From 139f1d4d9df991501563e1827b791ea8fe7db941 Mon Sep 17 00:00:00 2001 From: Samuel CHNIBER Date: Tue, 24 Dec 2024 16:44:00 +0100 Subject: [PATCH 1/2] fix #17317: corrected condition to include tools in boto3 client for Bedrock --- .../llama_index/llms/bedrock_converse/utils.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/llama-index-integrations/llms/llama-index-llms-bedrock-converse/llama_index/llms/bedrock_converse/utils.py b/llama-index-integrations/llms/llama-index-llms-bedrock-converse/llama_index/llms/bedrock_converse/utils.py index 2ad32f78003d9..35c5342570e90 100644 --- a/llama-index-integrations/llms/llama-index-llms-bedrock-converse/llama_index/llms/bedrock_converse/utils.py +++ b/llama-index-integrations/llms/llama-index-llms-bedrock-converse/llama_index/llms/bedrock_converse/utils.py @@ -337,12 +337,7 @@ def converse_with_retry( { k: v for k, v in kwargs.items() - if ( - k != "tools" - or k != "guardrail_identifier" - or k != "guardrail_version" - or k != "trace" - ) + if k not in ["tools", "guardrail_identifier", "guardrail_version", "trace"] }, ) @@ -395,12 +390,7 @@ async def converse_with_retry_async( { k: v for k, v in kwargs.items() - if ( - k != "tools" - or k != "guardrail_identifier" - or k != "guardrail_version" - or k != "trace" - ) + if k not in ["tools", "guardrail_identifier", "guardrail_version", "trace"] }, ) From beec393311c4ebd7023e29eae2a468e5bdeef355 Mon Sep 17 00:00:00 2001 From: Samuel CHNIBER Date: Tue, 24 Dec 2024 16:58:06 +0100 Subject: [PATCH 2/2] bump version of package --- .../llms/llama-index-llms-bedrock-converse/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama-index-integrations/llms/llama-index-llms-bedrock-converse/pyproject.toml b/llama-index-integrations/llms/llama-index-llms-bedrock-converse/pyproject.toml index ab4844f92d8f2..4b9d6b6f07bcf 100644 --- a/llama-index-integrations/llms/llama-index-llms-bedrock-converse/pyproject.toml +++ b/llama-index-integrations/llms/llama-index-llms-bedrock-converse/pyproject.toml @@ -27,7 +27,7 @@ exclude = ["**/BUILD"] license = "MIT" name = "llama-index-llms-bedrock-converse" readme = "README.md" -version = "0.4.2" +version = "0.4.3" [tool.poetry.dependencies] python = ">=3.9,<4.0"