-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Adding LiteLLM Router support to dspy.LM with RoutedLM #1611
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Zhaohan Dong <[email protected]>
Should probably add a dummy for testing if it looks good. |
Hey @zhaohan-dong ! Thanks. This is awesome. Most of the code appears to be nearly an exact duplicate of dspy.LM, so it makes me wonder if there's a cleaner way to avoid duplication? |
😅 If I'm allowed to modify the
Like Separately I'm thinking if there's any benefit of moving the router completion methods to standalone functions. But then there might be issue with the function arguments for caching. |
6f49496
to
9b4b9f9
Compare
Signed-off-by: Zhaohan Dong <[email protected]>
@okhat I feel like letting the litellm inference functions conditionally use routers would actually make it cleaner. It is possible since the litellm.Router can be hashed for lru_cache. Let me know what you think! |
No description provided.