You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: integrations/amazon_bedrock/src/haystack_integrations/components/embedders/amazon_bedrock/document_embedder.py
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,9 @@ class AmazonBedrockDocumentEmbedder:
29
29
```python
30
30
import os
31
31
from haystack.dataclasses import Document
32
-
from haystack_integrations.components.embedders.amazon_bedrock import AmazonBedrockDocumentEmbedder
32
+
from haystack_integrations.components.embedders.amazon_bedrock import (
33
+
AmazonBedrockDocumentEmbedder,
34
+
)
33
35
34
36
os.environ["AWS_ACCESS_KEY_ID"] = "..."
35
37
os.environ["AWS_SECRET_ACCESS_KEY_ID"] = "..."
@@ -43,7 +45,7 @@ class AmazonBedrockDocumentEmbedder:
43
45
doc = Document(content="I love Paris in the winter.", meta={"name": "doc1"})
Copy file name to clipboardExpand all lines: integrations/amazon_bedrock/src/haystack_integrations/components/embedders/amazon_bedrock/document_image_embedder.py
Copy file name to clipboardExpand all lines: integrations/amazon_bedrock/src/haystack_integrations/components/embedders/amazon_bedrock/text_embedder.py
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,9 @@ class AmazonBedrockTextEmbedder:
23
23
Usage example:
24
24
```python
25
25
import os
26
-
from haystack_integrations.components.embedders.amazon_bedrock import AmazonBedrockTextEmbedder
26
+
from haystack_integrations.components.embedders.amazon_bedrock import (
Copy file name to clipboardExpand all lines: integrations/amazon_bedrock/src/haystack_integrations/components/generators/amazon_bedrock/chat/chat_generator.py
+29-13Lines changed: 29 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -55,16 +55,24 @@ class AmazonBedrockChatGenerator:
55
55
**Usage example**
56
56
57
57
```python
58
-
from haystack_integrations.components.generators.amazon_bedrock import AmazonBedrockChatGenerator
58
+
from haystack_integrations.components.generators.amazon_bedrock import (
59
+
AmazonBedrockChatGenerator,
60
+
)
59
61
from haystack.dataclasses import ChatMessage
60
62
from haystack.components.generators.utils import print_streaming_chunk
61
63
62
-
messages = [ChatMessage.from_system("\\nYou are a helpful, respectful and honest assistant, answer in German only"),
63
-
ChatMessage.from_user("What's Natural Language Processing?")]
64
+
messages = [
65
+
ChatMessage.from_system(
66
+
"\\nYou are a helpful, respectful and honest assistant, answer in German only"
67
+
),
68
+
ChatMessage.from_user("What's Natural Language Processing?"),
0 commit comments