🎨 优化预设正则解析
This commit is contained in:
@@ -8,6 +8,8 @@ type ChatCompletionResponse struct {
|
||||
Model string `json:"model"`
|
||||
Choices []ChatCompletionChoice `json:"choices"`
|
||||
Usage ChatCompletionUsage `json:"usage"`
|
||||
// 扩展字段:正则脚本执行日志
|
||||
RegexLogs *RegexExecutionLogs `json:"regex_logs,omitempty"`
|
||||
}
|
||||
|
||||
type ChatCompletionChoice struct {
|
||||
@@ -46,3 +48,19 @@ type ChatMessageDelta struct {
|
||||
Role string `json:"role,omitempty"`
|
||||
Content string `json:"content,omitempty"`
|
||||
}
|
||||
|
||||
// RegexExecutionLogs 正则脚本执行日志
|
||||
type RegexExecutionLogs struct {
|
||||
InputScripts []RegexScriptLog `json:"input_scripts,omitempty"` // 输入前执行的脚本
|
||||
OutputScripts []RegexScriptLog `json:"output_scripts,omitempty"` // 输出后执行的脚本
|
||||
TotalMatches int `json:"total_matches"` // 总匹配次数
|
||||
}
|
||||
|
||||
// RegexScriptLog 单个正则脚本的执行日志
|
||||
type RegexScriptLog struct {
|
||||
ScriptName string `json:"script_name"` // 脚本名称
|
||||
ScriptID string `json:"script_id"` // 脚本ID
|
||||
Executed bool `json:"executed"` // 是否执行
|
||||
MatchCount int `json:"match_count"` // 匹配次数
|
||||
ErrorMessage string `json:"error_message,omitempty"` // 错误信息
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user