獲取代理資訊
獲取代理資訊
獲取代理的基本資訊。
請求方法
GET
請求 URL
https://api-${endpoint}.gptbots.ai/v1/bot/detail
請求身份驗證
請參閱概述以瞭解詳細的身份驗證資訊。
請求
請求範例
curl -X GET 'https://api-${endpoint}.gptbots.ai/v1/bot/detail' \
-H 'Authorization: Bearer ${API Key}'
curl -X GET 'https://api-${endpoint}.gptbots.ai/v1/bot/detail' \
-H 'Authorization: Bearer ${API Key}'
此代碼塊在浮窗中顯示
請求標頭
| 欄位 | 類型 | 描述 |
|---|---|---|
| Authorization | Bearer ${API Key} | 使用 Authorization: Bearer ${API Key} 進行身份驗證。API 金鑰 (API Key) 可從 API Key 頁面獲取。 |
請求參數
無。
回應
回應範例
{
"bot_id": "645dd86606931c4a9e0ffb1e",
"name": "Conversational App",
"logo": "https://res.gptbots.ai/ailab/images/default_avatar.png",
"bot_type": "QuestionAnswer",
"welcome_message": "首次使用代理時的歡迎訊息",
"introduction": "代理的介紹",
"tags": "代理的標籤",
"identity_prompt": "代理的身份提示訊息",
"creativity_level": 0.3,
"doc_correlation": 0.2,
"irrelevant_questions": true,
"question_limit": 100,
"long_term_memory": true
}
{
"bot_id": "645dd86606931c4a9e0ffb1e",
"name": "Conversational App",
"logo": "https://res.gptbots.ai/ailab/images/default_avatar.png",
"bot_type": "QuestionAnswer",
"welcome_message": "首次使用代理時的歡迎訊息",
"introduction": "代理的介紹",
"tags": "代理的標籤",
"identity_prompt": "代理的身份提示訊息",
"creativity_level": 0.3,
"doc_correlation": 0.2,
"irrelevant_questions": true,
"question_limit": 100,
"long_term_memory": true
}
此代碼塊在浮窗中顯示
成功回應
| 欄位 | 類型 | 描述 |
|---|---|---|
| bot_id | string | 代理 ID。 |
| name | string | 代理名稱。 |
| logo | string | 代理的圖示。 |
| bot_type | string | 代理類型,值為:QuestionAnswer、Flow。 |
| welcome_message | string | 首次使用代理時的歡迎訊息。 |
| introduction | string | 代理的介紹。 |
| tags | array | 代理的標籤。 |
| identity_prompt | string | 代理的身份提示訊息。 |
| creativity_level | float | 創造力等級,值範圍:0-1。 |
| doc_correlation | float | 文件相關性,值範圍:0-1。 |
| irrelevant_questions | boolean | 是否回答與資料集無關的問題。值:true、false。 |
| question_limit | int | 使用者問題的 Token (令牌) 長度限制。 |
| long_term_memory | boolean | 是否啟用長期記憶功能。 |
失敗回應
| 欄位 | 類型 | 描述 |
|---|---|---|
| code | int | 錯誤代碼。 |
| message | string | 錯誤詳細資訊。 |
錯誤代碼
| 代碼 | 訊息 |
|---|---|
| 40127 | 開發者身份驗證失敗 |
| 20059 | 代理已刪除 |
