How to change OpenAI temperature with Bubble API Connector
In this Bubble tutorial we explain how to add extra parameters to your OpenAI call such as temperature.
Unlock OpenAI's power: Learn to add temperature control to your Bubble OpenAI calls!
Master Bubble API Connector: Discover how to enhance your API connections with advanced parameters.
Boost your no-code skills: Add custom parameters to OpenAI calls and optimize your Bubble workflows.
The Importance of YouTube Engagement
Thank you to everyone who likes, subscribes and comments on our videos. It really helps us out on YouTube, helps us get discovered by more people. I'm creating this video in response to a comment we received and that was a question about OpenAI, the Bubble API connector and how we can add additional parameters into the API call, in particular temperature.
Setting Up the API Call
If I swap back into the API connector, I've got this API call set up and if you want help getting this far, we've now got loads of videos about OpenAI on our website, planetnocode.com that you can check out and get access to. If you become a member, you get access to even more videos.
Adding Temperature Parameter
So I want to add in temperature here and it's really simple. I'm just going to add it in and then type in temperature. It's really important that we follow JSON syntax here. So that is using the double quotes, the speech marks, making sure that between each line, we have a comma, making sure that the final one doesn't have a comma, it only goes in between.
Checking the Documentation
Then if I go back to the documentation, temperature is looking for a value between one and two. So I'll go back and I can just put into here. Let's try this. And then I'm just going to update the call here so that I don't have to allow make it JSON safe in my workflows or just rather test it here in the API connector.
Testing the API Call
I'm just going to say "write about no code". Okay, I've got an error back and that's probably because I've made a syntax error. Right, I've not got a comma there. I thought I had. Let's try that again. And it's not type number. Okay, now I was honestly thinking in the back of my mind this would happen.
Correcting the Syntax Error
That's because when you declare a string or a piece of text, you have to put it between double quotes, speech marks. But I think if you declare a number or an integer, you don't need the speech marks.
Successful API Response
Okay, and there we've got it. We get our response back and let's just check the temperature is as I set it. Does it give the temperature in the returning message? No, it doesn't. But anyway, you've seen that it is accepted.
Conclusion
So as long as you are careful with how you structure your JSON, that is how you can add additional parameters into OpenAI.
Get the Complete Bundle for Just $99
Access 3 courses, 390+ tutorials, and a vibrant community to support every step of your app-building journey.
Start building with total confidence
No more delays. With 30+ hours of expert content, you’ll have the insights needed to build effectively.
Find every solution in one place
No more searching across platforms for tutorials. Our bundle has everything you need, with 390+ videos covering every feature and technique.
Dive deep into every detail
Get beyond the basics with comprehensive, in-depth courses & no code tutorials that empower you to create a feature-rich, professional app.
Save over 70%!
Valued at $80
Valued at $85
Valued at $30
Valued at $110
Valued at $45
Can't find what you're looking for?
Search our 300+ Bubble tutorial videos. Start learning no code today!
Have questions?
We have answers!
Find answers to common questions about our membership plans, programs, and more.
We're here to help you launch your no code SaaS. Reach out to the team and we'll double check our vast library for useful content. We'll advise you on how we'd tackle the same problem and there's a good chance we'll record the video to help the wider community.
As a Planet No Code member, you'll receive a discount on our Bubble coaching sessions. Monthly members receive a 10% discount, while Annual members receive a 17.5% discount. To redeem your discount, simply log into your account and book a coaching session through our platform.
Our 8-week intensive mentorship program is designed to provide personalized guidance and support to help you accelerate your startup journey. You'll be matched with a startup expert who will work with you one-on-one to set goals, overcome challenges, and make rapid progress.
To apply for the Mastery Program, simply click the "Request Invitation" button on our pricing page and fill out the application form. Our team will review your application and schedule a call with you to discuss your goals and determine if the program is a good fit for your needs.
We accept all major credit cards, including Visa, Mastercard, American Express, and Discover.
While we don't offer a free trial, we do provide a 14-day money-back guarantee. If you're not completely satisfied with your membership within the first 14 days, simply contact our support team, and we'll issue a full refund.