PATCH
/
agent
/
{uuid}
/
embed
curl --request PATCH \
  --url https://geekai.co/api/v1/agent/{uuid}/embed \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'embed_files=[
  "/E:/文档/待训练文件.pdf"
]'
{
  "message": "文件上传成功,正在处理中",
  "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 请求响应示例

Authorizations

Authorization
string
header
required

JWT认证token

Path Parameters

uuid
string
required

资源唯一标识符

Body

multipart/form-data
embed_files
file[]
required

本地训练文件路径(支持批量上传)

Example:
["/E:/文档/待训练文件.pdf"]

Response

200
application/json
成功响应
message
string
required

响应消息

Example:

"文件上传成功,正在处理中"

data
object
required