Fix: specv2 cards wrapper case

This commit is contained in:
Grail Finder
2025-01-16 17:53:35 +03:00
parent db678b5215
commit c41ff09b2f
6 changed files with 53 additions and 8 deletions

View File

@@ -22,6 +22,10 @@ type CharCardSpec struct {
Tags []any `json:"tags"`
}
type Spec2Wrapper struct {
Data CharCardSpec `json:"data"`
}
func (c *CharCardSpec) Simplify(userName, fpath string) *CharCard {
fm := strings.ReplaceAll(strings.ReplaceAll(c.FirstMes, "{{char}}", c.Name), "{{user}}", userName)
sysPr := strings.ReplaceAll(strings.ReplaceAll(c.Description, "{{char}}", c.Name), "{{user}}", userName)

View File

@@ -75,9 +75,10 @@ func (m RoleMsg) ToText(i int, cfg *config.Config) string {
}
type ChatBody struct {
Model string `json:"model"`
Stream bool `json:"stream"`
Messages []RoleMsg `json:"messages"`
Model string `json:"model"`
Stream bool `json:"stream"`
Messages []RoleMsg `json:"messages"`
DRYMultiplier float32 `json:"frequency_penalty"`
}
type ChatToolsBody struct {