對話 Widget
取得特定 Web Chat
參數
參數名稱
必填
類型
說明
程式碼範例
# 呼叫 API 示例 (Shell)
curl -X GET "https://api.maiagent.ai/api/web-chats/550e8400-e29b-41d4-a716-446655440000/" \
-H "Authorization: Api-Key YOUR_API_KEY"
# 請確認在執行前替換 YOUR_API_KEY 並核對請求資料。const axios = require('axios');
// 設定請求標頭
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY'
}
};
axios.get("https://api.maiagent.ai/api/web-chats/550e8400-e29b-41d4-a716-446655440000/", config)
.then(response => {
console.log('成功取得回應:');
console.log(response.data);
})
.catch(error => {
console.error('請求發生錯誤:');
console.error(error.response?.data || error.message);
});回應內容
{
"id": string (uuid)
"name": string
"avatar"?: string (uri) // 非必填
"logo"?: string (uri) // 非必填
"description"?: string // 非必填
"cover"?: string (uri) // 非必填
"backUrl"?: string // 非必填
"isActive"?: boolean // 非必填
"enableSpeech": boolean
"displayGreeting": string
"displayConversationStarters": [
string
]
"theme": {
{
"primaryColor"?: string // 非必填
"navbarTextColor"?: string // 非必填
"conversationBackgroundColor"?: string // 非必填
"chatbotMessageTextColor"?: string // 非必填
"userMessageTextColor"?: string // 非必填
"chatbotMessageBackgroundColor"?: string // 非必填
"userMessageBackgroundColor"?: string // 非必填
"chatbotMessageBackgroundShadowEnabled"?: boolean // 非必填
"userMessageBackgroundShadowEnabled"?: boolean // 非必填
}
}
"darkTheme": {
{
"primaryColor"?: string // 非必填
"navbarTextColor"?: string // 非必填
"conversationBackgroundColor"?: string // 非必填
"chatbotMessageTextColor"?: string // 非必填
"userMessageTextColor"?: string // 非必填
"chatbotMessageBackgroundColor"?: string // 非必填
"userMessageBackgroundColor"?: string // 非必填
"chatbotMessageBackgroundShadowEnabled"?: boolean // 非必填
"userMessageBackgroundShadowEnabled"?: boolean // 非必填
}
}
"enableFileUpload"?: boolean // 非必填
"enableDisplayCitations"?: boolean // 非必填
"enableDisplayToolResults"?: boolean // 非必填
"enableShareConversation"?: boolean // 非必填
"enableLocation"?: boolean // 非必填
"enableShowPoweredBy"?: boolean // 非必填
"poweredByLogo"?: string (uri) // 非必填
"enableAnonymous"?: boolean // 非必填
"enableDisplayPreviousConversation"?: boolean // 非必填
"enableDisplayConversationHistory"?: boolean // 非必填
"enableConversationTimer"?: boolean // 非必填
"conversationTimerDuration"?: integer // 計時器逾時時長,範圍 3-60 分鐘 (非必填)
"enableAutoNewConversationOnTimeout"?: boolean // 非必填
"accessType":
{
}
"enableThemeModeToggle"?: boolean // 非必填
"enableDisplayFontSizeSwitch"?: boolean // 非必填
"defaultThemeMode"?: // 非必填
{
}
"enableDownloadCitations"?: boolean // 非必填
"customDomain"?: // 非必填
{
"id": string (uuid)
"domain": string
"status":
{
}
}
"enableDisplayChatbotAvatar"?: boolean // 非必填
"enableDisplayChatbotName"?: boolean // 非必填
"inbox": object
}獲取 LLM 使用統計
參數
參數名稱
必填
類型
說明
程式碼範例
回應內容
取得 AI 助理統計數據
參數
參數名稱
必填
類型
說明
程式碼範例
回應內容
啟用或停用特定 AI 助理的評估功能
參數
參數名稱
必填
類型
說明
請求內容
欄位
類型
必填
說明
程式碼範例
回應內容
Last updated
Was this helpful?
