Files
ai_proxy/server/model/app/request/ai_preset.go
2026-03-03 06:05:51 +08:00

43 lines
1.8 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
import "git.echol.cn/loser/ai_proxy/server/model/app"
// CreateAiPresetRequest 创建预设请求
type CreateAiPresetRequest struct {
Name string `json:"name" binding:"required"`
Description string `json:"description"`
Prompts []app.Prompt `json:"prompts" binding:"required"`
RegexScripts []app.RegexScript `json:"regexScripts"`
Temperature float64 `json:"temperature"`
TopP float64 `json:"topP"`
MaxTokens int `json:"maxTokens"`
FrequencyPenalty float64 `json:"frequencyPenalty"`
PresencePenalty float64 `json:"presencePenalty"`
StreamEnabled bool `json:"streamEnabled"`
IsDefault bool `json:"isDefault"`
IsPublic bool `json:"isPublic"`
}
// UpdateAiPresetRequest 更新预设请求
type UpdateAiPresetRequest struct {
ID uint `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Prompts []app.Prompt `json:"prompts"`
RegexScripts []app.RegexScript `json:"regexScripts"`
Temperature float64 `json:"temperature"`
TopP float64 `json:"topP"`
MaxTokens int `json:"maxTokens"`
FrequencyPenalty float64 `json:"frequencyPenalty"`
PresencePenalty float64 `json:"presencePenalty"`
StreamEnabled bool `json:"streamEnabled"`
IsDefault bool `json:"isDefault"`
IsPublic bool `json:"isPublic"`
}
// ImportAiPresetRequest 导入预设请求支持SillyTavern格式
type ImportAiPresetRequest struct {
Name string `json:"name" binding:"required"`
Data interface{} `json:"data" binding:"required"`
}