14 lines
304 B
Python
14 lines
304 B
Python
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
from openai import AsyncOpenAI
|
||
|
|
|
||
|
|
from api.config import settings
|
||
|
|
|
||
|
|
|
||
|
|
def build_openai_client() -> AsyncOpenAI:
|
||
|
|
return AsyncOpenAI(
|
||
|
|
api_key=settings.openai_api_key,
|
||
|
|
base_url=settings.openai_base_url,
|
||
|
|
timeout=settings.llm_timeout_seconds,
|
||
|
|
)
|