Only include user and assistant messages when generating titles

(again)
This commit is contained in:
Matt Low 2024-06-23 18:54:45 +00:00
parent a43a91c6ff
commit cea5118cac
1 changed files with 4 additions and 1 deletions

View File

@ -172,8 +172,11 @@ Example response:
var msgs []msg
for _, m := range messages {
switch m.Role {
case api.MessageRoleAssistant, api.MessageRoleUser:
msgs = append(msgs, msg{string(m.Role), m.Content})
}
}
// Serialize the conversation to JSON
conversation, err := json.Marshal(msgs)