fix(backend): rename thinking parameter to think for Ollama API compatibility
The Ollama API expects "think" parameter instead of "thinking". Also updates the API base URL in the frontend configuration to point to the correct endpoint.
This commit is contained in:
+2
-2
@@ -81,7 +81,7 @@ async def call_ollama(prompt: str, *, tag: str = "default", temperature: float =
|
||||
},
|
||||
}
|
||||
if thinking:
|
||||
kwargs["thinking"] = thinking
|
||||
kwargs["think"] = thinking
|
||||
|
||||
response = await client.chat(**kwargs)
|
||||
except Exception:
|
||||
@@ -117,7 +117,7 @@ async def call_ollama(prompt: str, *, tag: str = "default", temperature: float =
|
||||
if not content.strip():
|
||||
logger.warning("[LLM][%s] empty content returned by model", tag)
|
||||
|
||||
return {"content": content, "thinking": thinking}
|
||||
return {"content": content, "think": thinking}
|
||||
|
||||
async def call_vlm_ocr(image_bytes: bytes, language: str = 'auto') -> str:
|
||||
start = time.perf_counter()
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
export const DEBUG = import.meta.env.DEV
|
||||
|
||||
const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || 'https://api.learnteach.tech:8002'
|
||||
const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || 'http://149.104.29.239:8001'
|
||||
|
||||
export const API_URL = import.meta.env.VITE_API_URL || `${API_BASE_URL}/v1/completions`
|
||||
export const OCR_URL = import.meta.env.VITE_OCR_URL || `${API_BASE_URL}/v1/ocr`
|
||||
|
||||
Reference in New Issue
Block a user