diff options
| author | Grail Finder <wohilas@gmail.com> | 2026-01-31 12:57:53 +0300 |
|---|---|---|
| committer | Grail Finder <wohilas@gmail.com> | 2026-01-31 12:57:53 +0300 |
| commit | 3a11210f52a850f84771e1642cafcc3027b85075 (patch) | |
| tree | aa4ec3f49b4ed8221a045fc221b09b26bee2c15d /models | |
| parent | fa192a262410eb98b42ff8fb9e0f4e1111240514 (diff) | |
Enha: avoid recursion in llm calls
Diffstat (limited to 'models')
| -rw-r--r-- | models/models.go | 19 |
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 +} |
