コンテンツにスキップ

Knowledge Base は AI Agent の専門知識の中核です。これらのエンドポイントで設定の管理と再トレーニングのトリガーができます。

Knowledge Base は AI Agent の専門知識の中核です。AI が質問に回答する際に使用するすべての情報が含まれます。これらのエンドポイントを使うと、Knowledge Base の設定を管理し、コンテンツ変更後に再トレーニングをトリガーできます。

Knowledge Base は、作成したり、ウェブサイトからインポートしたり、ファイルとしてアップロードしたりした Articles を参照します。記事を変更した後は、その更新を会話に反映させるために Knowledge Base を 再トレーニング する必要があります。

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"],
"retrain_state": null
}
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
retrain_state
string or null
現在のトレーニング状況:null(最新、または未トレーニング)、"to_be_retrained""in_progress""up_to_date"、または "failed"
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 と同じスキーマ)。

Knowledge Base の非同期な再トレーニングをトリガーします。

Scope: write_all

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

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

Response 202 Accepted