Skip to content

Commit 0a126f4

Browse files
wd-hopkinsHoundie
authored andcommittedNov 25, 2024
Fix loop counter when generating embeddings
1 parent c006029 commit 0a126f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎agent/service.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func (s *Service) generateCompletion(ctx context.Context, integrationID, apiToke
106106
var messages []copilot.ChatMessage
107107

108108
// Create embeddings from user messages
109-
for i := len(req.Messages) - 1; i >= 0; i++ {
109+
for i := len(req.Messages) - 1; i >= 0; i-- {
110110
msg := req.Messages[i]
111111
if msg.Role != "user" {
112112
continue

0 commit comments

Comments
 (0)
Failed to load comments.