gofannon 0.25.10.1__tar.gz → 0.25.12__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.
Files changed (44) hide show
  1. {gofannon-0.25.10.1 → gofannon-0.25.12}/PKG-INFO +67 -14
  2. gofannon-0.25.12/README.md +111 -0
  3. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/base/__init__.py +27 -26
  4. gofannon-0.25.12/gofannon/base/bedrock.py +666 -0
  5. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/base/langchain.py +22 -10
  6. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/base/smol_agents.py +6 -4
  7. gofannon-0.25.12/gofannon/github/pr_review_tool.py +104 -0
  8. {gofannon-0.25.10.1 → gofannon-0.25.12}/pyproject.toml +4 -1
  9. gofannon-0.25.10.1/README.md +0 -61
  10. {gofannon-0.25.10.1 → gofannon-0.25.12}/LICENSE +0 -0
  11. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/__init__.py +0 -0
  12. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/arxiv/__init__.py +0 -0
  13. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/arxiv/get_article.py +0 -0
  14. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/arxiv/search.py +0 -0
  15. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/basic_math/__init__.py +0 -0
  16. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/basic_math/addition.py +0 -0
  17. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/basic_math/division.py +0 -0
  18. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/basic_math/exponents.py +0 -0
  19. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/basic_math/multiplication.py +0 -0
  20. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/basic_math/subtraction.py +0 -0
  21. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/cli.py +0 -0
  22. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/config.py +0 -0
  23. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/github/__init__.py +0 -0
  24. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/github/commit_file.py +0 -0
  25. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/github/commit_files.py +0 -0
  26. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/github/create_issue.py +0 -0
  27. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/github/get_repo_contents.py +0 -0
  28. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/github/read_issue.py +0 -0
  29. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/github/search.py +0 -0
  30. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/google_search/__init__.py +0 -0
  31. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/google_search/google_search.py +0 -0
  32. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/headless_browser/__init__.py +0 -0
  33. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/headless_browser/base.py +0 -0
  34. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/headless_browser/headless_browser_get.py +0 -0
  35. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/nhsta/__init__.py +0 -0
  36. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/open_notify_space/__init__.py +0 -0
  37. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/open_notify_space/iss_locator.py +0 -0
  38. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/orchestration/__init__.py +0 -0
  39. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/orchestration/firebase_wrapper.py +0 -0
  40. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/reasoning/__init__.py +0 -0
  41. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/reasoning/base.py +0 -0
  42. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/reasoning/hierarchical_cot.py +0 -0
  43. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/reasoning/sequential_cot.py +0 -0
  44. {gofannon-0.25.10.1 → gofannon-0.25.12}/gofannon/reasoning/tree_of_thought.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: gofannon
3
- Version: 0.25.10.1
3
+ Version: 0.25.12
4
4
  Summary: A collection of tools for LLMs
5
5
  License: ASFv2
6
6
  Author: Trevor Grant
@@ -12,17 +12,20 @@ Classifier: Programming Language :: Python :: 3.10
12
12
  Classifier: Programming Language :: Python :: 3.11
13
13
  Classifier: Programming Language :: Python :: 3.12
14
14
  Classifier: Programming Language :: Python :: 3.13
15
+ Provides-Extra: aws
15
16
  Provides-Extra: google
16
17
  Provides-Extra: headless-browser
17
18
  Provides-Extra: langchain
18
19
  Provides-Extra: smolagents
19
20
  Provides-Extra: testing
20
21
  Requires-Dist: GitPython (>=3.1.43,<4.0.0)
22
+ Requires-Dist: boto3 (>=1.34.97,<2.0.0) ; extra == "aws"
21
23
  Requires-Dist: google-api-python-client (>=2.161.0,<3.0.0) ; extra == "google"
22
24
  Requires-Dist: jsonschema (>=4.23.0,<5.0.0)
23
25
  Requires-Dist: langchain (>=0.3.16,<0.4.0) ; extra == "langchain"
24
26
  Requires-Dist: openai (>=1.60.2,<2.0.0)
25
27
  Requires-Dist: pydantic (>=2.10.6,<3.0.0) ; extra == "langchain"
28
+ Requires-Dist: pygithub (>=2.6.1,<3.0.0)
26
29
  Requires-Dist: pytest (>=8.3.4,<9.0.0) ; extra == "testing"
27
30
  Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
28
31
  Requires-Dist: requests (>=2.32.3,<3.0.0)
@@ -31,7 +34,12 @@ Requires-Dist: selenium (>=4.10.0,<5.0.0) ; extra == "headless-browser"
31
34
  Requires-Dist: smolagents (>=1.6.0,<2.0.0) ; extra == "smolagents"
32
35
  Description-Content-Type: text/markdown
33
36
 
34
- ![gofannon logo](./gofannon.jpg)
37
+ ![gofannon logo](https://github.com/The-AI-Alliance/gofannon/blob/main/gofannon.jpg)
38
+ <!-- ![CI](https://github.com/The-AI-Alliance/gofannon/actions/workflows/main.yml/badge.svg) -->
39
+ ![PyPI](https://img.shields.io/pypi/v/gofannon)
40
+ ![License](https://img.shields.io/github/license/The-AI-Alliance/gofannon)
41
+ ![Issues](https://img.shields.io/github/issues/The-AI-Alliance/gofannon)
42
+ ![GitHub stars](https://img.shields.io/github/stars/The-AI-Alliance/gofannon?style=social)
35
43
 
36
44
  # gofannon
37
45
 
@@ -39,7 +47,30 @@ Description-Content-Type: text/markdown
39
47
 
40
48
  ## Why the name `gofanon` ?
41
49
 
42
- See [`why_the_name_gofannon.md`](./why_the_name_gofannon.md) for the rich story on why we chose to honor this Celtic Diety
50
+ See [`why_the_name_gofannon.md`](https://the-ai-alliance.github.io/gofannon/about/the_name_gofannon/) for the rich story on why we chose to honor this Celtic Diety
51
+
52
+ ## Our Mission
53
+
54
+ We aim to achieve:
55
+
56
+ ### Cross-Framework Compatibility
57
+ We solve the "vendor lock-in" problem in AI tooling through:
58
+ - Standardized interface definitions
59
+ - Automatic schema translation
60
+ - Bidirectional conversion tools
61
+
62
+ ### Open Source Education
63
+ We make AI development accessible by:
64
+ - Curated contribution pathways
65
+ - Interactive documentation
66
+ - Pair programming sessions
67
+ - Weekly office hours
68
+
69
+ ### Encouraging First-Time Contributors
70
+ We actively support new contributors through:
71
+ - Beginner-friendly issues
72
+ - Clear documentation and guides
73
+ - Supportuve community engagement
43
74
 
44
75
  ## Features
45
76
 
@@ -51,20 +82,12 @@ See [`why_the_name_gofannon.md`](./why_the_name_gofannon.md) for the rich story
51
82
 
52
83
  ## Roadmap
53
84
 
54
- For a detailed overview of planned features and their current status, please refer to the [ROADMAP](./ROADMAP.md).
85
+ For a detailed overview of planned features and their current status, please refer to the [ROADMAP](https://github.com/The-AI-Alliance/gofannon/blob/main/ROADMAP.md).
55
86
 
56
87
  ## Documentation
57
88
 
58
- Documentation can be found [here](./docs).
89
+ Documentation can be found [here](https://github.com/The-AI-Alliance/gofannon/tree/main/docs).Each tool comes with its own documentation, which can be found in the docs/ directory. The documentation provides detailed information on how to use each tool, including required parameters and example usage.
59
90
 
60
- ## Contributing
61
-
62
- We welcome contributions from the community! If you'd like to add a new tool or improve an existing one, please check out our [CONTRIBUTING](./CONTRIBUTING.md) guide for detailed instructions on how to get started.
63
-
64
- ## Documentation
65
-
66
- Each tool comes with its own documentation, which can be found in the `docs/` directory. The documentation provides detailed information on how to use each tool, including required parameters and example usage.
67
-
68
91
  ## Installation
69
92
 
70
93
  To install gofannon, simply clone the repository and install the required dependencies:
@@ -79,11 +102,41 @@ or
79
102
 
80
103
  ```
81
104
  pip install git+https://github.com/The-AI-Alliance/gofannon.git
105
+ # OR
106
+ pip install gofannon
107
+ ```
108
+
109
+ ## Communication Channels
110
+ - **Discord** [Join our Discord server](https://discord.gg/2MMCVs76Sr)for eal-time collaboration and support
111
+ - **GitHub Discussions**: Explore our [GitHub organization](https://github.com/The-AI-Alliance/agents-wg/discussions/) for all related projects
112
+ - **Community Calls**: [Join our bi-weekly video meetings](https://calendar.app.google/c4eKW4zrNiXaue926)
113
+
114
+ ## Usage Example
115
+ ```bash
116
+ from gofannon.base import BaseTool
117
+
118
+ class NewTool(BaseTool):
119
+ def __init__(self):
120
+ super().__init__()
121
+
122
+ @property
123
+ def definition(self):
124
+ return {
125
+ # Define your tool metadata and configuration
126
+ }
127
+
128
+ def fn(self, *args, **kwargs):
129
+ # Define your tool functionality
130
+ pass
82
131
  ```
83
132
 
84
133
  ## License
85
134
 
86
- This project is licensed under the ASFv2 License. See the [LICENSE](./LICENSE) file for more details.
135
+ This project is licensed under the ASFv2 License. See the [LICENSE](https://github.com/The-AI-Alliance/gofannon/blob/main/LICENSE) file for more details.
136
+
137
+ ## Contributing
138
+
139
+ We welcome contributions from the community! If you'd like to add a new tool or improve an existing one, please check out our [CONTRIBUTING](https://github.com/The-AI-Alliance/gofannon/blob/main/CONTRIBUTING.md) guide for detailed instructions on how to get started.
87
140
 
88
141
  ## Support
89
142
 
@@ -0,0 +1,111 @@
1
+ ![gofannon logo](https://github.com/The-AI-Alliance/gofannon/blob/main/gofannon.jpg)
2
+ <!-- ![CI](https://github.com/The-AI-Alliance/gofannon/actions/workflows/main.yml/badge.svg) -->
3
+ ![PyPI](https://img.shields.io/pypi/v/gofannon)
4
+ ![License](https://img.shields.io/github/license/The-AI-Alliance/gofannon)
5
+ ![Issues](https://img.shields.io/github/issues/The-AI-Alliance/gofannon)
6
+ ![GitHub stars](https://img.shields.io/github/stars/The-AI-Alliance/gofannon?style=social)
7
+
8
+ # gofannon
9
+
10
+ **gofannon** is a collection of tools designed to enhance the capabilities of function-calling-enabled language models. These tools provide additional functionality for various tasks, including mathematical operations, GitHub interactions, arXiv searches, and advanced reasoning techniques.
11
+
12
+ ## Why the name `gofanon` ?
13
+
14
+ See [`why_the_name_gofannon.md`](https://the-ai-alliance.github.io/gofannon/about/the_name_gofannon/) for the rich story on why we chose to honor this Celtic Diety
15
+
16
+ ## Our Mission
17
+
18
+ We aim to achieve:
19
+
20
+ ### Cross-Framework Compatibility
21
+ We solve the "vendor lock-in" problem in AI tooling through:
22
+ - Standardized interface definitions
23
+ - Automatic schema translation
24
+ - Bidirectional conversion tools
25
+
26
+ ### Open Source Education
27
+ We make AI development accessible by:
28
+ - Curated contribution pathways
29
+ - Interactive documentation
30
+ - Pair programming sessions
31
+ - Weekly office hours
32
+
33
+ ### Encouraging First-Time Contributors
34
+ We actively support new contributors through:
35
+ - Beginner-friendly issues
36
+ - Clear documentation and guides
37
+ - Supportuve community engagement
38
+
39
+ ## Features
40
+
41
+ - **Basic Math Operations**: Perform addition, subtraction, multiplication, division, and exponentiation.
42
+ - **GitHub Integration**: Interact with GitHub repositories, including creating issues, committing files, and retrieving repository contents.
43
+ - **arXiv Search**: Search for and retrieve articles from arXiv.
44
+ - **Advanced Reasoning**: Utilize Chain-of-Thought (CoT) and Tree-of-Thought (ToT) reasoning techniques for complex problem-solving.
45
+ - **NHTSA Complaints**: Retrieve vehicle complaint data from the National Highway Traffic Safety Administration (NHTSA).
46
+
47
+ ## Roadmap
48
+
49
+ For a detailed overview of planned features and their current status, please refer to the [ROADMAP](https://github.com/The-AI-Alliance/gofannon/blob/main/ROADMAP.md).
50
+
51
+ ## Documentation
52
+
53
+ Documentation can be found [here](https://github.com/The-AI-Alliance/gofannon/tree/main/docs).Each tool comes with its own documentation, which can be found in the docs/ directory. The documentation provides detailed information on how to use each tool, including required parameters and example usage.
54
+
55
+ ## Installation
56
+
57
+ To install gofannon, simply clone the repository and install the required dependencies:
58
+
59
+ ```bash
60
+ git clone https://github.com/The-AI-Alliance/gofannon.git
61
+ cd gofannon
62
+ pip install -r requirements.txt
63
+ ```
64
+
65
+ or
66
+
67
+ ```
68
+ pip install git+https://github.com/The-AI-Alliance/gofannon.git
69
+ # OR
70
+ pip install gofannon
71
+ ```
72
+
73
+ ## Communication Channels
74
+ - **Discord** [Join our Discord server](https://discord.gg/2MMCVs76Sr)for eal-time collaboration and support
75
+ - **GitHub Discussions**: Explore our [GitHub organization](https://github.com/The-AI-Alliance/agents-wg/discussions/) for all related projects
76
+ - **Community Calls**: [Join our bi-weekly video meetings](https://calendar.app.google/c4eKW4zrNiXaue926)
77
+
78
+ ## Usage Example
79
+ ```bash
80
+ from gofannon.base import BaseTool
81
+
82
+ class NewTool(BaseTool):
83
+ def __init__(self):
84
+ super().__init__()
85
+
86
+ @property
87
+ def definition(self):
88
+ return {
89
+ # Define your tool metadata and configuration
90
+ }
91
+
92
+ def fn(self, *args, **kwargs):
93
+ # Define your tool functionality
94
+ pass
95
+ ```
96
+
97
+ ## License
98
+
99
+ This project is licensed under the ASFv2 License. See the [LICENSE](https://github.com/The-AI-Alliance/gofannon/blob/main/LICENSE) file for more details.
100
+
101
+ ## Contributing
102
+
103
+ We welcome contributions from the community! If you'd like to add a new tool or improve an existing one, please check out our [CONTRIBUTING](https://github.com/The-AI-Alliance/gofannon/blob/main/CONTRIBUTING.md) guide for detailed instructions on how to get started.
104
+
105
+ ## Support
106
+
107
+ If you encounter any issues or have questions, please open an issue on our [GitHub repository](https://github.com/your-repo/gofannon/issues).
108
+
109
+ ## Acknowledgments
110
+
111
+ We would like to thank the open-source community for their contributions and support in making this project possible.
@@ -9,6 +9,8 @@ from ..config import ToolConfig
9
9
 
10
10
  from .smol_agents import SmolAgentsMixin
11
11
  from .langchain import LangchainMixin
12
+ from .bedrock import BedrockMixin
13
+
12
14
 
13
15
  @dataclass
14
16
  class ToolResult:
@@ -17,6 +19,7 @@ class ToolResult:
17
19
  error: str = None
18
20
  retryable: bool = False
19
21
 
22
+
20
23
  class WorkflowContext:
21
24
  def __init__(self, firebase_config=None):
22
25
  self.data = {}
@@ -33,34 +36,37 @@ class WorkflowContext:
33
36
 
34
37
  def _save_local(self, name):
35
38
  path = self.local_storage / f"{name}.json"
36
- with open(path, 'w') as f:
37
- json.dump({
38
- 'data': self.data,
39
- 'execution_log': self.execution_log
40
- }, f)
39
+ with open(path, "w") as f:
40
+ json.dump({"data": self.data, "execution_log": self.execution_log}, f)
41
41
 
42
42
  def _save_to_firebase(self, name):
43
43
  from firebase_admin import firestore
44
+
44
45
  db = firestore.client()
45
- doc_ref = db.collection('checkpoints').document(name)
46
- doc_ref.set({
47
- 'data': self.data,
48
- 'execution_log': self.execution_log,
49
- 'timestamp': firestore.SERVER_TIMESTAMP
50
- })
46
+ doc_ref = db.collection("checkpoints").document(name)
47
+ doc_ref.set(
48
+ {
49
+ "data": self.data,
50
+ "execution_log": self.execution_log,
51
+ "timestamp": firestore.SERVER_TIMESTAMP,
52
+ }
53
+ )
51
54
 
52
55
  def log_execution(self, tool_name, duration, input_data, output_data):
53
56
  entry = {
54
- 'tool': tool_name,
55
- 'duration': duration,
56
- 'input': input_data,
57
- 'output': output_data
57
+ "tool": tool_name,
58
+ "duration": duration,
59
+ "input": input_data,
60
+ "output": output_data,
58
61
  }
59
62
  self.execution_log.append(entry)
60
63
 
61
- class BaseTool(SmolAgentsMixin, LangchainMixin, ABC):
64
+
65
+ class BaseTool(SmolAgentsMixin, LangchainMixin, BedrockMixin, ABC):
62
66
  def __init__(self, **kwargs):
63
- self.logger = logging.getLogger(f"{self.__class__.__module__}.{self.__class__.__name__}")
67
+ self.logger = logging.getLogger(
68
+ f"{self.__class__.__module__}.{self.__class__.__name__}"
69
+ )
64
70
  self._load_config()
65
71
  self._configure(**kwargs)
66
72
  self.logger.debug("Initialized %s tool", self.__class__.__name__)
@@ -73,7 +79,7 @@ class BaseTool(SmolAgentsMixin, LangchainMixin, ABC):
73
79
 
74
80
  def _load_config(self):
75
81
  """Auto-load config based on tool type"""
76
- if hasattr(self, 'API_SERVICE'):
82
+ if hasattr(self, "API_SERVICE"):
77
83
  self.api_key = ToolConfig.get(f"{self.API_SERVICE}_api_key")
78
84
 
79
85
  @property
@@ -83,7 +89,7 @@ class BaseTool(SmolAgentsMixin, LangchainMixin, ABC):
83
89
 
84
90
  @property
85
91
  def output_schema(self):
86
- return self.definition.get('function', {}).get('parameters', {})
92
+ return self.definition.get("function", {}).get("parameters", {})
87
93
 
88
94
  @abstractmethod
89
95
  def fn(self, *args, **kwargs):
@@ -99,14 +105,9 @@ class BaseTool(SmolAgentsMixin, LangchainMixin, ABC):
99
105
  tool_name=self.__class__.__name__,
100
106
  duration=duration,
101
107
  input_data=kwargs,
102
- output_data=result
108
+ output_data=result,
103
109
  )
104
110
 
105
111
  return ToolResult(success=True, output=result)
106
112
  except Exception as e:
107
- return ToolResult(
108
- success=False,
109
- output=None,
110
- error=str(e),
111
- retryable=True
112
- )
113
+ return ToolResult(success=False, output=None, error=str(e), retryable=True)