Issue Obtaining Agent Schema
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Inizia dalla chiamata glean.client.agents.retrieve(agent_id="") mostrata nell’issue e confronta i modelli restituiti con le risposte documentate e quelle di curl. Verifica come vengono rappresentati input_schema e output_schema nel client Python. Il lavoro è completato quando la risposta del client espone correttamente lo schema dell’agente restituito dall’endpoint e include la copertura per la struttura della risposta segnalata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 20
- Fork
- 10
- Merge medio
- 1g 6h
- PR unite (30g)
- 17
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di gleanwork/api-client-python
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
gleanwork/api-client-python#136 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
gleanwork/api-client-python#133 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
gleanwork/api-client-python#115 · 4 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
gleanwork/api-client-python#105 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
gleanwork/api-client-python#57 · 2 commenti ·
Tutte le issue di gleanwork/api-client-python
Issue simili
-
link-check link-check:sphinx-theme
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
OpenHands/extensions#626 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
CSCfi/sd-search-api#39 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100