知識庫(舊版)
取得 AI 助理的知識庫檔案列表
GET /api/v1/chatbots/{id}/knowledge-bases-files/
參數
id
✅
string
createdByMember
❌
string
建立者篩選:本組織成員 id(成員名冊回傳的 id,含已停用成員),只回該成員建立的 AI 助理
largeLanguageModel
❌
string
page
❌
integer
A page number within the paginated result set.
pageSize
❌
integer
Number of results to return per page.
query
❌
string
replyMode
❌
string
source
❌
string
`self_built`: self_built ; `built_in`: built_in ; `all`: all;
程式碼範例
# 呼叫 API 示例 (Shell)
curl -X GET "https://api.maiagent.ai/api/v1/chatbots/550e8400-e29b-41d4-a716-446655440000/knowledge-bases-files/?createdByMember=550e8400-e29b-41d4-a716-446655440000&largeLanguageModel=550e8400-e29b-41d4-a716-446655440000&page=1&pageSize=1&query=example&replyMode=example&source=all" \
-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/v1/chatbots/550e8400-e29b-41d4-a716-446655440000/knowledge-bases-files/?createdByMember=550e8400-e29b-41d4-a716-446655440000&largeLanguageModel=550e8400-e29b-41d4-a716-446655440000&page=1&pageSize=1&query=example&replyMode=example&source=all", config)
.then(response => {
console.log('成功取得回應:');
console.log(response.data);
})
.catch(error => {
console.error('請求發生錯誤:');
console.error(error.response?.data || error.message);
});回應內容
狀態碼: 200
回應結構範例
回應範例值
取得 AI 助理的知識庫 FAQ 列表
GET /api/v1/chatbots/{id}/knowledge-bases-faqs/
參數
id
✅
string
createdByMember
❌
string
建立者篩選:本組織成員 id(成員名冊回傳的 id,含已停用成員),只回該成員建立的 AI 助理
largeLanguageModel
❌
string
page
❌
integer
A page number within the paginated result set.
pageSize
❌
integer
Number of results to return per page.
query
❌
string
replyMode
❌
string
source
❌
string
`self_built`: self_built ; `built_in`: built_in ; `all`: all;
程式碼範例
回應內容
狀態碼: 200
回應結構範例
回應範例值
取得 AI 助理的所有檔案的文本節點
GET /api/v1/chatbot-text-nodes/
參數
chatbotFile
❌
string
【將棄用】Chatbot 檔案 ID(請使用 knowledge_base_file)
knowledgeBaseFile
❌
string
知識庫檔案 ID(建議使用)
page
❌
integer
A page number within the paginated result set.
pageSize
❌
integer
Number of results to return per page.
程式碼範例
回應內容
狀態碼: 200
回應結構範例
回應範例值
狀態碼: 403 - 無權讀取此檔案的文本節點:知識庫檔案需要 chatbot_knowledge_base_access 且群組已授權該知識庫;對話附件需要該助理的 chatbot_chatbot_access;收件匣檔案需要群組已授權該收件匣
狀態碼: 404 - 知識庫檔案不存在,或不屬於目前組織
取得 AI 助理的特定檔案的文本節點
GET /api/v1/chatbot-text-nodes/{id}/
參數
id
✅
string
A UUID string identifying this ChatbotTextNode.
程式碼範例
回應內容
狀態碼: 200
回應結構範例
回應範例值
搜尋測試
POST /api/v1/chatbots/{id}/search/
參數
id
✅
string
createdByMember
❌
string
建立者篩選:本組織成員 id(成員名冊回傳的 id,含已停用成員),只回該成員建立的 AI 助理
largeLanguageModel
❌
string
page
❌
integer
A page number within the paginated result set.
pageSize
❌
integer
Number of results to return per page.
query
❌
string
replyMode
❌
string
source
❌
string
`self_built`: self_built ; `built_in`: built_in ; `all`: all;
請求內容
請求參數
queryMetadata
object
否
Not supported for chatbot-wide search; providing a value returns 400.
請求結構範例
請求範例值
程式碼範例
回應內容
狀態碼: 200
回應結構範例
回應範例值
列出檔案類型支援的解析器
GET /api/v1/parsers/supported-file-types/
參數
knowledgeBaseId
❌
string
Knowledge base ID. When provided and the knowledge base does not support multimodal embeddings, image file types will be filtered out.
程式碼範例
回應內容
狀態碼: 200
回應結構範例
回應範例值
最後更新於
這有幫助嗎?