Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[BUG] Go Ollama adapter does not send tool_name on tool result messages

Đang mở Phù hợp với người mới
#3,371 0 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

@mandipadk đang làm issue này rồi.

Từ ngày 28/10/2026.

  • #3422 của @mandipadk — đang mở

Đá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
68/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ệ
go
Lĩnh vực
ai, backend

Hướng nghiên cứu

Đọc go/adk/pkg/models/ollama_adk.go, đặc biệt là convertGenaiContentsToOllamaMessages, và so sánh cách xử lý phản hồi hàm với _convert_content_to_ollama_messages trong tệp tham chiếu Python. Thêm một bài kiểm thử cho phản hồi từ get_weather và get_time, xác nhận mỗi thông điệp công cụ mang tên hàm tương ứng; hoàn tất khi cả hai giá trị ToolName khớp với các tên đó.

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

Mô tả

Bug Description

The Go Ollama adapter does not send tool_name on tool result messages. In convertGenaiContentsToOllamaMessages, each function response becomes a message with only role: tool and content. The Python Ollama adapter sets tool_name from the function response name. Ollama uses this field when it builds the prompt. For example, the Gemma 4 renderer shows a result with no tool_name as coming from an "unknown" tool.

Steps To Reproduce
  1. Build a history with a model turn that calls get_weather and get_time, then a user turn with both function responses.
  2. Pass it to convertGenaiContentsToOllamaMessages.
  3. Both tool messages have an empty ToolName.
Expected Behavior

Each tool message carries the name of the tool that produced it, the same as the Python runtime.

Additional Context

File: go/adk/pkg/models/ollama_adk.go. Python reference: _convert_content_to_ollama_messages in python/packages/kagent-adk/src/kagent/adk/models/_ollama.py. I have a small fix with a test ready.

Ngôn ngữ chính
Go
Star
4.1k
Fork
859
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
169

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 kagent-dev/kagent

Tất cả issue của kagent-dev/kagent

Issue tương tự

Thêm issue về Go

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.