update the env parsing logic

This commit is contained in:
Rashmi Pawar 2025-04-16 17:27:01 +05:30
parent 38ff88ba64
commit 0eaf5c21c3

View file

@ -48,8 +48,8 @@ class NVIDIAConfig(BaseModel):
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",
default_factory=lambda: os.getenv("NVIDIA_APPEND_API_VERSION", "True").lower() != "false",
description="When set to false, the API version will not be appended to the base_url. By default, it is true.",
)
@classmethod