Issue Obtaining Agent Schema
还没有人认领这个 Issue。
评估
调研方向
从 issue 中所示的 glean.client.agents.retrieve(agent_id="") 调用开始,并将其返回的模型与文档中的响应以及 curl 响应进行比较。检查 input_schema 和 output_schema 在 Python client 中的表示方式。当 client response 准确暴露 endpoint 返回的 agent schema,并覆盖所报告的 response shape 时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
When using this python block to obtain an agent's schema as hosted on the docs:
from glean.api_client import Glean
import os
with Glean(
api_token=os.getenv("GLEAN_API_TOKEN", ""),
server_url="https://mycompany-be.glean.com",
) as glean:
res = glean.client.agents.retrieve(agent_id="<id>")
# Handle response
print(res)
This gives me this current output:
agent_id='3fc1d69087e84a.....' input_schema=InputSchema() output_schema=OutputSchema()
Which does not match for the list of an agents schema example response:
{
"agent_id": "mho4lwzylcozgoc2",
"name": "HR Policy Agent",
"input_schema": {},
"output_schema": {},
"tools": [
{
"tool_id": "string",
"display_name": "string",
"type": "string",
"auth_type": "string",
"write_action_type": "string",
"is_setup_finished": true,
"data_source": "string"
}
]
}
This is the response I receive when curling:
{"agent_id":"c491df2fb3........","name":"[Sales] UMF Advisor","input_schema":{},"output_schema":{"$defs":{"ContentType":{"description":"The type of content block.","enum":["text"],"type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"messages":{"items":{"properties":{"content":{"description":"The content of the message.","items":{"properties":{"text":{"type":"string"},"type":{"$ref":"#/$defs/ContentType"}},"required":["text","type"],"title":"MessageTextBlock","type":"object"},"title":"Content","type":"array"},"role":{"description":"The role of the message.","title":"Role","type":"string"}},"title":"Message","type":"object"},"type":"array"}},"required":["messages"],"title":"AgentResponse","type":"object"}}
I understand that these api endpoints are in beta, but is there any communication about updates regarding this endpoint or the other ones regarding agents?
Thank you.
- 主要语言
- Python
- 星标
- 20
- 派生
- 10
- 平均合并
- 1 天 6 小时
- 30 天内合并 PR
- 17
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
gleanwork/api-client-python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
gleanwork/api-client-python#136 ·
-
难度 3/5 1-2 天 新手友好度 55/100
gleanwork/api-client-python#133 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 42/100
gleanwork/api-client-python#115 · 4 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 45/100
gleanwork/api-client-python#105 · 2 条评论 ·
-
难度 4/5 3-5 天 新手友好度 25/100
gleanwork/api-client-python#57 · 2 条评论 ·
查看 gleanwork/api-client-python 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
-
难度 2/5 1-3 小时 新手友好度 88/100
use-agent-os/agent-os#3314 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
BasedHardware/omi#15662 · 1 条评论 ·
-
documentation help wanted
难度 2/5 1-3 小时 新手友好度 90/100
-
难度 2/5 1-3 小时 新手友好度 62/100
AiursoftWeb/AnduinOS-2#19 ·