Python: [Bug]: OllamaChatClient sends non-image data content to Ollama as images
Maintainer thường phản hồi trong vòng 1 ngày
@eavanvalkenburg đang làm issue này rồi.
Từ ngày 30/9/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Description
OllamaChatClient._format_user_message checks if any data content is an image, but then sends all data content as images. So a message with an image and a PDF incorrectly sends the PDF to Ollama as an image.
Code Sample
from agent_framework import Content, Message
from agent_framework_ollama import OllamaChatClient
client = OllamaChatClient(model="llava")
msg = Message(role="user", contents=[
"describe",
Content.from_uri(uri="data:image/png;base64,SU1H", media_type="image/png"),
Content.from_uri(uri="data:application/pdf;base64,UERG", media_type="application/pdf"),
])
print(client._prepare_messages_for_ollama([msg]))
# images=['SU1H', 'UERG'] -> the PDF is sent as an image
Error Messages / Stack Traces
No error is raised by the framework. The PDF is silently included in the `images` list sent to Ollama, which then fails later with an image-decoding error or produces an unrelated answer.
Package Versions
agent-framework-core: 1.19.0, agent-framework-ollama: 1.0.0b260813 (current main), ollama: 0.5.3
Python Version
Python 3.11.15
Additional Context
No response
- Ngôn ngữ chính
- Python
- Star
- 14k
- Fork
- 2.5k
- Merge trung bình
- 2 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 424
Chuẩn bị môi trường
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.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/agent-framework
-
Python: [Bug]: A non-positive MCP request timeout silently disables the timeoutCó thể đã có người làm @jpalvarezl đã nhận 3 ngày trước. Đang mởpython
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
microsoft/agent-framework#9313 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
.NET: Proposal: add an llms.txtĐang mở.NET python triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
microsoft/agent-framework#9092 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Python: raw-data content mappings lose annotations and attachment metadataCó thể đã có người làm @moonbox3 đã nhận 17 ngày trước. Đang mởpython triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
microsoft/agent-framework#8632 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Python: Clarify when to use platformCó thể đã có người làm @eavanvalkenburg đã nhận 16 ngày trước. Đang mởpython triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoft/agent-framework#8599 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
.NET compaction documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
microsoft/agent-framework#4629 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/agent-framework
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
noontide-co/mainbranch#1211 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[1.x Bug] run-operation --sql reports success but rolls back writes on transaction-capable adaptersĐang mởtriage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
dbt-labs/dbt#16784 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug settings ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
DewaldOosthuizen/py-tray-command-launcher#162 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
run_all sleeps after the final job despite documenting delays between jobsCó thể đã có người làm @Gambit-Checkmate đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100