Add doc-service tests, AI category suggestions, LM Studio default
- pytest suite for doc-service: 20+ tests covering category CRUD, document upload/get/delete/patch, ownership isolation, category assignment, AI processing (mock), and live PDF tests (auto-skipped when tests/pdfs/ is empty) - Minimal in-memory PDF builder in conftest so tests run without any fixture files; real PDFs can be dropped into tests/pdfs/ to activate live extraction tests - AI prompt updated to return suggested_categories (2–5 short names) - Frontend: SuggestionChip component in DocumentRow shows AI-suggested categories after processing; "Assign" links to an existing category, "Create & Assign" creates it first, ✕ dismisses locally - Default AI provider changed to LM Studio at http://host.docker.internal:1234/v1 (host.docker.internal resolves to the macOS host from inside Docker Desktop) - tests/pdfs/ directory tracked via .gitkeep; *.pdf excluded by .gitignore Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -31,13 +31,15 @@ class OllamaConfig(BaseModel):
|
||||
|
||||
|
||||
class LMStudioConfig(BaseModel):
|
||||
base_url: str = "http://192.168.1.x:1234/v1"
|
||||
# host.docker.internal resolves to the host from inside Docker (macOS/Windows).
|
||||
# For local dev outside Docker, use http://localhost:1234/v1 instead.
|
||||
base_url: str = "http://host.docker.internal:1234/v1"
|
||||
model: str = "local-model"
|
||||
api_key: str = ""
|
||||
api_key: str = "lm-studio"
|
||||
|
||||
|
||||
class AIConfig(BaseModel):
|
||||
provider: str = "anthropic"
|
||||
provider: str = "lmstudio"
|
||||
anthropic: AnthropicConfig = AnthropicConfig()
|
||||
ollama: OllamaConfig = OllamaConfig()
|
||||
lmstudio: LMStudioConfig = LMStudioConfig()
|
||||
|
||||
Reference in New Issue
Block a user