mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-12-27 23:18:37 +00:00
docs: docstrings formatting (#6677)
* docs: docstrings formatting * indent
This commit is contained in:
parent
76b0d05eb1
commit
d61ac9e6ae
@ -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
|
||||
|
||||
@ -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 = []
|
||||
|
||||
|
||||
@ -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.
|
||||
"""
|
||||
|
||||
@ -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})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user