Plugin details
Stream Assistant GPT 🤖
Create content using OpenAI's Assistants API interface. Includes data streaming:
## 🔑 Key Features
1. 🌐 Communication with Assistant API: The plugin uses OpenAI's API, specifically the Assistants API in beta version (v2).
2. 🔴 Real-time Streaming: The plugin supports real-time streaming of AI-generated content, providing a more interactive user experience.
3. 📊 Log Management: Maintains and updates the state, publishes log messages and output content.
4. 🛡️ Error Handling: Comprehensive error handling is implemented throughout the plugin usage.
## 🔧 Main Functionality
1. 🧵 Thread Creation: The code creates a new thread with the user's input.
2. ▶️ Run Creation: It initiates a run within the created thread, using the specified assistant ID.
3. 🌊 Stream Processing: The plugin processes the streamed response from the API, updating the output in real-time.
4. 🔄 Run Completion Monitoring: If the run is not completed during stream processing, the code queries the API to check for completion.
5. 📨 Message Retrieval: In case the output is empty after stream processing, the code retrieves messages from the thread.
6. 📈 Token Utilization: The plugin tracks response time and estimates token count.