Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
swuecho committed Feb 4, 2025
1 parent 17243bf commit 0750e9a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion api/sqlc_queries/zz_custom_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,15 @@ func (q *Queries) GetChatHistoryBySessionUUID(ctx context.Context, uuid string,
}

simple_msgs := lo.Map(messages, func(message ChatMessage, _ int) SimpleChatMessage {
text := message.Content
// prepend reason content
if len(message.ReasoningContent) > 0 {
text = message.ReasoningContent + message.Content
}
return SimpleChatMessage{
Uuid: message.Uuid,
DateTime: message.UpdatedAt.Format(time.RFC3339),
Text: message.Content,
Text: text,
Model: message.Model,
Inversion: message.Role == "user",
Error: false,
Expand Down

0 comments on commit 0750e9a

Please sign in to comment.