Remove intent model entirely; quick-capture uses primary model
The separate intent model (OLLAMA_INTENT_MODEL / qwen2.5:7b) is removed from every part of the system. All classification now uses the primary model. Changes: - config.py: remove OLLAMA_INTENT_MODEL - intent.py: remove classify_intent() and all supporting infrastructure (_SYSTEM_PROMPT_TEMPLATE, _RESEARCH_PREFIX, _PRIOR_WORK_REFS); file now only contains the quick-capture classifier - quick_capture.py: classify_capture_intent() now called with Config.OLLAMA_MODEL - generation_task.py: remove intent_model_setting DB lookup and get_setting import; history summarization and research pipeline use the primary model directly - research.py: remove intent_model parameter from run_research_pipeline() and _generate_sub_queries(); both use the model param throughout - routes/settings.py: remove intent_model from model-key validation and response - app.py: remove intent model pre-warming at startup - SettingsView.vue: remove Intent Model selector and related refs/state Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -25,7 +25,6 @@ async def run_research_pipeline(
|
||||
topic: str,
|
||||
user_id: int,
|
||||
model: str,
|
||||
intent_model: str,
|
||||
buf=None,
|
||||
) -> Note:
|
||||
"""Full research pipeline: search → fetch → synthesize → create note.
|
||||
@@ -36,7 +35,7 @@ async def run_research_pipeline(
|
||||
# Step 1: Generate sub-queries
|
||||
if buf is not None:
|
||||
buf.append_event("status", {"status": "Generating search queries..."})
|
||||
queries = await _generate_sub_queries(topic, intent_model)
|
||||
queries = await _generate_sub_queries(topic, model)
|
||||
logger.info("Research: generated %d sub-queries for topic '%s'", len(queries), topic)
|
||||
|
||||
# Step 2: Search all queries in parallel (200 ms stagger to avoid hammering SearXNG)
|
||||
@@ -118,8 +117,8 @@ async def run_research_pipeline(
|
||||
return note
|
||||
|
||||
|
||||
async def _generate_sub_queries(topic: str, intent_model: str) -> list[str]:
|
||||
"""Ask the intent model for focused search queries for the topic."""
|
||||
async def _generate_sub_queries(topic: str, model: str) -> list[str]:
|
||||
"""Ask the model for focused search queries for the topic."""
|
||||
messages = [
|
||||
{
|
||||
"role": "system",
|
||||
@@ -135,7 +134,7 @@ async def _generate_sub_queries(topic: str, intent_model: str) -> list[str]:
|
||||
{"role": "user", "content": f"Topic: {topic}"},
|
||||
]
|
||||
try:
|
||||
raw = await generate_completion(messages, intent_model, max_tokens=200)
|
||||
raw = await generate_completion(messages, model, max_tokens=200)
|
||||
raw = raw.strip()
|
||||
raw = re.sub(r"^```(?:json)?\s*", "", raw)
|
||||
raw = re.sub(r"\s*```$", "", raw)
|
||||
|
||||
Reference in New Issue
Block a user