From c41ff09b2f62b8c715ec9beb2fdac987b25892d9 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Thu, 16 Jan 2025 17:53:35 +0300 Subject: Fix: specv2 cards wrapper case --- models/card.go | 4 ++++ models/models.go | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'models') diff --git a/models/card.go b/models/card.go index 4ff2d8b..fb807f3 100644 --- a/models/card.go +++ b/models/card.go @@ -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) diff --git a/models/models.go b/models/models.go index eb215a6..67cff0c 100644 --- a/models/models.go +++ b/models/models.go @@ -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 { -- cgit v1.2.3