Purebasic and chat gpt (version 3.5)
Purebasic and chat gpt (version 3.5)
Good morning,
I would like, with purebasic, to ask a question to Chat gpt (version 3.5), and to be able to automatically save its answer in a text file.
For example, I would like to automatically launch with purebasic the question: "Who is the world record holder in the high jump?" and save gpt chat response to text file
I can not do it.
Thank you for your help.
I would like, with purebasic, to ask a question to Chat gpt (version 3.5), and to be able to automatically save its answer in a text file.
For example, I would like to automatically launch with purebasic the question: "Who is the world record holder in the high jump?" and save gpt chat response to text file
I can not do it.
Thank you for your help.
Re: Purebasic and chat gpt (version 3.5)
You can try this for gpt4all
https://dnscope.io/idlefiles/gpt4all_pb.zip
You will need to download the appropriate model from nomic.ai
Example runs a web server. But you can change it.
https://dnscope.io/idlefiles/gpt4all_pb.zip
You will need to download the appropriate model from nomic.ai
Example runs a web server. But you can change it.
Re: Purebasic and chat gpt (version 3.5)
Hello Idle,
I'll take a look at this and let you know.
Thank you and good day
I'll take a look at this and let you know.
Thank you and good day
Re: Purebasic and chat gpt (version 3.5)
Hello Idle,
I don't understand the code.
I ran "gpt4all.pbi" and got the message "error file not found libllmodel.dll.a"!!!
I don't understand the code.
I ran "gpt4all.pbi" and got the message "error file not found libllmodel.dll.a"!!!
Re: Purebasic and chat gpt (version 3.5)
OK I will check later it's 1am I should get some sleep .
Re: Purebasic and chat gpt (version 3.5)
Excuse me, here in France it's 3PM
Re: Purebasic and chat gpt (version 3.5)
Jak64,
in this second, I am also in the progress of checking Idles code.
The error come up, because u need to download and install a AI model from the web (https://gpt4all.io/index.html).
Scroll down to "Model Explorer", choose a model and click on the little arrow icon to download the model.
The files are > 3 GB!!!
Then you have to adjust line 277 in the purebasic file.
Enter the name of the model you have downloaded and copied into the directory where the pb code is located.
I am still downloading the model file, so not sure, if it will run correctly after changing the path to the downloaded modelname.
I have to test all this for myself in the next minutes.
PS: This does not solve the problem for me. But maybe its caused by the x86 Version of PureBasic which I use at the moment. I am not using my standard Laptop, so I have only the x86 Version of PB availabe. :-/
in this second, I am also in the progress of checking Idles code.
The error come up, because u need to download and install a AI model from the web (https://gpt4all.io/index.html).
Scroll down to "Model Explorer", choose a model and click on the little arrow icon to download the model.
The files are > 3 GB!!!
Then you have to adjust line 277 in the purebasic file.
Enter the name of the model you have downloaded and copied into the directory where the pb code is located.
Code: Select all
path.s = GetPathPart(ProgramFilename()) + "ggml-gpt4all-j-v1.3-groovy.bin"
I have to test all this for myself in the next minutes.
PS: This does not solve the problem for me. But maybe its caused by the x86 Version of PureBasic which I use at the moment. I am not using my standard Laptop, so I have only the x86 Version of PB availabe. :-/
Last edited by Kurzer on Sun Aug 27, 2023 2:16 pm, edited 1 time in total.
PB 6.02 x64, OS: Win 7 Pro x64 & Win 11 x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age in 2024: 56y
"Happiness is a pet." | "Never run a changing system!"
"Happiness is a pet." | "Never run a changing system!"
Re: Purebasic and chat gpt (version 3.5)
Hello Kurzer,
I don't have ChatGPT 4, only ChatGPT 3.5 (which is free).
I would just send a request to ChatGPT 3.5 and save its response to a text file.
I don't have ChatGPT 4, only ChatGPT 3.5 (which is free).
I would just send a request to ChatGPT 3.5 and save its response to a text file.
Re: Purebasic and chat gpt (version 3.5)
GPT4All means not GPT4, it means "GPT for All"
Are you using PB x86 Version?
Are you using PB x86 Version?
PB 6.02 x64, OS: Win 7 Pro x64 & Win 11 x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age in 2024: 56y
"Happiness is a pet." | "Never run a changing system!"
"Happiness is a pet." | "Never run a changing system!"
Re: Purebasic and chat gpt (version 3.5)
No, i have Windows 11 Professional 64 bits and Purebasic 64 bits
Re: Purebasic and chat gpt (version 3.5)
okay, then the provided 'libllmodel.dll.a' file is the problem.
the dll does not support all needed symbols.
then we have to wait until idle has slept off.
the dll does not support all needed symbols.
then we have to wait until idle has slept off.

PB 6.02 x64, OS: Win 7 Pro x64 & Win 11 x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age in 2024: 56y
"Happiness is a pet." | "Never run a changing system!"
"Happiness is a pet." | "Never run a changing system!"
Re: Purebasic and chat gpt (version 3.5)
For example, I would like to send the question "What is the capital of the United States?" to ChatGPT with Purebasic and then save its response in a text file.
(See screenshot below)

(See screenshot below)

Re: Purebasic and chat gpt (version 3.5)
Unfortunately, I can't help you with that. ChatGPT is not executed correctly in the WebGadget of PB, so that an automatic filling of the input fields is not possible.
But ChatGPT offers an API that you can use (I've even seen code for it in PB here in the forum). but you need an API key for it. It costs money though, which is why I didn't bother with it further. I just wanted to play around with it and therefore didn't want to buy an API key.
But ChatGPT offers an API that you can use (I've even seen code for it in PB here in the forum). but you need an API key for it. It costs money though, which is why I didn't bother with it further. I just wanted to play around with it and therefore didn't want to buy an API key.
PB 6.02 x64, OS: Win 7 Pro x64 & Win 11 x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age in 2024: 56y
"Happiness is a pet." | "Never run a changing system!"
"Happiness is a pet." | "Never run a changing system!"
Re: Purebasic and chat gpt (version 3.5)
It doesn't matter, thank you anyway.
Re: Purebasic and chat gpt (version 3.5)
Maybe this post helps you:
viewtopic.php?t=81312
viewtopic.php?t=81312