16 lines
638 B
Python
16 lines
638 B
Python
class KnowledgeRuntimeConfig:
|
|
DEFAULT_ROUTES = {
|
|
"faq": ("fin_faq_collection", 3),
|
|
"product_inquiry": ("fin_product_collection", 5),
|
|
"policy_explain": ("fin_policy_collection", 5),
|
|
}
|
|
|
|
def __init__(self, *, vector_dim: int = 1024, similarity_threshold: float = 0.60) -> None:
|
|
self.routes = dict(self.DEFAULT_ROUTES)
|
|
self.vector_dim = vector_dim
|
|
self.similarity_threshold = similarity_threshold
|
|
|
|
def route(self, intent: str) -> tuple[str, int] | None:
|
|
"""Return the collection route used by the retrieval compatibility layer."""
|
|
return self.routes.get(intent)
|