Supports custom system prompts and custom models.

This commit is contained in:
SkywalkerJi
2025-11-01 19:45:54 +08:00
parent 1ac6eed8af
commit 5ad135310f
12 changed files with 848 additions and 209 deletions

View File

@@ -125,7 +125,7 @@ export function AITradersPage({ onTraderSelect }: AITradersPageProps) {
const handleCreateTrader = async (data: CreateTraderRequest) => {
try {
const model = allModels?.find(m => m.provider === data.ai_model_id);
const model = allModels?.find(m => m.id === data.ai_model_id);
const exchange = allExchanges?.find(e => e.id === data.exchange_id);
if (!model?.enabled) {
@@ -162,7 +162,7 @@ export function AITradersPage({ onTraderSelect }: AITradersPageProps) {
if (!editingTrader) return;
try {
const model = enabledModels?.find(m => m.provider === data.ai_model_id);
const model = enabledModels?.find(m => m.id === data.ai_model_id);
const exchange = enabledExchanges?.find(e => e.id === data.exchange_id);
if (!model) {