it’s nice to know that we can connect to openAI via a thunkable block designed for that purpose.
first i asked “Tell me, in a poem, why python rocks” and it came back with this:
it seemed to have problems in handling newlines (\n) though,
so i split the returned response by hand:
Python’s great for all your coding needs
It’s easy to learn and a great tool to please
It’s open source, and it’s ever so flexible
And it’s got a huge library to explore and collect
Python’s great for automation and data science
It’s so versatile, it can do almost anything
It’s got a great community, full of helpful folks
Ready to help you when your code chokes
Python’s the language of choice for many
It’s got the power to solve any coding worry
It’s easy to use and understand
The perfect language for any tech-savvy man
Python rocks, it’s clear for us to see
It’s the language of choice for you and me!
actually i made an earlier request with this prompt:
write a poem describing why i should learn python.
and it came back with this (which is not bad) - i also had to split by hand.
Python is a language that’s worth learning,
Its power and flexibility make it appealing.
You can create things that are quite amazing,
And the learning process is not too taxing.
It provides a base for quite a few things,
From simple scripts to web development wings.
It’s easy to learn and quite a lot of fun,
And you can apply it to many a project, one and one.
The applications it has can be seen,
From automation to data science and machine learning.
So don’t hesitate, take the time,
To learn Python and you won’t regret your climb.
so it’s not ChatGPT but it tries!
then i tried the image generation with this prompt:
robot in grass skirt , green hills in background, style stained glass
i was surprised by the response - it may have missed the grass skirt (i should have worded it differently) but overall, the image is impressive!
then i tried the prompt “don quixote dancing with snow white in the style of picasso” and voila
there must be a way to interpret those newlines in the returned response of the first example for text generation. (when i was connecting to GPT-3 - directly - in the summer, the response came back with newlines correctly interpreted - perhaps in this format, via the control block, there is some setting i need to set).
all in all, it’s impressive - here are my blocks:
here;s the link to the project for remixing (you have to supplu an api_key)
https://x.thunkable.com/copy/c548528e5420ab6ce006d7e14e3c8f49
sign up for an API key with OpenAI and click on the link in @conroy33’s post above.