aiq.llm.openai_llm#

Classes#

OpenAIModelConfig

An OpenAI LLM provider to be used with an LLM client.

Functions#

openai_llm(config, builder)

Module Contents#

class OpenAIModelConfig(/, **data: Any)#

Bases: aiq.data_models.llm.LLMBaseConfig

An OpenAI LLM provider to be used with an LLM client.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

api_key: str | None = None#
base_url: str | None = None#
model_name: str = None#
temperature: float = None#
top_p: float = None#
seed: int | None = None#
max_retries: int = None#
async openai_llm(
config: OpenAIModelConfig,
builder: aiq.builder.builder.Builder,
)#