Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Agnieszka Marzec <97166305+agnieszka-m@users.noreply.github.com>
  • Loading branch information
dfokina and agnieszka-m authored Aug 13, 2024
1 parent 7b26306 commit a845fd0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions haystack/components/embedders/azure_document_embedder.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ def __init__( # noqa: PLR0913 (too-many-arguments)
:param progress_bar:
If `True`, shows a progress bar when running.
:param meta_fields_to_embed:
List of meta fields that will be embedded along with the document text.
List of metadata fields to embed along with the document text.
:param embedding_separator:
Separator used to concatenate the meta fields to the document text.
Separator used to concatenate the metadata fields to the document text.
:param timeout: The timeout for `AzureOpenAI` client calls, in seconds.
If not set, defaults to either the
`OPENAI_TIMEOUT` environment variable, or 30 seconds.
:param max_retries: Maximum number of retries to contact AzureOpenAI after an internal error.
If not set, defaults to either the `OPENAI_MAX_RETRIES` environment variable, or set to 5.
If not set, defaults to either the `OPENAI_MAX_RETRIES` environment variable or to 5 retries.
"""
# if not provided as a parameter, azure_endpoint is read from the env var AZURE_OPENAI_ENDPOINT
azure_endpoint = azure_endpoint or os.environ.get("AZURE_OPENAI_ENDPOINT")
Expand Down Expand Up @@ -233,7 +233,7 @@ def run(self, documents: List[Document]) -> Dict[str, Any]:
:returns:
A dictionary with the following keys:
- `documents`: Documents with embeddings.
- `documents`: A list of documents with embeddings.
- `meta`: Information about the usage of the model.
"""
if not (isinstance(documents, list) and all(isinstance(doc, Document) for doc in documents)):
Expand Down
2 changes: 1 addition & 1 deletion haystack/components/embedders/azure_text_embedder.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def __init__(
If not set, defaults to either the
`OPENAI_TIMEOUT` environment variable, or 30 seconds.
:param max_retries: Maximum number of retries to contact AzureOpenAI after an internal error.
If not set, defaults to either the `OPENAI_MAX_RETRIES` environment variable, or set to 5.
If not set, defaults to either the `OPENAI_MAX_RETRIES` environment variable, or to 5 retries.
:param prefix:
A string to add at the beginning of each text.
:param suffix:
Expand Down

0 comments on commit a845fd0

Please sign in to comment.