diff --git a/app/app.go b/app/app.go index e8f0178..fbeed1c 100644 --- a/app/app.go +++ b/app/app.go @@ -154,7 +154,7 @@ func New(ctx context.Context, opts interface{}, ver appInit.Version) (appInit.Co WorkerRespondentCh: workerRespondentCh, Encrypt: encrypt, RedirectURl: options.RedirectURL, - AiClient: clients.NewAiClient("https://alvatar.com/api/engine/send_answer/"), + AiClient: clients.NewAiClient("https://alvatar.com/api/engine/send_answer"), }) saveRespWcData := savewc.DepsForResp{ diff --git a/clients/aiClient.go b/clients/aiClient.go index d93e527..28768da 100644 --- a/clients/aiClient.go +++ b/clients/aiClient.go @@ -15,7 +15,7 @@ type AIClient struct { type SendAnswerRequest struct { Tipe string `json:"type"` Message string `json:"message"` - Final bool `json:"final"` + Final bool `json:"is_final"` Session string `json:"session"` } @@ -34,13 +34,10 @@ func (client *AIClient) SendAnswerer(final bool, tipe, message, session string) // Session: session, //} - clownRequest := struct { - Title string `json:"title"` - Text string `json:"text"` - Final bool `json:"is_final"` - Session string `json:"string"` - }{ - Text: message, + clownRequest := SendAnswerRequest{ + Message: message, + Tipe: "text", + Final: false, Session: session, }