mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 16:56:22 +02:00
refactor: replace hardcoded embedding dimension with dynamic configuration
- Updated the embedding dimension in test configurations to use the value from the application config, enhancing maintainability and consistency across tests.
This commit is contained in:
parent
223c2de0d2
commit
f09b5b0ea4
2 changed files with 6 additions and 2 deletions
|
|
@ -8,6 +8,7 @@ from sqlalchemy import text
|
|||
from sqlalchemy.ext.asyncio import AsyncSession, create_async_engine
|
||||
from sqlalchemy.pool import NullPool
|
||||
|
||||
from app.config import config as app_config
|
||||
from app.db import (
|
||||
Base,
|
||||
DocumentType,
|
||||
|
|
@ -18,7 +19,7 @@ from app.db import (
|
|||
)
|
||||
from app.indexing_pipeline.connector_document import ConnectorDocument
|
||||
|
||||
_EMBEDDING_DIM = 1024 # must match the Vector() dimension used in DB column creation
|
||||
_EMBEDDING_DIM = app_config.embedding_model_instance.dimension
|
||||
|
||||
_DEFAULT_TEST_DB = (
|
||||
"postgresql+asyncpg://postgres:postgres@localhost:5432/surfsense_test"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue