OpenAI Assistants API coding tutorial

preview_player
Показать описание
🚀 Learn how to build with the new OpenAI Assistants API in less than 20 minutes. I'll show you how, step by step using a local NodeJS environment. All of the code and resources needed to complete this is available below.

🎥 UPDATE: New and improved Tutorials:
I released two updated and more comprehensive Assistants API tutorials I recommend you check out:

🔗 Resources & code for this tutorial

🕒 Chapters:
0:00 Welcome
1:22 Example output
2:28 Starting to code
5:30 The Assistants API
7:10 Using Threads
10:15 Run lifecycles
13:43 Running the code
16:30 Outro

#OpenAI #assistants #openaiapi #nodejs
Рекомендации по теме
Комментарии
Автор

Thank you so much for putting this out so fast! Couldn't have been easy and we appreciate it!

solagbenro
Автор

great video! gonna try out your code example now! 👍

monkeybiz
Автор

Thank you for putting this out so fast

sauravkharal
Автор

Another excellent tutorial/guide thanks Ralf!

Jotato_Tube
Автор

Thank you! Building a Mac ap with the AI assistant API.

nosult
Автор

Thank you for the video, please when you can zoom in on your code for us to fully understand your thought process, appreciate very much you sharing your knowledge

DreamsAPI
Автор

🎯 Key Takeaways for quick navigation:

00:00 🚀 *Introduction to OpenAI's Assistants API*
- Introduction to OpenAI's new Assistants API and its key features,
- Explanation of the purpose of the tutorial, including the use of threads and the Code Interpreter,
- Mention of the availability of resources and documentation.
01:25 🛠️ *Setting up the Environment*
- Setting up the development environment using VS Code and creating necessary files,
- Mention of creating an environment variable for the OpenAI API key.
04:06 📦 *Importing Dependencies and Creating Functions*
- Importing necessary dependencies and explaining the importance of updating the OpenAI npm package,
- Introduction to the main functions used in the tutorial.
05:54 🤖 *Creating the Assistant and Defining Its Purpose*
- Creating an OpenAI assistant with a specific name and purpose,
- Explaining the use of tools and the choice of the GPT-4 1106 model.
08:06 🤝 *Interacting with the Assistant*
- Starting the interaction with the assistant, including greeting the user,
- Introduction to the concept of threads and state management for ongoing conversations.
10:00 🔄 *Implementing a Polling Mechanism*
- Explaining the need for a polling mechanism to check the status of the assistant's tasks,
- Describing the process of checking for completion and the need for potential improvements.
11:50 📄 *Retrieving and Displaying Messages*
- Retrieving messages from the assistant's thread and focusing on the most recent answer,
- Displaying the assistant's response to the user's queries.
13:36 🛑 *Terminating or Continuing the Interaction*
- Giving the user the option to terminate the interaction or continue asking more questions,
- Explaining the continuation of context in the conversation.
16:24 🧐 *Conclusion and Future Plans*
- Summarizing the tutorial and its purpose,
- Encouraging users to subscribe for future content and improvements in code and use cases.

Made with HARPA AI

HarpaAI
Автор

Thanks for this. I learned a lot. I have one problem though. Every time I run the assistant it creates a new one in my openai account. I just got done deleting like dozens of math tutor assistants.

santiago-owou
Автор

Hello, nice tutorial. Is it possible to make an assistant that takes fillings from the sec.gov api, analyzes data from, for example, the last quarter of the Tesla share, and the final summary would be displayed on my page?

akka
Автор

great video.. my question is whats the point of Assistant API when we can just ask same questions in chat gpt

michaeli
Автор

love this tutorial. Can you kindly upload another video with Files? Say I want to upload a list of scientific literature and do Q&A with Assistants API on those papers. This can be an interesting use case!! Also, file is difficult to deal with

redli
Автор

I desperately want to see how to integrate Zapier functionality into the assistants beta api. I'm having a hard time understanding that.

TheRealDOSmile
Автор

I can't wait for this as I plan to use it for Unreal & Unity

holdthetruthhostage
Автор

Thanks Ralf, very helpful. How can we integrate this assistant api in our website?

zahraahawie
Автор

This video was super helpful thank you so much

bigbadcatbigbcy
Автор

Your video helped me earn $100 USD quickly, and it also taught me many other things that will be useful to me, thanks to you!!

andresh
Автор

so much value, thank you!! Is it possible to add the ability for the chatbot to accept an uploaded file by the chatbot user, such as a CSV, so that it can analyze it using a code interpreter or data analysis tools?" This refers to the chatbot user being able to upload a CSV, not that it's pre-uploaded as part of its knowledge base.

elkabeatz
Автор

Great info!! Can you do one with GPT 4V and TTS API please

airevolution
Автор

Thank you for the great tutorial to start with! One question if we have assistants established through openAI platform and want to use it, only what we have to do is to replace assistant.id with the actual assistants ID??

aisprint
Автор

To me the Assistant API is just another wrapper around the original API (a bit like langchain). However, I would be curious: can we save cost because once initialized they won't be a need to send the character description of the bot with every API call?

inck
join shbcf.ru