mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2026-06-15 23:20:32 +03:00
refactor ollama reasoning controls
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user