Knowledge Base は AI Agent の専門知識の中核です。AI が質問に回答する際に使用するすべての情報が含まれます。これらのエンドポイントを使うと、Knowledge Base の設定を管理し、そのコンテンツの処理状況を追跡できます。
Knowledge Base は、作成したり、ウェブサイトからインポートしたり、ファイルとしてアップロードしたりした Articles を参照します。再トレーニングのステップはありません。作成・更新・削除した記事はすべてバックグラウンドで自動的に処理され、完了した時点で会話に反映されます。
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"], "pending_embed_count": 0, "failed_embed_count": 0}| 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 |
pending_embed_count integer | 処理中の記事の件数。0 であれば、送信した内容がすべて反映されています |
failed_embed_count integer | 処理に失敗した記事の件数。Retry Failed Articles で再試行できます |
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 と同じスキーマ)。
Retry Failed Articles
Section titled “Retry Failed Articles”処理に失敗したすべての記事を再処理します。すでに反映済みの記事や処理中の記事はそのまま維持され、このリクエストは何度呼び出しても安全です。
失敗した記事は自動でも再試行されるため、このエンドポイントはそれを待ちたくない場合にのみ必要です。
Scope: write_allPOST https://app.quickchat.ai/v1/api/knowledge_base/retry_failed_embeds
curl -X POST https://app.quickchat.ai/v1/api/knowledge_base/retry_failed_embeds \ -H 'Authorization: Bearer <API_TOKEN>'import requests
response = requests.post( url="https://app.quickchat.ai/v1/api/knowledge_base/retry_failed_embeds", headers={"Authorization": "Bearer <API_TOKEN>"},)Response 200 OK
{ "retried": 2}| Field | Description |
|---|---|
retried integer | 再処理のためにキューに入れられた、失敗記事の件数 |
Retrain Knowledge Base Deprecated
Section titled “Retrain Knowledge Base ”POST https://app.quickchat.ai/v1/api/knowledge_base/retrain/
再トレーニングという仕組みはなくなりました。記事の変更は自動的に処理されます。このエンドポイントは既存の連携が動作し続けるようにするためだけに残されており、リクエストを受け付けて何もせずに 200 OK を返します。
連携からこの呼び出しは削除して構いません。再トレーニングの完了までポーリングしていた場合は、代わりに Get Settings の pending_embed_count が 0 になるのを待ってください。