你可能用過 LINE 的聊天機器人,或是網站上的客服機器人——那些通常只會回答固定的問題,換個說法就不懂了。
kiro-discord-bot 不是那種機器人。
| { | |
| "name": "Telegram AI Chat Bot", | |
| "nodes": [ | |
| { | |
| "parameters": { | |
| "promptType": "define", | |
| "text": "=幫我根據下方使用者提供的內容,拆分成一個純 JSON 輸出的格式,包含兩個欄位: 1. prompt: 表示一個整理過指示\n2. link: 如果該內容有附帶一個網址,將此網址整理至這欄位存放,如果沒有就空值。\n\n要注意,除了 JSON 格式的內容外,其他輸出完全不必要。\n\n然後幫我根據 prompt 的指示,選定一個 tool 工具執行。\n====== USER CONTENT START =====\n{{ $json.message.text }}\n===== USER CONTENT END =====", | |
| "hasOutputParser": true, | |
| "options": {} | |
| }, |
| <?php | |
| // 從 https://www.npmjs.com/package/oauth-1.0a 這邊改寫過來用 | |
| class OAuth { | |
| private $consumer; | |
| private $nonce_length; | |
| private $version; | |
| private $parameter_seperator; | |
| private $realm; | |
| private $last_ampersand; | |
| private $signature_method; |
| <?php | |
| /* | |
| Plugin Name: 三竹簡訊 Webhook | |
| Plugin URI: https://gist.github.com/nczz/750c3d8d18b9e0ca07ca06a248c11570 | |
| Description: 接收 Webhook 請求發送簡訊 | |
| Author: Chun | |
| Version: 1.0 | |
| Author URI: https://www.mxp.tw/ | |
| */ |
| <?php | |
| //設定系統環境,確保輸出執行環境無礙 | |
| set_time_limit(0); | |
| ini_set('memory_limit', '256M'); | |
| //判斷執行權限 | |
| //建立資料庫連線,開始取得資料 | |
| //撰寫資料庫欄位與可讀性資料的轉換方法 |
| <?php | |
| /** | |
| * This little class records how long it takes each WordPress action or filter | |
| * to execute which gives a good indicator of what hooks are being slow. | |
| * You can then debug those hooks to see what hooked functions are causing problems. | |
| * | |
| * This class does NOT time the core WordPress code that is being run between hooks. | |
| * You could use similar code to this that doesn't have an end processor to do that. | |
| * |
| <?php | |
| //修正管理後台頁尾顯示 | |
| function dashboard_footer_design() { | |
| echo 'Design by <a href="https://www.mxp.tw">Mxp</a>'; | |
| } | |
| add_filter('admin_footer_text', 'dashboard_footer_design'); | |
| //修正管理後台頁尾顯示 | |
| function dashboard_footer_developer() { | |
| echo '<br/><span id="footer-thankyou">Developed by <a href="http://www.mxp.tw">Mxp</a></span>'; |