File tree Expand file tree Collapse file tree 4 files changed +3
-15
lines changed
docs-website/reference/haystack-api Expand file tree Collapse file tree 4 files changed +3
-15
lines changed Original file line number Diff line number Diff 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
3533from haystack import Document
3634from haystack.components.generators.chat import OpenAIChatGenerator
@@ -74,8 +72,8 @@ extractor = LLMDocumentContentExtractor(
7472)
7573
7674documents = [
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]
8078result = extractor.run(documents = documents)
8179updated_documents = result[" documents" ]
Original file line number Diff line number Diff line change @@ -2016,8 +2016,6 @@ LLMs running locally may need powerful hardware.
20162016
20172017### Usage example
20182018
2019- <!-- test-ignore -->
2020-
20212019``` python
20222020from haystack.components.generators import HuggingFaceLocalGenerator
20232021
@@ -2028,7 +2026,7 @@ generator = HuggingFaceLocalGenerator(
20282026)
20292027
20302028print (generator.run(" Who is the best American actor?" ))
2031- # {'replies': ['John Cusack']}
2029+ # >> {'replies': ['John Cusack']}
20322030```
20332031
20342032#### __ init__
Original file line number Diff line number Diff line change @@ -697,8 +697,6 @@ if a score is present.
697697
698698### Usage example
699699
700- <!-- test-ignore -->
701-
702700``` python
703701from haystack import Document
704702from haystack.components.rankers import SentenceTransformersDiversityRanker
@@ -1018,8 +1016,6 @@ additional features.
10181016
10191017### Usage example
10201018
1021- <!-- test-ignore -->
1022-
10231019``` python
10241020from haystack import Document
10251021from haystack.components.rankers import TransformersSimilarityRanker
Original file line number Diff line number Diff 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
528526from haystack.components.generators.chat import HuggingFaceAPIChatGenerator
529527from 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
10141010from haystack import Document
10151011from haystack.document_stores.in_memory import InMemoryDocumentStore
You can’t perform that action at this time.
0 commit comments