brackets-curlyManaging Assistants & Threads

概述

Threads (线程) 和 Messages (消息) 表示 Assistant 与用户之间的对话会话。您可以在 Thread 中存储的消息数量没有限制。当 Messages 的大小超过模型的上下文窗口时,Thread 将在完全删除最不重要的消息之前巧妙地截断消息。

API 参考

删除助手。

delete

删除助手,将其从系统中删除。

路径参数
assistantIdstring必填
响应
chevron-right
200成功
application/json
delete
/assistants/{assistantId}
200成功

创建新助手。

post

创建新的 AI 助手,将其配置为根据预定义的模型和设置执行任务。

请求体
namestring必填
descriptionstring必填
modelstring必填
instructionsstring可选
metadataobject可选
响应
post
/assistants
201成功

列出全部可用的模型

get

返回一个可用的AI助手列表,使用户可以查看和管理他们的虚拟助手。

查询参数
limitnumber可选
orderstring可选
beforestring可选
afterstring可选
响应
chevron-right
200成功
application/json
get
/assistants
200成功

获取特定助理的详细信息。

get

检索有关特定助手的信息,包括其当前配置和状态。

路径参数
assistantIdstring必填
响应
chevron-right
200成功
application/json
get
/assistants/{assistantId}
200成功

更新助手的设置。

post

更新现有助手的配置或设置。

路径参数
assistantIdstring必填
请求体
namestring可选
descriptionstring可选
modelstring可选
instructionsstring可选
metadataobject可选
响应
chevron-right
200成功
application/json
post
/assistants/{assistantId}
200成功

最后更新于