specify LLM for query

This commit is contained in:
omdivyatej
2025-03-23 21:33:49 +05:30
parent f8ba98c1ff
commit 3522da1b21
4 changed files with 112 additions and 8 deletions

View File

@@ -10,6 +10,7 @@ from typing import (
Literal,
TypedDict,
TypeVar,
Callable,
)
import numpy as np
from .utils import EmbeddingFunc
@@ -83,6 +84,12 @@ class QueryParam:
ids: list[str] | None = None
"""List of ids to filter the results."""
model_func: Callable[..., object] | None = None
"""Optional override for the LLM model function to use for this specific query.
If provided, this will be used instead of the global model function.
This allows using different models for different query modes.
"""
@dataclass