Add Flask web UI, Docker Compose, core engine + tests
- physcom core: CLI, 5-pass pipeline, SQLite repo, 37 tests - physcom_web: Flask app with HTMX for entity/domain/pipeline/results CRUD - Docker Compose: web + cli services sharing a named volume for the DB - Clean up local settings to use wildcard permissions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
28
src/physcom/llm/providers/mock.py
Normal file
28
src/physcom/llm/providers/mock.py
Normal file
@@ -0,0 +1,28 @@
|
||||
"""Mock LLM provider for testing."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from physcom.llm.base import LLMProvider
|
||||
|
||||
|
||||
class MockLLMProvider(LLMProvider):
|
||||
"""Returns deterministic stub responses for testing."""
|
||||
|
||||
def __init__(self, default_estimates: dict[str, float] | None = None) -> None:
|
||||
self._defaults = default_estimates or {}
|
||||
|
||||
def estimate_physics(
|
||||
self, combination_description: str, metrics: list[str]
|
||||
) -> dict[str, float]:
|
||||
result = {}
|
||||
for metric in metrics:
|
||||
result[metric] = self._defaults.get(metric, 0.5)
|
||||
return result
|
||||
|
||||
def review_plausibility(
|
||||
self, combination_description: str, scores: dict[str, float]
|
||||
) -> str:
|
||||
avg = sum(scores.values()) / max(len(scores), 1)
|
||||
if avg > 0.5:
|
||||
return "This concept appears plausible and worth further investigation."
|
||||
return "This concept has significant feasibility challenges."
|
||||
Reference in New Issue
Block a user