Chat AI & Image Generator (aka Synthi)

Update: added negative prompt (see superhero image in first post above)

Negative prompts are an important aspect of creating more accurate AI-generated images. See this for a brief example of negative prompts: Guide to negative prompts in Stable Diffusion

In case you’re curious, here are the prompts I used to generate the superhero image…

Prompt: Marvel superhero sitting at a desk in an office, coffee mug, laptop, digital art in the style of Todd McFarlane, trending on artstation, comic book, highly detailed, brightly colored, full body

Negative prompt: Text, writing, weird hands, weird face, weird feet, distorted, fuzzy, blurry, disjointed, mini figures, out of frame, messy, cluttered

Update #2: Added a DEMO button for people who are new to AI image generation. See example in first post, above.

In case you’re curious, here are the prompts I used to generate the DEMO image:

Prompt: scenic photo of a two lane slightly curvy road through redwoods, avenue of the giants, with dappled sunlight In the style of a high resolution photograph, slight crepuscular rays

Negative prompt: drawing, digital art, blurry, distorted, unclear, ugly

Fun fact: I ran my first marathon a few years ago in my 40s at the Avenue of the Giants which is what the prompt is describing. The road I ran on looks almost identical to the image that was generated.

1 Like

Love this - loads of work in there too! Really impressive :slight_smile:

And, wow what a place to run a marathon. I’ve travelled a lot in the US now and the Redwoods just took my breath away like nothing else.

1 Like

Thank you! Yes, it was a stunning route.

So, since I wasn’t able to figure out why my Realwear AR headset won’t run the in-built Thunkable Text-2-Voice block, I wanted to see if it’ll run an API generated Text-2-Voice output instead.

I’ve tried running a few different T2V API’s with no luck (the all seem to output a url which I know you’ve found doesn’t work in Thunkable). So, I’ve come back to Google’s T2V API but I’m struggling with the following:

  1. Authentication: I’ve added “Authorization: Bearer ” to the config panel which it isn’t happy with. I’ve also tried adding it in via blocks to set the headers. Still no dice. Did you actually use an API key or did you use an OAuth 2 token?

  2. How did you set the block up - was in Set body > Create JSON from obj > Create Obj?

Edit: figured those out - will post something for others who follow soon.

Still working on this:
3) How did you handle the output as it says in the docs that it’s output in base64 which I know Thunkable can’t handle.

Basically, any help in using it would be most appreciated as before! :slight_smile:

This is a great implementation of A.I.!

Well done @tatiang!!

1 Like

This has to be added to the front of the audioContent property text string:


Hehe, so prior to your reply I found your previous post and went digging through it. I tried to implement exactly this but weirdly I can’t pull the audio code from the object which is returned from the API.

Here’s what I’m getting:

Even if I remove the ‘get object from JSON’ block at (1) I still get a null for the property of that object. If I just use the response I get {“audioContent”:“//aodihfqeioeh…”}

Those blocks worked for me but you need to switch the [get object from JSON] and [get property of object] block positions. The reason for this is that the green [response] block is JSON, not an object. So before you can get an object property from it, you need to convert it to an object:


Oh flippin 'eck! That’s the one combination I didn’t check. Thanks man!
It’s working - hurrah! Interestingly, it doesn’t work via the webapp but does on my phone. I’ll test this on the headset and report back.

1 Like

Update: now using GPT-4. Here’s an example, similar to what OpenAI demoed:

For comparison, here’s GPT 3.5 Turbo:


@tatiang Thank you for sharing that
The new GPT-4 is fantastic.

Awesome - do you have GPT-4 access directly of are you using some other service to wangle access?
Also, have you got plans for it that you’re willing to talk about? I’m currently mulling over how I’m going to use the extra power considering the price increase.

I have API access from OpenAI. My understanding is that the price went down significantly from GPT-3. Is that not correct?

Oh you applied for GPT4 API access and got it? Yeh that’s what I want!

RE: pricing, no:
GPT-3’s Da-vinci-003 is $0.02 / 1000 tokens. ChatGPT (GPT3.5-Turbo) dropped that to $0.002 / 1000 tokens for roughly the same performance. GPT4 though upped that back to $0.03 / 1000 tokens FOR THE PROMPT, the completion is $0.06 / 1000 tokens. the wider context window of 32k tokens is 6 / 12c respectively. I mean you’re very unlikely to test your wallet any time soon for personal stuff lol.

1 Like

Ah, I must have confused ChatGPT 3.5 with 4. I thought 4 was also at $0.002/1000 tokens. Thanks for that. So far, I’m the only user so it’s not a big deal but definitely a consideration if I go public with the app.

Yeh, right now it’s cheap as chips!!
So looking forward to GPT4 though, happy paying 3c / 1000t for the performance upgrade. especially when it means we can feed images in and potentially have the model annotate the images and recursively train from there! Need to take a look at what Stanford just put out too - Alpaca looks v interesting!

1 Like

I can’t wait until I can upload images to GPT-4. It sounds like it won’t be long. I really don’t care about having it figure out a recipe from my fridge ingredients (although, yeah, that’s kind of fun) but being able to provide it data via drawings and existing images sounds fascinating.

1 Like

Do you think you can share a sample template for creating stable diffusion. I have a project started and it’s coming along nicely but Open AI’'s api really sucks for it’s mobile implementation. It would be highly appreciated!

It’s another one of those things that I’ve spent hours working on and don’t really feel I can share freely. But if you have it set up and it’s not working properly, I (or someone else here) might be able to take a look at your blocks and see if there’s anything obvious that’s not correct.

Understood. After working countless hours and finally figuring it out, I see why you wouldn’t want to share. It was a good learning experience. Where do you have your application posted? I would love to see the end result. I will post screenshots of mine after I workout a few kinks.