fix: 補充 System Prompt 中新動作的格式說明

問題:
- System Prompt 的 action 列表缺少新增的動作
- 只列出:open_long, open_short, close_long, close_short, hold, wait
- 缺少:update_stop_loss, update_take_profit, partial_close
- 導致 AI 不知道可以使用這些新動作

修復:
- 補充完整的 action 列表(9 個動作)
- 添加每個新動作的必填字段說明:
  * update_stop_loss: new_stop_loss, reasoning
  * update_take_profit: new_take_profit, reasoning
  * partial_close: close_percentage (0-100), reasoning

影響:
- AI 現在知道可以使用動態止盈止損功能
- 明確每個動作需要哪些字段
- 與 Decision 結構定義完全一致
This commit is contained in:
ZhouYongyou
2025-11-02 08:38:46 +08:00
parent 8ca2071557
commit 45ec64537d

View File

@@ -287,9 +287,12 @@ func buildSystemPrompt(accountEquity float64, btcEthLeverage, altcoinLeverage in
sb.WriteString(" {\"symbol\": \"ETHUSDT\", \"action\": \"close_long\", \"reasoning\": \"止盈离场\"}\n")
sb.WriteString("]\n```\n\n")
sb.WriteString("字段说明:\n")
sb.WriteString("- `action`: open_long | open_short | close_long | close_short | hold | wait\n")
sb.WriteString("- `action`: open_long | open_short | close_long | close_short | update_stop_loss | update_take_profit | partial_close | hold | wait\n")
sb.WriteString("- `confidence`: 0-100开仓建议≥75\n")
sb.WriteString("- 开仓时必填: leverage, position_size_usd, stop_loss, take_profit, confidence, risk_usd, reasoning\n\n")
sb.WriteString("- 开仓时必填: leverage, position_size_usd, stop_loss, take_profit, confidence, risk_usd, reasoning\n")
sb.WriteString("- update_stop_loss 必填: new_stop_loss, reasoning\n")
sb.WriteString("- update_take_profit 必填: new_take_profit, reasoning\n")
sb.WriteString("- partial_close 必填: close_percentage (0-100), reasoning\n\n")
return sb.String()
}