43 lines
1.8 KiB
Go
43 lines
1.8 KiB
Go
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"`
|
||
}
|