Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.langchain.com/llms.txt

Use this file to discover all available pages before exploring further.

any-llm is a unified interface for calling OpenAI, Anthropic, Google, local models (via Ollama/LocalAI), and more. Switch between providers just by changing a string.

Installation and setup

pip install langchain-anyllm
You need the appropriate API key for your chosen provider. API keys can be passed via the api_key parameter or set as environment variables (e.g., OPENAI_API_KEY, ANTHROPIC_API_KEY). See the any-llm documentation for provider-specific requirements.

Chat models

from langchain_anyllm import ChatAnyLLM

API reference

For detailed documentation of all ChatAnyLLM features and configurations, head to the API reference: https://github.com/mozilla-ai/langchain-any-llm