LiteLLM
Short description of third-party integration with AI/ML API (LiteLLM) and how to work with it.
About
LiteLLM is an open-source Python library that provides a unified API for interacting with multiple large language model providers. It allows developers to switch between different models with minimal code changes, optimizing cost and performance. LiteLLM simplifies integration by offering a single interface for various LLM endpoints, enabling seamless experimentation and deployment across different AI providers.
If you use this library, you can also call models from AI/ML API through it. Below are the most common use cases:
Installation
Install the library with the standard pip tool in terminal:
pip install litellmMaking API Calls
You can choose from LLama, Qwen, Flux, and 200+ other models on the AI/ML API official website.
Chat completion
Streaming
Async Completion
Async Streaming
Async Embedding
Async Image Generation
Last updated
Was this helpful?