You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrate from REST API to WebSocket for Receiving LLM Responses
Description
Currently, our application uses a single POST API endpoint to send messages and receive responses from the LLM (Language Learning Model). This synchronous approach can lead to performance bottlenecks, especially when handling multiple requests or waiting for long responses from the LLM. To improve efficiency and responsiveness, we should transition to using WebSockets for receiving messages.
The text was updated successfully, but these errors were encountered:
farhoud
changed the title
Migrate from REST API to WebSocket for Receiving LLM Responses
Migrate from REST API to SSR for Receiving new message
Jul 1, 2024
Issue Title
Migrate from REST API to WebSocket for Receiving LLM Responses
Description
Currently, our application uses a single POST API endpoint to send messages and receive responses from the LLM (Language Learning Model). This synchronous approach can lead to performance bottlenecks, especially when handling multiple requests or waiting for long responses from the LLM. To improve efficiency and responsiveness, we should transition to using WebSockets for receiving messages.
Current Implementation
/api/message
Proposed Change
/ws/message
Benefits
Tasks
Backend (FastAPI)
Frontend (Next.js)
Testing
Example Code
Backend (FastAPI)
Frontend (Next.js)
Additional Notes
References
The text was updated successfully, but these errors were encountered: