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
{{ message }}
This repository was archived by the owner on Feb 5, 2023. It is now read-only.
I think we can add default number of retry to each incoming request to /api/ask endpoint. Instead of returning Content-Type: 'application/json' we could return Content-Type: 'text/event-stream'. With this change it might be slightly slower than the original but we would at least try at least 3 times with different agents from connection pool.
For example, proposed change:
/api/ask endpoint content type would be text/event-stream instead of application/json:
I think we can add default number of retry to each incoming request to
/api/askendpoint. Instead of returningContent-Type: 'application/json'we could returnContent-Type: 'text/event-stream'. With this change it might be slightly slower than the original but we would at least try at least 3 times with different agents from connection pool.For example, proposed change:
/api/askendpoint content type would betext/event-streaminstead ofapplication/json:curl "http://localhost:8080/api/ask" -X POST --header 'Authorization: <API_KEY>' -d '{"content": "Hello world"}'default minimum retry # is 3.
In this example
/api/askendpoint failed with first two agent and was successful at the third one.I believe this would utilize the connection pool even better.