fix(generation): compute num_ctx in run_assist_generation
This commit is contained in:
@@ -529,8 +529,10 @@ async def run_assist_generation(
|
||||
On each retry the accumulated content is reset so the done event
|
||||
always reflects only the successful generation.
|
||||
"""
|
||||
from fabledassistant.services.llm import pick_num_ctx
|
||||
input_chars = sum(len(m.get("content", "")) for m in messages)
|
||||
logger.info("Assist generation started: model=%s, input_chars=%d", model, input_chars)
|
||||
num_ctx = pick_num_ctx(messages)
|
||||
logger.info("Assist generation started: model=%s, input_chars=%d, num_ctx=%d", model, input_chars, num_ctx)
|
||||
|
||||
last_exc: BaseException | None = None
|
||||
for attempt in range(3):
|
||||
|
||||
Reference in New Issue
Block a user