xgerhard / XGPT

Use Nightbot as AI chatbot powered by ChatGPT
https://xgpt.gerhard.dev/
9 stars 8 forks source link

custom querystring #3

Open wooodyx opened 2 weeks ago

wooodyx commented 2 weeks ago

Hello

I would like to add a text before the query string, For example, the command would be !tradsp to translate to Spanish, to translate any text from the querystring to Spanish.

but I get a 400 error. I would like to understand what my mistake is or how I could do it.

$(urlfetch https://xgpt.gerhard.dev/api/command?q=translate%20to%20spanish:%20$(querystring)&token=<token>)

xgerhard commented 2 weeks ago

Hiya! Dont see anything wrong with the command, what is the exact error you're seeing? Not sure if it's a 400 error code from Nightbot, OpenAI or my application. If this is the only command in your channel that uses this API, I would suggest using the dashboard and give the AI instructions to just be a translator: https://xgpt.gerhard.dev/dashboard