unique_toolkit 1.1.4__py3-none-any.whl → 1.1.5__py3-none-any.whl

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.
@@ -0,0 +1 @@
1
+ # Utils package for common utilities
@@ -0,0 +1 @@
1
+ # Structured output utilities package
@@ -1,41 +1,15 @@
1
1
  from enum import StrEnum
2
- from typing import TYPE_CHECKING, Any
2
+ from typing import Any
3
3
 
4
- import humps
5
4
  from pydantic import (
6
5
  BaseModel,
7
- ConfigDict,
8
6
  Field,
9
7
  ValidationInfo,
10
8
  model_validator,
11
9
  )
12
- from pydantic.alias_generators import to_camel
13
- from pydantic.fields import ComputedFieldInfo, FieldInfo
14
10
 
15
- if TYPE_CHECKING:
16
- from unique_toolkit.agentic.tools.schemas import BaseToolConfig
17
-
18
-
19
- def field_title_generator(
20
- title: str,
21
- info: FieldInfo | ComputedFieldInfo,
22
- ) -> str:
23
- return humps.decamelize(title).replace("_", " ").title()
24
-
25
-
26
- def model_title_generator(model: type) -> str:
27
- return humps.decamelize(model.__name__).replace("_", " ").title()
28
-
29
-
30
- def get_configuration_dict(**kwargs) -> ConfigDict:
31
- return ConfigDict(
32
- alias_generator=to_camel,
33
- field_title_generator=field_title_generator,
34
- model_title_generator=model_title_generator,
35
- populate_by_name=True,
36
- protected_namespaces=(),
37
- **kwargs,
38
- )
11
+ from unique_toolkit._common.pydantic_helpers import get_configuration_dict
12
+ from unique_toolkit.agentic.tools.schemas import BaseToolConfig
39
13
 
40
14
 
41
15
  class ToolIcon(StrEnum):
@@ -63,7 +37,7 @@ class ToolBuildConfig(BaseModel):
63
37
  """Main tool configuration"""
64
38
 
65
39
  name: str
66
- configuration: "BaseToolConfig"
40
+ configuration: BaseToolConfig
67
41
  display_name: str = ""
68
42
  icon: ToolIcon = ToolIcon.BOOK
