Knowledge Base は AI Agent の専門知識の中核です。AI が質問に回答する際に使用するすべての情報が含まれます。これらのエンドポイントを使うと、Knowledge Base の設定を管理し、コンテンツ変更後に再トレーニングをトリガーできます。
Knowledge Base は、作成したり、ウェブサイトからインポートしたり、ファイルとしてアップロードしたりした Articles を参照します。記事を変更した後は、その更新を会話に反映させるために Knowledge Base を 再トレーニング する必要があります。
Get Settings
Section titled “Get Settings”Knowledge Base の設定を取得します。
Scope: read_allGET https://app.quickchat.ai/v1/api/knowledge_base/
curl https://app.quickchat.ai/v1/api/knowledge_base/ \ -H 'Authorization: Bearer <API_TOKEN>'import requests
response = requests.get( url="https://app.quickchat.ai/v1/api/knowledge_base/", headers={"Authorization": "Bearer <API_TOKEN>"},)data = response.json()Response 200 OK
{ "one_word_description": "Support Agent", "short_description": "A helpful customer support assistant.", "ai_commands": ["Be polite", "Stay on topic"], "retrain_state": null}| Field | Description |
|---|---|
one_word_description string | AI Agent 名。Dashboard: Identity > Profile > AI Agent Name |
short_description string | システムプロンプト / AI Agent の説明。Dashboard: Identity > Profile > AI Agent Description |
ai_commands array of strings | 行動ガイドライン。Dashboard: Identity > Conversation Style > AI Guidelines |
retrain_state string or null | 現在のトレーニング状況:null(最新、または未トレーニング)、"to_be_retrained"、"in_progress"、"up_to_date"、または "failed" |
Update Settings
Section titled “Update Settings”PATCH https://app.quickchat.ai/v1/api/knowledge_base/
Request Body
| Parameter | Description |
|---|---|
one_word_description string | AI Agent 名 |
short_description string | システムプロンプト / AI Agent の説明 |
ai_commands array of strings | AI Guidelines |
curl -X PATCH https://app.quickchat.ai/v1/api/knowledge_base/ \ -H 'Authorization: Bearer <API_TOKEN>' \ -H 'Content-Type: application/json' \ -d '{ "one_word_description": "Sales Bot"}'import requests
response = requests.patch( url="https://app.quickchat.ai/v1/api/knowledge_base/", headers={"Authorization": "Bearer <API_TOKEN>"}, json={"one_word_description": "Sales Bot"},)data = response.json()Response 200 OK — 更新された Knowledge Base 設定を返します(Get Settings と同じスキーマ)。
Retrain Knowledge Base
Section titled “Retrain Knowledge Base”Knowledge Base の非同期な再トレーニングをトリガーします。
Scope: write_allPOST https://app.quickchat.ai/v1/api/knowledge_base/retrain/
curl -X POST https://app.quickchat.ai/v1/api/knowledge_base/retrain/ \ -H 'Authorization: Bearer <API_TOKEN>'import requests
response = requests.post( url="https://app.quickchat.ai/v1/api/knowledge_base/retrain/", headers={"Authorization": "Bearer <API_TOKEN>"},)Response 202 Accepted