Skip to content

Commit

Permalink
docs: Update docstrings of Nvidia integrations (deepset-ai#599)
Browse files Browse the repository at this point in the history
  • Loading branch information
shadeMe committed Mar 19, 2024
1 parent 83ac8a1 commit 0e1986e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ class NvidiaDocumentEmbedder:
"""
A component for embedding documents using embedding models provided by
[NVIDIA AI Foundation Endpoints](https://www.nvidia.com/en-us/ai-data-science/foundation-models/)
and NVIDIA NeMo Inference Microservices.
and NVIDIA Inference Microservices.
Usage example:
```python
from haystack_integrations.components.embedders.nvidia import NvidiaDocumentEmbedder, NvidiaEmbeddingModel
from haystack_integrations.components.embedders.nvidia import NvidiaDocumentEmbedder
doc = Document(content="I love pizza!")
Expand Down Expand Up @@ -50,7 +50,7 @@ def __init__(
:param api_key:
API key for the NVIDIA AI Foundation Endpoints.
:param api_url:
Custom API URL for the NVIDIA NeMo Inference Microservices.
Custom API URL for the NVIDIA Inference Microservices.
:param prefix:
A string to add to the beginning of each text.
:param suffix:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ class NvidiaTextEmbedder:
"""
A component for embedding strings using embedding models provided by
[NVIDIA AI Foundation Endpoints](https://www.nvidia.com/en-us/ai-data-science/foundation-models/)
and NVIDIA NeMo Inference Microservices.
and NVIDIA Inference Microservices.
For models that differentiate between query and document inputs,
this component embeds the input string as a query.
Usage example:
```python
from haystack_integrations.components.embedders.nvidia import NvidiaTextEmbedder, NvidiaEmbeddingModel
from haystack_integrations.components.embedders.nvidia import NvidiaTextEmbedder
text_to_embed = "I love pizza!"
Expand All @@ -47,7 +47,7 @@ def __init__(
:param api_key:
API key for the NVIDIA AI Foundation Endpoints.
:param api_url:
Custom API URL for the NVIDIA NeMo Inference Microservices.
Custom API URL for the NVIDIA Inference Microservices.
:param prefix:
A string to add to the beginning of each text.
:param suffix:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
class NvidiaGenerator:
"""
A component for generating text using generative models provided by
[NVIDIA AI Foundation Endpoints](https://www.nvidia.com/en-us/ai-data-science/foundation-models/).
[NVIDIA AI Foundation Endpoints](https://www.nvidia.com/en-us/ai-data-science/foundation-models/)
and NVIDIA Inference Microservices.
Usage example:
```python
from haystack_integrations.components.generators.nvidia import NvidiaGenerator, NvidiaGeneratorModel
from haystack_integrations.components.generators.nvidia import NvidiaGenerator
generator = NvidiaGenerator(
model="nv_llama2_rlhf_70b",
Expand Down Expand Up @@ -55,7 +56,7 @@ def __init__(
:param api_key:
API key for the NVIDIA AI Foundation Endpoints.
:param api_url:
Custom API URL for the NVIDIA NeMo Inference Microservices.
Custom API URL for the NVIDIA Inference Microservices.
:param model_arguments:
Additional arguments to pass to the model provider. Different models accept different arguments.
Search your model in the [Nvidia catalog](https://catalog.ngc.nvidia.com/ai-foundation-models)
Expand Down

0 comments on commit 0e1986e

Please sign in to comment.