From 1708ab12250a7f4a8f62539531aba205d627690b Mon Sep 17 00:00:00 2001 From: Matthew Farrellee Date: Tue, 26 Nov 2024 10:10:05 -0500 Subject: [PATCH] allow env NVIDIA_BASE_URL to set NVIDIAConfig.url --- llama_stack/providers/remote/inference/nvidia/config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/llama_stack/providers/remote/inference/nvidia/config.py b/llama_stack/providers/remote/inference/nvidia/config.py index c50143043..28be43f4c 100644 --- a/llama_stack/providers/remote/inference/nvidia/config.py +++ b/llama_stack/providers/remote/inference/nvidia/config.py @@ -35,7 +35,9 @@ class NVIDIAConfig(BaseModel): """ url: str = Field( - default="https://integrate.api.nvidia.com", + default_factory=lambda: os.getenv( + "NVIDIA_BASE_URL", "https://integrate.api.nvidia.com" + ), description="A base url for accessing the NVIDIA NIM", ) api_key: Optional[str] = Field(