Skip to content
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

Add RouteLLM Pipeline #174

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

justinh-rahb
Copy link
Collaborator

Introducing the RouteLLM Intelligent Routing Pipeline

This PR unveils a significant innovation in our processing capabilities with the RouteLLM Pipeline, now implemented in: routellm_pipeline.py. This pipeline is engineered to enhance efficiency by intelligently routing queries between different language models to balance cost and performance effectively.

Screenshot 2024-07-25 at 11 28 13 AM

RouteLLM Routing Features:

  • The pipeline leverages RouteLLM to dynamically route queries between a strong model and a weak model based on a specified cost threshold.
  • Seamlessly integrates with multiple language models to ensure high-quality responses while optimizing for resource usage.

This addition to our Pipelines framework empowers users with intelligent routing capabilities, allowing for a significant reduction in operational costs while maintaining the high-quality output required for various applications. Embrace the efficient, flexible, and scalable processing with the RouteLLM Intelligent Routing Pipeline.

@justinh-rahb justinh-rahb marked this pull request as draft July 25, 2024 16:11
@justinh-rahb
Copy link
Collaborator Author

justinh-rahb commented Jul 25, 2024

It's got some issues right now:

  • Need to save your valves again after restarting server to initialize the environment variables
  • litellm is used for API adapters, so this could support other endpoints than OpenAI-spec Supports LiteLLM-supported providers now.

@justinh-rahb justinh-rahb marked this pull request as ready for review July 26, 2024 15:45
@justinh-rahb justinh-rahb marked this pull request as draft July 30, 2024 15:58
@justinh-rahb
Copy link
Collaborator Author

justinh-rahb commented Jul 30, 2024

Still having the issue where the valves need to be re-saved after a server restart to take effect, as well as this when sending a message with an image:

ERROR:root:Error in pipe: Error code: 400 - {'error': {'message': "'$.input' is invalid. Please check the API reference: https://platform.openai.com/docs/api-reference.", 'type': 'invalid_request_error', 'param': None, 'code': None}}
routellm.openai

@justinh-rahb
Copy link
Collaborator Author

I feel better about merging this now, the startup initialization issue is fixed. It still doesn't support images, though I seem to recall we always had issues there with LiteLLM before.

@justinh-rahb justinh-rahb marked this pull request as ready for review August 2, 2024 13:25
@justinh-rahb justinh-rahb marked this pull request as draft August 17, 2024 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant