Improve(interface): replace some struct with interface for testing (#994)

* fix(trader): get peakPnlPct using posKey
* fix(docs): keep readme at the same page
* improve(interface): replace with interface
* refactor mcp
---------
Co-authored-by: zbhan <zbhan@freewheel.tv>
This commit is contained in:
Shui
2025-11-13 22:22:05 -05:00
committed by tangmengqiu
parent 5577d284f6
commit b96c86fce4
8 changed files with 164 additions and 93 deletions

12
mcp/interface.go Normal file
View File

@@ -0,0 +1,12 @@
package mcp
import "net/http"
// AIClient AI客户端接口
type AIClient interface {
SetAPIKey(apiKey string, customURL string, customModel string)
// CallWithMessages 使用 system + user prompt 调用AI API
CallWithMessages(systemPrompt, userPrompt string) (string, error)
setAuthHeader(reqHeaders http.Header)
}