69
43
  selection_policy: ToolSelectionPolicy = Field(
@@ -5,7 +5,7 @@ from typing import Any, Optional
5
5
 
6
6
  from pydantic import BaseModel, ConfigDict, Field, field_serializer, field_validator
7
7
 
8
- from unique_toolkit.agentic.tools.config import get_configuration_dict
8
+ from unique_toolkit._common.pydantic_helpers import get_configuration_dict
9
9
  from unique_toolkit.agentic.tools.utils.source_handling.schema import SourceFormatConfig
10
10
  from unique_toolkit.content.schemas import ContentChunk
11
11
 
@@ -61,6 +61,11 @@ class Tool(ABC, Generic[ConfigType]):
61
61
  """
62
62
  return False
63
63
 
64
+ @property
65
+ def configuration(self) -> BaseToolConfig:
66
+ """The configuration of the tool."""
67
+ return self.settings.configuration
68
+
64
69
  @abstractmethod
65
70
  def tool_description(self) -> LanguageModelToolDescription:
66
71
  raise NotImplementedError
@@ -72,18 +77,23 @@ class Tool(ABC, Generic[ConfigType]):
72
77
  else:
73
78
  return cast("dict[str, Any]", parameters)
74
79
 
80
+ # TODO: This method should be a property
75
81
  def tool_description_for_system_prompt(self) -> str:
76
82
  return ""
77
83
 
84
+ # TODO: This method should be a property
78
85
  def tool_format_information_for_system_prompt(self) -> str:
79
86
  return ""
80
87
 
88
+ # TODO: This method should be a property
81
89
  def tool_description_for_user_prompt(self) -> str:
82
90
  return ""
83
91
 
92
+ # TODO: This method should be a property
84
93
  def tool_format_information_for_user_prompt(self) -> str:
85
94
  return ""
86
95
 
96
+ # TODO: This method should be a property
87
97
  def tool_format_reminder_for_user_prompt(self) -> str:
88
98
  """A short reminder for the user prompt for formatting rules for the tool.
89
99
  You can use this if the LLM fails to follow the formatting rules.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unique_toolkit
3
- Version: 1.1.4
3
+ Version: 1.1.5
4
4
  Summary:
5
5
  License: Proprietary
6
6
  Author: Cedric Klinkert
@@ -118,6 +118,8 @@ All notable changes to this project will be documented in this file.
118
118
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
119
119
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
120
120
 
121
+ ## [1.1.4] - 2025-09-23
122
+ - Fix a circular import and add tests for `ToolBuildConfig`
121
123
 
122
124
  ## [1.1.4] - 2025-09-23
123
125
  - First version human verification on api calls
@@ -17,6 +17,8 @@ unique_toolkit/_common/pydantic_helpers.py,sha256=TVEYUaBnsXRXmjmdtaM0LV_0-7NX9S
17
17
  unique_toolkit/_common/string_utilities.py,sha256=pbsjpnz1mwGeugebHzubzmmDtlm18B8e7xJdSvLnor0,2496
18
18
  unique_toolkit/_common/token/image_token_counting.py,sha256=VpFfZyY0GIH27q_Wy4YNjk2algqvbCtJyzuuROoFQPw,2189
19
19
  unique_toolkit/_common/token/token_counting.py,sha256=gM4B_aUqKqEPvmStFNcvCWNMNNNNKbVaywBDxlbgIps,7121
20
+ unique_toolkit/_common/utils/__init__.py,sha256=qHrEy-3zkbFPdGFriRscPbGKuQfOuPi3O7tE5Zw5VHY,37
21
+ unique_toolkit/_common/utils/structured_output/__init__.py,sha256=nm_orZrlCXL0FPLUg0Jv6Ty1flXPkCgZ9caAWaS8rz8,38
20
22
  unique_toolkit/_common/utils/structured_output/schema.py,sha256=Tp7kDYcmKtnUhcuRkH86TSYhylRff0ZZJYb2dLkISts,131
21
23
  unique_toolkit/_common/utils/write_configuration.py,sha256=fzvr4C-XBL3OSM3Od9TbqIxeeDS9_d9CLEyTq6DDknY,1409
22
24
  unique_toolkit/_common/validate_required_values.py,sha256=Y_M1ub9gIKP9qZ45F6Zq3ZHtuIqhmOjl8Z2Vd3avg8w,588
@@ -54,16 +56,16 @@ unique_toolkit/agentic/tools/a2a/memory.py,sha256=4VFBzITCv5E_8YCc4iF4Y6FhzplS2C
54
56
  unique_toolkit/agentic/tools/a2a/schema.py,sha256=T1l5z6trtPE5nhqPzt5tvfRNDhqL_ST1Wj7_lBWJ58g,304
55
57
  unique_toolkit/agentic/tools/a2a/service.py,sha256=7n7BkJxTR-hpoQczfHLK8eS0rtATL7-YARH-4netbbI,5339
56
58
  unique_toolkit/agentic/tools/agent_chunks_hanlder.py,sha256=x32Dp1Z8cVW5i-XzXbaMwX2KHPcNGmqEU-FB4AV9ZGo,1909
57
- unique_toolkit/agentic/tools/config.py,sha256=1--Gq-MG2RorTKdBHHyx0EFC_d2uRynJ-L_K-fjOjvA,3899
59
+ unique_toolkit/agentic/tools/config.py,sha256=NWFp8Kr8LOSoOk0cy207tFnenomu3HXSjEqMvi7tJJQ,3221
58
60
  unique_toolkit/agentic/tools/factory.py,sha256=Wt0IGSbLg8ZTq5PU9p_JTW0LtNATWLpc3336irJKXlM,1277
59
61
  unique_toolkit/agentic/tools/mcp/__init__.py,sha256=RLF_p-LDRC7GhiB3fdCi4u3bh6V9PY_w26fg61BLyco,122
60
62
  unique_toolkit/agentic/tools/mcp/manager.py,sha256=DPYwwDe6RSZyuPaxn-je49fP_qOOs0ZV46EM6GZcV4c,2748
61
63
  unique_toolkit/agentic/tools/mcp/models.py,sha256=OyCCb7Vwv1ftzC_OCpFkf3TX9Aeb74ZZagG-qK5peIU,722
62
64
  unique_toolkit/agentic/tools/mcp/tool_wrapper.py,sha256=5UdtqFtZ0aqjae2eL3zVacDMfr1hu5KiQkaoI7VkhqA,9972
63
- unique_toolkit/agentic/tools/schemas.py,sha256=Nk2U2WEK9WEuxyoDQ0gjegoHPHUrt_Ozck4HfFQZJAM,4833
65
+ unique_toolkit/agentic/tools/schemas.py,sha256=0ZR8xCdGj1sEdPE0lfTIG2uSR5zqWoprUa3Seqez4C8,4837
64
66
  unique_toolkit/agentic/tools/test/test_mcp_manager.py,sha256=9F7FjpYKeOkg2Z4bt2H1WGaxu9fzB-1iiE-b7g3KzQk,15724
65
67
  unique_toolkit/agentic/tools/test/test_tool_progress_reporter.py,sha256=dod5QPqgGUInVAGXAbsAKNTEypIi6pUEWhDbJr9YfUU,6307
66
- unique_toolkit/agentic/tools/tool.py,sha256=8ExasfdLrdyOXWrcKi8dtvR1vYbdFV0UcS4UDf-5XXs,6369
68
+ unique_toolkit/agentic/tools/tool.py,sha256=m56VLxiHuKU2_J5foZp00xhm5lTxWEW7zRLGbIE9ssU,6744
67
69
  unique_toolkit/agentic/tools/tool_manager.py,sha256=RWz6hKzuTTqzry5KpaeSfsO84zMp6RqVfX59YWFYblc,11034
68
70
  unique_toolkit/agentic/tools/tool_progress_reporter.py,sha256=ixud9VoHey1vlU1t86cW0-WTvyTwMxNSWBon8I11SUk,7955
69
71
  unique_toolkit/agentic/tools/utils/__init__.py,sha256=iD1YYzf9LcJFv95Z8BqCAFSewNBabybZRZyvPKGfvro,27
@@ -126,7 +128,7 @@ unique_toolkit/short_term_memory/schemas.py,sha256=OhfcXyF6ACdwIXW45sKzjtZX_gkcJ
126
128
  unique_toolkit/short_term_memory/service.py,sha256=5PeVBu1ZCAfyDb2HLVvlmqSbyzBBuE9sI2o9Aajqjxg,8884
127
129
  unique_toolkit/smart_rules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
128
130
  unique_toolkit/smart_rules/compile.py,sha256=cxWjb2dxEI2HGsakKdVCkSNi7VK9mr08w5sDcFCQyWI,9553
129
- unique_toolkit-1.1.4.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
130
- unique_toolkit-1.1.4.dist-info/METADATA,sha256=2BBFs3a2HGMSWyyk2MQV5gAVJUINJC3Bua6hF4VklcI,32722
131
- unique_toolkit-1.1.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
132
- unique_toolkit-1.1.4.dist-info/RECORD,,
131
+ unique_toolkit-1.1.5.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
132
+ unique_toolkit-1.1.5.dist-info/METADATA,sha256=J5VKFRheot-bjwdjbOoXzTR4NlgWvq5dNZ1ffBE7sVg,32806
133
+ unique_toolkit-1.1.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
134
+ unique_toolkit-1.1.5.dist-info/RECORD,,