Skip to content

Commit 1722a35

Browse files
authored
fix model name check for bedrock embedder (#476)
1 parent f862081 commit 1722a35

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 1.0.15
2+
3+
### Fixes
4+
5+
* **Fix bedrock embedder precheck**
6+
17
## 1.0.14
28

39
### Enhancements

unstructured_ingest/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.0.14" # pragma: no cover
1+
__version__ = "1.0.15" # pragma: no cover

unstructured_ingest/embed/bedrock.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ def run_precheck(self) -> None:
9696
try:
9797
model_info = client.list_foundation_models(byOutputModality="EMBEDDING")
9898
summaries = model_info.get("modelSummaries", [])
99-
model_ids = [m["modelId"].split(":")[0] for m in summaries]
100-
arns = [":".join(m["modelArn"].split(":")[0:-1]) for m in summaries]
99+
model_ids = [m["modelId"] for m in summaries]
100+
arns = [":".join(m["modelArn"]) for m in summaries]
101101

102102
if self.embedder_model_name not in model_ids and self.embedder_model_name not in arns:
103103
raise UserError(

0 commit comments

Comments
 (0)