cookbook icon indicating copy to clipboard operation
cookbook copied to clipboard

add litellm example (OpenAI-Compatible Endpoint)

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

Hi @random-forests @markmcd,

Adding a tutorial to show how to call Gemini through an OpenAI-Compatible Endpoint (via LiteLLM)

This supports Google AI Studio + Vertex AI as well.

Let me know if there's anything further required here!

krrishdholakia avatar Apr 17 '24 01:04 krrishdholakia

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Apr 17 '24 01:04 google-cla[bot]

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Hi, we're planning to put integration examples like this in an examples/integrations/ directory. Can you create that directory and move this file into it?

MarkDaoust avatar Apr 17 '24 18:04 MarkDaoust

Also, se can't merge anything until you sign the CLA.

MarkDaoust avatar May 22 '24 20:05 MarkDaoust

Hey @MarkDaoust thanks for the bump - just signed the CLA

krrishdholakia avatar May 22 '24 23:05 krrishdholakia

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 Aug 16 '24 04:08 github-actions[bot]

Please ignore the "stale" check above. I'll reset the counter since you were waiting on us.

I've rebased your PR to the current head to pick up the lint, etc checks. Please take a look at them.

Can you also:

  • Give the guide a descriptive title - it needs to describe what this guide demonstrates (include the task, like "question answering" or "building a chatbot" - it could be something like "Generating content with LiteLLM" or "Issuing OpenAI compatible requests to the Gemini API with LiteLLM")
  • Update the filename to match, and put it in examples/litellm/...
  • Add an intro sentence/paragraph to explain what task the reader is going to implement, including links to relevant content (like litellm docs).
  • Also add descriptions to each section of the guide, explaining what will be done.
  • Include response outputs where they are helpful, e.g. to show the model has responsed.

For a good example, check out this langchain example (but yours can be much shorter).

Also please refer to the style guide for guidance on how to structure your text.

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 Aug 31 '24 01:08 github-actions[bot]