deepset-ai / haystack-core-integrations

Additional packages (components, document stores and the likes) to extend the capabilities of Haystack version 2.0 and onwards
https://haystack.deepset.ai
Apache License 2.0
121 stars 119 forks source link

irrelevant warning: AmazonBedrockChatGenerator with AnthropicClaude #1113

Closed Nathan-Kr closed 1 day ago

Nathan-Kr commented 1 month ago

Using AmazonBedrockChatGenerator in a pipeline cause the following warning; {"event": "Parameter 'stream' is not allowed and will be ignored.", "level": "warning", "timestamp": "2024-09-26T16:26:40.966021Z", "lineno": 79, "module": "haystack_integrations.components.generators.amazon_bedrock.chat.adapters"}

Parameter is set here removing the line seems to have no impact, and silent the warning.

Either it should not be set or added to the list of ALLOWED_PARAMS

Warning can be triggered with this code:

from haystack.dataclasses import ChatMessage
from haystack.utils import Secret
from haystack_integrations.components.generators.amazon_bedrock import AmazonBedrockChatGenerator

AmazonBedrockChatGenerator(
    model="anthropic.claude-3-haiku-20240307-v1:0",
    aws_region_name=Secret.from_token("eu-west-3")
).run([ChatMessage.from_user("Hello, how are you?")])

amazon-bedrock-haystack 1.0.2 haystack-ai 2.5.1 python 3.10