summaryrefslogtreecommitdiff
path: root/models
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2025-01-16 17:53:35 +0300
committerGrail Finder <wohilas@gmail.com>2025-01-16 17:53:35 +0300
commitc41ff09b2f62b8c715ec9beb2fdac987b25892d9 (patch)
tree8e85dd4f6a645b15fc58dd5f3ebb5b4f8bab1988 /models
parentdb678b521592503342bf717e1ae0f48b8b11ed80 (diff)
Fix: specv2 cards wrapper case
Diffstat (limited to 'models')
-rw-r--r--models/card.go4
-rw-r--r--models/models.go7
2 files changed, 8 insertions, 3 deletions
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 {