diff --git a/integrations/amazon_bedrock/src/haystack_integrations/components/generators/amazon_bedrock/chat/chat_generator.py b/integrations/amazon_bedrock/src/haystack_integrations/components/generators/amazon_bedrock/chat/chat_generator.py index 960968755..73f70eee2 100644 --- a/integrations/amazon_bedrock/src/haystack_integrations/components/generators/amazon_bedrock/chat/chat_generator.py +++ b/integrations/amazon_bedrock/src/haystack_integrations/components/generators/amazon_bedrock/chat/chat_generator.py @@ -1,6 +1,7 @@ import json import logging import re +import warnings from typing import Any, Callable, ClassVar, Dict, List, Optional, Type from botocore.exceptions import ClientError @@ -135,6 +136,12 @@ def resolve_secret(secret: Optional[Secret]) -> Optional[str]: self.stop_words = stop_words or [] self.streaming_callback = streaming_callback + warnings.warn( + "The `meta` output of the AmazonBedrockChatGenerator will change in the next release to be inline with " + "OpenAI `meta`output keys.", + stacklevel=2, + ) + def invoke(self, *args, **kwargs): """ Invokes the Amazon Bedrock LLM with the given parameters. The parameters are passed to the Amazon Bedrock diff --git a/integrations/anthropic/src/haystack_integrations/components/generators/anthropic/chat/chat_generator.py b/integrations/anthropic/src/haystack_integrations/components/generators/anthropic/chat/chat_generator.py index d150788d2..06b3dc353 100644 --- a/integrations/anthropic/src/haystack_integrations/components/generators/anthropic/chat/chat_generator.py +++ b/integrations/anthropic/src/haystack_integrations/components/generators/anthropic/chat/chat_generator.py @@ -1,5 +1,6 @@ import dataclasses import json +import warnings from typing import Any, Callable, ClassVar, Dict, List, Optional, Union from haystack import component, default_from_dict, default_to_dict, logging @@ -114,6 +115,12 @@ def __init__( self.client = Anthropic(api_key=self.api_key.resolve_value()) self.ignore_tools_thinking_messages = ignore_tools_thinking_messages + warnings.warn( + "The `meta` output of the AnthropicChatGenerator will change in the next release to be inline with " + "OpenAI `meta`output keys.", + stacklevel=2, + ) + def _get_telemetry_data(self) -> Dict[str, Any]: """ Data that is sent to Posthog for usage analytics.