[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2026-04-10 14:44:36 +00:00
commit 315f3d7f81

View file

@ -1853,9 +1853,12 @@ async def openai_completions(
is_stream = body.get("stream", False)
if is_stream:
async def _stream():
async with httpx.AsyncClient() as client:
async with client.stream("POST", target_url, json = body, timeout = 600) as resp:
async with client.stream(
"POST", target_url, json = body, timeout = 600
) as resp:
async for chunk in resp.aiter_bytes():
yield chunk
@ -1923,6 +1926,7 @@ class _ResponsesInputMessage(BaseModel):
class ResponsesRequest(BaseModel):
"""Minimal OpenAI Responses API request."""
model: str = "default"
input: Union[str, list[_ResponsesInputMessage]] = []
instructions: Optional[str] = None