gleanwork / gleanwork/api-client-python
Issue Obtaining Agent Schema
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- Python
- Estrelas
- 20
- Forks
- 10
- Merge médio
- 1d 6h
- PRs com merge (30d)
- 17
Descrição
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.
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Comece pela chamada glean.client.agents.retrieve(agent_id="") mostrada na issue e compare os modelos retornados com as respostas documentadas e as respostas do curl. Verifique como input_schema e output_schema são representados no cliente Python. A tarefa estará concluída quando a resposta do cliente expuser corretamente o esquema do agente retornado pelo endpoint e houver cobertura para o formato de resposta relatado.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- python
- Domínio
- api
- Tipo de issue
- Bug
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Pouca atividade
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 45/100