Discuss Scratch

TsengGames
Scratcher
100+ posts

How to connect to api using cloud variables

New chatbot coming soon!
-
I want to use ChatGPT api to power my next chatbot but idk how to do that

Edit: I know this has been posted 1000 times but the previous posts don't make sense to me

Edit2: I mean something like this: https://scratch.mit.edu/projects/850366286/

Last edited by TsengGames (June 5, 2023 13:48:16)


GIitchInTheMatrix
Scratcher
1000+ posts

How to connect to api using cloud variables

Depends, do you know Python? If so, use an API Wrapper, like ScratchAttach: https://scratch.mit.edu/discuss/topic/603418/
If not, there are other languages you can use, although I don’t remember wrappers for them.
You can also leave it at making http requests to the api, but I don’t remember the end points.

Last edited by GIitchInTheMatrix (June 5, 2023 13:45:44)


this is my signature
I simply exist
TsengGames
Scratcher
100+ posts

How to connect to api using cloud variables

GIitchInTheMatrix wrote:

Depends, do you know Python? If so, use an API Wrapper, like ScratchAttach: https://scratch.mit.edu/discuss/topic/603418/
If not, there are other languages you can use, although I don’t remember wrappers for them.
You can also leave it at making http requests to the api, but I don’t remember the end points.
I know how to code python but only a little bit and I have no idea what is an api wrapper

GIitchInTheMatrix
Scratcher
1000+ posts

How to connect to api using cloud variables

TsengGames wrote:

GIitchInTheMatrix wrote:

Depends, do you know Python? If so, use an API Wrapper, like ScratchAttach: https://scratch.mit.edu/discuss/topic/603418/
If not, there are other languages you can use, although I don’t remember wrappers for them.
You can also leave it at making http requests to the api, but I don’t remember the end points.
I know how to code python but only a little bit and I have no idea what is an api wrapper
Basically, performs http requests for you.
It has some documentation, you just need to know some Python. I’d suggest ensuring you’re efficient in the basics.

this is my signature
I simply exist
TsengGames
Scratcher
100+ posts

How to connect to api using cloud variables

GIitchInTheMatrix wrote:

TsengGames wrote:

GIitchInTheMatrix wrote:

Depends, do you know Python? If so, use an API Wrapper, like ScratchAttach: https://scratch.mit.edu/discuss/topic/603418/
If not, there are other languages you can use, although I don’t remember wrappers for them.
You can also leave it at making http requests to the api, but I don’t remember the end points.
I know how to code python but only a little bit and I have no idea what is an api wrapper
Basically, performs http requests for you.
It has some documentation, you just need to know some Python. I’d suggest ensuring you’re efficient in the basics.
I know how to import openai but the install code won't work: Me: $ pip install openai Python: Invalid syntax Me: What the *?!

Last edited by TsengGames (June 5, 2023 13:53:03)


GIitchInTheMatrix
Scratcher
1000+ posts

How to connect to api using cloud variables

TsengGames wrote:

GIitchInTheMatrix wrote:

TsengGames wrote:

GIitchInTheMatrix wrote:

Depends, do you know Python? If so, use an API Wrapper, like ScratchAttach: https://scratch.mit.edu/discuss/topic/603418/
If not, there are other languages you can use, although I don’t remember wrappers for them.
You can also leave it at making http requests to the api, but I don’t remember the end points.
I know how to code python but only a little bit and I have no idea what is an api wrapper
Basically, performs http requests for you.
It has some documentation, you just need to know some Python. I’d suggest ensuring you’re efficient in the basics.
I know how to import openai but the install code won't work: Me: $ pip install openai Python: Invalid syntax Me: What the *?!
Screenshot please

this is my signature
I simply exist
ajskateboarder
Scratcher
1000+ posts

How to connect to api using cloud variables

TsengGames wrote:

I know how to import openai but the install code won't work: Me: $ pip install openai Python: Invalid syntax Me: What the *?!
Did you run “pip install” in a terminal, like “PowerShell”?
banana439monkey
Scratcher
1000+ posts

How to connect to api using cloud variables

ajskateboarder wrote:

(#7)

TsengGames wrote:

I know how to import openai but the install code won't work: Me: $ pip install openai Python: Invalid syntax Me: What the *?!
Did you run “pip install” in a terminal, like “PowerShell”?
Please Don't do that.

Banana


Banana
——————————————————————————–

Very inactive user who has now become a maker.
If you reply to this post it would be greatly appreciated if you could comment the link to your post on my profile!!!

TsengGames
Scratcher
100+ posts

How to connect to api using cloud variables

ajskateboarder wrote:

TsengGames wrote:

I know how to import openai but the install code won't work: Me: $ pip install openai Python: Invalid syntax Me: What the *?!
Did you run “pip install” in a terminal, like “PowerShell”?
Yes

ajskateboarder
Scratcher
1000+ posts

How to connect to api using cloud variables

TsengGames wrote:

ajskateboarder wrote:

TsengGames wrote:

I know how to import openai but the install code won't work: Me: $ pip install openai Python: Invalid syntax Me: What the *?!
Did you run “pip install” in a terminal, like “PowerShell”?
Yes
Can you post the complete error when running the script? Run this command in a terminal:
python name_of_file.py
in the directory where the Python file is
TsengGames
Scratcher
100+ posts

How to connect to api using cloud variables

ajskateboarder wrote:

TsengGames wrote:

ajskateboarder wrote:

TsengGames wrote:

I know how to import openai but the install code won't work: Me: $ pip install openai Python: Invalid syntax Me: What the *?!
Did you run “pip install” in a terminal, like “PowerShell”?
Yes
Can you post the complete error when running the script? Run this command in a terminal:
python name_of_file.py
in the directory where the Python file is
I also tried that

josueart
Scratcher
100+ posts

How to connect to api using cloud variables

AzimuthPulse wrote:

i am @005742 on my new account also don't use your own system use replit or github or some other ide like that
bud, commas exist /j

This topic is old, old enough to be considered necroposting. It's better to develop on your own machine before deploying anywhere else.


Check this Scratch status monitor I made with BetterStack: https://scratch.betteruptime.com / RIP ScratchDB
TsengGames
Scratcher
100+ posts

How to connect to api using cloud variables

AzimuthPulse wrote:

TsengGames wrote:

ajskateboarder wrote:

TsengGames wrote:

ajskateboarder wrote:

TsengGames wrote:

I know how to import openai but the install code won't work: Me: $ pip install openai Python: Invalid syntax Me: What the *?!
Did you run “pip install” in a terminal, like “PowerShell”?
Yes
Can you post the complete error when running the script? Run this command in a terminal:
python name_of_file.py
in the directory where the Python file is
I also tried that
i am @005742 on my new account also don't use your own system use replit or github or some other ide like that
Also tried that

Powered by DjangoBB