mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-10 10:33:11 +03:00
Cast context size
This commit is contained in:
parent
be743128aa
commit
dd7427f94a
@ -102,7 +102,7 @@ class LlamaCppClient(GenAIClient):
|
||||
|
||||
def get_context_size(self) -> int:
|
||||
"""Get the context window size for llama.cpp."""
|
||||
return self.provider_options.get("context_size", 4096)
|
||||
return int(self.provider_options.get("context_size", 4096))
|
||||
|
||||
def _build_payload(
|
||||
self,
|
||||
|
||||
@ -85,8 +85,8 @@ class OllamaClient(GenAIClient):
|
||||
|
||||
def get_context_size(self) -> int:
|
||||
"""Get the context window size for Ollama."""
|
||||
return self.genai_config.provider_options.get("options", {}).get(
|
||||
"num_ctx", 4096
|
||||
return int(
|
||||
self.genai_config.provider_options.get("options", {}).get("num_ctx", 4096)
|
||||
)
|
||||
|
||||
def _build_request_params(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user