Settings
Settings Class Overview
The configuration is defined in a class named CodeInterpreterAPISettings, which inherits from Pydantic's BaseSettings class.
codeinterpreterapi/config.py
class CodeInterpreterAPISettings(BaseSettings):
...
Setting Descriptions
Debug Settings
DEBUG: bool = FalseEnables or disables the debug mode.
API Keys
-
OPENAI_API_KEY: Optional[str] = NoneAPI key for the OpenAI service. -
AZURE_API_KEY: Optional[str] = NoneAPI key for the Azure service. -
AZURE_API_BASE: Optional[str] = NoneBase URL for Azure API. -
AZURE_API_VERSION: Optional[str] = NoneAPI version for Azure service. -
AZURE_DEPLOYMENT_NAME: Optional[str] = NoneDeployment name for Azure service. -
ANTHROPIC_API_KEY: Optional[SecretStr] = NoneAPI key for the Anthropic service, stored securely.
LLM Settings
-
MODEL: str = "gpt-3.5-turbo"The language model to be used. -
TEMPERATURE: float = 0.03Controls randomness in the model's output. -
DETAILED_ERROR: bool = TrueEnables or disables detailed error messages. -
SYSTEM_MESSAGE: SystemMessage = code_interpreter_system_messageSets the default system message -
REQUEST_TIMEOUT: int = 3 * 60API request timeout in seconds. -
MAX_ITERATIONS: int = 12Maximum number of iterations for certain operations. -
MAX_RETRY: int = 3Maximum number of API request retries.
Production Settings
-
HISTORY_BACKEND: Optional[str] = NoneSpecifies the history backend to be used. -
REDIS_URL: str = "redis://localhost:6379"URL for Redis server. -
POSTGRES_URL: str = "postgresql://postgres:postgres@localhost:5432/postgres"URL for PostgreSQL server.
CodeBox
-
CODEBOX_API_KEY: Optional[str] = NoneAPI key for the CodeBox service. -
CUSTOM_PACKAGES: list[str] = []List of custom Python packages to be used.
Deprecated
VERBOSE: bool = DEBUGThis setting is deprecated and should not be used. It defaults to the value ofDEBUG.