mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-06-21 03:41:55 +03:00
Ensure runtime options are passed
This commit is contained in:
parent
b1de5e2290
commit
75f6971f13
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user