Skip to content

Commit

Permalink
docs: update docstrings of JinaDocumentEmbedder and JinaTextEmbedder (#…
Browse files Browse the repository at this point in the history
…1092)

* chore: update function doc

* chore: polished function doc

* chore: polished function doc

* chore: update function doc

* Update integrations/jina/src/haystack_integrations/components/embedders/jina/document_embedder.py

Co-authored-by: Julian Risch <[email protected]>

* Update integrations/jina/src/haystack_integrations/components/embedders/jina/text_embedder.py

Co-authored-by: Julian Risch <[email protected]>

* chore: update function doc

* fix: lint issues

* chore: update function doc

---------

Co-authored-by: Julian Risch <[email protected]>
  • Loading branch information
2 people authored and Amnah199 committed Oct 2, 2024
1 parent cfacb6b commit 60c4d4a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@ def __init__(
to keep the logs clean.
:param meta_fields_to_embed: List of meta fields that should be embedded along with the Document text.
:param embedding_separator: Separator used to concatenate the meta fields to the Document text.
:param task: The downstream task for which the embeddings will be used.
The model will return the optimized embeddings for that task.
Check the list of available tasks on [Jina documentation](https://jina.ai/embeddings/).
:param dimensions: Number of desired dimension.
Smaller dimensions are easier to store and retrieve, with minimal performance impact thanks to MRL.
:param late_chunking: A boolean to enable or disable late chunking.
Apply the late chunking technique to leverage the model's long-context capabilities for
generating contextual chunk embeddings.
The support of `task` and `late_chunking` parameters is only available for jina-embeddings-v3.
"""
resolved_api_key = api_key.resolve_value()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ def __init__(
Check the list of available models on [Jina documentation](https://jina.ai/embeddings/).
:param prefix: A string to add to the beginning of each text.
:param suffix: A string to add to the end of each text.
:param task: The downstream task for which the embeddings will be used.
The model will return the optimized embeddings for that task.
Check the list of available tasks on [Jina documentation](https://jina.ai/embeddings/).
:param dimensions: Number of desired dimension.
Smaller dimensions are easier to store and retrieve, with minimal performance impact thanks to MRL.
:param late_chunking: A boolean to enable or disable late chunking.
Apply the late chunking technique to leverage the model's long-context capabilities for
generating contextual chunk embeddings.
The support of `task` and `late_chunking` parameters is only available for jina-embeddings-v3.
"""

resolved_api_key = api_key.resolve_value()
Expand Down

0 comments on commit 60c4d4a

Please sign in to comment.