fix: request new question now get session
This commit is contained in:
parent
bb489ee5da
commit
f9d1ef5eaf
@ -35,11 +35,14 @@ func (client *AIClient) SendAnswerer(final bool, tipe, message, session string)
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
clownRequest := struct {
|
clownRequest := struct {
|
||||||
Title string `json:"title"`
|
Tipe string `json:"type"`
|
||||||
Text string `json:"text"`
|
Text string `json:"message"`
|
||||||
Final bool `json:"is_final"`
|
Final bool `json:"is_final"`
|
||||||
|
Session string `json:"string"`
|
||||||
}{
|
}{
|
||||||
|
Tipe: "text",
|
||||||
Text: message,
|
Text: message,
|
||||||
|
Session: session,
|
||||||
}
|
}
|
||||||
|
|
||||||
body, err := json.Marshal(clownRequest)
|
body, err := json.Marshal(clownRequest)
|
||||||
@ -52,6 +55,7 @@ func (client *AIClient) SendAnswerer(final bool, tipe, message, session string)
|
|||||||
|
|
||||||
statusCode, respBody, errs := agent.Bytes()
|
statusCode, respBody, errs := agent.Bytes()
|
||||||
if len(errs) > 0 {
|
if len(errs) > 0 {
|
||||||
|
fmt.Println("AI ERROR", errors.Join(errs...))
|
||||||
return "", errors.Join(errs...)
|
return "", errors.Join(errs...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user