BerriAI / litellm

Call all LLM APIs using the OpenAI format. Use Bedrock, Azure, OpenAI, Cohere, Anthropic, Ollama, Sagemaker, HuggingFace, Replicate (100+ LLMs)
https://docs.litellm.ai/docs/
Other
10.59k stars 1.2k forks source link

Support blobs to be sent for google ai studio - gemini #1357

Open haseeb-heaven opened 6 months ago

haseeb-heaven commented 6 months ago

The Feature

Proposal: Implement multiple image upload modes in Google Gemini AI Studio

Description:

Enhancements:

Motivation, pitch

Motivation:

Specific Problem:

Twitter / LinkedIn details

haseeb_heaven

krrishdholakia commented 6 months ago

@haseeb-heaven we already support passing images via URL + local storage for gemini ai studio.

The missing one is blob, but i don't any code examples of how blob data is processed / passed for ai studio.

Can you point me to a relevant code example on this?

haseeb-heaven commented 6 months ago

@haseeb-heaven we already support passing images via URL + local storage for gemini ai studio.

The missing one is blob, but i don't any code examples of how blob data is processed / passed for ai studio.

Can you point me to a relevant code example on this?

There is no documentation on how to access local files I checked this VertexAI Documentation couldn't find anything here.

It says this.

LiteLLM Supports the following image types passed in url

Images with Cloud Storage URIs - gs://cloud-samples-data/generative-ai/image/boats.jpeg Images with direct links - https://storage.googleapis.com/github-repo/img/gemini/intro/landmark3.jpg Videos with Cloud Storage URIs - https://storage.googleapis.com/github-repo/img/gemini/multimodality_usecases_overview/pixel8.mp4

No mention of local storage

krrishdholakia commented 6 months ago

Great point - added here https://docs.litellm.ai/docs/providers/gemini

haseeb-heaven commented 6 months ago

Great point - added here https://docs.litellm.ai/docs/providers/gemini

Thanks. But need more documentation on code we need different code for different modes offline files and online files how to access then via Gemini Vision

krrishdholakia commented 6 months ago

good idea - feel free to contribute any examples to docs πŸ˜„

haseeb-heaven commented 6 months ago

good idea - feel free to contribute any examples to docs πŸ˜„

@krrishdholakia @ishaan-jaff Check this PR https://github.com/BerriAI/litellm/pull/1370