summaryrefslogtreecommitdiff
path: root/models/models.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/models.go')
-rw-r--r--models/models.go19
1 files changed, 13 insertions, 6 deletions
diff --git a/models/models.go b/models/models.go
index 69bdf02..76ef183 100644
--- a/models/models.go
+++ b/models/models.go
@@ -116,9 +116,9 @@ func (m RoleMsg) MarshalJSON() ([]byte, error) {
} else {
// Use simple content format
aux := struct {
- Role string `json:"role"`
- Content string `json:"content"`
- ToolCallID string `json:"tool_call_id,omitempty"`
+ Role string `json:"role"`
+ Content string `json:"content"`
+ ToolCallID string `json:"tool_call_id,omitempty"`
KnownTo []string `json:"known_to,omitempty"`
}{
Role: m.Role,
@@ -150,9 +150,9 @@ func (m *RoleMsg) UnmarshalJSON(data []byte) error {
// Otherwise, unmarshal as simple content format
var simple struct {
- Role string `json:"role"`
- Content string `json:"content"`
- ToolCallID string `json:"tool_call_id,omitempty"`
+ Role string `json:"role"`
+ Content string `json:"content"`
+ ToolCallID string `json:"tool_call_id,omitempty"`
KnownTo []string `json:"known_to,omitempty"`
}
if err := json.Unmarshal(data, &simple); err != nil {
@@ -540,3 +540,10 @@ func (lcp *LCPModels) ListModels() []string {
}
return resp
}
+
+type ChatRoundReq struct {
+ UserMsg string
+ Role string
+ Regen bool
+ Resume bool
+}