from langchain_openai import ChatOpenAI

from .config import AppConfig


def create_llm(config: AppConfig) -> ChatOpenAI:
    return ChatOpenAI(
        model_name=config.model,
        api_key=config.api_key,
        base_url=config.api_url,
        temperature=0.7,
    )
