Skip to content

Commit

Permalink
fix: split
Browse files Browse the repository at this point in the history
  • Loading branch information
jackmcguire1 committed May 16, 2024
1 parent f4dea22 commit e0e1a72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/api/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (h *Handler) DispatchIntents(ctx context.Context, req alexa.Request) (res a
spaces := strings.Split(prompt, " ")
sourceLanguage := spaces[0]
targetLanguage := spaces[2]
promptPhrase := strings.Split(prompt, targetLanguage)
promptPhrase := strings.SplitN(prompt, targetLanguage, 1)
promptToTranslate := strings.Join(promptPhrase[1:len(promptPhrase)-1], " ")

err = h.RequestsQueue.PushMessage(ctx, &chatmodels.Request{
Expand Down

0 comments on commit e0e1a72

Please sign in to comment.