Finally, I accessed the GPT-3 API in Snap!

thanks for this info, @ pajamaclaws21 and @ toontalk

this is exciting stuff!

You can just put @ and then follow it with the name of that someone without putting links.

For example,
@manyone rather than @ manyone

thanks @slate_technologies - i'm still learning!

You're welcome!

But only do that if you specifically want them to get notified.

I have a key, but it does nothing and gives me and error when using it.

Are you using the stored API key block? If so, you need to set the browser key "openaiapikey" to your OpenAI API key.

image

That's an example by @warped_wart_wars, but you should replace "warpedwartwarsapikey" with your valid OpenAI API key...

EDIT: For reference, "warpedwartwarsapikey" isn't a valid API key. That's why it's okay to share.

so i replace both of them?

What do you mean, both of them? You can follow the example of that script pic, but replace the value "warpedwartwarsapikey" to your API key.

oh ok

Note that GPT-3 is fussy about apostrophes, new lines, and trailing spaces. I use the following to sanitise the prompt:

Without this GPT-3 reports the empty string.

I like how you named it.

It turns out most of the fussiness is in how the POST message is constructed and not GPT-3's API.

The original post extracted the completion from the POST response by using split of substrings like "index" and "text". While that works OK I believe using split by json is a better method. A list of lists is created that one can navigate with reporters like assoc in the list library.

I cant use the API key i created unless i pay.

I believe OpenAI still gives you a $5 credit so you can experiment with the API key. See Regarding the free credits? - #2 by _j - Feedback - OpenAI Developer Forum

But yes, sadly, once that is used up one must pay.

is there a way we can use the free gemini AI API. I have a project that im working thats a voice assistant for school, so far i have speech to text and a nice looking system. i plan on adding an API and maybe voice recognition. but because its for school i would probably need to use a google system for it to be unblocked.

In order to use gemini, you'll have to look into how to use the gemini api, as gemini is not openai, and the api is most likely very different.

yeah thats the problem. I have been coding for already a couple of years and got pretty good at coding stuff like AI's on unconventional platforms like google sheets; but those AI's were for games. I have no clue how to use the API's and use them from within snap. If anyone would like to help it would be greatly appreciated.