mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-02 18:11:13 +03:00
mypy
This commit is contained in:
parent
44ec45ab41
commit
38c72efd6a
@ -120,11 +120,14 @@ class GeminiClient(GenAIClient):
|
|||||||
messages: list[dict[str, Any]],
|
messages: list[dict[str, Any]],
|
||||||
tools: Optional[list[dict[str, Any]]] = None,
|
tools: Optional[list[dict[str, Any]]] = None,
|
||||||
tool_choice: Optional[str] = "auto",
|
tool_choice: Optional[str] = "auto",
|
||||||
|
enable_thinking: Optional[bool] = None,
|
||||||
) -> dict[str, Any]:
|
) -> dict[str, Any]:
|
||||||
"""
|
"""
|
||||||
Send chat messages to Gemini with optional tool definitions.
|
Send chat messages to Gemini with optional tool definitions.
|
||||||
|
|
||||||
Implements function calling/tool usage for Gemini models.
|
Implements function calling/tool usage for Gemini models. Thinking is
|
||||||
|
configured at the model level for Gemini, so ``enable_thinking`` is
|
||||||
|
accepted for interface parity and ignored.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
# Convert messages to Gemini format
|
# Convert messages to Gemini format
|
||||||
|
|||||||
@ -188,11 +188,14 @@ class OpenAIClient(GenAIClient):
|
|||||||
messages: list[dict[str, Any]],
|
messages: list[dict[str, Any]],
|
||||||
tools: Optional[list[dict[str, Any]]] = None,
|
tools: Optional[list[dict[str, Any]]] = None,
|
||||||
tool_choice: Optional[str] = "auto",
|
tool_choice: Optional[str] = "auto",
|
||||||
|
enable_thinking: Optional[bool] = None,
|
||||||
) -> dict[str, Any]:
|
) -> dict[str, Any]:
|
||||||
"""
|
"""
|
||||||
Send chat messages to OpenAI with optional tool definitions.
|
Send chat messages to OpenAI with optional tool definitions.
|
||||||
|
|
||||||
Implements function calling/tool usage for OpenAI models.
|
Implements function calling/tool usage for OpenAI models. The OpenAI
|
||||||
|
chat completions API does not expose a per-request thinking toggle,
|
||||||
|
so ``enable_thinking`` is accepted for interface parity and ignored.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
openai_tool_choice = None
|
openai_tool_choice = None
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user