Spaces:
Configuration error
Configuration error
Download scripts/generate_config.py from D3AMON/hermes-agent: direct link, hf CLI and curl.
- Browser
- Download file 1.57 kB
-
https://huggingface.co/spaces/D3AMON/hermes-agent/resolve/main/scripts/generate_config.py
- Command line
-
hf download hf://spaces/D3AMON/hermes-agent/scripts/generate_config.py
-
curl -L -o generate_config.py https://huggingface.co/spaces/D3AMON/hermes-agent/resolve/main/scripts/generate_config.py
1.57 kB
| import yaml | |
| import os | |
| def generate_config(): | |
| telegram_token = os.getenv("TELEGRAM_BOT_TOKEN", "8964920717:AAEdwvXgdPPhOtLVjnsqfXdfnIx0wmzKyHg") | |
| agent_name = os.getenv("AGENT_NAME", "Hermes Worker") | |
| hf_token = os.getenv("HF_TOKEN") | |
| config = { | |
| "agent": { | |
| "name": agent_name, | |
| "personality": "I am your dedicated AI worker. I am powered by free Hugging Face inference and have access to 30+ free APIs from GitHub. I am 100% self-sufficient and ready to work." | |
| }, | |
| "llm": { | |
| "provider": "huggingface", | |
| "model": "meta-llama/Meta-Llama-3-70B-Instruct", | |
| "api_key": hf_token | |
| }, | |
| "mcp_servers": { | |
| "public-apis": { | |
| "command": "uvx", | |
| "args": ["public-apis-mcp", "run"] | |
| } | |
| }, | |
| "gateway": { | |
| "platforms": { | |
| "telegram": { | |
| "enabled": True, | |
| "token": telegram_token | |
| } | |
| } | |
| }, | |
| "toolsets": [ | |
| "web", "terminal", "file", "browser", "vision", "todo", "memory", "session_search", "cronjob" | |
| ], | |
| "display": { | |
| "tool_progress": "all" | |
| } | |
| } | |
| config_path = os.path.expanduser("~/.hermes/config.yaml") | |
| os.makedirs(os.path.dirname(config_path), exist_ok=True) | |
| with open(config_path, "w") as f: | |
| yaml.dump(config, f) | |
| print(f"Worker Config generated at {config_path}") | |
| if __name__ == "__main__": | |
| generate_config() | |