Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correct image upload field for ollama llama3.2-vision #4697

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

samurai00
Copy link

💻 变更类型 | Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 👷 build
  • ⚡️ perf
  • 📝 docs
  • 🔨 chore

🔀 变更说明 | Description of Change

  • Fix image data not being passed to correct field in API request for ollama
  • Enable proper image recognition functionality for llama3.2-vision model

📝 补充信息 | Additional Information

fix #4642
Related #3888

Copy link

vercel bot commented Nov 15, 2024

@samurai00 is attempting to deploy a commit to the LobeChat Community Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Nov 15, 2024
@lobehubbot
Copy link
Member

👍 @samurai00

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

@dosubot dosubot bot added ollama Relative to Ollama Provider and ollama models vision labels Nov 15, 2024
@arvinxx
Copy link
Contributor

arvinxx commented Nov 15, 2024

have you tried with client fetch?

Copy link

vercel bot commented Nov 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lobe-chat-database 🛑 Canceled (Inspect) Nov 15, 2024 2:35pm
lobe-chat-preview 🛑 Canceled (Inspect) Nov 15, 2024 2:35pm

Copy link

codecov bot commented Nov 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.26%. Comparing base (32630fa) to head (34e4a6d).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4697      +/-   ##
==========================================
+ Coverage   92.44%   97.26%   +4.82%     
==========================================
  Files         524       27     -497     
  Lines       36893     3843   -33050     
  Branches     2518      168    -2350     
==========================================
- Hits        34104     3738   -30366     
+ Misses       2789      105    -2684     
Flag Coverage Δ
app ?
server 97.26% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vercel vercel bot temporarily deployed to Preview – lobe-chat-preview November 15, 2024 14:32 Inactive
@vercel vercel bot temporarily deployed to Preview – lobe-chat-database November 15, 2024 14:35 Inactive
@samurai00
Copy link
Author

have you tried with client fetch?

I found the imageUrlToBase64 method in anthropicHelpers.ts, which is used in Anthropic's agent-runtime. Looking at the implementation, it's just using fetch and then converting to base64.

- Fix image data not being passed to correct field in API request
- Enable proper image recognition functionality for llama3.2-vision model

fix lobehub#4642
Related lobehub#3888
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ollama Relative to Ollama Provider and ollama models size:S This PR changes 10-29 lines, ignoring generated files. vision
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Request] 好像不支持 Ollama 的 llama3.2-vision 图片
3 participants