Skip to content

Error: Response payload is not completed #574

@zzc0430

Description

@zzc0430

Describe the bug

When using the acreate interface and attempting to utilize streaming output, I encountered "aiohttp.client_exceptions.ClientPayloadError: Response payload is not completed"

  • Time: (UTC) 2023-08-17 06:08:24,030 ~ 2023-08-17 06:13:24,180
  • Request ID: 9c46544d6517b7b8e9df1e9e61fd7f53

To Reproduce

  1. using acreate interface
  2. stream = True

Code snippets

async for chunk in completion_stream:
File "/usr/local/lib/python3.9/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 230, in <genexpr>
return (
File "/usr/local/lib/python3.9/site-packages/openai/api_requestor.py", line 319, in wrap_resp
async for r in resp:
File "/usr/local/lib/python3.9/site-packages/openai/api_requestor.py", line 633, in <genexpr>
return (
File "/usr/local/lib/python3.9/site-packages/openai/api_requestor.py", line 114, in parse_stream_async
async for line in rbody:
File "/usr/local/lib/python3.9/site-packages/aiohttp/streams.py", line 35, in __anext__
rv = await self.read_func()
File "/usr/local/lib/python3.9/site-packages/aiohttp/streams.py", line 311, in readline
return await self.readuntil()
File "/usr/local/lib/python3.9/site-packages/aiohttp/streams.py", line 343, in readuntil
await self._wait("readuntil")
File "/usr/local/lib/python3.9/site-packages/aiohttp/streams.py", line 304, in _wait
await waiter
aiohttp.client_exceptions.ClientPayloadError: Response payload is not completed

OS

Linux

Python version

Python v3.9

Library version

openai-python v0.27.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Azurefor issues relating to the Azure OpenAI servicebugSomething isn't workingfixed in v1Issues addressed by the v1 beta

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions