Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Added a class which performs semantic routing#1192

Merged
aponcedeleonch merged 2 commits intomainfrom
semantic-routing
Mar 4, 2025
Merged

Added a class which performs semantic routing#1192
aponcedeleonch merged 2 commits intomainfrom
semantic-routing

Conversation

@aponcedeleonch
Copy link
Copy Markdown
Member

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

Loading
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants