gofannon 0.25.12.6__py3-none-any.whl → 0.25.13__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.
@@ -2,7 +2,7 @@ from typing import Type, Callable
2
2
 
3
3
  try:
4
4
  from langchain.tools import BaseTool as LangchainBaseTool
5
- from langchain.pydantic_v1 import BaseModel, Field
5
+ from pydantic.v1 import BaseModel, Field
6
6
 
7
7
  _HAS_LANGCHAIN = True
8
8
  except ImportError:
@@ -32,20 +32,29 @@ class SmolAgentsMixin:
32
32
  def smol_forward(*args, **kwargs):
33
33
  return self.fn(*args, **kwargs)
34
34
 
35
- inputs_definition = {
36
- "example_arg": {
37
- "type": "string",
38
- "description": "Example argument recognized by this tool",
35
+ # Get the parameters from the Gofannon tool definition
36
+ parameters = self.definition.get("function", {}).get("parameters", {})
37
+ param_properties = parameters.get("properties", {})
38
+ required_params = parameters.get("required", [])
39
+
40
+ # Create inputs_definition from the Gofannon tool definition
41
+ inputs_definition = {}
42
+ for param_name, param_def in param_properties.items():
43
+ inputs_definition[param_name] = {
44
+ "type": param_def.get("type", "string"),
45
+ "description": param_def.get("description", ""),
46
+ #"required": param_name in required_params
39
47
  }
40
- }
41
- output_type = "string"
48
+
49
+ # Get the description from the Gofannon tool definition
50
+ description = self.definition.get("function", {}).get("description", "Exported from Gofannon tool")
42
51
 
43
52
  exported_tool = SmolTool()
44
53
  exported_tool.name = getattr(self, "name", "exported_base_tool")
45
- exported_tool.description = getattr(self, "description", "Exported from Tool")
54
+ exported_tool.description = description
46
55
  exported_tool.inputs = inputs_definition
47
- exported_tool.output_type = output_type
56
+ exported_tool.output_type = "string"
48
57
  exported_tool.forward = smol_forward
49
58
  exported_tool.is_initialized = True
50
59
 
51
- return exported_tool
60
+ return exported_tool
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: gofannon
3
- Version: 0.25.12.6
3
+ Version: 0.25.13
4
4
  Summary: A collection of tools for LLMs
5
5
  License: ASFv2
6
6
  Author: Trevor Grant
@@ -4,8 +4,8 @@ gofannon/arxiv/get_article.py,sha256=SRGTXFXdXdXTIOLZKWUTXxZEYEqZFWFJEV2nTsU5qqU
4
4
  gofannon/arxiv/search.py,sha256=37Zx1y2vAX1xYIKaAxzBGXE3qPHUZdAD2XR0H1Acs-4,4225
5
5
  gofannon/base/__init__.py,sha256=8-uJsYAbLD-2e4clX73QZ8eip9S2PJlQ9JMRNWFHxSI,3387
6
6
  gofannon/base/bedrock.py,sha256=Z2c36R8jaIusgpmegbYVz2eR7lDBc0IhTtwiqUGOcT4,25646
7
- gofannon/base/langchain.py,sha256=gAmDT_khB28-p8KMf4lT4Buy2w4zrdP1jG4hOituQ54,2714
8
- gofannon/base/smol_agents.py,sha256=rrdsXiOF-LZ1eY08PCN3r8bg0YEaN1b4vPlSaxii4LI,1654
7
+ gofannon/base/langchain.py,sha256=25z9opy7E7qWP-DSn6oYAqKDg8i21az-kAKrsYLfyiQ,2704
8
+ gofannon/base/smol_agents.py,sha256=p2YU5BrscavGk5X9R7HSJmtVR5OpOsQwCd9hwC9eBMk,2229
9
9
  gofannon/basic_math/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
10
10
  gofannon/basic_math/addition.py,sha256=zA-xtUBNnGnQVqTJkBvjZwX0gnGZ6mrUGhrlTbsH1ts,1148
11
11
  gofannon/basic_math/division.py,sha256=ZO8ZzWNL9zeFdXTEdPWDpnbDrWMXVeucSu105RbQmWU,1229
@@ -37,7 +37,7 @@ gofannon/reasoning/base.py,sha256=D-4JHJqUlqgwMNOkKU0BHYA4GEWwNgPlLxKYHX0FVyg,14
37
37
  gofannon/reasoning/hierarchical_cot.py,sha256=e8ZgMbyJQ0wCBEmv7QJqFv7l3XxTMwDYupGxJ7EF6t8,11516
38
38
  gofannon/reasoning/sequential_cot.py,sha256=m9c8GnyTtmI-JntCuhkoFfULAabVOxsYgTRUd3MjzfY,3166
39
39
  gofannon/reasoning/tree_of_thought.py,sha256=TRhRJQNsFVauCLw4TOvQCDcX1nGmp_wSg9H67GJn1hs,10574
40
- gofannon-0.25.12.6.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
41
- gofannon-0.25.12.6.dist-info/METADATA,sha256=lwrZhfv6tY8sRYKLxuaoccxZj1WIfcKibeO5xxSSV-E,6039
42
- gofannon-0.25.12.6.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
43
- gofannon-0.25.12.6.dist-info/RECORD,,
40
+ gofannon-0.25.13.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
41
+ gofannon-0.25.13.dist-info/METADATA,sha256=i4xrcLJdSOMAvi4Fr7e3b8eMf6zzxGxyCiwrh804eTQ,6037
42
+ gofannon-0.25.13.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
43
+ gofannon-0.25.13.dist-info/RECORD,,