获取 Bot 信息
最新更新:2023-11-02

获取 Bot 的基本信息。

请求方式

GET

调用地址

https://api.gptbots.ai/v1/bot/detail

调用验证

详情参见 API 概述的鉴权方式说明。

请求

请求示例

curl -X GET 'https://api.gptbots.ai/v1/bot/detail?' \ -H 'Authorization: Bearer your_apikey' \ -H 'Content-Type: application/json'
          curl -X GET 'https://api.gptbots.ai/v1/bot/detail?' \ 
  -H 'Authorization: Bearer your_apikey' \ 
  -H 'Content-Type: application/json'

        
此代码块在浮窗中显示

请求头

字段 类型 描述
Authorization Bearer ${token} 使用 Authorization: Bearer ${token}进行调用验证,请在 API 密钥页面获取密钥作为 token。
Content-Type application/json 数据类型,取值为 application/json。

请求体

无。

响应

响应示例

{ "bot_id": "645dd86606931c4a9e0ffb1e", "name": "对话应用", "logo": "https://res.theengagelab.com/ailab/images/default_avatar.png", "bot_type": "QuestionAnswer", "welcome_message": "用户首次使用 Bot 时的欢迎语", "introduction": "Bot 的简介", "tags": "Bot 的标签", "identity_prompt": "Bot 的身份提示", "ai_model": "ChatGPT", "ai_model_version": "3.5", "creativity_level": 0.3, "doc_correlation": 0.2, "irrelevant_questions": true, "question_limit": 100, "long_term_memory": true }
          {
  "bot_id": "645dd86606931c4a9e0ffb1e",
  "name": "对话应用",
  "logo": "https://res.theengagelab.com/ailab/images/default_avatar.png",
  "bot_type": "QuestionAnswer",
  "welcome_message": "用户首次使用 Bot 时的欢迎语",
  "introduction": "Bot 的简介",
  "tags": "Bot 的标签",
  "identity_prompt": "Bot 的身份提示",
  "ai_model": "ChatGPT",
  "ai_model_version": "3.5",
  "creativity_level": 0.3,
  "doc_correlation": 0.2,
  "irrelevant_questions": true,
  "question_limit": 100,
  "long_term_memory": true
}

        
此代码块在浮窗中显示

成功响应

字段 类型 描述
bot_id string Bot 的 ID 标识。
name string Bot 名称。
logo string Bot 的头像。
bot_type string Bot 类型,取值:QuestionAnswer、Flow。
welcome_message string 用户首次使用 Bot 时的欢迎语。
introduction string Bot 的简介。
tags array Bot 的标签。
identity_prompt string Bot 的身份提示。
ai_model string AI 模型,取值:ChatGPT。
ai_model_version string AI 模型的版本。
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 错误详情。

错误码

Code Message
40127 开发者鉴权失败
20059 Bot 已删除