Skip to main content

cameo_botrun_prompt_tools

Project description

cameo_botrun_prompt_tools

這個套件提供了一系列工具,方便使用者產生與波特人相關的提示詞。

安裝

使用 pip 安裝套件:

pip install cameo_botrun_prompt_tools

使用範例

print_button() 和 print_link() 函式

print_button()print_link() 函式可以用來生成含有@begin @end的按鈕和連結文字。

from cameo_botrun_prompt_tools import print_button, print_link

print_button("點擊我", "這是一個按鈕")
print_link("https://www.example.com", "訪問範例網站")

# 上面程式會輸出以下文字
# @begin button("點擊我") 這是一個按鈕 @end
# @begin link("https://www.example.com") 訪問範例網站 @end

format_info_for_readability() 函式

format_info_for_readability()函式可以藉由LLM將複雜資訊(例如API回傳的資訊)整理成方便人類閱讀的格式輸出。

from cameo_botrun_prompt_tools import format_info_for_readability

formatted_info = format_info_for_readability(
    info, prompt="請將以下資訊整理成方便人類閱讀的格式輸出:\n",
    model="gpt-4o-mini"
)
print(formatted_info)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cameo_botrun_prompt_tools-1.0.3.tar.gz (2.5 kB view details)

Uploaded Source

File details

Details for the file cameo_botrun_prompt_tools-1.0.3.tar.gz.

File metadata

File hashes

Hashes for cameo_botrun_prompt_tools-1.0.3.tar.gz
Algorithm Hash digest
SHA256 6e2f984f9c5788a5ad572269e12378b7ec402a0d10001fbfa2888a5e207530e2
MD5 9578866ff412fe4c38fd5649a1f7795e
BLAKE2b-256 fb7b05161afc02f0858f2924451717f2c12be027f8b64e1dc4d58e037ee1bda9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page