cookbook
cookbook copied to clipboard
Call Gemini in OpenAI format (via LiteLLM) - tool calling, image url's, etc. in docs
Adds docs on calling gemini in the openai format
- via litellm sdk
- via litellm proxy (allows users to set budgets + track usage across llm providers)
cc: @shilpakancharla @Giom-V
let me know if there's anything missing for merge!
Hey @krrishdholakia - thanks for the contribution. I think the idea is solid, and we'd be happy to have something showing how to use litellm in this cookbook, though I have some notes.
Given this is in Python, can you format it as a Python notebook? And can you focus the content specifically on how to use LiteLLM with the Gemini API?
If you want to put it all in one notebook you could, or separate notebooks per topic would be fine if they are detailed enough to justify it. A topic like "Getting started with LiteLLM and the Gemini API" would be great, or something showing the features of litellm would be even better - the idea of track usage + set budgets sounds compelling, if you could show the budgets and usage in the content it'd be excellent.
got it @markmcd i'll update the model strings to correctly reference the gemini api
Hi @markmcd updated with detailed examples for tracking usage + setting budgets. Also did some additional cleanup to reference gemini in the model strings.
Is this good for merge?
can you format it as a Python notebook?
Can you address this? Once it's in the right format we can start the review process.
Marking this pull request as stale since it has been open for 14 days with no activity. This PR will be closed if no further activity occurs.
This pull request was closed because it has been inactive for 27 days. Please open a new pull request if you need further assistance. Thanks!