mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-11 17:47:37 +03:00
Add logging for context tokens used
This commit is contained in:
parent
80197a4e40
commit
b322b48b82
@ -64,6 +64,9 @@ class OllamaClient(GenAIClient):
|
||||
images=images if images else None,
|
||||
**self.provider_options,
|
||||
)
|
||||
logger.debug(
|
||||
f"Ollama tokens used: eval_count={result.get('eval_count')}, prompt_eval_count={result.get('prompt_eval_count')}"
|
||||
)
|
||||
return result["response"].strip()
|
||||
except (TimeoutException, ResponseError) as e:
|
||||
logger.warning("Ollama returned an error: %s", str(e))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user