docs: docstrings formatting (#6677)

* docs: docstrings formatting

* indent
This commit is contained in:
Daria Fokina 2024-01-02 15:28:01 +01:00 committed by GitHub
parent 76b0d05eb1
commit d61ac9e6ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -1,7 +1,7 @@
loaders:
- type: loaders.CustomPythonLoader
search_path: [../../../haystack/components/builders]
modules: ["answer_builder", "prompt_builder", "dynamic_prompt_builder"]
modules: ["answer_builder", "prompt_builder", "dynamic_prompt_builder", "dynamic_chat_prompt_builder"]
ignore_when_discovered: ["__init__"]
processors:
- type: filter

View File

@ -15,7 +15,7 @@ logger = logging.getLogger(__name__)
class RemoteWhisperTranscriber:
"""
Transcribes audio files using OpenAI's Whisper using OpenAI API. Requires an API key. See the
[OpenAI blog post](https://beta.openai.com/docs/api-reference/whisper for more details.
[OpenAI blog post](https://beta.openai.com/docs/api-reference/whisper) for more details.
You can get one by signing up for an [OpenAI account](https://beta.openai.com/).
For the supported audio formats, languages, and other parameters, see the
@ -100,7 +100,7 @@ class RemoteWhisperTranscriber:
Transcribe the audio files into a list of Documents, one for each input file.
:param sources: A list of file paths or ByteStreams containing the audio files to transcribe.
:returns: a list of Documents, one for each file. The content of the document is the transcription text.
:returns: A list of Documents, one for each file. The content of the document is the transcription text.
"""
documents = []

View File

@ -18,7 +18,7 @@ class DocumentSplitter:
):
"""
:param split_by: The unit by which the document should be split. Choose from "word" for splitting by " ",
"sentence" for splitting by ".", or "passage" for splitting by "\n\n".
"sentence" for splitting by ".", or "passage" for splitting by "\\n\\n".
:param split_length: The maximum number of units in each split.
:param split_overlap: The number of units that each split should overlap.
"""

View File

@ -47,8 +47,8 @@ class MetadataRouter:
{"field": "meta.created_at", "operator": "<", "value": "2024-01-01"},
],
},
}
```
}
```
"""
self.rules = rules
component.set_output_types(self, unmatched=List[Document], **{edge: List[Document] for edge in rules})