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 2 commits 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 size:S This PR changes 10-29 lines, ignoring generated files. 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
@samurai00
Copy link
Author

have you tried with client fetch?

I have now tried it with the Client-Side Fetching Mode.

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 图片
2 participants