This PR removes the use of pydantic-settings and use dotenv to load environments variables.
settings.py assumes a .env is always available and required in the application for it to deploy. While this design works in dev, it will broke the Docker image. .env is meant to be ephemeral. In production, the environment is set directly during deploy.
As such, pydantic-settings can be removed and the dotenv is better suited to take in the environment variable.
This PR also ensure the model choices are now not-hardcoded and can be overrided by the LLM_DEFAULT_MODEL variable. By default, this DEFAULT_MODEL is set to phi to maintain backward compatibility.
This PR removes the use of
pydantic-settings
and usedotenv
to load environments variables.settings.py
assumes a.env
is always available and required in the application for it to deploy. While this design works in dev, it will broke the Docker image..env
is meant to be ephemeral. In production, the environment is set directly during deploy.As such,
pydantic-settings
can be removed and thedotenv
is better suited to take in the environment variable.This PR also ensure the model choices are now not-hardcoded and can be overrided by the
LLM_DEFAULT_MODEL
variable. By default, thisDEFAULT_MODEL
is set tophi
to maintain backward compatibility.