mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-20 10:49:00 +03:00
Ensure runtime options are passed
This commit is contained in:
@@ -115,6 +115,7 @@ class OpenAIClient(GenAIClient):
|
||||
"model": self.genai_config.model,
|
||||
"messages": messages,
|
||||
"timeout": self.timeout,
|
||||
**self.genai_config.runtime_options,
|
||||
}
|
||||
|
||||
if tools:
|
||||
@@ -212,6 +213,7 @@ class OpenAIClient(GenAIClient):
|
||||
"timeout": self.timeout,
|
||||
"stream": True,
|
||||
"stream_options": {"include_usage": True},
|
||||
**self.genai_config.runtime_options,
|
||||
}
|
||||
|
||||
if tools:
|
||||
|
||||
@@ -527,6 +527,7 @@ class LlamaCppClient(GenAIClient):
|
||||
k: v for k, v in self.provider_options.items() if k != "context_size"
|
||||
}
|
||||
payload.update(provider_opts)
|
||||
payload.update(self.genai_config.runtime_options)
|
||||
return payload
|
||||
|
||||
def _message_from_choice(self, choice: dict[str, Any]) -> dict[str, Any]:
|
||||
|
||||
@@ -309,6 +309,7 @@ class OllamaClient(GenAIClient):
|
||||
"model": self.genai_config.model,
|
||||
"messages": request_messages,
|
||||
**self.provider_options,
|
||||
**self.genai_config.runtime_options,
|
||||
}
|
||||
if stream:
|
||||
request_params["stream"] = True
|
||||
|
||||
Reference in New Issue
Block a user