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.4.tar.gz (2.6 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for cameo_botrun_prompt_tools-1.0.4.tar.gz
Algorithm Hash digest
SHA256 102a16eb113c4321d312dda28c2231e7a9cdaf3adcbdec86fdbf4aff68a38f93
MD5 de4d3ad838f9a6db0180a2dd4c82d0dc
BLAKE2b-256 846147ce85231e3543e50d5a8fef566ed4c63570d824b2429fa5892aee88eccd

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