mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-27 18:48:22 +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:
|
def get_context_size(self) -> int:
|
||||||
"""Get the context window size for llama.cpp."""
|
"""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(
|
def _build_payload(
|
||||||
self,
|
self,
|
||||||
|
|||||||
@ -85,8 +85,8 @@ class OllamaClient(GenAIClient):
|
|||||||
|
|
||||||
def get_context_size(self) -> int:
|
def get_context_size(self) -> int:
|
||||||
"""Get the context window size for Ollama."""
|
"""Get the context window size for Ollama."""
|
||||||
return self.genai_config.provider_options.get("options", {}).get(
|
return int(
|
||||||
"num_ctx", 4096
|
self.genai_config.provider_options.get("options", {}).get("num_ctx", 4096)
|
||||||
)
|
)
|
||||||
|
|
||||||
def _build_request_params(
|
def _build_request_params(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user