There was an error while loading. Please reload this page.
2 parents 7d0fcfc + c93c666 commit 9735851Copy full SHA for 9735851
1 file changed
src/ogx/providers/remote/inference/nvidia/utils.py
@@ -4,8 +4,13 @@
4
# This source code is licensed under the terms described in the LICENSE file in
5
# the root directory of this source tree.
6
7
+from urllib.parse import urlparse
8
+
9
from . import NVIDIAConfig
10
11
+_NVIDIA_HOSTED_HOSTNAME = "integrate.api.nvidia.com"
12
13
14
def _is_nvidia_hosted(config: NVIDIAConfig) -> bool:
- return "integrate.api.nvidia.com" in str(config.base_url)
15
+ hostname = urlparse(str(config.base_url)).hostname
16
+ return hostname == _NVIDIA_HOSTED_HOSTNAME
0 commit comments