Files
st-react/server/model/app/request/regex_script.go
Echo 4cecfd6589 🎨 1.优化前端渲染功能(html和对话消息格式)
2.优化流式传输,新增流式渲染功能
3.优化正则处理逻辑
4.新增context budget管理系统
5.优化对话消息失败处理逻辑
6.新增前端卡功能(待完整测试)
2026-03-13 15:58:33 +08:00

56 lines
2.2 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package request
// CreateRegexScriptRequest 创建正则脚本请求
type CreateRegexScriptRequest struct {
Name string `json:"name" binding:"required,max=100"`
FindRegex string `json:"findRegex" binding:"required"`
ReplaceWith string `json:"replaceWith"`
TrimStrings []string `json:"trimStrings"`
Placement int `json:"placement"`
Disabled bool `json:"disabled"`
MarkdownOnly bool `json:"markdownOnly"`
RunOnEdit bool `json:"runOnEdit"`
PromptOnly bool `json:"promptOnly"`
SubstituteRegex bool `json:"substituteRegex"`
MinDepth *int `json:"minDepth"`
MaxDepth *int `json:"maxDepth"`
Scope int `json:"scope"`
OwnerCharID *uint `json:"ownerCharId"`
OwnerPresetID *uint `json:"ownerPresetId"`
Order int `json:"order"`
}
// UpdateRegexScriptRequest 更新正则脚本请求
type UpdateRegexScriptRequest struct {
Name *string `json:"name" binding:"omitempty,max=100"`
FindRegex *string `json:"findRegex"`
ReplaceWith *string `json:"replaceWith"`
TrimStrings []string `json:"trimStrings"`
Placement *int `json:"placement"`
Disabled *bool `json:"disabled"`
MarkdownOnly *bool `json:"markdownOnly"`
RunOnEdit *bool `json:"runOnEdit"`
PromptOnly *bool `json:"promptOnly"`
SubstituteRegex *bool `json:"substituteRegex"`
MinDepth *int `json:"minDepth"`
MaxDepth *int `json:"maxDepth"`
Scope *int `json:"scope"`
OwnerCharID *uint `json:"ownerCharId"`
OwnerPresetID *uint `json:"ownerPresetId"`
Order *int `json:"order"`
}
// GetRegexScriptListRequest 获取正则脚本列表请求
type GetRegexScriptListRequest struct {
Page int `json:"page"`
PageSize int `json:"pageSize"`
Keyword string `json:"keyword"`
Scope *int `json:"scope"`
OwnerCharID *uint `json:"ownerCharId"` // 过滤指定角色的脚本scope=1时有效
}
// TestRegexScriptRequest 测试正则脚本请求
type TestRegexScriptRequest struct {
TestString string `json:"testString" binding:"required"`
}