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
-
documentation help wanted
難度 2/5 1-3 小時 新手友好度 90/100
-
難度 2/5 1-3 小時 新手友好度 90/100
simonw/sqlite-utils#872 ·
-
難度 2/5 1-3 小時 新手友好度 88/100
-
難度 2/5 1-3 小時 新手友好度 82/100
-
難度 2/5 1-3 小時 新手友好度 78/100