跳转到主要内容
PATCH
/
agent
/
{uuid}
/
embed
Embed Agent Knowledge
curl --request PATCH \
  --url https://geekai.dev/api/v1/agent/{uuid}/embed \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form embed_files=/E:/Documents/file.pdf \
  --form embed_files.items='@example-file'
{
  "message": "File uploaded successfully, processing in progress.",
  "data": {
    "task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "status": "pending",
    "progress": 50
  }
}
你可以通过智能体训练接口向指定智能体添加训练文件(支持批量上传)进行智能体训练。 响应数据和创建智能体一样,略。

cURL 请求示例

curl --location --request PATCH 'https://geekai.co/api/v1/agent/be9062c1-68d5-48ee-b74e-fab6d864bc29/embed' \
--header 'Authorization: Bearer {YOUR_GEEKAI_API_KEY}' \
--form 'embed_files=@"/E:/文档/极客智坊/训练文件1.txt"' \
--form 'embed_files=@"/E:/文档/极客智坊/训练文件2.txt"' \
--form 'embed_files=@"/E:/文档/极客智坊/训练文件3.txt"'

Postman 请求响应示例

训练智能体

授权

Authorization
string
header
必填

token

路径参数

uuid
string<uuid>
必填

uuid

请求体

multipart/form-data
embed_files
file[]
必填

local training files

示例:
["/E:/Documents/file.pdf"]

响应

successful response

message
string
必填

response message

示例:

"File uploaded successfully, processing in progress."

data
object
必填