Parameters

chatlas leverages typing and IDE autocomplete to help you discover and set parameters for your model provider. This includes both model parameters and client parameters. The former is primarily for customizing the behavior of the model, while the latter is for customizing the behavior of the HTTP client used to communicate with the model provider. The goal is to make it easy to discover and set these parameters in a type safe way, regardless of the model provider you’re using.

Model parameters

Both the .chat() and .stream() methods accept a dictionary of model parameters via the kwargs parameter. Some of these parameters are common across providers (e.g., temperature, top_p), while others are specific to the provider (e.g., max_tokens, stop). Assuming your IDE has autocomplete / typing support, provider-specific parameters are shown as you type in keys and values can be type checked.

Screenshot of IDE with typing support showing available parameters for model provider

Screenshot of IDE with typing support showing available parameters for model provider

Client parameters

When you initialize a Chat client, you can pass in a dictionary of client parameters via the kwargs parameter. These parameters are used to customize the behavior of the HTTP client used to communicate with the model provider. This can be useful for things like setting the timeout, number of retries, and other HTTP client-specific settings.

Screenshot of IDE with typing support showing available parameters for HTTP client

Screenshot of IDE with typing support showing available parameters for HTTP client

LLMs have model parameters that can be tweaked to change their behavior. Some of these parameters are unique to the model provider, while others (e.g., temperature, top_p) are quite common across providers. In addition, HTTP client parameters can be helpful for customizing the behavior of the HTTP client used to communicate with the model provider.