fix: display ai assert in html report

This commit is contained in:
lilong.129
2025-07-06 11:08:52 +08:00
parent af40d082f7
commit d329fb610f
6 changed files with 183 additions and 17 deletions

View File

@@ -33,8 +33,9 @@ type AssertOptions struct {
type AssertionResult struct {
Pass bool `json:"pass"`
Thought string `json:"thought"`
ModelName string `json:"model_name"` // model name used for assertion
Usage *schema.TokenUsage `json:"usage,omitempty"` // token usage statistics
Content string `json:"content,omitempty"` // raw response content
ModelName string `json:"model_name"` // model name used for assertion
Usage *schema.TokenUsage `json:"usage,omitempty"` // token usage statistics
}
// Asserter handles assertion using different AI models
@@ -180,5 +181,6 @@ func parseAssertionResult(content string, modelType option.LLMServiceType) (*Ass
}
result.ModelName = string(modelType)
result.Content = content // Store the original response content
return &result, nil
}