Revert "fix(projects): route auto-summary through main model"
This reverts commit ec3853a78a.
This commit is contained in:
@@ -119,17 +119,12 @@ async def generate_project_summary(user_id: int, project_id: int) -> None:
|
||||
f"Recent notes:\n{note_snippets}"
|
||||
)
|
||||
|
||||
# Project summarization is synthesis over ~10 notes — too hard for the
|
||||
# 3B background model, which produces incoherent, repetitive output
|
||||
# (misspellings, broken parens, cliché filler). Route through the main
|
||||
# chat model instead. These are rare events (only when a project
|
||||
# changes), so the main model's KV cache eviction cost is negligible.
|
||||
from fabledassistant.services.llm import generate_completion
|
||||
from fabledassistant.config import Config
|
||||
from fabledassistant.services.settings import get_setting
|
||||
messages = [{"role": "user", "content": prompt}]
|
||||
main_model = await get_setting(user_id, "default_model", Config.OLLAMA_MODEL)
|
||||
summary = await generate_completion(messages, model=main_model, max_tokens=400, num_ctx=2048)
|
||||
bg_model = await get_setting(user_id, "background_model", Config.OLLAMA_BACKGROUND_MODEL)
|
||||
summary = await generate_completion(messages, model=bg_model, max_tokens=400, num_ctx=2048)
|
||||
if not summary:
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user