# Create Your Own GPT Turbo with OpenAI Assistant ## Metadata - **Published:** 11/7/2023 - **Duration:** 12 minutes - **YouTube URL:** https://youtube.com/watch?v=OKcHeOqHf4c - **Channel:** nerding.io ## Description Join us as we explore ChatGPT Turbo OpenAI's groundbreaking announcement from Dev Day, showcasing the revolutionary feature that allows you to create your very own ChatGPT AI Assistant using both the dashboard and an API. This in-depth tutorial covers everything you need to know to harness the power of the latest GPT4 Turbo model, making AI development more accessible than ever. ๐Ÿ”ฅ What's Inside: โœ… Look at the New Dashboard from OpenAI Dev Day 2023 โœ… Step-by-Step Guide on Setting Up Your AI Assistant โœ… Review the Logging โœ… Real-World Applications Demo ๐ŸŽฅ Chapters 00:00 Introduction 00:17 UI Updates 01:00 Discover 01:49 Assistant 02:51 Playground 06:06 Add vs Run 06:51 Logging 07:30 Modals 09:16 API 11:49 Review ๐Ÿš€ Whether you're a seasoned developer or just starting out, this video will provide you with the tools and knowledge to dive into the world of AI-assisted technology. Get ready to unlock the potential of custom AI Assistants for your projects and workflows. ๐Ÿ‘ Don't forget to like, subscribe, and hit the bell icon to stay updated on all our latest content. Comment below with your thoughts on this new feature or any questions you have โ€“ we love hearing from you! ๐Ÿ“บ Watch next: https://www.youtube.com/watch?v=6p2T9iZUkn0 ๐Ÿ“ž Book a Call: https://calendar.app.google/M1iU6X2x18metzDeA ๐Ÿ“ฐ FREE snippets & news: https://sendfox.com/nerdingio ๐Ÿ‘‰๐Ÿป Ranked #1 Product of the Day: https://www.producthunt.com/posts/ever-efficient-ai ๐Ÿ”— Links https://chat.openai.com/gpts/discovery https://platform.openai.com/playground https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo https://platform.openai.com/docs/assistants/overview โคต๏ธ Let's Connect https://everefficient.ai https://nerding.io https://twitter.com/nerding_io https://www.linkedin.com/in/jdfiscus/ https://www.linkedin.com/company/ever-efficient-ai/ ## Key Highlights ### 1. Custom GPTs via Playground Assistant OpenAI's playground allows users to create custom GPT assistants using their own data (e.g., PDFs) as a workaround while the official custom GPT feature is in beta and closed off for some users. ### 2. Importance of Logs for Debugging The playground provides detailed logs of the assistant's operation, including HTTP requests, tool calls, and code interpreter actions, which are crucial for debugging and understanding the assistant's logic. ### 3. GPT Turbo Token Window GPT Turbo has a large 128k token context window, but it's important to note the maximum return is limited to around 4k output tokens, which impacts the length of the assistant's responses. ### 4. Assistant API Details The Assistant API mirrors the UI features, allowing programmatic creation of assistants with names, instructions, tools and model selection. Requires updated SDKs with beta object. ### 5. Thread Management for Context The Assistant API utilizes threads to manage context and conversation history, adding messages and running them to generate responses. Files can be optionally added to threads for context. ## Summary ## Video Summary: Create Your Own GPT Turbo with OpenAI Assistant **1. Executive Summary:** This video provides a practical guide to leveraging OpenAI's latest Dev Day announcements, specifically the new Assistant API and enhanced features of GPT Turbo, to create custom AI assistants. It demonstrates building an assistant both through the OpenAI playground UI and by referencing the new API. **2. Main Topics Covered:** * **OpenAI Dev Day 2023 UI Updates:** Overview of the new OpenAI dashboard interface, focusing on access to GPT-4, browsing, analysis tools, and plugin integration. * **Creating Custom GPT Assistants via Playground:** A walkthrough of using the OpenAI Playground's Assistant feature as a workaround to the waitlist for the Custom GPTs feature, using file uploads for data retrieval. * **Assistant Configuration & Tooling:** Explanation of options for customizing assistants, including setting names, instructions, choosing models (GPT Turbo & GPT 3.5), and adding tools like code interpreter, file retrieval, and custom function calls. * **Importance of Logging:** Emphasizing the crucial role of the Playground's logs in debugging and understanding the assistant's execution flow, highlighting HTTP requests, tool calls, and code interpreter actions. * **GPT Turbo Model Details:** Discussion of GPT Turbo's capabilities, including its 128k context window, 4k output token limit, and integration with vision (image handling). * **Assistant API Overview:** Breakdown of the Assistant API, including creating assistants programmatically, managing threads for context, adding messages and files, and running the assistant to generate responses. **3. Key Takeaways:** * The OpenAI Playground offers a user-friendly interface for creating custom AI assistants by uploading custom data and using different models. * Logs within the Playground are essential for debugging and understanding how the assistant processes information and interacts with different tools. * GPT Turbo offers a large context window (128k tokens), but its output is limited to ~4k tokens. * The Assistant API allows for programmatic creation and management of AI assistants, mirroring the features available in the Playground UI. * Thread management is key in the Assistant API for managing conversation history and context. **4. Notable Quotes or Examples:** * **Creating a Web Accessibility Bot (WAG) Demo:** The video demonstrates building a chatbot using an ebook on web accessibility standards. This example showcases how to upload custom data and use the retrieval tool to answer user questions based on the document's content. * **"The thing that's the coolest for me is actually watching the log seeing the information that's coming back through so that we can find oh this is where it's actually trying to run the weather function that's pretty sweet but being able to look at this log and see the execution makes it really important and really helpful for what we're going to look at coming up which is the API call"**: This highlights the value of logging for understanding assistant behavior. * **GPT Turbo Token Context:** The video clarifies that although GPT Turbo has a 128k token input context window, it is limited to about 4k output tokens. **5. Target Audience:** * Software developers and AI enthusiasts looking to build custom AI assistants. * Individuals interested in understanding and utilizing OpenAI's latest Dev Day announcements, specifically the GPT Turbo model and Assistant API. * Those seeking a practical guide on creating AI assistants using both a UI and an API approach. * Anyone exploring the possibilities of AI-assisted technology for various projects and workflows. ## Full Transcript hey everyone welcome to nerding IO I'm JD and today we're going to be going through open AI Dev day announcements specifically chat GPT turbo as well as looking at the playground which will actually allow you to create your own GPT assistant all right so first things first we're actually going to take a look at the the dashboard and the UI updates here so if you look at the new screen for the dashboard it's a basically different uh UI you have GPT four up here in the corner which gives you all of Dolly browsing and Analysis and 3.5 as well as plugins the other thing you can do is you can actually upload content here so uh you know whether it's an image or CSV you can kind of interact with it from the home page and it'll switch in between the different models this is only for the plus version of chaty PT so that's one thing to keep in mind the other thing that's really cool is they announc the custom gpts and so if you go over here to explore you can see the gpts that are made by open AI so you have things like Dolly data analysis uh things for game time even coaching or writing coach and uh some other uh graphical ones like coloring book hero and things like that but if you want to create your own GPT right now it's in beta and at least for me it's closed off and it's saying it's in the it's coming available in the next couple weeks however there's a workaround for this so you can actually create an assistant with your data uh by using the playground and so that's what we're going to look at next so if you go to the playground you have a couple different options you have on the sidebar here all the uh the playground and the assistance so assistance is new um what you can do is you can actually click create and then it'll give you this little another little sidebar that allows you to put in a friendly name some instructions model types which we'll go over in a little more detail and then the different types of tools that you can put and files now you can go ahead and use this and create your assistant here however I found that the playground is actually uh like better for a lot of the tools so we're going to go ahead and click out of here and go over to the playground all right real quick if you haven't already please remember to like And subscribe it helps more than you know and we can continue putting out great content for this Channel all right let's get back to nerding all right so now that you can see the playground is is loaded the view is a little bit different so we have the same kind of functionality here that create an assistant we have some clear options but then we also have the logs and this is super important we're going to go through through that as we're building our assistant so what we're going to do for this one is we're actually going to take an ebook that uh I put together on web accessibility so we're just going to call this wag we're going to tell it you are a web accessibility bot on helping software developers and then we'll go over what the models are later but for now we're just going to use the GPT 416 preview the other things here are tools so you can actually add functions so you can what's cool about this though is not only can you hit external apis but you can actually add multiple functions so we aren't going to uh actually use these but we can just go ahead and show that you can have multiple with their examples so this is going out and checking the weather or stock then you're going to have the code interpreter which allows you to look at different types of data and formatting um I did try and upload a CS be but that didn't seem to work so we're going to stick with our PDF and then retrieval this is really cool because in the PDF it can actually make an annotation to where it's looking in the file and then lastly what we'll do is we'll go ahead and we'll add our web accessibility PDF you can see it's loading here and then what we're going to do is we'll go ahead and put in a message so we'll just say what are oh first we got to save what are the standards in the US and so you'll notice that I didn't have to actually State what wayag is so we're going out and then here's where we're actually putting out the threads of the logs so this is incredibly cool because it's showing us the HTTP requests in order to get this information back so now it's talking about the uh information about wag specifically how it started in the US it's talking about wag 2.0 that was what was in the PDF at the time now we're at 2.2 but you can keep seeing like how it's going through the logic of the tools being called in these threads and you can see the run now we're in the code inter interpreter so before it listed the fact that it was going to make a tool call and it did a type of retrieval again doing a retrieval but as a code interpreter and so it gives us a lot to be able to debug now what we're going to do is we're going to do something a little different we're going to look for different parts of the world so we're going to say EU and rather than add and run we're just going to click add and then we'll say a us for Australia go ahead and add that and then we're going to do Canada and this time we'll do add and run and we'll get a different thread and what's really cool about this is you're noticing that every time it adds it's not actually running the the assistant now that we've done this it's posting the runs and the message and we're going through our thread so as you can see it took all three of these all three of these user inputs then actually ran what it was looking for so now it's found information on the EU Canada and Australia and it's also pinpointed The annotation of the source so this goes back to the retrieval as well so this is super cool about how just like this we already have a working chatbot that's you based off information through a PDF as well as you can see it with csvs um the thing that's the coolest for me is actually watching the log seeing the information that's coming back through so that we can find oh this is where it's actually trying to run the weather function that's pretty sweet but being able to look at this log and see the execution makes it really important and really helpful for what we're going to look at coming up which is the API call all right so we're going to look at the model and try and examine like a little bit more of what's been launched on devday so the first thing is is that uh GPT turbo is now released and it has 128k contact window and GPT 3.5 has been updated to 16 context window 16k and so we're going to take a look at what that actually means so the other things you can kind of notice is 3.5 is standard Dolly doesn't say Dolly 2 or Dolly 3 it's just standard and you have gp4 and gp4 turbo so let's take a look at this one first and this is what we were using for our chatbot was the gp4 116 preview and although it has 128,000 tokens and your training data has been updated to April 2023 the thing to note is that the maximum return is 4,9 96 output tokens meaning that it can only return the 4,000 tokens but it can inest a total of 128,000 so that's a important thing to note um the other thing is that GPT for vision preview so I've actually been really excited to see this that in the API we'll be a able to actually send uh images and interact with them if you haven't checked out our our other video on GPT Vision definitely check it out all right so let's keep going and let's dig into the API now all right so if we look at the assistance API this is the API these are the API calls that were being made in order to interact with the playground open AI that we built our assistant in so you can see that we were this call is talking about how it's actually going to create the assistant so if you look at the UI they kind of match up the same right you have your name your instructions the type of tools you're going to have and then the model then you start a thread next you're going to be adding a message so as long as you've uh created a thread you can actually use your thread ID and and you can do the uh the object all right so now we're looking at the assistant API this is going to be the code that's actually running in the playground in order to create your the assistant so some things to note right out of the bat is the fact that you can only use the the new models in order to create these assistants and they you can use Python and and node.js are what they have the SD case the other thing is you need to make sure that you've updated your package so that it has the beta object in there other than that it looks very similar to how the UI was with our uh our assistant you can see we have a name we have instructions we have tools that we're going to add and then we have our model the next piece is we're actually going to create a thread a thread allows us to add messages and then actually run them so once we have this thread they then we can add to the messages the other thing to note is that you can have either text or optionally add files which is super cool so then once you have your uh thread in place you actually run the assistant so that's where we were seeing previously where we could just add to this thread object right and then we ultimately run the assistant and then we're awaiting to see the thread response all right and that's what we have today so what we've done is we've actually look through the multiple different models that have been released we kind of looked at some of the tokens and what they actually mean and then we went through the building our own chat GPT assistant in the playground as well as looked at some of the assistant API docs so don't forget to like And subscribe we'll see you in the --- *Generated for LLM consumption from nerding.io video library*