Responses conversion drops nested SDK tool-call history payloads

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

Maintainer thường phản hồi trong vòng 1 ngày

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

  • #5456 của @dajiaohuang — đã đóng, không merge
  • #5470 của @dajiaohuang — đã đóng, không merge

Đánh giá

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

Hướng nghiên cứu

Start with the Responses history conversion builder, which reads name and arguments from the outer object for SDK ChatCompletionMessageToolCall calls instead of the nested function attribute. Reproduce through LLM.get_response with chat_history and stream=False using a fake Responses boundary. Done when the function_call item keeps the name and arguments, flat-object and dictionary inputs still work, and the two failing regressions pass. Check the closed, unmerged PRs #5456 and #5470 first to see why they did not land.

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

Mô tả

On main bb470c786b63a6a8d5e5f3abcfc6080f1a8832f1, Responses history conversion loses the function payload from OpenAI ChatCompletionMessageToolCall objects nested in assistant-message tool_calls.

For a call with id call_1, function name lookup and arguments {"key":"value"}, the resulting function_call item retains the ID but contains name="" and arguments="{}". The same call serialized with model_dump() preserves both fields. This also reproduces through public LLM.get_response(..., chat_history=..., stream=False) with a fake Responses boundary.

The builder reads the nested function for dictionary calls but reads name/arguments directly from the outer object for SDK calls. It should select the nested function attribute while retaining flat-object and dictionary compatibility.

Five regressions on unchanged main: two fail, three controls pass. No live provider request was run; this proves request construction rather than provider acceptance.

Ngôn ngữ chính
Python
Star
9.3k
Fork
1.5k
Merge trung bình
1 ngày 5 giờ
Pull request đã merge (30 ngày)
520

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 MervinPraison/PraisonAI

Tất cả issue của MervinPraison/PraisonAI

Issue tương tự

Thêm issue về 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.