Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Adjustments in _prepare_input_and_invoke_stream for meta models #117

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
6 changes: 1 addition & 5 deletions libs/aws/langchain_aws/llms/bedrock.py
Original file line number Diff line number Diff line change
Expand Up @@ -990,11 +990,7 @@ async def _aprepare_input_and_invoke_stream(
_model_kwargs = self.model_kwargs or {}
provider = self._get_provider()

if stop:
if provider not in self.provider_stop_sequence_key_name_map:
raise ValueError(
f"Stop sequence key name for {provider} is not supported."
)
if stop and provider in self.provider_stop_sequence_key_name_map:
if k := self.provider_stop_sequence_key_name_map.get(provider):
_model_kwargs[k] = stop

Expand Down