获取聊天机器人
GET
/api/v0/chatbots/{chatbotId}请求参数
Path 参数
chatbotId
string
必需
聊天机器人的 ID
Header 参数
Authorization
string
必需
示例值:
Bearer <token>
示例代码
返回响应
成功(200)
请求有误(400)
没有权限(401)
禁止访问(403)
请求有误(405)
服务器错误(500)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
success
boolean
必需
指示这是成功响应还是错误响应
message
string
必需
有关所执行操作的总体消息
data
object
从服务器返回的数据
chatbot
object
聊天机器人
示例
成功示例
{
"success": true,
"message": "Fetched the chatbot successfully",
"data": {
"chatbot": {
"id": "365062873485935184",
"title": "My Bot",
"description": "This is a test chatbot",
"createdById": "360596271623307865",
"createdByEmail": "saidheeraj.kumar04@gmail.com",
"suggestions": [
{
"id": "538aa9ca-ef69-4a1a-a6a2-ba1f62f05c43",
"title": "Contact us",
"description": "How to contact you?",
"link": "https://sitegpt.ai/contact-us"
},
{
"id": "40ffc3fe-9d74-439c-bfec-8b0d69a94836",
"title": "Yo",
"description": "Hey what's up?"
}
],
"nextSuggestions": [
{
"id": "dd6480d7-33da-4943-a5f5-24d7593ec62e",
"title": "Elaborate",
"link": "",
"description": "Explain this in layman language",
"isEscalationPrompt": false
}
],
"prompts": [
{
"id": "042686d9-b695-4dc5-aa11-58706284d45e",
"title": "Random",
"description": "Random prompt",
"instructions": "You should provide random information",
"temperature": 0.9
},
{
"id": "78ac8ecd-d889-4700-8c8c-162c92731ff9",
"title": "Factual",
"description": "Factual Prompt",
"instructions": "You should provide only facts",
"temperature": 0.1
}
],
"settings": {
"mode": "AGENT",
"tooltip": "Want to know anything about the porduct?",
"welcomeMessage": "Hello! How can I assist you today?",
"placeholderText": "Ask me anything...",
"brandColor": "#2563eb",
"hideSources": false,
"hideTooltip": false,
"hideWatermark": false,
"watermarkText": "Powered by SiteGPT",
"watermarkIconSrcId": "",
"watermarkLink": "https://sitegpt.ai",
"distanceFromBottom": 16,
"horizontalDistance": 16,
"fontSize": 14,
"iconSize": "SMALL",
"iconPosition": "RIGHT",
"height": 85,
"ctaLink": "",
"ctaText": "",
"iconSrcId": "",
"personIconSrcId": "",
"brandTextColor": "#FFFFFF",
"hideFeedbackButtons": false,
"rtl": false,
"agentIconSrcId": "",
"bubbleIconSrcId": "",
"localization": {
"learnMore": "Learn more",
"chatHome": {
"home": "Home",
"addDetails": "Add details",
"startConversation": "Start a conversation",
"starting": "Starting..."
},
"chatMessages": {
"messages": "Messages",
"noMessages": "No Messages",
"loginToSeeHistory": "Verify your email to save your conversation history.",
"historyShowsUpHere": "Your conversation history shows up here.",
"verifyEmail": "Verify your email",
"startConversation": "Start a conversation",
"starting": "Starting..."
},
"chatMessage": {
"botName": "Bot",
"yourName": "You",
"agentName": "Agent",
"escalationHeading": "Are you sure you want to escalate the chat to human support?",
"escalationSubHeading": "This conversation will be shared with the human support and they will get back to you as soon as they can.",
"yesContinue": "Yes, continue",
"cancel": "Cancel",
"conversationEscalated": "👨💼 Conversation changed to human mode"
},
"chatAccount": {
"account": "Account",
"verifyEmail": "Verify your email",
"loginToSeeHistory": "Verify your email to save your chat history.",
"emailLabel": "Email",
"nameLabel": "Name",
"phoneLabel": "Phone Number",
"sendingOtp": "Sending OTP...",
"verifyOtp": "Verify OTP",
"sentOtpToEmail": "We sent the OTP to your email address",
"otp": "OTP",
"verifyAndContinue": "Verify & Continue",
"notReceivedOtpYet": "Didn't receive OTP yet?",
"resend": "Resend",
"editDetails": "Edit Details",
"resetting": "Resetting...",
"verifying": "Verifying...",
"logout": "Logout",
"loggingOut": "Logging out...",
"verified": "Verified",
"edit": "Edit",
"update": "Update",
"updating": "Updating..."
}
},
"systemPrompt": "You are a funny AI assistant and you answer the user queries based on the website content. Include jokes in your answer.",
"userPrompt": "You are an AI assistant who answers user questions based on the website content. Answer the questions in the same language as the language of the question.",
"promptId": "78ac8ecd-d889-4700-8c8c-162c92731ff9",
"historyCount": 4,
"temperature": 1,
"topK": 3,
"gptModel": "gpt-3.5-turbo",
"collectUserDetails": "DO_NOT_COLLECT",
"collectUserData": {
"name": false,
"phone": false
},
"creativity": "conservative",
"webhookUrl": "https://example.com",
"webhookToken": "abc123",
"extraData": "",
"metadata": {
"key1": "value1"
}
},
"customContent": null
}
}
}
最后修改时间: 8 个月前