From 8189f331b65721643d8c9d059e1f455c8c503448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mayoral=20Vilches?= Date: Mon, 24 Mar 2025 18:11:38 +0100 Subject: [PATCH] Update openai library version to avoid version-related issue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In particular: Traceback (most recent call last): File /Users/alias/Alias/research/openai-agents-python/examples/agent_patterns/litellm.py, line 4, in from agents import OpenAIChatCompletionsModel,Agent,Runner File /Users/alias/Alias/research/openai-agents-python/src/agents/__init__.py, line 44, in from .models.openai_chatcompletions import OpenAIChatCompletionsModel File /Users/alias/Alias/research/openai-agents-python/src/agents/models/openai_chatcompletions.py, line 57, in from openai.types.responses.response_usage import InputTokensDetails, OutputTokensDetails ImportError: cannot import name 'InputTokensDetails' from 'openai.types.responses.response_usage' (/Users/alias/Alias/research/openai-agents-python/env/lib/python3.12/site-packages/openai/types/responses/response_usage.py). Did you mean: 'OutputTokensDetails'? Signed-off-by: VĂ­ctor Mayoral Vilches --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 667ab355..17cf1366 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ requires-python = ">=3.9" license = "MIT" authors = [{ name = "OpenAI", email = "support@openai.com" }] dependencies = [ - "openai>=1.66.5", + "openai>=1.68.2", "pydantic>=2.10, <3", "griffe>=1.5.6, <2", "typing-extensions>=4.12.2, <5",