How to stream OpenAI Assistants API v1 response in Python & Node.js TUI🔥 — OpenAI #6
Автор: Code AI with Rok
Загружено: 2024-03-28
Просмотров: 2105
In today's tutorial, we're going to add response streaming functionality to the terminal user interface for the customer support chatbot that we built in the previous OpenAI tutorial with the OpenAI Assistants API v1 using the Knowledge Retrieval tool. I’ll show you an example in both Python and Node.js.
⚠️ Note: The code in this tutorial works with the OpenAI Assistants API v1. In April 2024, the OpenAI Assistants API v2 was released. See the migration guide: https://platform.openai.com/docs/assi...
🔗 Links 🔗
⦁ OpenAI Python SDK helpers: https://github.com/openai/openai-pyth...
⦁ OpenAI Node.js SDK helpers: https://github.com/openai/openai-node...
⦁ List of all assistant stream events: https://platform.openai.com/docs/api-...
⭐ Code ⭐
⦁ GitHub repository: https://github.com/rokbenko/ai-playgr...
⦁ Code for this tutorial: https://github.com/rokbenko/ai-playgr...
🙌 Support 🙌
⦁ Subscribe: / @rokbenko
⦁ Keep tutorials brewing: https://buymeacoffee.com/rokbenko
🌐 Profiles 🌐
⦁ GitHub: https://github.com/rokbenko
⦁ LinkedIn: / rokbenko
⦁ X: https://x.com/rokbenko
🎞️ Timestamps 🎞️
00:00 – Intro
00:18 – Code for this tutorial
00:33 – Previous tutorial
00:57 – New feature
01:03 – Response streaming explained
01:27 – Code breakdown
02:11 – Streaming helpers
02:30 – Create and stream method explained
02:56 – Event listening explained
03:23 – Python vs. Node.js example
03:44 – Run the Python example
03:56 – Run the Node.js example
04:15 – Outro
#AI #OpenAI #AssistantsAPI
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: