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

Docs - Add example using LiteLLM Proxy to call Mistral AI Models #75

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

ishaan-jaff
Copy link

Doc - Add example on using Mistral models with LiteLLM Proxy

Hi, I'm the maintainer of LiteLLM - made a PR to show how to use LiteLLM Proxy to call Mistral AI models

Why use LiteLLM Proxy ?

Use LiteLLM Proxy for:

  • Calling 100+ LLMs Mistral AI, Codestral API, OpenAI, Azure, Vertex, Bedrock/etc. in the OpenAI ChatCompletions & Completions format
  • Track usage + set budgets with Virtual Keys

Works for Mistral AI API + Codestral API + Bedrock

@ishaan-jaff
Copy link
Author

hi @sophiamyang can you review this PR? Happy to make any changes necessary

[Use with Langchain, LlamaIndex, Instructor, etc.](https://docs.litellm.ai/docs/proxy/user_keys)

```bash
import openai
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use Mistral SDK instead of OpenAI please?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated @sophiamyang - now examples use the Mistral SDK

@ishaan-jaff ishaan-jaff requested a review from sophiamyang July 26, 2024 03:01
@ishaan-jaff
Copy link
Author

following up on this @sophiamyang - any other changes ?

@pandora-s-git
Copy link
Collaborator

Hi ishaan, I dont think this will work, our current SDK Python Client does not have the same methods and behavior as OpenAIs SDKs, it seems you are using chat.completions.create and other methods that do not current exist with the current SDK, possible to update it? And thank you for the notebook! 🙏

@sophiamyang
Copy link
Collaborator

Hi @ishaan-jaff, I think your code with Mistral client still has issues. Could you help update the code? You can see our docs here.

@ishaan-jaff
Copy link
Author

acknowledging this, will add this to my backlog @sophiamyang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants