Purebasic and chat gpt (version 3.5)

Just starting out? Need help? Post your questions and find answers here.
jak64
Enthusiast
Enthusiast
Posts: 619
Joined: Sat Aug 15, 2020 5:02 pm
Location: Ciboure (France)

Re: Purebasic and chat gpt (version 3.5)

Post by jak64 »

Hello Caronte3D,
Thank you for your response, I didn't quite understand that...

Too bad and many thanks again for all the time you devoted to me.

See you :D
jak64
Enthusiast
Enthusiast
Posts: 619
Joined: Sat Aug 15, 2020 5:02 pm
Location: Ciboure (France)

Re: Purebasic and chat gpt (version 3.5)

Post by jak64 »

Hello idle,
OK, I understood your answer but, and it's a shame, I can't use it for what I want to do (see what I wrote in the post of "Thu Sep 07, 2023 12:46 pm").

See you
User avatar
Janni
Enthusiast
Enthusiast
Posts: 127
Joined: Mon Feb 21, 2022 5:58 pm
Location: Norway

Re: Purebasic and chat gpt (version 3.5)

Post by Janni »

I agree with Caronte3D. GPT3.5 API is dirt cheap!

Inspired by this thread I decided to make a program that uses the API. I now have a tray icon in my taskbar, when I click that I can input the question as text and a female voice speaks back the reply from Chatgpt.

I put 10$ on the account and during my programming I failed a lot so made a ton of requests.
Now it's 9.97$ remaining on my account :shock:
Spec: Linux Mint 20.3 Cinnamon, i7-3770K, 16GB RAM, RTX 2070 Super
jak64
Enthusiast
Enthusiast
Posts: 619
Joined: Sat Aug 15, 2020 5:02 pm
Location: Ciboure (France)

Re: Purebasic and chat gpt (version 3.5)

Post by jak64 »

Hello Janni,
Thank you for the info.
I have written several game programs, music player, movie player with library, etc... in Purebasic and I have made them available (especially on the French site) or I put them on the computers of the members of my family or others.

It's not the cost that bothers me, I'm a happy French retiree with a very good pension, but I wouldn't want to make a program available to other people who would be forced to pay to use it.

See you
User avatar
Caronte3D
Addict
Addict
Posts: 1355
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: Purebasic and chat gpt (version 3.5)

Post by Caronte3D »

If your program is for a few known people (family), you pay for the service and create a gateway to access ChatGPT from your apps through you :D
P.D: I don't know if it's doable or even legal, but...
jak64
Enthusiast
Enthusiast
Posts: 619
Joined: Sat Aug 15, 2020 5:02 pm
Location: Ciboure (France)

Re: Purebasic and chat gpt (version 3.5)

Post by jak64 »

THANKS Caronte3D
See you
zefiro_flashparty
User
User
Posts: 74
Joined: Fri Mar 04, 2005 7:46 pm
Location: argentina

Re: Purebasic and chat gpt (version 3.5)

Post by zefiro_flashparty »

how are you! The gpt 3.5 or 4 thing would be interesting, although for example without having the paid one, 3.5 never worked for me in any python program for example, and when it pretends that it will work, it tells me that I no longer have free tokens, but He never actually gave them to me. So I haven't been able to make any progress, I'm thinking how to trick openai into thinking I'm via the web xD
but, with which I cannot prove in any way,
(If anyone wants to investigate this topic and has an Openai account that they want to share, I would gladly try to get something going. They had said that, for example, to use the free API, you had to have at least paid a subscription amount, but I live in Argentina. and the economy at this moment is terrible, with everything that comes from outside, so it is not viable at the moment...)
Something that yes, I have been doing, is creating from purebasic, the scripts for the ias, and launching them under python, or modifying the prompts etc. as needed, and I launch that from an env, virtual in python, and then if necessary I see the responses , send a txt or something like that,
I have used the pb for example with the AI to generate videos,
at some point with stable diffusion to launch the one that generates images,
with llama2 (in ctransformers, even with models up to 64b billion! that used a few gigabytes of ram) although in practice I do better with the smaller ones, because the large ones take forever on my 12gb rtx2060, I have also I have achieved interesting things with freedomgpt, (in freedomgpt there is a windows launcher .exe) that can create ggml models, with which I can launch it by configuring the parameters, and I see in the process what the program returns to me, and at least it works a little)

I have been testing how much AI has been released, locally for example, and in many I launch everything from purebasic, for example I was also able to run the AI that defragments objects in an image, so I send it a photo, it generates the defragmentation for me, and those If I load the images in the pb, and I can reconstruct the scene, although I only opened a couple there to see what worked, I did not continue investigating,
I have also managed to use whisper, although complete programs have already emerged that translate everything making good use of the GPU, or CPU,
one of my first experiments, I loaded a question with an input in pb, that was translated into English, I asked an AI something, she responded, translated into Spanish, and she responded in a windows voice, but it was a franquestein, then I learned to use the microphone voice in python and translate it into text, with which I could say something and have it do everything the same but I don't like python at all.

Going back to the topic of APIs, I have used many from PB, although with some others I still don't understand why it doesn't work. Recently I started trying to get Google searches running, from Serper.dev, which allows 2500 free requests, but I couldn't. make it work from pb, in the end I started to see how the browser did when I search for something, and by copying that I managed to do searches from pb, in one line of code, :D

Using an api from pb is usually relatively simple,
The request is made in the correct format, and the response is read,
A little while ago I saw that the Google Bard AI apikey was available, one of the first versions, and for example I managed to make it work, in python by creating the script from purebasic, the good thing about it is that it does not require any cpu/gpu and It responds quite quickly, like gpt3, or sometimes faster. (maybe he's not so smart)
but since it uses Google's python libraries, and a translator's libraries, I generate the python code of my request, I translate it into English with a translator, and I send that final prompt to bard, and it responds to me in English, then that response I send it to a txt
I tried to translate it back into Spanish, for example, but Bard's response is longer than what the translator allows, so if you don't like it, you either cut it off or nothing comes out, but since I couldn't fragment it and translate it like that I still haven't figured out what to do.

Another thing that I was able to make work with a purebasic script was bark, the AI that generates voices, I made a code in pb that generated the script to create 50 voices saying the same text, (the voices always come out different, although it is far from coming out as I hope) then with this I generate 50 wavs of voices of a text,

then with another AI, for example, from pb I launched a script generator, which selects the audio, an image of a person, and creates the animation to make it speak with that voice, and as a result it gives me an mp4, although I don't know how to open them in pb, only in window xD

Going back to my experiments today with the Google search API, looking at how the browser is doing, what I was doing was generating a prompt, based on that prompt I did a Google search, filtered the results, and added it to my prompt , which used those responses from the search engine, and sent all of that to an AI, locally, and I have noticed an improvementin some responses,
And I think it has to do with giving a more specific and broader context to the tokens that will be used, at least of the 10 answers that the AI gives me, 1 or 2 are fantastic, in other tests out of 10, 7 were very good,
and in some cases without applying that trick, the answers were very bad, sometimes it even processes but I don't get answers.
which for certain types of processes can be very interesting,
I suppose that using the gpt3/4 api, the quality of the answers is much greater, but I am still trying to do something useful and good locally, without depending on the apis,
For example, I didn't implement that trick in Bard, even though in the web version I think it already uses Google, Gmail, YouTube, etc., in my version of the API it doesn't, so maybe it's useful too.
I'm going to look for my gpt3 apikey, to see if I at least get the response that I no longer have tokens!
Amd Vishera fx8350 ,16Gbram, Gtx650 ti, 2gb,Win 10pro. 13tbs. 8)
User avatar
Caronte3D
Addict
Addict
Posts: 1355
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: Purebasic and chat gpt (version 3.5)

Post by Caronte3D »

It would be nice if you shared examples of all the things you are doing, so other PB users could learn from your experience.
Post Reply