Overview
Functions
aion_chat_model(...)
langchain.chat_models.init_chat_model.
This is the generic approach that auto-detects the provider. For most use cases with Aion, you’ll use
OpenAI models, so it behaves the same as aion_chat_openai.
Parameters:
| Parameter | Type | Description |
|---|---|---|
model | str | Model ID from the Aion control plane model catalog (e.g., gpt-4o, gpt-4-turbo) |
**kwargs | Any | Additional behavior options: temperature, max_tokens, timeout, max_retries, etc. |
api_key, base_url, default_headers, http_async_client, or
http_client. These are managed by Aion.
Returns:
A LangChain chat model (typically ChatOpenAI) ready to use.
Raises:
ImportError— If LangChain is not installedValueError— If any reserved parameter is provided
aion_chat_openai(...)
langchain-openai ChatOpenAI model configured for Aion.
Use this when you need explicit control or want to be specific about using OpenAI models.
Parameters:
| Parameter | Type | Description |
|---|---|---|
model | str | OpenAI model ID (e.g., gpt-4o, gpt-4-turbo, gpt-3.5-turbo) |
**kwargs | Any | Additional model options forwarded to ChatOpenAI. |
api_key, base_url, default_headers, http_async_client, or
http_client. These are managed by Aion.
Returns:
A ChatOpenAI instance backed by Aion’s model proxy.
Raises:
ImportError— Iflangchain-openaiis not installedValueError— If any reserved parameter is provided