summaryrefslogtreecommitdiff
path: root/models
diff options
context:
space:
mode:
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 {