Fix ollama-local: correct a wrong claim about ChatClient.options() and keepAlive
Self-correction pass caught this before publishing: the previous commit's test
comment and companion post draft claimed a keepAlive set through
ChatClient.prompt().options(...) never reaches the request Ollama receives,
and worked around it by calling ChatModel.call(Prompt) directly instead. That
claim was never actually verified against /api/ps for the ChatClient path --
only inferred from a failed timing assertion that, it turned out, would have
failed the same way even with a genuinely confirmed unload (see below).
Checked directly: unloading via ChatClient.prompt().options(OllamaChatOptions
.builder()...keepAlive("0")).call() and immediately querying /api/ps shows an
empty model registry, same as the ChatModel path. The options merge works
correctly. Simplified the test back to ChatClient throughout, consistent with
the rest of this series, and removed the incorrect comment.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FtpJvZfg4nvLvtzgJTDWpB
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
/api/ps immediately after the unload call: {"models":[]}
|
||||
|
||||
prompt: "Reply with a single short sentence: why do developers like small local models?"
|
||||
response: Developers often prefer small local models because they are more efficient, faster, and easier to deploy and train.
|
||||
response: Developers often appreciate small local models because they are more efficient and can provide quicker, more relevant results for their applications.
|
||||
|
||||
total-duration: 901ms
|
||||
load-duration: 1ms
|
||||
prompt-eval-count: 44, prompt-eval-duration: 39ms
|
||||
eval-count: 23, eval-duration: 856ms
|
||||
26.87 tokens/sec (eval-count / eval-duration)
|
||||
total-duration: 1076ms
|
||||
load-duration: 2ms
|
||||
prompt-eval-count: 44, prompt-eval-duration: 41ms
|
||||
eval-count: 27, eval-duration: 1028ms
|
||||
26.25 tokens/sec (eval-count / eval-duration)
|
||||
Reference in New Issue
Block a user