[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
e7d2f2ee5a
commit
315f3d7f81
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue