The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
Update bedrock.py - support of other endpoint url (esp. for users of … (#7592)
Ducasse-Arthur93a84f6182d0
diff --git a/langchain/llms/bedrock.py b/langchain/llms/bedrock.pyindex 884202a5a4..f923e0e5a3 100644--- a/langchain/llms/bedrock.py+++ b/langchain/llms/bedrock.py@@ -95,6 +95,9 @@ class Bedrock(LLM):model_kwargs: Optional[Dict] = None"""Key word arguments to pass to the model."""+ endpoint_url: Optional[str] = None+ """Needed if you don't want to default to us-east-1 endpoint"""+class Config:"""Configuration for this pydantic object."""@@ -120,6 +123,8 @@ class Bedrock(LLM):client_params = {}if values["region_name"]:client_params["region_name"] = values["region_name"]+ if values["endpoint_url"]:+ client_params["endpoint_url"] = values["endpoint_url"]values["client"] = session.client("bedrock", **client_params)