ibigio / shell-ai

A delightfully minimal, yet remarkably powerful AI Shell Assistant.
GNU General Public License v3.0
266 stars 25 forks source link

Investigate slow first request on some networks #9

Closed ibigio closed 9 months ago

ibigio commented 1 year ago

Context

Noticed while traveling to Mexico that while using the tool from some networks the response to the first prompt consistently took > 15 seconds, even though subsequent followups were still returning in ~1-3 seconds. My hunch is that something is slowing down the initial http client setup / first request, and then reusing the http client for followups makes it quicker. Ideally this tool should work quickly from any network.

Task

Investigate why first request is so slow, propose potential solutions, discuss and implement.

Some ideas: