llama-index-llms-bedrock-converse 0.12.4__tar.gz → 0.12.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: llama-index-llms-bedrock-converse
3
- Version: 0.12.4
3
+ Version: 0.12.5
4
4
  Summary: llama-index llms bedrock converse integration
5
5
  Author-email: Your Name <you@example.com>
6
6
  License-Expression: MIT
@@ -491,7 +491,7 @@ def tools_to_converse_tools(
491
491
  tool_required: bool = False,
492
492
  tool_caching: bool = False,
493
493
  supports_forced_tool_calls: bool = True,
494
- ) -> Dict[str, Any]:
494
+ ) -> Optional[Dict[str, Any]]:
495
495
  """
496
496
  Converts a list of tools to AWS Bedrock Converse tools.
497
497
 
@@ -499,9 +499,12 @@ def tools_to_converse_tools(
499
499
  tools: List of BaseTools
500
500
 
501
501
  Returns:
502
- AWS Bedrock Converse tools
502
+ AWS Bedrock Converse tools, or None if tools list is empty
503
503
 
504
504
  """
505
+ if not tools:
506
+ return None
507
+
505
508
  converse_tools = []
506
509
  for tool in tools:
507
510
  tool_name, tool_description = tool.metadata.name, tool.metadata.description
@@ -29,7 +29,7 @@ dev = [
29
29
 
30
30
  [project]
31
31
  name = "llama-index-llms-bedrock-converse"
32
- version = "0.12.4"
32
+ version = "0.12.5"
33
33
  description = "llama-index llms bedrock converse integration"
34
34
  authors = [{name = "Your Name", email = "you@example.com"}]
35
35
  requires-python = ">=3.9,<4.0"