code-debug228 / HostetskiGPT

FreeScout module for requests to GPT
MIT License
26 stars 7 forks source link

Error: max_token to be integer #14

Closed dabesa closed 1 year ago

dabesa commented 1 year ago

Hello guys, I just installed, activated and configured the plugin, but when I click on "Generate answer (GPT)" I get this: "Error occurred. Please check your internet connection and try again."

In the Laravel logs I see this error:

" _Type error: Invalid type: expected Tectalic\OpenAi\Models\ChatCompletions\CreateRequest::max_tokens to be of type integer, instead got value 1024, which is string._ "

I tried lover numbers (I use gpt3.5) but it's the same.

Is it a bug?

Thanks

AliakseyM commented 1 year ago

Hello,

Go to the module settings page and make sure that the value of Token limit is 1024 and does not contain spaces. Click save and try again.

dabesa commented 1 year ago

Hello,

I tried but it doesn't help. I'm running PHP 8.1, maybe is something related to that?

Thanks

Il giorno mar 6 giu 2023 alle ore 14:25 AliakseyM @.***> ha scritto:

Hello,

Go to the module settings page and make sure that the value of Token limit is 1024 and does not contain spaces. Click save and try again.

— Reply to this email directly, view it on GitHub https://github.com/code-debug228/HostetskiGPT/issues/14#issuecomment-1578667692, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNY4VZBNDM5T3MM4GXCH23XJ4OTHANCNFSM6AAAAAAY4BQNHY . You are receiving this because you authored the thread.Message ID: @.***>

code-debug228 commented 1 year ago

Hello, What FreeScout version are you using?

dabesa commented 1 year ago

I am on latest version of FreeScout and modules are updated.

Version 1.8.80

On Wed, Jun 7, 2023, 00:18 Mihail Barinov @.***> wrote:

Hello, What FreeScout version are you using?

— Reply to this email directly, view it on GitHub https://github.com/code-debug228/HostetskiGPT/issues/14#issuecomment-1579529575, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNY4V4IGTTM65E2XSERTETXJ6UBTANCNFSM6AAAAAAY4BQNHY . You are receiving this because you authored the thread.Message ID: @.***>

code-debug228 commented 1 year ago

Unfortunately, I couldn't reproduce this error, but I made an update in the code that might help. Download updated module code and try again.

dabesa commented 1 year ago

Thank you, problem solved!!