Fixed - Forgot a s in fireworks

This commit is contained in:
Adrien Bouvais 2024-08-07 18:38:45 +02:00
parent 5a0c352ccd
commit 3bc0ade499

View File

@ -3,6 +3,7 @@ package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
"strings"
@ -79,7 +80,7 @@ func RequestFirework(c *fiber.Ctx, llm LLM, messages []Message) string {
} filter .company.name = <str>$0 AND .<keys[is Setting].<setting[is User] = global currentUser
)
select filtered_keys.key limit 1
`, &apiKey, "firework")
`, &apiKey, "fireworks")
if err != nil {
return "JADE internal error: 09-00-0000. Please contact the support."
}
@ -148,6 +149,8 @@ func RequestFirework(c *fiber.Ctx, llm LLM, messages []Message) string {
addUsage(c, inputCost, outputCost, chatCompletionResponse.Usage.PromptTokens, chatCompletionResponse.Usage.CompletionTokens, model)
if len(chatCompletionResponse.Choices) == 0 {
fmt.Println(resp.Status)
fmt.Println("JADE internal error: 09-03-0007 - ", string(body))
return "JADE internal error: 09-03-0007. Please contact the support."
}