Issue Obtaining Agent Schema

Đang mở
#137 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python
Lĩnh vực
api

Hướng nghiên cứu

Bắt đầu từ lệnh gọi glean.client.agents.retrieve(agent_id="") được nêu trong issue và so sánh các model được trả về với các response được ghi lại trong tài liệu và các response của curl. Kiểm tra cách input_schema và output_schema được biểu diễn trong Python client. Được xem là hoàn tất khi response của client hiển thị chính xác agent schema do endpoint trả về và có coverage cho response shape đã được báo cáo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
20
Fork
10
Merge trung bình
1 ngày 6 giờ
Pull request đã merge (30 ngày)
17

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của gleanwork/api-client-python

Tất cả issue của gleanwork/api-client-python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.