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
## Summary of Changes
This PR introduces performance-related improvements.
- Avoids proxied calls to our remote deployment for the `llm_proxy`
service (see #746 )
- Moves from `requests` to `httpx` for asynchronous calls to other
services (see #747 )
- Reuses clients for improved performance via dependency injection (see
#748 )
### Related issues
- Resolves#746
- Resolves#747
- Resolves#748
---------
Co-authored-by: Justin <[email protected]> ea7e2b6
We make a series of proxied calls in our services. Creating a new client/client connection for each call to the same remote introduces latency (see https://stackoverflow.com/a/34491383). Whenever possible, we should reuse connections. One strategy is to utilize FastAPI's dependency injection which supports caching of dependencies: https://fastapi.tiangolo.com/tutorial/dependencies/sub-dependencies/
Relates to #747
The text was updated successfully, but these errors were encountered: