diff options
Diffstat (limited to 'models')
-rw-r--r-- | models/models.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/models/models.go b/models/models.go index 30ba548..880779f 100644 --- a/models/models.go +++ b/models/models.go @@ -61,17 +61,17 @@ type MessagesStory struct { Content string `json:"content"` } -func (m MessagesStory) ToText() string { +func (m MessagesStory) ToText(i int) string { icon := "" switch m.Role { case "assistant": - icon = "<🤖>: " + icon = fmt.Sprintf("(%d) <🤖>: ", i) case "user": - icon = "<user>: " + icon = fmt.Sprintf("(%d) <user>: ", i) case "system": - icon = "<system>: " + icon = fmt.Sprintf("(%d) <system>: ", i) case "tool": - icon = "<tool>: " + icon = fmt.Sprintf("(%d) <tool>: ", i) } textMsg := fmt.Sprintf("%s%s\n", icon, m.Content) return strings.ReplaceAll(textMsg, "\n\n", "\n") |