Skip to content

Commit

Permalink
fix: request params for languages
Browse files Browse the repository at this point in the history
  • Loading branch information
jackmcguire1 committed May 16, 2024
1 parent 512e731 commit f9210ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/dom/chatmodels/cloudflare_ai_worker_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ func (api *CloudflareApiClient) GenerateTranslation(ctx context.Context, req *Ge
req.SourceLanguage = "en"
}
payload := map[string]string{
"text": req.Prompt,
"source_language": req.SourceLanguage,
"target_language": req.TargetLanguage,
"text": req.Prompt,
"source_lang": req.SourceLanguage,
"target_lang": req.TargetLanguage,
}

jsonPayload, err := json.Marshal(payload)
Expand Down

0 comments on commit f9210ee

Please sign in to comment.