33 lines
759 B
Python
33 lines
759 B
Python
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import os
|
|
import sys
|
|
import argparse
|
|
from typing import Dict, Any
|
|
|
|
# 添加项目根目录到Python路径
|
|
current_dir = os.path.dirname(os.path.abspath(__file__))
|
|
parent_dir = os.path.dirname(current_dir)
|
|
sys.path.append(parent_dir)
|
|
|
|
from cryptoai.agents.crypto_agent import CryptoAgent
|
|
from cryptoai.agents.gold_agent import GoldAgent
|
|
from cryptoai.utils.config_loader import ConfigLoader
|
|
|
|
def main():
|
|
try:
|
|
# 启动智能体
|
|
CryptoAgent().start_agent()
|
|
|
|
except KeyboardInterrupt:
|
|
print("\n程序已退出")
|
|
|
|
except Exception as e:
|
|
print(f"程序运行出错: {e}")
|
|
import traceback
|
|
traceback.print_exc()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main() |