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

Added a class which performs semantic routing #1192

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aponcedeleonch
Copy link
Contributor

Related to: #1055

For the current implementation of muxing we only need to match a single Persona at a time. For example:

  1. mux1 -> persona Architect -> openai o1
  2. mux2 -> catch all -> openai gpt4o

In the above case we would only need to know if the request matches the persona Architect. It's not needed to match any extra personas even if they exist in DB.

This PR introduces what's necessary to do the above without actually wiring in muxing rules. The PR:

  • Creates the persona table in DB
  • Adds methods to write and read to the new persona table
  • Implements a function to check if a query matches to the specified persona

To check more about the personas and the queries please check the unit tests

Related to: #1055

For the current implementation of muxing we only need
to match a single Persona at a time. For example:
1. mux1 -> persona Architect -> openai o1
2. mux2 -> catch all -> openai gpt4o

In the above case we would only need to know if the request
matches the persona `Architect`. It's not needed to match
any extra personas even if they exist in DB.

This PR introduces what's necessary to do the above without
actually wiring in muxing rules. The PR:
- Creates the persona table in DB
- Adds methods to write and read to the new persona table
- Implements a function to check if a query matches to the specified persona

To check more about the personas and the queries please check the unit tests
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