课程: Build a Document Search Assistant with Node and OpenAI's Assistants API
免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
Creating and running a thread
课程: Build a Document Search Assistant with Node and OpenAI's Assistants API
Creating and running a thread
- [Instructor] Now that you've created an assistant uploaded files, and even set up a vector store for knowledge retrieval, it's time to bring your assistant to life. The next step is creating and running threads. Threads allow the assistant to manage conversations with users, keeping track of context, and providing meaningful interactive responses. You can think of a thread, like a conversation thread in a messaging app, keeping all related messages together. So I'm going to guide you step by step, through creating a thread, adding user messages, and running the assistant to generate insightful replies. First up, you create a thread using the threads.create method shown here in the docs. Back in my project, I'll open up the file assistant.js and scroll down and I'll first comment out my call to the update assistant function so that I don't inadvertently update my assistant. And here I'll define a new async function. I'll name create thread, and within the function, I'll declare a new…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。