mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-10-17 05:14:19 +02:00
planPrompt() returned the response reserve as num_predict, and the reserve was clamped by MAX_RESPONSE_RESERVE = 1024. Chat answers stopped at 1024 output tokens regardless of window size, often mid-sentence, and the normalized stream chunks dropped Ollama's done_reason, so neither the UI nor API clients could discern between a cut-off answer and a finished one. - Decouple the generation cap from the reserve. num_predict is now the space left in the window after the prompt, less a 5% (min 64 token) margin for estimator error, with the reserve as its floor. Raise MAX_RESPONSE_RESERVE to 8192 so it only bounds prompt hold-back. - Carry done_reason through all four OllamaService chat paths. Native forwards Ollama's done_reason; compat maps OpenAI's finish_reason. - Log length-limited stops in OllamaController with num_predict, num_ctx and tokens generated. - Show a truncation notice on cut-off answers, with a Continue button on the latest one that sends a normal follow-up turn. Generation evals before and after this change are not length comparable. Closes #1342 |
||
|---|---|---|
| .. | ||
| benchmark_controller.ts | ||
| chats_controller.ts | ||
| collection_updates_controller.ts | ||
| conditions_controller.ts | ||
| creator_packs_controller.ts | ||
| docs_controller.ts | ||
| downloads_controller.ts | ||
| drug_reference_controller.ts | ||
| easy_setup_controller.ts | ||
| home_controller.ts | ||
| maps_controller.ts | ||
| nomad_md_controller.ts | ||
| ollama_controller.ts | ||
| openapi_controller.ts | ||
| rag_controller.ts | ||
| settings_controller.ts | ||
| supply_depot_controller.ts | ||
| system_controller.ts | ||
| zim_controller.ts | ||