Skip to content

Commit

Permalink
align tests and docs on NVIDIA_API_KEY (instead of NVIDIA_CATALOG_API…
Browse files Browse the repository at this point in the history
…_KEY) (#731)
  • Loading branch information
mattf authored Jun 5, 2024
1 parent e118b92 commit 42d85b3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions integrations/nvidia/tests/test_document_embedder.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,15 +388,15 @@ def test_run_integration_with_nim_backend(self):
assert isinstance(doc.embedding[0], float)

@pytest.mark.skipif(
not os.environ.get("NVIDIA_CATALOG_API_KEY", None),
reason="Export an env var called NVIDIA_CATALOG_API_KEY containing the Nvidia API key to run this test.",
not os.environ.get("NVIDIA_API_KEY", None),
reason="Export an env var called NVIDIA_API_KEY containing the NVIDIA API key to run this test.",
)
@pytest.mark.integration
def test_run_integration_with_api_catalog(self):
embedder = NvidiaDocumentEmbedder(
model="NV-Embed-QA",
api_url="https://ai.api.nvidia.com/v1/retrieval/nvidia",
api_key=Secret.from_env_var("NVIDIA_CATALOG_API_KEY"),
api_key=Secret.from_env_var("NVIDIA_API_KEY"),
)
embedder.warm_up()

Expand Down
6 changes: 3 additions & 3 deletions integrations/nvidia/tests/test_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,15 +208,15 @@ def test_run_integration_with_nim_backend(self):
assert result["meta"]

@pytest.mark.skipif(
not os.environ.get("NVIDIA_CATALOG_API_KEY", None),
reason="Export an env var called NVIDIA_CATALOG_API_KEY containing the Nvidia API key to run this test.",
not os.environ.get("NVIDIA_API_KEY", None),
reason="Export an env var called NVIDIA_API_KEY containing the NVIDIA API key to run this test.",
)
@pytest.mark.integration
def test_run_integration_with_api_catalog(self):
generator = NvidiaGenerator(
model="meta/llama3-70b-instruct",
api_url="https://integrate.api.nvidia.com/v1",
api_key=Secret.from_env_var("NVIDIA_CATALOG_API_KEY"),
api_key=Secret.from_env_var("NVIDIA_API_KEY"),
model_arguments={
"temperature": 0.2,
},
Expand Down
6 changes: 3 additions & 3 deletions integrations/nvidia/tests/test_text_embedder.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,15 @@ def test_run_integration_with_nim_backend(self):
assert "usage" in meta

@pytest.mark.skipif(
not os.environ.get("NVIDIA_CATALOG_API_KEY", None),
reason="Export an env var called NVIDIA_CATALOG_API_KEY containing the Nvidia API key to run this test.",
not os.environ.get("NVIDIA_API_KEY", None),
reason="Export an env var called NVIDIA_API_KEY containing the NVIDIA API key to run this test.",
)
@pytest.mark.integration
def test_run_integration_with_api_catalog(self):
embedder = NvidiaTextEmbedder(
model="NV-Embed-QA",
api_url="https://ai.api.nvidia.com/v1/retrieval/nvidia",
api_key=Secret.from_env_var("NVIDIA_CATALOG_API_KEY"),
api_key=Secret.from_env_var("NVIDIA_API_KEY"),
)
embedder.warm_up()

Expand Down

0 comments on commit 42d85b3

Please sign in to comment.