コンテンツにスキップ

Knowledge Base は AI Agent の専門知識の中核です。これらのエンドポイントで設定の管理とコンテンツの処理状況の確認ができます。

Knowledge Base は AI Agent の専門知識の中核です。AI が質問に回答する際に使用するすべての情報が含まれます。これらのエンドポイントを使うと、Knowledge Base の設定を管理し、そのコンテンツの処理状況を追跡できます。

Knowledge Base は、作成したり、ウェブサイトからインポートしたり、ファイルとしてアップロードしたりした Articles を参照します。再トレーニングのステップはありません。作成・更新・削除した記事はすべてバックグラウンドで自動的に処理され、完了した時点で会話に反映されます。

Knowledge Base の設定を取得します。

Scope: read_all

GET https://app.quickchat.ai/v1/api/knowledge_base/

Terminal window
curl https://app.quickchat.ai/v1/api/knowledge_base/ \
-H 'Authorization: Bearer <API_TOKEN>'

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
}
FieldDescription
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 で再試行できます
Scope: write_all

PATCH https://app.quickchat.ai/v1/api/knowledge_base/

Request Body

ParameterDescription
one_word_description
string
AI Agent 名
short_description
string
システムプロンプト / AI Agent の説明
ai_commands
array of strings
AI Guidelines
Terminal window
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"
}'

Response 200 OK — 更新された Knowledge Base 設定を返します(Get Settings と同じスキーマ)。

処理に失敗したすべての記事を再処理します。すでに反映済みの記事や処理中の記事はそのまま維持され、このリクエストは何度呼び出しても安全です。

失敗した記事は自動でも再試行されるため、このエンドポイントはそれを待ちたくない場合にのみ必要です。

Scope: write_all

POST https://app.quickchat.ai/v1/api/knowledge_base/retry_failed_embeds

Terminal window
curl -X POST https://app.quickchat.ai/v1/api/knowledge_base/retry_failed_embeds \
-H 'Authorization: Bearer <API_TOKEN>'

Response 200 OK

{
"retried": 2
}
FieldDescription
retried
integer
再処理のためにキューに入れられた、失敗記事の件数

Retrain Knowledge Base Deprecated

Section titled “Retrain Knowledge Base ”

POST https://app.quickchat.ai/v1/api/knowledge_base/retrain/

再トレーニングという仕組みはなくなりました。記事の変更は自動的に処理されます。このエンドポイントは既存の連携が動作し続けるようにするためだけに残されており、リクエストを受け付けて何もせずに 200 OK を返します。

連携からこの呼び出しは削除して構いません。再トレーニングの完了までポーリングしていた場合は、代わりに Get Settingspending_embed_count0 になるのを待ってください。