add version env variable

This commit is contained in:
Rashmi Pawar 2025-04-16 14:33:41 +05:30
parent 436b3269dc
commit 1d960bacdc
8 changed files with 16 additions and 20 deletions

View file

@ -47,10 +47,15 @@ class NVIDIAConfig(BaseModel):
default=60,
description="Timeout for the HTTP requests",
)
append_api_version: bool = Field(
default=lambda: os.getenv("NVIDIA_APPEND_API_VERSION", True),
description="Whether to append the API version to the model ID",
)
@classmethod
def sample_run_config(cls, **kwargs) -> Dict[str, Any]:
return {
"url": "${env.NVIDIA_BASE_URL:https://integrate.api.nvidia.com}",
"api_key": "${env.NVIDIA_API_KEY:}",
"append_api_version": "${env.NVIDIA_APPEND_API_VERSION:True}",
}