Problem Statement
Use Case
We just noticed the new'ish LLMSwitcher and started to use it - awesome addition! So we wanted to have timeouts (~2s or so) trigger an error that we could handle in our code to call upon the LLM Switcher to do its thing, but then we noticed that the only way to do this was to either:
- Make changes to the private _client member of the LLM processor
- Add a bunch of code to monitor and actively interrupt the LLM if it takes too long
Request
We'd like to be able to pass the timeout to the LLM service constructor.
Thanks!
-Al
Proposed Solution
We only use OpenAI-like LLMs so I'm not sure how hard this is to do across all LLM services.
But for OpenAI-like's, we also noticed the timeout can have more granular settings because of the underlying HTTPX timeout settings - bonus points if we can even specify those too!
But honestly, even being able to pass a single timeout that will make it fail at any point in the response if there's >timeout seconds of inactivity would be great.
Alternative Solutions
If it's too tricky to make this work for all LLM Services in a standard way, just exposing the underlying client on a per-llm-service basis
Additional Context
No response
Would you be willing to help implement this feature?
Problem Statement
Use Case
We just noticed the new'ish LLMSwitcher and started to use it - awesome addition! So we wanted to have timeouts (~2s or so) trigger an error that we could handle in our code to call upon the LLM Switcher to do its thing, but then we noticed that the only way to do this was to either:
Request
We'd like to be able to pass the timeout to the LLM service constructor.
Thanks!
-Al
Proposed Solution
We only use OpenAI-like LLMs so I'm not sure how hard this is to do across all LLM services.
But for OpenAI-like's, we also noticed the timeout can have more granular settings because of the underlying HTTPX timeout settings - bonus points if we can even specify those too!
But honestly, even being able to pass a single timeout that will make it fail at any point in the response if there's
>timeoutseconds of inactivity would be great.Alternative Solutions
If it's too tricky to make this work for all LLM Services in a standard way, just exposing the underlying client on a per-llm-service basis
Additional Context
No response
Would you be willing to help implement this feature?