Skip to content

Commit cc3f522

Browse files
Sync Haystack API reference on Docusaurus (#11102)
Co-authored-by: davidsbatista <7937824+davidsbatista@users.noreply.github.com>
1 parent 0cf322a commit cc3f522

File tree

4 files changed

+3
-15
lines changed

4 files changed

+3
-15
lines changed

docs-website/reference/haystack-api/extractors_api.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ Documents that fail extraction are returned in `failed_documents` with `content_
2929

3030
### Usage example
3131

32-
<!-- test-ignore -->
33-
3432
```python
3533
from haystack import Document
3634
from haystack.components.generators.chat import OpenAIChatGenerator
@@ -74,8 +72,8 @@ extractor = LLMDocumentContentExtractor(
7472
)
7573

7674
documents = [
77-
Document(content="", meta={"file_path": "/test/test_files/images/image_metadata.png"}),
78-
Document(content="", meta={"file_path": "/test/test_files/images/apple.jpg", "page_number": 1})
75+
Document(content="", meta={"file_path": "test/test_files/images/image_metadata.png"}),
76+
Document(content="", meta={"file_path": "test/test_files/images/apple.jpg", "page_number": 1})
7977
]
8078
result = extractor.run(documents=documents)
8179
updated_documents = result["documents"]

docs-website/reference/haystack-api/generators_api.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2016,8 +2016,6 @@ LLMs running locally may need powerful hardware.
20162016

20172017
### Usage example
20182018

2019-
<!-- test-ignore -->
2020-
20212019
```python
20222020
from haystack.components.generators import HuggingFaceLocalGenerator
20232021

@@ -2028,7 +2026,7 @@ generator = HuggingFaceLocalGenerator(
20282026
)
20292027

20302028
print(generator.run("Who is the best American actor?"))
2031-
# {'replies': ['John Cusack']}
2029+
# >> {'replies': ['John Cusack']}
20322030
```
20332031

20342032
#### __init__

docs-website/reference/haystack-api/rankers_api.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -697,8 +697,6 @@ if a score is present.
697697

698698
### Usage example
699699

700-
<!-- test-ignore -->
701-
702700
```python
703701
from haystack import Document
704702
from haystack.components.rankers import SentenceTransformersDiversityRanker
@@ -1018,8 +1016,6 @@ additional features.
10181016

10191017
### Usage example
10201018

1021-
<!-- test-ignore -->
1022-
10231019
```python
10241020
from haystack import Document
10251021
from haystack.components.rankers import TransformersSimilarityRanker

docs-website/reference/haystack-api/routers_api.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -522,8 +522,6 @@ This component can be used with general-purpose LLMs and with specialized LLMs f
522522

523523
### Usage example
524524

525-
<!-- test-ignore -->
526-
527525
```python
528526
from haystack.components.generators.chat import HuggingFaceAPIChatGenerator
529527
from haystack.components.routers.llm_messages_router import LLMMessagesRouter
@@ -1008,8 +1006,6 @@ Specify the set of labels for categorization when initializing the component.
10081006

10091007
### Usage example
10101008

1011-
<!-- test-ignore -->
1012-
10131009
```python
10141010
from haystack import Document
10151011
from haystack.document_stores.in_memory import InMemoryDocumentStore

0 commit comments

Comments
 (0)