cookbook icon indicating copy to clipboard operation
cookbook copied to clipboard

Call Gemini in OpenAI format (via LiteLLM) - tool calling, image url's, etc. in docs

Open krrishdholakia opened this issue 1 year ago • 6 comments
trafficstars

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)

krrishdholakia avatar Jul 22 '24 18:07 krrishdholakia

cc: @shilpakancharla @Giom-V

let me know if there's anything missing for merge!

krrishdholakia avatar Jul 22 '24 18:07 krrishdholakia

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.

markmcd avatar Aug 15 '24 07:08 markmcd

got it @markmcd i'll update the model strings to correctly reference the gemini api

krrishdholakia avatar Aug 15 '24 15:08 krrishdholakia

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?

krrishdholakia avatar Aug 15 '24 15:08 krrishdholakia

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.

markmcd avatar Aug 16 '24 04:08 markmcd

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.

github-actions[bot] avatar Dec 02 '24 08:12 github-actions[bot]

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!

github-actions[bot] avatar Dec 15 '24 22:12 github-actions[bot]