Skip to content

Commit d052c1f

Browse files
mdagostMichelangelo D'Agostino
andauthored
[Bugfix] Fix wrong imports in examples (#1241)
The current script gives ``` Traceback (most recent call last): File "/Users/xmxd289/code/openai-agents-python/examples/reasoning_content/main.py", line 19, in <module> from agents.types import ResponseOutputRefusal, ResponseOutputText # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ModuleNotFoundError: No module named 'agents.types' ``` because it should be `from openai.types.responses import ResponseOutputRefusal, ResponseOutputText` rather than `from agents.types import ResponseOutputRefusal, ResponseOutputText` --------- Co-authored-by: Michelangelo D'Agostino <mda@grainger.com>
1 parent 44042e1 commit d052c1f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/reasoning_content/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@
1313
import os
1414
from typing import Any, cast
1515

16+
from openai.types.responses import ResponseOutputRefusal, ResponseOutputText
17+
1618
from agents import ModelSettings
1719
from agents.models.interface import ModelTracing
1820
from agents.models.openai_provider import OpenAIProvider
19-
from agents.types import ResponseOutputRefusal, ResponseOutputText # type: ignore
2021

2122
MODEL_NAME = os.getenv("EXAMPLE_MODEL_NAME") or "deepseek-reasoner"
2223

0 commit comments

Comments
 (0)