Skip to content

Commit c0b979c

Browse files
committed
fix py 3.9 error
1 parent 0f1441a commit c0b979c

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ celerybeat.pid
103103
.python-version
104104
.env*
105105
.venv
106+
.venv*
106107
env/
107108
venv/
108109
ENV/

src/agents/models/chatcmpl_converter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import json
44
from collections.abc import Iterable
5-
from typing import Any, Literal, cast
5+
from typing import Any, Literal, Union, cast
66

77
from openai import Omit, omit
88
from openai.types.chat import (
@@ -507,7 +507,7 @@ def ensure_assistant_message() -> ChatCompletionAssistantMessageParam:
507507
elif func_output := cls.maybe_function_tool_call_output(item):
508508
flush_assistant_message()
509509
output_content = cast(
510-
str | Iterable[ResponseInputContentParam], func_output["output"]
510+
Union[str, Iterable[ResponseInputContentParam]], func_output["output"]
511511
)
512512
msg: ChatCompletionToolMessageParam = {
513513
"role": "tool",

0 commit comments

Comments
 (0)