Openai API (aka ChatGPT)


This is my first post here.

Is there any openai library, package, code examples to use openai API with xojo ? Especially tne text applications, Text Generation and Question Answering ?

Thank you

The OpenAi docs give CURL examples which can be followed using regular REST API calls using URLConnection.

The docs for URLConnection is located here: URLConnection — Xojo documentation

Some more information on using URLConnection for REST API calls:

This is a pretty good video on YouTube by @Paul_Lefebvre

Thank you. This is the solution I chose. I was hoping for something less basic, but it turned out to be just fine.


So basically your job is to create 13 in a dozen apps? Now that’s #$@&. I agree.

Anyhow, my question was well-meant. Not meant badly! Long toes don’t help then, of course

1 Like

I find it interesting how many people believe the only way to do well with software is to have something unique and/or be first to market when the reality is that if you have something unique, it won’t be unique for long and if you’re first, you’ll soon be joined by many others.

That being the case, the only logical conclusion is that neither of those are the main driver of success over the medium to long term - it needs to be something(s) else.


You certainly have a point there!
But the fact is that a lot of people are quick to jump on the bandwagon of something that is “hot” at the time. ChatGPT is really a very good example. In less than 1 month more than 100 iOS and Android apps have appeared on the market (and almost none of them free) to get a piece of the pie.

That was my original question too, if Damien is also such a person or someone who wants to use ChatGPT in another playful way. Unfortunately, he had long toes and preferred to insult rather than provide an answer. Actually, that says it all, and we now know the answer. :smile:

@SteveP Yes, I totally agree. On the other hand, if we want to be successful, we have to create added value, and in the case of GPT chat there are indeed immense possibilities to create something new.

As far as I am involved, I am working on something that has very little in common with chat-GPT. I am modestly trying to use the available language models of openai to enrich a knowledge base in the field of human resources.

However, the more I work on the subject, the more I think that we could indeed create a chat-GPT type conversational robot. This would consist in enriching the conversational model with all the knowledge we already have in the knowledge base. It would be a kind of chat-GPT specialized in human resources, specifically in skills profiling. But for the moment I am not there yet! There is some work to do first :slight_smile:

@Damien_Raczy yep well in that case you’d want to look at paying to train the models for this purpose with what you have.

Good concept of course - once the entire generalists are out of the way, specialist trained use cases will be next - such as what you describe.


@SteveP yes, this can be very costly, especially when repeated testing is done with large volumes of data with high performance models. On the other hand, we can do your trial and error with cheaper models, even if we end up using davinci to generate high quality documents. Especially tuning with Ada and Babage which are 10 or even 40 times cheaper than davinci, validate the hypothesis, and then finalize with davinci.

I have just completed a DLL plugin for windows that gives you two way conversations and temporal coherence with ChatGPT. PM me if you still need it.

@Nicholas_Pearce-Boby , is there a chance that you could share your windows dll with this community ?

Not only that, in Opera, but also buttons to access directly to ChatLGBT…

Do you have a GPT API Key?

Yes I have one.

I just need to make a couple of changes as I fixed my API code when testing.

Ok. Please when you finish testing let me know. Thanks !!!

imb building it into a plugin pack, ive started another thread to see what anyone else would want in it.