Skip to main content

Module compat

Module compat 

Source
Expand description

Convenience constructors for OpenAI-compatible providers.

Each provider uses the same wire format as OpenAI but with a different base URL. The functions in this module pre-configure OpenAiConfig and OpenAiEmbeddingsConfig with the correct endpoint.

Functionsยง

cohere_chat_model
Create a Cohere chat model.
cohere_config
Create an OpenAI-compatible config for Cohere.
cohere_embeddings
Create Cohere embeddings.
cohere_embeddings_config
Create an OpenAI-compatible embeddings config for Cohere.
deepseek_chat_model
Create a DeepSeek chat model.
deepseek_config
Create an OpenAI-compatible config for DeepSeek.
fireworks_chat_model
Create a Fireworks AI chat model.
fireworks_config
Create an OpenAI-compatible config for Fireworks AI.
groq_chat_model
Create a Groq chat model.
groq_config
Create an OpenAI-compatible config for Groq.
huggingface_chat_model
Create a HuggingFace chat model.
huggingface_config
Create an OpenAI-compatible config for HuggingFace Inference API.
huggingface_embeddings
Create HuggingFace embeddings.
huggingface_embeddings_config
Create an OpenAI-compatible embeddings config for HuggingFace.
mistral_chat_model
Create a Mistral AI chat model.
mistral_config
Create an OpenAI-compatible config for Mistral AI.
mistral_embeddings
Create Mistral AI embeddings.
mistral_embeddings_config
Create an OpenAI-compatible embeddings config for Mistral AI.
openrouter_chat_model
Create an OpenRouter chat model.
openrouter_config
Create an OpenAI-compatible config for OpenRouter.
together_chat_model
Create a Together AI chat model.
together_config
Create an OpenAI-compatible config for Together AI.
xai_chat_model
Create an xAI chat model.
xai_config
Create an OpenAI-compatible config for xAI.