Spaces:
Paused
Paused
Download python/tools/online_knowledge_tool.py from OnyxMunk/GravityFalls: direct link, hf CLI and curl.
- Browser
- Download file 398 Bytes
-
https://huggingface.co/spaces/OnyxMunk/GravityFalls/resolve/c425c4043529634171dcfbb3aa5a94de613d28a8/python/tools/online_knowledge_tool.py
- Command line
-
hf download hf://spaces/OnyxMunk/GravityFalls@c425c4043529634171dcfbb3aa5a94de613d28a8/python/tools/online_knowledge_tool.py
-
curl -L -o online_knowledge_tool.py https://huggingface.co/spaces/OnyxMunk/GravityFalls/resolve/c425c4043529634171dcfbb3aa5a94de613d28a8/python/tools/online_knowledge_tool.py
398 Bytes
| from agent import Agent | |
| from python.helpers import perplexity_search | |
| from python.helpers.tool import Tool, Response | |
| class OnlineKnowledge(Tool): | |
| def execute(self,**kwargs): | |
| return Response( | |
| message=process_question(self.args["question"]), | |
| break_loop=False, | |
| ) | |
| def process_question(question): | |
| return str(perplexity_search.perplexity_search(question)) |