with multiprocessing, pickle issue with client.beta.chat.completions.parse output #1776
Open
1 task done
Labels
bug
Something isn't working
Confirm this is an issue with the Python library and not an underlying OpenAI API
Describe the bug
We use multiprocessing to handle the calls. It was working with client.chat.completions.create. Currently, we are trying client.beta.chat.completions.parse with response_format, i got error:
Traceback (most recent call last):
File "/anaconda/lib/python3.10/multiprocessing/queues.py", line 244, in _feed
obj = _ForkingPickler.dumps(obj)
File "/anaconda/lib/python3.10/multiprocessing/reduction.py", line 51, in dumps
cls(buf, protocol).dump(obj)
_pickle.PicklingError: Can't pickle <class 'openai.types.chat.parsed_chat_completion.ParsedChatCompletion[CalendarEvent]'>: attribute lookup ParsedChatCompletion[CalendarEvent] on openai.types.chat.parsed_chat_completion failed
anyone can help ?
Thanks
To Reproduce
Code snippets
No response
OS
linux
Python version
py3.10
Library version
openai 1.51.0
The text was updated successfully, but these errors were encountered: