gofannon 0.25.13__py3-none-any.whl → 0.25.14__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.
@@ -88,7 +88,8 @@ class CommitFiles(BaseTool):
88
88
  if branch in repo.heads:
89
89
  # If it does, checkout the branch and pull the latest changes
90
90
  repo.git.checkout(branch)
91
- repo.git.pull()
91
+ # Explicit pull from origin/branch to avoid tracking dependency
92
+ repo.git.pull('origin', branch)
92
93
  else:
93
94
  # If it does not exist, checkout the base branch and create a new branch
94
95
  try:
@@ -112,5 +113,6 @@ class CommitFiles(BaseTool):
112
113
  repo.index.commit(commit_msg)
113
114
 
114
115
  origin = repo.remotes.origin
115
- origin.push(branch)
116
+ # Push with tracking (still recommended)
117
+ repo.git.push('-u', 'origin', branch)
116
118
  return "Files committed and pushed successfully"
File without changes
@@ -0,0 +1,78 @@
1
+ from ..base import BaseTool
2
+ from ..config import FunctionRegistry
3
+ import logging
4
+ import requests
5
+
6
+ logger = logging.getLogger(__name__)
7
+
8
+ """Wikipedia Lookup Tool for retrieving article summaries from Wikipedia.
9
+ This class provides functionality to fetch summaries of Wikipedia articles using the Wikipedia REST API.
10
+ Attributes:
11
+ name (str): The name identifier for the tool, defaults to 'wikipedia_lookup'
12
+ Methods:
13
+ definition: Returns the OpenAI function definition schema for the tool
14
+ fn(query): Executes the Wikipedia lookup and returns article data
15
+ The tool performs the following:
16
+ 1. Accepts a search query string
17
+ 2. Makes a GET request to Wikipedia's REST API
18
+ 3. Returns a dictionary containing:
19
+ - title: The article title
20
+ - summary: The article extract/summary
21
+ - image: URL to the article's thumbnail image (if available)
22
+ - url: URL to the full Wikipedia article page
23
+ If the API request fails, it returns an error dictionary.
24
+ Example:
25
+ tool = WikipediaLookup()
26
+ result = tool.fn("Python programming")
27
+ # Returns dictionary with article data or error message
28
+ Raises:
29
+ Handles HTTP errors internally by returning error dictionary
30
+ Returns:
31
+ dict: Article data including title, summary, image URL, and article URL,
32
+ or error message if lookup fails
33
+ """
34
+
35
+ @FunctionRegistry.register
36
+ class WikipediaLookup(BaseTool):
37
+ def __init__(self, name='wikipedia_lookup'):
38
+ super().__init__()
39
+ self.name = name
40
+
41
+ @property
42
+ def definition(self):
43
+ return{
44
+ "type": "function",
45
+ "function": {
46
+ "name": self.name,
47
+ "description": "Fetches a Wikipedia summary for a given search term.",
48
+ "parameters": {
49
+ "type": "object",
50
+ "properties": {
51
+ "query": {
52
+ "type": "string",
53
+ "description": "The search term to look up on Wikipedia."
54
+ }
55
+ },
56
+ "required": ["query"]
57
+ }
58
+ }
59
+ }
60
+
61
+ def fn(self, query):
62
+ logger.debug(f"Fetching Wikipedia summary for: {query}")
63
+ base_url = "https://en.wikipedia.org/api/rest_v1/page/summary/"
64
+ response = requests.get(base_url + query.replace(" ", "_"))
65
+
66
+ if response.status_code == 200:
67
+ data = response.json()
68
+ return {
69
+ "title": data.get("title", "No title found"),
70
+ "summary": data.get("extract", "No summary found"),
71
+ "image": data.get("thumbnail", {}).get("source", None),
72
+ "url": data.get("content_urls", {}).get("desktop", {}).get("page", None)
73
+ }
74
+ else:
75
+ return{
76
+ "error": f"Failed to fetch Wikipedia summary for {query}"
77
+ }
78
+
@@ -0,0 +1,118 @@
1
+ Metadata-Version: 2.3
2
+ Name: gofannon
3
+ Version: 0.25.14
4
+ Summary: A collection of tools for LLMs
5
+ License: ASFv2
6
+ Author: Trevor Grant
7
+ Author-email: trevor.d.grant@gmail.com
8
+ Requires-Python: >=3.10,<4.0
9
+ Classifier: License :: Other/Proprietary License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Provides-Extra: aws
16
+ Provides-Extra: google
17
+ Provides-Extra: headless-browser
18
+ Provides-Extra: langchain
19
+ Provides-Extra: smolagents
20
+ Provides-Extra: testing
21
+ Requires-Dist: GitPython (>=3.1.43,<4.0.0)
22
+ Requires-Dist: boto3 (>=1.34.97,<2.0.0) ; extra == "aws"
23
+ Requires-Dist: google-api-python-client (>=2.161.0,<3.0.0) ; extra == "google"
24
+ Requires-Dist: jsonschema (>=4.23.0,<5.0.0)
25
+ Requires-Dist: langchain (>=0.3.16,<0.4.0) ; extra == "langchain"
26
+ Requires-Dist: openai (>=1.60.2,<2.0.0)
27
+ Requires-Dist: pydantic (>=2.10.6,<3.0.0) ; extra == "langchain"
28
+ Requires-Dist: pygithub (>=2.6.1,<3.0.0)
29
+ Requires-Dist: pytest (>=8.3.4,<9.0.0) ; extra == "testing"
30
+ Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
31
+ Requires-Dist: requests (>=2.32.3,<3.0.0)
32
+ Requires-Dist: requests-mock (>=1.12.1,<2.0.0) ; extra == "testing"
33
+ Requires-Dist: selenium (>=4.10.0,<5.0.0) ; extra == "headless-browser"
34
+ Requires-Dist: smolagents (>=1.6.0,<2.0.0) ; extra == "smolagents"
35
+ Description-Content-Type: text/markdown
36
+
37
+ ![logo](https://the-ai-alliance.github.io/gofannon/assets/images/logo_1000x1260.png)
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)
43
+
44
+ # `gofannon`
45
+
46
+ **[gofannon](https://the-ai-alliance.github.io/gofannon/)** is a collection of tools designed to enhance the capabilities of
47
+ function-calling-enabled language models/agents. These tools provide additional
48
+ functionality for various tasks.
49
+
50
+
51
+ ## 🌟🌟 Features 🌟🌟
52
+
53
+ 1. Cross-Framework Compatibility (Import From/Export To Multiple Frameworks)
54
+ - **Current:** `smolagents`, LangChain, AWS Bedrock
55
+ - **Currently Being Developed:** [Up To Date List](https://github.com/The-AI-Alliance/gofannon/issues?q=is%3Aissue%20state%3Aopen%20label%3Aframework%20assignee:*)
56
+ - **In The Roadmap:** [Up To Date List](https://github.com/The-AI-Alliance/gofannon/issues?q=is%3Aissue%20state%3Aopen%20label%3Aframework%20no%3Aassignee)
57
+ 2. A Robust Collection of Tools
58
+ - List [Here](https://github.com/The-AI-Alliance/gofannon/pulls?q=is%3Apr+is%3Aclosed+label%3Atool)
59
+ - New Tools being added daily
60
+ 3. New Contributor Friendly
61
+ - [Curated contribution pathways](https://the-ai-alliance.github.io/gofannon/developers/)
62
+ - [Gamified Contributor Process](https://the-ai-alliance.github.io/gofannon/leaderboard.html)
63
+ ## 🎓🎓 Why the name `gofanon`? 🎓🎓
64
+
65
+ See [`why_the_name_gofannon`](https://the-ai-alliance.github.io/gofannon/about/the_name_gofannon/) for the rich story on why we chose to honor this Celtic Diety
66
+
67
+ ## ⚡️⚡️Quickstart ⚡️⚡️
68
+
69
+ ```bash
70
+ pip install gofannon
71
+ ```
72
+
73
+ gofannon is an ambitious upstart, things are happening fast. We have a git
74
+ action that deploys to PyPi every Monday morning, so `pip install gofannon`
75
+ will get you pretty close to the tip of the spear. But if you absolutely _must_
76
+ have the latest and greatest, this will work too:
77
+
78
+ ```bash
79
+ git+https://github.com/The-AI-Alliance/gofannon.git@main
80
+ ```
81
+
82
+ For more information, see out [quickstart guide](https://github.com/The-AI-Alliance/gofannon/blob/main/docs/quickstart.md).
83
+
84
+ ## 🏆🏆 Acknowledgments 🏆🏆
85
+
86
+ We would like to thank the open-source community for their contributions and support in making this project possible.
87
+
88
+ <a href="https://github.com/The-AI-Alliance/gofannon/graphs/contributors">
89
+ <img src="https://contrib.rocks/image?repo=The-AI-Alliance/gofannon" />
90
+ </a>
91
+
92
+ Made with [contrib.rocks](https://contrib.rocks).
93
+
94
+ ## 🗞️🗞️ Stay Up To Date 🗞️🗞️
95
+
96
+ Star `gofannon` for good karma (and to receive updates in your github feed).
97
+
98
+ ![gif showng how to star](https://the-ai-alliance.github.io/gofannon/assets/images/github-star.gif)
99
+
100
+ ## 🚲🚲 Roadmap 🚲🚲
101
+
102
+ 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).
103
+
104
+ ## 📘📘 Documentation 📘📘
105
+
106
+ 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.
107
+
108
+ ## ☎️☎️ Contact Us ☎️☎️
109
+
110
+ [Contact Information](https://the-ai-alliance.github.io/gofannon/community/contact.html)
111
+
112
+ ## 🧑‍⚖️🧑‍⚖️ License 🧑‍⚖️🧑‍⚖️
113
+
114
+ 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.
115
+
116
+
117
+
118
+
@@ -16,7 +16,7 @@ gofannon/cli.py,sha256=-T-jjBNl_74TsGRcrjxsQnG0-wA2neYhncnaqCiEzPo,1733
16
16
  gofannon/config.py,sha256=N1xmWTbcyDPZT3r_ZuwW1RI0VRhDcbf3qIasEZZNwyc,1718
17
17
  gofannon/github/__init__.py,sha256=VFw4sJIt4Zc0-__eYnksN8Ku9qMhbPpHJEkXMWUiD30,4
18
18
  gofannon/github/commit_file.py,sha256=jdQGQHbrZx4521XgTbx5N0Ss8fDyl7hvp9sjDW15v9U,2573
19
- gofannon/github/commit_files.py,sha256=0WP4nx4RYpO_Vb45Sa65afuzSMf4de-Wt6awpSOusyM,4395
19
+ gofannon/github/commit_files.py,sha256=OZclhhSejRB1CYmd7IGYvdJZEWBzpaRRKK5S8NQxALU,4554
20
20
  gofannon/github/create_issue.py,sha256=WXq0klzPvGZnZyZRmriGOkHl7E_Tp08vO1v2ou7TR8w,2560
21
21
  gofannon/github/get_repo_contents.py,sha256=9k6M2BqGlNsSGVjyfW7nxZpk1TFuhyPoZvURkv1PEyo,3637
22
22
  gofannon/github/pr_review_tool.py,sha256=srBbfgqBWy-J4wdAM0kLJfQr8LJ6uaA4vkDErqhyMxI,4336
@@ -37,7 +37,9 @@ 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.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,,
40
+ gofannon/wikipedia/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
41
+ gofannon/wikipedia/wikipedia_lookup.py,sha256=J6wKPbSivCF7cccaiRaJW1o0VqNhQAGfrh5U1ULLesg,2869
42
+ gofannon-0.25.14.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
43
+ gofannon-0.25.14.dist-info/METADATA,sha256=1kkXxb_c_NmP30eDMPwktODU5SwQ2uaPIKH1b9pPX9s,5352
44
+ gofannon-0.25.14.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
45
+ gofannon-0.25.14.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.1
2
+ Generator: poetry-core 2.1.2
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,148 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: gofannon
3
- Version: 0.25.13
4
- Summary: A collection of tools for LLMs
5
- License: ASFv2
6
- Author: Trevor Grant
7
- Author-email: trevor.d.grant@gmail.com
8
- Requires-Python: >=3.10,<4.0
9
- Classifier: License :: Other/Proprietary License
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.10
12
- Classifier: Programming Language :: Python :: 3.11
13
- Classifier: Programming Language :: Python :: 3.12
14
- Classifier: Programming Language :: Python :: 3.13
15
- Provides-Extra: aws
16
- Provides-Extra: google
17
- Provides-Extra: headless-browser
18
- Provides-Extra: langchain
19
- Provides-Extra: smolagents
20
- Provides-Extra: testing
21
- Requires-Dist: GitPython (>=3.1.43,<4.0.0)
22
- Requires-Dist: boto3 (>=1.34.97,<2.0.0) ; extra == "aws"
23
- Requires-Dist: google-api-python-client (>=2.161.0,<3.0.0) ; extra == "google"
24
- Requires-Dist: jsonschema (>=4.23.0,<5.0.0)
25
- Requires-Dist: langchain (>=0.3.16,<0.4.0) ; extra == "langchain"
26
- Requires-Dist: openai (>=1.60.2,<2.0.0)
27
- Requires-Dist: pydantic (>=2.10.6,<3.0.0) ; extra == "langchain"
28
- Requires-Dist: pygithub (>=2.6.1,<3.0.0)
29
- Requires-Dist: pytest (>=8.3.4,<9.0.0) ; extra == "testing"
30
- Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
31
- Requires-Dist: requests (>=2.32.3,<3.0.0)
32
- Requires-Dist: requests-mock (>=1.12.1,<2.0.0) ; extra == "testing"
33
- Requires-Dist: selenium (>=4.10.0,<5.0.0) ; extra == "headless-browser"
34
- Requires-Dist: smolagents (>=1.6.0,<2.0.0) ; extra == "smolagents"
35
- Description-Content-Type: text/markdown
36
-
37
- ![logo](https://the-ai-alliance.github.io/gofannon/assets/images/logo_1000x1260.png)
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)
43
-
44
- # gofannon
45
-
46
- **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.
47
-
48
- ## Why the name `gofanon` ?
49
-
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
74
-
75
- ## Features
76
-
77
- - **Basic Math Operations**: Perform addition, subtraction, multiplication, division, and exponentiation.
78
- - **GitHub Integration**: Interact with GitHub repositories, including creating issues, committing files, and retrieving repository contents.
79
- - **arXiv Search**: Search for and retrieve articles from arXiv.
80
- - **Advanced Reasoning**: Utilize Chain-of-Thought (CoT) and Tree-of-Thought (ToT) reasoning techniques for complex problem-solving.
81
- - **NHTSA Complaints**: Retrieve vehicle complaint data from the National Highway Traffic Safety Administration (NHTSA).
82
-
83
- ## Roadmap
84
-
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).
86
-
87
- ## Documentation
88
-
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.
90
-
91
- ## Installation
92
-
93
- To install gofannon, simply clone the repository and install the required dependencies:
94
-
95
- ```bash
96
- git clone https://github.com/The-AI-Alliance/gofannon.git
97
- cd gofannon
98
- pip install -r requirements.txt
99
- ```
100
-
101
- or
102
-
103
- ```
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
131
- ```
132
-
133
- ## License
134
-
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.
140
-
141
- ## Support
142
-
143
- If you encounter any issues or have questions, please open an issue on our [GitHub repository](https://github.com/your-repo/gofannon/issues).
144
-
145
- ## Acknowledgments
146
-
147
- We would like to thank the open-source community for their contributions and support in making this project possible.
148
-