Simple components that let a WEB Core app interact with ChatGPT?

I've found several ChatGPT components, but some are pretty hairy and most try to cover a big chunk of the API.

Is it possible to just simulate going through the web page, posting questions, and getting replies back? Or do you have to use the API?

Alternatively, is there a simple way to use the API? I realize the web interface does some crazy things, but if all you need is answers to questions, what it provides is overkill.

You should be using the API with any of these. Gives you some control over things. Not hard to use in just a conversational setting.

1 Like

it looks like the new TTMSFNCCloudAI component in the Cloud Pack solves this problem. :)

Additional question: Does the resources got freed even during the application running?

If I don't free one form's resources that were created upon creation, will they be freed automatically when the form is closed?

Or in a procedure, If I don't free a TList, will it be freed automatically when the procedure ends?

WEB Core is running javascript within the browser. There's no need to free anything as that's handled automatically by the browser. That said, I run several different browsers with LOTS of open windows and tabs, and I can't go for much more than a month before the amount of leaked memory forces the entire computer to reboot. So whatever they're supposedly doing to manage memory fragmentation isn't very good. The biggest offenders are videos. I think that unless you're building a app that streams lots of long 4k videos, the average app built in Delphi would take a very long time to eat up enough memory to crash the computer.

If you have an LLM you're running on your machine, I don't know what impact that might have. But running via a ChatGPT or related API, all of the work is being done remotely, so all the app would see is the responses it gets back, which are moslty just text.