Skip to content

Commit c131efd

Browse files
committed
fix(llm): fix boto3 metadata endpoint
1 parent 4a54ac0 commit c131efd

File tree

3 files changed

+429
-429
lines changed

3 files changed

+429
-429
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath-langchain"
3-
version = "0.5.10"
3+
version = "0.5.11"
44
description = "Python SDK that enables developers to build and deploy LangGraph agents to the UiPath Cloud Platform"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"

src/uipath_langchain/chat/bedrock.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ def _check_bedrock_dependencies() -> None:
4444
_check_bedrock_dependencies()
4545

4646
import boto3
47-
import botocore.config
47+
from botocore import UNSIGNED
48+
from botocore.config import Config
4849
from langchain_aws import (
4950
ChatBedrock,
5051
ChatBedrockConverse,
@@ -97,10 +98,11 @@ def get_client(self):
9798
region_name="none",
9899
aws_access_key_id="none",
99100
aws_secret_access_key="none",
100-
config=botocore.config.Config(
101+
config=Config(
102+
signature_version=UNSIGNED,
101103
retries={
102104
"total_max_attempts": 1,
103-
}
105+
},
104106
),
105107
)
106108
client.meta.events.register(
@@ -183,6 +185,7 @@ def __init__(
183185
client = passthrough_client.get_client()
184186
kwargs["client"] = client
185187
kwargs["model"] = model_name
188+
kwargs.setdefault("region_name", "none")
186189
super().__init__(**kwargs)
187190
self.model = model_name
188191
self.retryer = retryer
@@ -244,6 +247,7 @@ def __init__(
244247
client = passthrough_client.get_client()
245248
kwargs["client"] = client
246249
kwargs["model"] = model_name
250+
kwargs.setdefault("region_name", "none")
247251
super().__init__(**kwargs)
248252
self.model = model_name
249253
self.retryer = retryer

0 commit comments

Comments
 (0)