refactor ollama reasoning controls

This commit is contained in:
angelplusultra
2026-05-20 11:50:24 -07:00
parent 4c6fdde307
commit 7702160dbc

View File

@@ -273,13 +273,14 @@ class OllamaAILLM {
) {
const reasoningConfig = {};
if (reasoningOption !== null) {
const ollamaCompatibleReasoningControl = {
on: true,
off: false,
};
if (reasoningOption) {
reasoningConfig.think =
reasoningOption === "on"
? true
: reasoningOption === "off"
? false
: reasoningOption;
ollamaCompatibleReasoningControl[reasoningOption] ?? reasoningOption;
}
const result = await LLMPerformanceMonitor.measureAsyncFunction(
this.client