Adrian Twarog
Databases can be connected to an AI through an API. In this tutorial, I’ll show the practical uses of creating a simple connection from OpenAI to a new Database built on Singlestore.
00:00 – Introduction
01:00 – Project Plan
01:32 – Accessing Youtube API
01:59 – Connecting to the Youtube API
03:07 – Retrieving Comments from Youtubes API
04:16 – Setting up a Database on SingleStore
05:01 – Connecting to the Database via API
05:50 – Creating Database Tables and Structures
06:34 – Inserting Row to Database
07:31 – Populating Database with Youtube Comments
09:36 – Connect to OpenAI API
11:09 – Connect Database to GPT3
14:05 – Using GPT AI to Analyse and Update Database
16:29 – Conclusion
β New – Teach Me OpenAI Digital Book β
https://enhanceui.gumroad.com/l/teach-me-openai
I’ve put together a easy to understand book with ~60 pages about OpenAI and GPT with how to get started to integrate it into projects, code examples, and much more!
SingleStore: (also today’s sponsor)
Unified data engine for transactional and analytical workloads.
https://www.singlestore.com/cloud-trial/?utm_campaign=adrian-twarog&utm_medium=video&utm_source=youtube
OpenAI:
Creator of ChatGPT, Open AI creates models like davinci, ada, and chat gpt and can be accessed via their APIs.
https://openai.com/
Learn Design for Developers!
A book I’ve created to help you improve the look of your apps and websites.
π Enhance UI: https://www.enhanceui.com/
Feel free to follow me on:
π¦ Twitter: https://twitter.com/intent/follow?screen_name=adrian_twarog
π¬ Discord: https://discord.gg/6gmmFvxkD7
πΈ Patreon: https://www.patreon.com/adriantwarog
Software & Discounts:
πΎ Webflow: https://webflow.grsm.io/adrian
πΏ Envato: https://1.envato.market/yRZjz2
πΏ Envato Elements: https://1.envato.market/LP0OJZ
π΄ Elementor: https://elementor.com/adrian/?ref=23140
β Editor X: https://www.editorx.com/adrian-twarog
Computer Gear:
β¬ Monitor: https://amzn.to/3f9DOQI
β¨ Keyboard: https://amzn.to/3eA5UFD
π Mouse: https://amzn.to/3xVJO8l
π€ Mic: https://amzn.to/3hgCfms
π± Tablet: https://amzn.to/3ewt7sa
π‘ Lighting: https://amzn.to/3vOZeZY
π‘ Key Lighting: https://amzn.to/3f6qP2f
Camera Equipment:
π· Camera: https://amzn.to/3uCv4J9
πΈ Primary Lens: https://amzn.to/3vT6wMm
πΈ Secondary Lens: https://amzn.to/3tyqWIX
π₯ Secondary Camera: https://amzn.to/3o2zCGi
π Camera Mic: https://amzn.to/33tCz9l
π USB to HDMI: https://amzn.to/33yW9RE
i wouldn't exactly call it connecting gpt with database.. I would call it Integrate GPT with your Node Js backend. If i really want to call it connecting GPT with Database, Then it should be something where you pass in the credentials to connect and just prompt the GPT to use its own model to create queries to select data
Great π―π―π―
that is awesomw bro, you just won a new subscriber π
Amazing tutorial… but for that use case would be better to train a custom model to analyse the comments so you don't have to pay per token. You could use openai API to answer the comments. And that's I good idea for a tutorial… using custom models to read text and identify potential risk
Hai your discord link is expired. I cannot access it
I have a JavaScript code with a bug I have send you a message reply so that we can solve it
This is the most useful idea with AI I've seen so far! Good job!
I believe that what subscribers wanted was to literally feed gpt3 with all the knowledge of a database at once, so that after that, they could ask any business question like: "Tell me which customers had the highest revenue in the last 5 years, and which ones are likely committing fraud." This is a practical example of what would be possible by integrating ChatGPT with a proprietary database. Just like a new help desk employee who, after learning about the company's business rules, has the knowledge to answer any customer questions that come through the support department with doubts.
ThioJoe built a great tool for moderating comments some time ago π
OpenAI has a private trained model for enterprises. Does it have Role-based access control for the Privately trained data in OpenAI? (like employees can access only their data; another employee cannot access his/her data)
Is possible to use python to do all this work? Thanks for the video
Uhm, yeah. We all need a highly scalable Enterprise level Cloud DB for our personal YouTube comments. Or, you can find a simple, free way of doing this in the same, Google eco space via something like the Google Sheets API. Oops, that won't pay the influencer bills though…
What about using GPT-3/4 to give you a response based on previous multiple responses without hallucinations from just fine-tuning, and maybe even ask some questions if needed…
For example, User input: Which route do I take to go to the bank? Context answer 1: If you're on foot take x route, A2: Take route Y by car, Chatbot reply: How are you planning to go there, by foot or driving? and so on…
Do you have a video on how to do this? Is it even possible?
Hope you changed your API key since making this.
This is amazing thanks.
Can you employ me to shifter all your comments and help delete the spam like comments. I have plenty of time and I have a team trained and dedicated to doing this.
I promise you it's pocket friendly and you'll get the best value you can. Good thing is that you don't have to commit financially until after the first 30 days.
I'm looking forward to hearing from you and working with you. Thank you.
GitHub? Link
So thankful I can change the playback speed! Haha
Great video! Can't wait to check out more of your content
Will this make The Graph Protocol obsolete?
How many tokens does this use ?
Great video !
Thank you π
Hey Adrian
Congratulations for 300Kπ
Can I use Google Sheets instead of Youtube
Can I hire you on a project? How could I discuss this with you?
Can you make a video on how to automat YouTube commenting and spam reporting using chatgpt APIs
Let's say I understand the formula to make agentgpt sentient how can I have it localy on my computer so I can work with it
what if we want to do a brainstorming of a database, i mean giving all the infos in the database to chatgpt and asking it about a request π
Is openai api key is needed to train the model?
anyone have the Github repo?
So beautiful to watch this in action.
Every time I see use cases like this, I can't help but think how many people in the non-IT world are clueless about the impact of this technology.
Keeps blowing my mind every day.
is this normally the work of data scientist or data engineer or neither
Like the other video of the creator I just watched: leveraging his (excellent) node.js skills but very few OpenAI API Infos burried somewhere between.
One of the best hands on tutorials on how to practically use GPT. Thanks so much for sharing this, Adrian!
Is it possible to get text from the comment? Ex I stuck on step four then we have some column in which it stores four?
β€
When you post your API key on line 4 is there a way that this is not public or are you just deleting/changing it after the video is posted?
have anyone tried MediaX chrome extension that works on chatgpt , bard and even bing AI chat
Do you think whenever we do a request from API on our sensitive data do you think openai takes our data ?
I only see value in doing this database, if there were millions of comments that needed to be cached and maybe some other analysis done after on the same DB, like querying the DB to figure out which users asked the most questions. Also, while technically the DB was connected to an AI, in essence the AI was only used to process some text and set a boolean value. I think a better title would have been "How to process natural language and save the results to a DB". Thoughts?
I was thinking in this when AI appears in news because there are a lot of similar comments that chatgtp can resume in a same comment or classify in specific topic, this will evolve the way to see comments in future.
how can i get your sample code
Well done with this tutorial I wonder if you still use this? Should Reply: Yes
Thank you, please could you help me to connect Gpt to my own sql data base ? for asking request to gpt about my database ?
The code you wrote at 15:09 is prone to SQL injection. It would actually be quite fun to see if it was possible to exploit it by combining a propt injection attack with a SQLi attack…
This is a nice example that does not require Chat GPT unverified plugins.
I wanted to play around with a π and burned a bunch of time looking into all of these vector solutions, only to find out I don't even have the ability to add them
This is the best video I've ever seen about actually integrating ChatGPT in a application. Thank you a lot, buddy.
awesome broπ€©
Please rename your title. This is not having gpt connected to the database at all. This is just pulling data from database and then feeding it to gpt as prompts.