SemanticRouter Objects

class SemanticRouter(BaseRouter)

A router that uses a dense encoder to encode routes and utterances.

add

def add(routes: List[Route] | Route)

Add a route to the local SemanticRouter and index.

Arguments:

  • route (Route): The route to add.

aadd

async def aadd(routes: List[Route] | Route)

Asynchronously add a route to the local SemanticRouter and index.

Arguments:

  • routes (List[Route] | Route): The route(s) to add.