Spaces:
Paused
Paused
Download python/tools/response.py from OnyxMunk/GravityFalls: direct link, hf CLI and curl.
- Browser
- Download file 632 Bytes
-
https://huggingface.co/spaces/OnyxMunk/GravityFalls/resolve/c425c4043529634171dcfbb3aa5a94de613d28a8/python/tools/response.py
- Command line
-
hf download hf://spaces/OnyxMunk/GravityFalls@c425c4043529634171dcfbb3aa5a94de613d28a8/python/tools/response.py
-
curl -L -o response.py https://huggingface.co/spaces/OnyxMunk/GravityFalls/resolve/c425c4043529634171dcfbb3aa5a94de613d28a8/python/tools/response.py
632 Bytes
| from agent import Agent | |
| from python.helpers import files | |
| from python.helpers.print_style import PrintStyle | |
| from agent import Agent | |
| from python.helpers.tool import Tool, Response | |
| from python.helpers import files | |
| from python.helpers.print_style import PrintStyle | |
| class ResponseTool(Tool): | |
| def execute(self,**kwargs): | |
| # superior = self.agent.get_data("superior") | |
| # if superior: | |
| self.agent.set_data("timeout", 60) | |
| return Response(message=self.args["text"], break_loop=True) | |
| # else: | |
| def after_execution(self, response, **kwargs): | |
| pass # do add anything to the history or output |