-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Description
Describe the bug
Hi,
I'm using the openaI python module and I'm experiencing some issues lately. I'm making a streaming completion task. Randomly I'm getting the following exception "requests.exceptions.ChunkedEncodingError : ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)".
def send_completion_task_stream(self):
prompt = """my prompt"""
response = self.completion_task.create(prompt=prompt, model=self.modal_name, stop=self.stop,
temperature=self.temperature,
top_p=self.top_p, frequency_penalty=self.frequency_penalty,
presence_penalty=self.presence_penalty,
max_tokens=3000,
stream=True
)
return response `
do you know what can cause this error ?
Thank you
Best regards
To Reproduce
1- Send a streaming completion task and put max-token to 3000
2 - The errors appears (but randomly)
Code snippets
No response
OS
macOs
Python version
Python 3.10
Library version
openai-python-0.26.1