mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-01 17:41:13 +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,
|
"model": self.genai_config.model,
|
||||||
"messages": messages,
|
"messages": messages,
|
||||||
"timeout": self.timeout,
|
"timeout": self.timeout,
|
||||||
|
**self.genai_config.runtime_options,
|
||||||
}
|
}
|
||||||
|
|
||||||
if tools:
|
if tools:
|
||||||
@ -212,6 +213,7 @@ class OpenAIClient(GenAIClient):
|
|||||||
"timeout": self.timeout,
|
"timeout": self.timeout,
|
||||||
"stream": True,
|
"stream": True,
|
||||||
"stream_options": {"include_usage": True},
|
"stream_options": {"include_usage": True},
|
||||||
|
**self.genai_config.runtime_options,
|
||||||
}
|
}
|
||||||
|
|
||||||
if tools:
|
if tools:
|
||||||
|
|||||||
@ -527,6 +527,7 @@ class LlamaCppClient(GenAIClient):
|
|||||||
k: v for k, v in self.provider_options.items() if k != "context_size"
|
k: v for k, v in self.provider_options.items() if k != "context_size"
|
||||||
}
|
}
|
||||||
payload.update(provider_opts)
|
payload.update(provider_opts)
|
||||||
|
payload.update(self.genai_config.runtime_options)
|
||||||
return payload
|
return payload
|
||||||
|
|
||||||
def _message_from_choice(self, choice: dict[str, Any]) -> dict[str, Any]:
|
def _message_from_choice(self, choice: dict[str, Any]) -> dict[str, Any]:
|
||||||
|
|||||||
@ -309,6 +309,7 @@ class OllamaClient(GenAIClient):
|
|||||||
"model": self.genai_config.model,
|
"model": self.genai_config.model,
|
||||||
"messages": request_messages,
|
"messages": request_messages,
|
||||||
**self.provider_options,
|
**self.provider_options,
|
||||||
|
**self.genai_config.runtime_options,
|
||||||
}
|
}
|
||||||
if stream:
|
if stream:
|
||||||
request_params["stream"] = True
|
request_params["stream"] = True
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user