如图,这是我的一个ccmmate里面的配置:
非常的简单。
我发现,使用minimax就可以通过,但是,使用支持openai样式的就不可以使用,这就好奇了。
所以决定来搞一搞。
先去使用deepseek,他后来兼容了athropic的样式,同时还支持openai样子的调用。
sk-4f654479949b46b688c7** https://api.deepseek.com/v1 deepseek-chat
–
athropic https://api.deepseek.com/anthropic
–
# Please install OpenAI SDK first: `pip3 install openai`
import os
from openai import OpenAI
client = OpenAI(api_key=os.environ.get('DEEPSEEK_API_KEY'), base_url="https://api.deepseek.com")
response = client.chat.completions.create(
model="deepseek-chat",
messages=[
{"role": "system", "content": "You are a helpful assistant"},
{"role": "user", "content": "Hello"},
],
stream=False
)
print(response.choices[0].message.content)
最后得到了回答,那么切换成为普通的openai样式的
很显然,这个软件自己不支持那样的修改。
补充,我发现国内的大模型,使用ccr的时候会胡乱回答问题
– 回答如下,这个和实际的不符合,差得远呢。
Now I have a better understanding of the project. Let me create a comprehensive documentation file for the xtrade project based on what I've discovered.
Overview
xtrade is a trading framework that provides a unified interface for various trading platforms, with initial support for
TWS (Interactive Brokers) and placeholder support for other platforms like Binance.
Project Structure
The project includes:
- Core framework files (xtrade/*.py)
- Configuration files (xtrade/config/*)
- Test files (xtrade/test/*)
- Documentation and example files
Core Components
XTrade Framework
The main class XTrade provides a unified interface for:
- Connecting to different trading platforms
- Retrieving account information
- Managing orders and positions
- Handling market data
Supported Platforms
- tws: Interactive Brokers TWS connection
- binance: Placeholder for Binance integration
- default: Generic platform interface
Key Features
- Unified API across different trading platforms
- Connection management with automatic configuration
- Account information retrieval
- Order management capabilities
- Position tracking
- Market data handling
Configuration
The project uses a configuration system with:
- Platform-specific settings
- Connection parameters
- API keys and authentication
- Default settings for various operations
Files and Modules
Main Framework Files
- xtrade/__init__.py: Package initialization
- xtrade/xtrade.py: Main XTrade class
- xtrade/tws/tws.py: TWS (Interactive Brokers) integration
- xtrade/binance/binance.py: Binance placeholder implementation
- xtrade/default/default.py: Default platform implementation
Test Files
- xtrade/test/test.py: Basic test for the framework
- test_email.py: Email testing functionality
Configuration Files
- xtrade/config/__init__.py: Configuration initialization
- xtrade/config/config.py: Configuration management
- xtrade/config/config.json: Default configuration
不过这个可能是因为模型不支持的原因,他们是为了支持openai样式的,未必支持claude。
(base) PS C:\Users\25515> ccr
Usage: ccr [command] [preset-name]
Commands:
start Start server
stop Stop server
restart Restart server
status Show server status
statusline Integrated statusline
code Execute claude command
model Interactive model selection and configuration
preset Manage presets (export, install, list, delete)
install Install preset from GitHub marketplace
activate Output environment variables for shell integration
ui Open the web UI in browser
-v, version Show version information
-h, help Show help information
Presets:
Any preset directory in ~/.claude-code-router/presets/
Examples:
ccr start
ccr code "Write a Hello World"
ccr my-preset "Write a Hello World" # Use preset configuration
ccr model
ccr preset export my-config # Export current config as preset
ccr preset install /path/to/preset # Install a preset from directory
ccr preset list # List all presets
ccr install my-preset # Install preset from marketplace
eval "$(ccr activate)" # Set environment variables globally
ccr ui
事实是什么样?
直接使用支持anthropic的
那么结果很明显,是可以使用的,没有问题的 回答的质量还不错
请看
我查看了你的项目目录,这是一个 AI 创作系统 项目。以下是详细分析:
📁 项目结构
D:\a.Data\MY_GIT_lib\xtrade\01----copy\xtrade\
├── 12.py # 基础版 Flask AI 聊天系统 ├── 12_pro.py # Pro 版(增强功能)
├── 12_enhanced.py # 增强版(可能类似)
├── 12_pro.rar # 压缩备份
├── 12_enhanced.zip # 压缩备份
├── test_email.py # QQ 邮箱测试脚本
├── creative_system_pro_v6.db # SQLite 数据库(V5/V6 版本)
└── creative_system_pro_v7.db # SQLite 数据库(Pro 版本)
🚀 核心功能
1. 基础版 (12.py)
- 技术栈: Flask + SQLite + DeepSeek API
- 功能:
- AI 对话聊天(支持记忆)
- 会话管理(新建、切换)
- 长期记忆摘要(自动更新)
- 反馈系统(👍/👎)
- 响应式 Web 界面
2. Pro 版 (12_pro.py)
在基础版上增强:
- 邮件系统:
- 每日聊天报告(定时发送)
- 情报抓取报告
- QQ 邮箱 SMTP 集成
- 界面升级:
- 现代化 UI(渐变、动画)
- 更好的移动端适配
- Markdown 渲染
- 额外功能:
- 定时任务(每天 8:00 发送报告)
- 情报抓取模拟(可扩展为真实爬虫)
- 邮件配置界面
🔧 数据库设计
- messages 表:存储对话记录
- sessions 表:存储会话信息和长期记忆摘要
- settings 表:存储 API 密钥、邮箱配置等