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
{{ message }}
Repository navigation
Commit 7cf3769
Browse filesBrowse the repository at this point in the historyBrowse files
docs: replace removed non-chat Generators with ChatGenerators (#590)
* docs: replace removed non-chat Generators with ChatGenerators
Swap the Generator components removed in Haystack 3.0 and the core-integration Generators being removed for their ChatGenerator equivalents across 33 integration pages; note that lmformatenforcer only works with Haystack 2.x.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* docs: replace retired OpenAI model names in migrated examples with gpt-4.1-mini
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Once installed, you will have access to [AmazonBedrockChatGenerator](https://docs.haystack.deepset.ai/docs/amazonbedrockchatgenerator)and [AmazonBedrockGenerator](https://docs.haystack.deepset.ai/docs/amazonbedrockgenerator) components that support generative language models on Amazon Bedrock.
39
+
Once installed, you will have access to the [AmazonBedrockChatGenerator](https://docs.haystack.deepset.ai/docs/amazonbedrockchatgenerator)component that supports generative language models on Amazon Bedrock.
40
40
You will also have access to the [AmazonBedrockTextEmbedder](https://docs.haystack.deepset.ai/docs/amazonbedrocktextembedder) and [AmazonBedrockDocumentEmbedder](https://docs.haystack.deepset.ai/docs/amazonbedrockdocumentembedder), which can be used to compute embeddings.
41
41
The integration also includes [S3Downloader](https://docs.haystack.deepset.ai/docs/s3downloader) that allows downloading files from AWS S3 buckets to the local filesystem.
42
42
@@ -88,22 +88,6 @@ Output:
88
88
{'replies': [ChatMessage(_role=<ChatRole.ASSISTANT:'assistant'>, _content=[TextContent(text='El procesamiento del lenguaje natural (PLN) es una rama de la inteligencia artificial que permite a las computadoras comprender, interpretar y generar lenguaje humano.')], _name=None, _meta={'model':'amazon.nova-pro-v1:0', 'index':0, 'finish_reason':'end_turn', 'usage': {'prompt_tokens':21, 'completion_tokens':31, 'total_tokens':52}})]}
89
89
```
90
90
91
-
### AmazonBedrockGenerator
92
-
93
-
Most [supported models](https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html) can be used with `AmazonBedrockGenerator`, but we highly recommend using the `AmazonBedrockChatGenerator` instead.
94
-
95
-
```python
96
-
from haystack_integrations.components.generators.amazon_bedrock import AmazonBedrockGenerator
result = generator.run("Who is the best American actor?")
100
-
print(result)
101
-
```
102
-
Output:
103
-
```shell
104
-
{'replies': ['It\'s subjective to determine the "best" American actor as it depends on personal preferences, critical acclaim, and the impact of their work. However, some of the most renowned and influential American actors include:\n\n1. Daniel Day-Lewis - Known for his versatility and commitment to his roles, Day-Lewis is a three-time Academy Award winner for Best Actor.\n2. Meryl Streep - With a record 21 Academy Award nominations and three wins, Streep is widely regarded as one of the greatest actresses in American film history.\n3. Jack Nicholson - A three-time Academy Award winner and 12-time nominee, Nicholson is known for his iconic roles in films like "One Flew Over the Cuckoo\'s Nest," "Terms of Endearment," and "As Good as It Gets."\n4. Robert De Niro - A two-time Academy Award winner, De Niro is known for his collaborations with Martin Scorsese and his memorable roles in films like "Taxi Driver," "Raging Bull," and "The Godfather: Part II."\n5. Leonardo DiCaprio - A four-time Academy Award nominee and one-time winner, DiCaprio has had a successful career in both blockbusters and independent films.\n\nThese are just a few examples of highly acclaimed American actors, and there are many other talented actors who could be considered for this title.'], 'meta': {'RequestId': 'ed9c8566-0b13-4c08-ba72-c88be1aecd02', 'HTTPStatusCode': 200, 'HTTPHeaders': {'date': 'Mon, 28 Apr 2025 11:00:15 GMT', 'content-type': 'application/json', 'content-length': '1322', 'connection': 'keep-alive', 'x-amzn-requestid': 'ed9c8566-0b13-4c08-ba72-c88be1aecd02', 'x-amzn-bedrock-invocation-latency': '7065', 'x-amzn-bedrock-output-token-count': '323', 'x-amzn-bedrock-input-token-count': '16'}, 'RetryAttempts': 0}}
105
-
```
106
-
107
91
### Embedders
108
92
109
93
Three components are available for using embedding models with Amazon Bedrock: [`AmazonBedrockTextEmbedder`](https://docs.haystack.deepset.ai/docs/amazonbedrocktextembedder), [`AmazonBedrockDocumentEmbedder`](https://docs.haystack.deepset.ai/docs/amazonbedrockdocumentembedder) and [`AmazonBedrockDocumentImageEmbedder`](https://docs.haystack.deepset.ai/docs/amazonbedrockdocumentimageembedder).
Copy file name to clipboardExpand all lines: integrations/anthropic.md
+1-19Lines changed: 1 addition & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ toc: true
27
27
28
28
This integration supports Anthropic Claude models such as Claude Haiku 3.5, Claude Sonnet 3.7, and Claude Sonnet 4.5 through Anthropic’s inference infrastructure. For a complete list of available models, check out [the Anthropic Claude documentation](https://docs.claude.com/en/docs/about-claude/models/overview).
29
29
30
-
You can use Anthropic models with [`AnthropicGenerator`](https://docs.haystack.deepset.ai/docs/anthropicgenerator) and [`AnthropicChatGenerator`](https://docs.haystack.deepset.ai/docs/anthropicchatgenerator).
30
+
You can use Anthropic models with [`AnthropicChatGenerator`](https://docs.haystack.deepset.ai/docs/anthropicchatgenerator).
31
31
32
32
## Installation
33
33
@@ -37,7 +37,6 @@ pip install anthropic-haystack
37
37
38
38
## Usage
39
39
40
-
Based on your use case, you can choose between [`AnthropicGenerator`](https://docs.haystack.deepset.ai/docs/anthropicgenerator) or [`AnthropicChatGenerator`](https://docs.haystack.deepset.ai/docs/anthropicchatgenerator) to work with Anthropic models. To learn more about the difference, visit the [Generators vs Chat Generators](https://docs.haystack.deepset.ai/docs/generators-vs-chat-generators) guide.
41
40
Before using, make sure to set the `ANTHROPIC_API_KEY` environment variable.
42
41
43
42
### Using `AnthropicChatGenerator`
@@ -94,20 +93,3 @@ rag_pipeline.run(
94
93
}
95
94
)
96
95
```
97
-
98
-
### Using `AnthropicGenerator`
99
-
100
-
Below is an example of using `AnthropicGenerator`:
101
-
102
-
```python
103
-
from haystack_integrations.components.generators.anthropic import AnthropicGenerator
104
-
105
-
client = AnthropicGenerator()
106
-
response = client.run("What's Natural Language Processing? Be brief.")
107
-
print(response)
108
-
109
-
>>{'replies': ['Natural language processing (NLP) is a branch of artificial intelligence focused on enabling
110
-
>>computers to understand, interpret, and manipulate human language. The goal of NLPis to read, decipher,
111
-
>> understand, and make sense of the human languages in a manner that is valuable.'], 'meta': {'model':
Copy file name to clipboardExpand all lines: integrations/assemblyai.md
+6-12Lines changed: 6 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -113,14 +113,14 @@ The metadata of the transcription document contains the transcription ID and url
113
113
### Summarization
114
114
You can perform summarization with `AssemblyAITranscriber` by setting `"summarization": True`. When activated, `AssemblyAITranscriber` provides both a `transcription` object and a `summarization` output.
115
115
116
-
The example below illustrates a generative QA pipeline that seamlessly integrates `AssemblyAITranscriber` and `OpenAIGenerator`. This pipeline generates answers based on the given question and the summarized transcription:
116
+
The example below illustrates a generative QA pipeline that seamlessly integrates `AssemblyAITranscriber` and `OpenAIChatGenerator`. This pipeline generates answers based on the given question and the summarized transcription:
117
117
118
118
```python
119
119
from haystack import Pipeline
120
120
from haystack.utils import Secret
121
121
from haystack.components.retrievers.in_memory import InMemoryEmbeddingRetriever
122
122
from haystack.components.builders.prompt_builder import PromptBuilder
123
-
from haystack.components.generators importOpenAIGenerator
123
+
from haystack.components.generators.chatimportOpenAIChatGenerator
124
124
from assemblyai_haystack.transcriber import AssemblyAITranscriber
Since this filtering only returns the text where person A was the speaker, it can't find any relevant results. Run the same pipeline for speaker B information to get results.
199
199
200
200
```shell
201
-
{'llm': {'replies': ['The documents do not provide explicit information on who is more affected by wildfires.'],
202
-
'meta': [{'model': 'gpt-3.5-turbo-0613',
203
-
'index': 0,
204
-
'finish_reason': 'stop',
205
-
'usage': {'completion_tokens': 15,
206
-
'prompt_tokens': 177,
207
-
'total_tokens': 192}}]}}
201
+
{'llm': {'replies': [ChatMessage(_role=<ChatRole.ASSISTANT: 'assistant'>, _content=[TextContent(text='The documents do not provide explicit information on who is more affected by wildfires.')], _name=None, _meta={'model': 'gpt-4.1-mini-2025-04-14', 'index': 0, 'finish_reason': 'stop', 'usage': {'completion_tokens': 15, 'prompt_tokens': 177, 'total_tokens': 192}})]}}
You can leverage Azure OpenAI models through two components: [AzureOpenAIGenerator](https://docs.haystack.deepset.ai/docs/azureopenaigenerator) and [AzureOpenAIChatGenerator](https://docs.haystack.deepset.ai/docs/azureopenaichatgenerator).
85
+
You can leverage Azure OpenAI models through the [AzureOpenAIChatGenerator](https://docs.haystack.deepset.ai/docs/azureopenaichatgenerator) component.
87
86
88
-
To use OpenAI models deployed through Azure services for text generation, initialize a `AzureOpenAIGenerator` with `azure_deployment` and `azure_endpoint`. You can then use the `AzureOpenAIGenerator` instance in a pipeline after the `PromptBuilder`.
87
+
To use OpenAI models deployed through Azure services for text generation, initialize an `AzureOpenAIChatGenerator` with `azure_deployment` and `azure_endpoint`. You can then use the `AzureOpenAIChatGenerator` instance in a pipeline after the `PromptBuilder`.
89
88
90
-
Below is the example of generative questions answering pipeline using RAG with `PromptBuilder` and `AzureOpenAIGenerator`:
89
+
Below is the example of generative questions answering pipeline using RAG with `PromptBuilder` and `AzureOpenAIChatGenerator`:
91
90
92
91
```python
93
92
from haystack import Pipeline
94
93
from haystack.components.retrievers.in_memory import InMemoryBM25Retriever
95
94
from haystack.components.builders.prompt_builder import PromptBuilder
96
-
from haystack.components.generators importAzureOpenAIGenerator
95
+
from haystack.components.generators.chatimportAzureOpenAIChatGenerator
97
96
98
97
os.environ["AZURE_OPENAI_API_KEY"] ="Your Azure OpenAI API key"
99
98
os.environ["AZURE_OPENAI_AD_TOKEN"] ="Your Azure Active Directory Token"
0 commit comments