Skip to content

Commit

Permalink
AmazonBedrockChatGenerator with Claude raises moot warning for stream…
Browse files Browse the repository at this point in the history
… kwarg
  • Loading branch information
vblagoje committed Nov 21, 2024
1 parent 96e3951 commit 62f68f5
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ def prepare_body(self, messages: List[ChatMessage], **inference_kwargs) -> Dict[
stop_sequences = inference_kwargs.get("stop_sequences", []) + inference_kwargs.pop("stop_words", [])
if stop_sequences:
inference_kwargs["stop_sequences"] = stop_sequences
# pop stream kwarg from inference_kwargs as Anthropic does not support it (if provided)
inference_kwargs.pop("stream", None)
params = self._get_params(inference_kwargs, default_params, self.ALLOWED_PARAMS)
body = {**self.prepare_chat_messages(messages=messages), **params}
return body
Expand Down

0 comments on commit 62f68f5

Please sign in to comment.