ChatLiteLLM and ChatLiteLLMRouter
LiteLLM is a library that simplifies calling Anthropic, Azure, Huggingface, Replicate, etc.
This notebook covers how to get started with using Langchain + the LiteLLM I/O library.
This integration contains two main classes:
ChatLiteLLM
: The main Langchain wrapper for basic usage of LiteLLM (docs).ChatLiteLLMRouter
: AChatLiteLLM
wrapper that leverages LiteLLM's Router (docs).
Table of Contentsโ
- Overview
- Setup
- Credentials
- Installation
- Instantiation
- Invocation
- Async and Streaming Functionality
- API Reference
Overviewโ
Integration detailsโ
Class | Package | Local | Serializable | JS support | Package downloads | Package latest |
---|---|---|---|---|---|---|
ChatLiteLLM | langchain-litellm | โ | โ | โ | ||
ChatLiteLLMRouter | langchain-litellm | โ | โ | โ |
Model featuresโ
Tool calling | Structured output | JSON mode | Image input | Audio input | Video input | Token-level streaming | Native async | Token usage | Logprobs |
---|---|---|---|---|---|---|---|---|---|
โ | โ | โ | โ | โ | โ | โ | โ | โ |