Skip to content

The agent engineering platform.

community: Fix the stop sequence key name for Mistral in Bedrock (#20709)

Matheus Henrique Raymundobb698192679f
diff --git a/libs/community/langchain_community/llms/bedrock.py b/libs/community/langchain_community/llms/bedrock.py
index 6d03c7be95..cfbc393b00 100644
--- a/libs/community/langchain_community/llms/bedrock.py
+++ b/libs/community/langchain_community/llms/bedrock.py
@@ -339,7 +339,7 @@ class BedrockBase(BaseModel, ABC):
"amazon": "stopSequences",
"ai21": "stop_sequences",
"cohere": "stop_sequences",
- "mistral": "stop_sequences",
+ "mistral": "stop",
}
guardrails: Optional[Mapping[str, Any]] = {