Skip to content

Commit 858ac7f

Browse files
fixed mypy
1 parent 95ff215 commit 858ac7f

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

python/semantic_kernel/agents/open_ai/assistant_thread_actions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from collections.abc import AsyncIterable, Iterable, Sequence
66
from typing import TYPE_CHECKING, Any, ClassVar, Literal, TypeVar, cast
77

8-
from openai import NOT_GIVEN, AsyncOpenAI, NotGiven
8+
from openai import AsyncOpenAI, Omit, omit
99
from openai.types.beta.code_interpreter_tool import CodeInterpreterTool
1010
from openai.types.beta.file_search_tool import FileSearchTool
1111
from openai.types.beta.threads.run_create_params import AdditionalMessage, AdditionalMessageAttachment
@@ -597,7 +597,7 @@ async def get_messages(
597597
An async iterable of ChatMessageContent.
598598
"""
599599
agent_names: dict[str, Any] = {}
600-
last_id: str | NotGiven = NOT_GIVEN
600+
last_id: str | Omit = omit
601601

602602
while True:
603603
messages = await client.beta.threads.messages.list(

python/semantic_kernel/agents/open_ai/openai_assistant_agent.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from copy import copy, deepcopy
88
from typing import TYPE_CHECKING, Any, ClassVar, Literal, TypeVar
99

10-
from openai import NOT_GIVEN, AsyncOpenAI, NotGiven
10+
from openai import AsyncOpenAI, Omit, omit
1111
from openai.lib._parsing._completions import type_to_response_format_param
1212
from openai.types.beta.assistant import Assistant
1313
from openai.types.beta.assistant_create_params import (
@@ -138,9 +138,9 @@ def __init__(
138138
self,
139139
client: AsyncOpenAI,
140140
thread_id: str | None = None,
141-
messages: Iterable["ThreadCreateMessage"] | NotGiven = NOT_GIVEN,
142-
metadata: dict[str, Any] | NotGiven = NOT_GIVEN,
143-
tool_resources: ToolResources | NotGiven = NOT_GIVEN,
141+
messages: Iterable["ThreadCreateMessage"] | Omit = omit,
142+
metadata: dict[str, Any] | Omit = omit,
143+
tool_resources: ToolResources | Omit = omit,
144144
) -> None:
145145
"""Initialize the OpenAI Assistant Thread.
146146

python/semantic_kernel/agents/open_ai/openai_responses_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ def configure_web_search_tool(
706706
A WebSearchToolParam dictionary with any passed-in parameters.
707707
"""
708708
tool: WebSearchToolParam = {
709-
"type": "web_search_preview",
709+
"type": "web_search",
710710
}
711711
if context_size is not None:
712712
tool["search_context_size"] = context_size

python/semantic_kernel/connectors/ai/open_ai/services/open_ai_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ async def _send_image_edit_request(
150150
try:
151151
response: ImagesResponse = await self.client.images.edit(
152152
image=image,
153-
mask=mask,
153+
mask=mask, # type: ignore
154154
**settings.prepare_settings_dict(),
155155
)
156156
self.store_usage(response)

0 commit comments

Comments
 (0)