Model choice
Below is a table of model providers that come pre-packaged with chatlas.
Each model provider has its own set of pre-requisites. For example, OpenAI requires an API key, while Ollama requires you to install the Ollama CLI and download models. To see the pre-requisites for a given provider, visit the relevant usage page in the table below.
Name | Usage | Enterprise? |
---|---|---|
Anthropic (Claude) | ChatAnthropic() |
|
GitHub model marketplace | ChatGithub() |
|
Google (Gemini) | ChatGoogle() |
|
Groq | ChatGroq() |
|
Ollama local models | ChatOllama() |
|
OpenAI | ChatOpenAI() |
|
perplexity.ai | ChatPerplexity() |
|
AWS Bedrock | ChatBedrockAnthropic() |
✅ |
Azure OpenAI | ChatAzureOpenAI() |
✅ |
Databricks | ChatDatabricks() |
✅ |
Snowflake Cortex | ChatSnowflake() |
✅ |
Vertex AI | ChatVertex() |
✅ |
If you want to use a model provider that isn’t listed in the table above, you have two options:
- If the model provider is OpenAI compatible (i.e., it can be used with the
openai
Python SDK), useChatOpenAI()
with the appropriatebase_url
andapi_key
. - If you’re motivated, implement a new provider by subclassing
Provider
and implementing the required methods.
Model choice
In addition to choosing a model provider, you also need to choose a specific model from that provider. This is important because different models have different capabilities and performance characteristics. For example, some models are faster and cheaper, while others are more accurate and capable of handling more complex tasks.
If you’re using chatlas
inside your organisation, you’ll be limited to what your org allows, which is likely to be one provided by a big cloud provider (e.g. ChatAzureOpenAI()
and ChatBedrockAnthropic()
). If you’re using chatlas
for your own personal exploration, you have a lot more freedom so we have a few recommendations to help you get started:
ChatOpenAI()
orChatAnthropic()
are both good places to start.ChatOpenAI()
defaults to GPT-4o, but you can usemodel = "gpt-4o-mini"
for a cheaper lower-quality model, ormodel = "o1-mini"
for more complex reasoning.ChatAnthropic()
is similarly good; it defaults to Claude 3.7 Sonnet which we have found to be particularly good at writing code.ChatGoogle()
is great for large prompts, because it has a much larger context window than other models. It allows up to 1 million tokens, compared to Claude 3.7 Sonnet’s 200k and GPT-4o’s 128k.ChatOllama()
, which uses Ollama, allows you to run models on your own computer. The biggest models you can run locally aren’t as good as the state of the art hosted models, but they also don’t share your data and and are effectively free.
Auto complete
If you’re using an IDE that supports type hints, you can get autocompletion for the model
parameter. This is particularly useful for getting the right model name, or simply to see what models are available.
Auto provider
ChatAuto()
is a special model provider that allows one to configure the model provider through environment variables. This is useful for having a single, simple, script that can run on any model provider, without having to change the code.