mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 11:23:10 +02:00
Improvements to Stirling Engine to prepare for SaaS release (#6603)
# Description of Changes - Use pool for postgres connections - Add ability to require user ID to be set on API calls to the engine - Add process-wide concurrency cap on AI access (in addition to existing user caps) - Allow number of workers (threads) to be specified for stirling engine - Update env var names to reflect that the DB is not just for RAG
This commit is contained in:
@@ -77,17 +77,20 @@ def test_pdf_question_answer_defaults_evidence_list() -> None:
|
||||
def test_app_settings_accepts_model_configuration() -> None:
|
||||
from pathlib import Path
|
||||
|
||||
from stirling.config import RagBackend
|
||||
from stirling.config import DocumentsBackend
|
||||
|
||||
settings = AppSettings(
|
||||
smart_model_name="claude-sonnet-4-5-20250929",
|
||||
fast_model_name="claude-haiku-4-5-20251001",
|
||||
smart_model_max_tokens=8192,
|
||||
fast_model_max_tokens=2048,
|
||||
rag_backend=RagBackend.SQLITE,
|
||||
model_max_concurrency=32,
|
||||
documents_backend=DocumentsBackend.SQLITE,
|
||||
rag_embedding_model="voyageai:voyage-4",
|
||||
rag_store_path=Path(":memory:"),
|
||||
rag_pgvector_dsn="",
|
||||
documents_sqlite_path=Path(":memory:"),
|
||||
documents_pgvector_dsn="",
|
||||
documents_pgvector_pool_min_size=1,
|
||||
documents_pgvector_pool_max_size=10,
|
||||
rag_chunk_size=512,
|
||||
rag_chunk_overlap=64,
|
||||
rag_default_top_k=5,
|
||||
@@ -98,6 +101,7 @@ def test_app_settings_accepts_model_configuration() -> None:
|
||||
chunked_reasoner_notes_char_budget=250_000,
|
||||
max_pages=200,
|
||||
max_characters=200_000,
|
||||
require_user_id=False,
|
||||
posthog_enabled=False,
|
||||
posthog_api_key="",
|
||||
posthog_host="https://eu.i.posthog.com",
|
||||
|
||||
Reference in New Issue
Block a user