Add RAG configuration options and enhance parameter configurability

- Add top-k and cosine-threshold parms for api server
- Update .env and cli parms handling with new parameters
- Improve splash screen display
- Update bash and storage classes to read new parameters from .env file.
This commit is contained in:
yangdx
2025-01-29 21:34:34 +08:00
parent d0052456d4
commit 7aedc08caf
4 changed files with 42 additions and 12 deletions

View File

@@ -73,7 +73,7 @@ from lightrag.base import (
@dataclass
class NanoVectorDBStorage(BaseVectorStorage):
cosine_better_than_threshold: float = 0.2
cosine_better_than_threshold: float = float(os.getenv("COSINE_THRESHOLD", "0.2"))
def __post_init__(self):
self._client_file_name = os.path.join(