mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-18 01:44:38 +08:00
refactor: standardize code comments
This commit is contained in:
@@ -5,9 +5,9 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
// TestBuildSystemPrompt_ContainsAllValidActions 测试 prompt 是否包含所有有效的 action
|
||||
// TestBuildSystemPrompt_ContainsAllValidActions tests whether prompt contains all valid actions
|
||||
func TestBuildSystemPrompt_ContainsAllValidActions(t *testing.T) {
|
||||
// 这是系统中定义的所有有效 action(来自 validateDecision)
|
||||
// These are all valid actions defined in the system (from validateDecision)
|
||||
validActions := []string{
|
||||
"open_long",
|
||||
"open_short",
|
||||
@@ -17,13 +17,13 @@ func TestBuildSystemPrompt_ContainsAllValidActions(t *testing.T) {
|
||||
"wait",
|
||||
}
|
||||
|
||||
// 构建 prompt
|
||||
// Build prompt
|
||||
prompt := buildSystemPrompt(1000.0, 10, 5, "default", "")
|
||||
|
||||
// 验证每个有效 action 都在 prompt 中出现
|
||||
// Verify each valid action appears in prompt
|
||||
for _, action := range validActions {
|
||||
if !strings.Contains(prompt, action) {
|
||||
t.Errorf("Prompt 缺少有效的 action: %s", action)
|
||||
t.Errorf("Prompt missing valid action: %s", action)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user