12 lines
371 B
Python
12 lines
371 B
Python
from openai import AsyncOpenAI
|
|
from app.core.config import settings
|
|
|
|
def get_llm_client() -> AsyncOpenAI:
|
|
"""
|
|
Initialise le client de génération (LLM) compatible OpenAI.
|
|
Configuré pour pointer vers notre instance locale llama.cpp (Gemma 4).
|
|
"""
|
|
return AsyncOpenAI(
|
|
base_url=settings.llm_base_url,
|
|
api_key=settings.llm_api_key,
|
|
) |