filmov
tv
How to poll or stream OpenAI Assistants API v2 response in Python & Node.js TUI🔥 — OpenAI #7
Показать описание
⭐ Code ⭐
🙌 Support 🙌
📫 Contact 📫
🎞️ Timestamps 🎞️
00:00 – Intro
00:14 – Code for this tutorial
00:28 – Response polling and response streaming explained
00:57 – Tutorial overview
01:48 – Code breakdown (part 1)
01:57 – Create an .env file to set up environment variables
02:14 – Code breakdown (part 2)
03:17 – Step 1: Create a new thread
03:24 – Step 2: Get the user question and display it
03:30 – Step 3: Add the user question to the thread messages
03:47 – Core of this tutorial
04:04 – Manual response polling example – Step 4: Run the assistant
04:10 – Manual response polling example – Step 5: Periodically retrieve the run to check its status
04:32 – Manual response polling example – Step 6: Display the assistant answer once the run is completed
04:48 – Response polling using a helper example – Step 4: Run the assistant and periodically retrieve the run to check its status using a helper
05:21 – Response polling using a helper example – Step 5: Display the assistant answer once the run is completed
05:29 – Response streaming using a helper example – Step 4: Run the assistant and stream its answer
06:00 – Code comparison
06:24 – Run the Python manual response polling example
06:57 – Run the Python response polling using a helper example
07:23 – Run the Python response streaming using a helper example
07:57 – Outro
#AI #OpenAI #AssistantsAPI
Комментарии