Windows cURL API Chat Engine

I created a batch file which can successfully use cURL to access the OpenAI api. It doesn’t require any external libraries. It also allows data to be recirculated so the API knows the previous requests. I am using this to create a chatbot that can hold a good conversation through a batch file.

The current issues that I’m having right now is dealing with unicode formatted characters.
The unicode characters don’t travel well through batch files using cURL, an example would be  being \ue106 outputted into the text prompt.

If I get this working, I plan on creating a batch file that can allow people to modify all of the parameters that you can on the webpage, and create your custom presets to be loaded on your PC as files. And as part of the windows batch system, this project can be further expanded upon.

Currently it is pretty weird and glitches out quite a bit. But I am also using the curie engine for the requests currently. I have seen davinci give way smarter responses using my system vs curie.

Currently, the problem I’m experiencing that will fix basically everything, is trying to figure out how to escape the tilda( ~ ) character next to a colon( : ) in the batch script.

An example of the problem is set problem=%problem:[escape character here]~=%
I’m storing the previous outputs in a variable that formats itself.
Sometimes the chatbot will send a tilda into the chat, which messes with the code.

Basically the variable will contain text such as, “AI: ~~~ Hello there. How are you doing?~”
I’m trying to remove the tilda and other characters such as equals signs as well.

If anyone highly skilled in batch formatting could help me with this one part, I would greatly appreciate it.

Here is a photo to show what I have so far.

1 Like

And just to let you know. It had a preset I designed on the website loaded previously.

Hi Vincent! Can you share your project?