Spaces:
Paused
Paused
Download python/extensions/tool_execute_after/_10_mask_secrets.py from OnyxMunk/GravityFalls: direct link, hf CLI and curl.
- Browser
- Download file 428 Bytes
-
https://huggingface.co/spaces/OnyxMunk/GravityFalls/resolve/main/python/extensions/tool_execute_after/_10_mask_secrets.py
- Command line
-
hf download hf://spaces/OnyxMunk/GravityFalls/python/extensions/tool_execute_after/_10_mask_secrets.py
-
curl -L -o _10_mask_secrets.py https://huggingface.co/spaces/OnyxMunk/GravityFalls/resolve/main/python/extensions/tool_execute_after/_10_mask_secrets.py
428 Bytes
| from python.helpers.extension import Extension | |
| from python.helpers.secrets import get_secrets_manager | |
| from python.helpers.tool import Response | |
| class MaskToolSecrets(Extension): | |
| async def execute(self, response: Response | None = None, **kwargs): | |
| if not response: | |
| return | |
| secrets_mgr = get_secrets_manager(self.agent.context) | |
| response.message = secrets_mgr.mask_values(response.message) | |