pedrojlazevedo / twitch-chatgpt

ChatGPT Implementation for Twitch Streamers
67 stars 1.69k forks source link

RequestError: Request path contains unescaped characters #8

Closed 6ghost9 closed 1 year ago

6ghost9 commented 1 year ago

I'm not sure if it's a bug, or some setting should be adjusted, but whenever I try to talk to my ChatGPTbot in polish, using polish characters like: ś ć ż ź ę ą ó ł etc I get this error from the title:

RequestError: Request path contains unescaped characters

I wonder if the chatbot is set to talk in english only, or there's a problem with character encoding (not using UTF-8?).

pedrojlazevedo commented 1 year ago

Hello @6ghost9,

Could you provide the full log? Cyclic provides it.

There are two possible reasons, when sending the request from twitch to cyclic endpoint, or when making the openai request. The logs would help locate the problem.

Thank you.

pedrojlazevedo commented 1 year ago

Hello @6ghost9,

please check #9 to solve your problem.

Thank you.

6ghost9 commented 1 year ago

Oh my, sorry for the delayed response! The StreamElements bot version would be:

!editcom !bot $(urlfetch https://your-cyclic-url.cyclic.app/gpt/"${user}:${1:}")

or

!editcom !bot $(urlfetch https://your-cyclic-url.app/gpt/"${user}:${querystring}")

?

Or maybe without the first two commands? Sorry for the really dumb questions, but I'm totally new at this... :D

pedrojlazevedo commented 1 year ago

No worries.

You are not using Nightbot then? It's for streamelements?

If it's StreamElements can you try this: $(urlfetch https://your-cyclic-url.cyclic.app/gpt/"${user}:${queryescape ${1:}}")

6ghost9 commented 1 year ago

It works perfectly! Thank you so much!