Compare commits

...

1 Commits

Author SHA1 Message Date
5b2f08f57c fix: request new question now get session
All checks were successful
Deploy / CreateImage (push) Successful in 2m13s
Deploy / DeployService (push) Successful in 24s
2025-06-30 15:07:18 +03:00

@ -35,11 +35,14 @@ func (client *AIClient) SendAnswerer(final bool, tipe, message, session string)
//}
clownRequest := struct {
Title string `json:"title"`
Text string `json:"text"`
Tipe string `json:"type"`
Text string `json:"message"`
Final bool `json:"is_final"`
Session string `json:"session"`
}{
Tipe: "text",
Text: message,
Session: session,
}
body, err := json.Marshal(clownRequest)
@ -54,8 +57,9 @@ func (client *AIClient) SendAnswerer(final bool, tipe, message, session string)
if len(errs) > 0 {
return "", errors.Join(errs...)
}
fmt.Println("AI ERROR", string(respBody))
if statusCode != fiber.StatusCreated {
if statusCode != fiber.StatusOK {
return "", fmt.Errorf("invalid response status code: %d", statusCode)
}