diff --git a/.env.django b/.env.django index 8aa7ddaed..41bb42dd2 100644 --- a/.env.django +++ b/.env.django @@ -2,6 +2,7 @@ ANTHROPIC_API_KEY= OPENAI_API_KEY= +OPENAI_MODEL= LLM_MAX_TOKENS=1024 # === Development === diff --git a/.env.example b/.env.example index 9a78c01e5..ed2f1714a 100644 --- a/.env.example +++ b/.env.example @@ -2,6 +2,7 @@ ANTHROPIC_API_KEY= OPENAI_API_KEY= +OPENAI_API_KEY= LLM_MAX_TOKENS=1024 # === Development === diff --git a/.env.test b/.env.test index 6fac0ca6e..0bc9191ce 100644 --- a/.env.test +++ b/.env.test @@ -2,6 +2,7 @@ ANTHROPIC_API_KEY= OPENAI_API_KEY= +OPENAI_MODEL= LLM_MAX_TOKENS=1024 # === AI === diff --git a/core_api/src/dependencies.py b/core_api/src/dependencies.py index db3eab95e..fd477fb77 100644 --- a/core_api/src/dependencies.py +++ b/core_api/src/dependencies.py @@ -120,6 +120,7 @@ def get_llm(env: Annotated[Settings, Depends(get_env)]) -> ChatLiteLLM: streaming=True, openai_key=env.openai_api_key, callbacks=[logger_callback], + model=env.openai_model, ) elif env.azure_openai_api_key is not None: log.info("Creating Azure LLM Client") diff --git a/redbox-core/redbox/models/settings.py b/redbox-core/redbox/models/settings.py index aa5f31610..a194536b1 100644 --- a/redbox-core/redbox/models/settings.py +++ b/redbox-core/redbox/models/settings.py @@ -136,6 +136,7 @@ class Settings(BaseSettings): anthropic_api_key: str | None = None openai_api_key: str | None = None + openai_model: str | None = None azure_openai_api_key: str | None = None azure_openai_endpoint: str | None = None