mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-01-24 03:14:28 +08:00
fix: OpenAI SDK compat (ResponseTextConfig) (#23126)
Signed-off-by: breno.skuk <breno.skuk@hcompany.ai> Signed-off-by: Breno Baldas Skuk <breno.skuk@hcompany.ai> Signed-off-by: mgoin <mgoin64@gmail.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Michael Goin <mgoin64@gmail.com>
This commit is contained in:
parent
bf756321c7
commit
ac6eb49de3
@ -12,7 +12,7 @@ tokenizers >= 0.21.1 # Required for fast incremental detokenization.
|
||||
protobuf # Required by LlamaTokenizer.
|
||||
fastapi[standard] >= 0.115.0 # Required by FastAPI's form models in the OpenAI API server's audio transcriptions endpoint.
|
||||
aiohttp
|
||||
openai >= 1.99.1, < 1.100.0 # For Responses API with reasoning content
|
||||
openai >= 1.99.1 # For Responses API with reasoning content
|
||||
pydantic >= 2.10
|
||||
prometheus_client >= 0.18.0
|
||||
pillow # Required for image processing
|
||||
|
||||
@ -18,7 +18,7 @@ cbor2
|
||||
cloudpickle
|
||||
fastapi
|
||||
msgspec
|
||||
openai < 1.100.0
|
||||
openai
|
||||
openai-harmony
|
||||
partial-json-parser
|
||||
pillow
|
||||
|
||||
@ -20,7 +20,15 @@ from openai.types.chat.chat_completion_message import (
|
||||
from openai.types.responses import (ResponseFunctionToolCall,
|
||||
ResponseInputItemParam, ResponseOutputItem,
|
||||
ResponsePrompt, ResponseReasoningItem,
|
||||
ResponseStatus, ResponseTextConfig)
|
||||
ResponseStatus)
|
||||
|
||||
# Backward compatibility for OpenAI client versions
|
||||
try: # For older openai versions (< 1.100.0)
|
||||
from openai.types.responses import ResponseTextConfig
|
||||
except ImportError: # For newer openai versions (>= 1.100.0)
|
||||
from openai.types.responses import (ResponseFormatTextConfig as
|
||||
ResponseTextConfig)
|
||||
|
||||
from openai.types.responses.response import ToolChoice
|
||||
from openai.types.responses.tool import Tool
|
||||
from openai.types.shared import Metadata, Reasoning
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user