RouterWithStrategy

gitinsp.infrastructure.factories.RouterWithStrategy
class RouterWithStrategy(strategy: QueryRoutingStrategy, retrievers: List[EmbeddingStoreContentRetriever]) extends QueryRouter

A custom router that uses a query routing strategy. This is an adapter that bridges the gap between the QueryRouter interface and the QueryRoutingStrategy.

Value parameters

retrievers

The list of content retrievers

strategy

The query routing strategy

Attributes

Graph
Supertypes
trait QueryRouter
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def route(query: Query): Collection[ContentRetriever]

Routes the query to the appropriate retrievers based on the strategy.

Routes the query to the appropriate retrievers based on the strategy.

Value parameters

query

The query to route

Attributes

Returns

A collection of content retrievers

Definition Classes
QueryRouter