Open mattflo opened 2 hours ago
Thank you so much for filing. We'll take a look!
Here's some more visibility into the callstack when the error occurs:
discount_email/src/discount.py:38: in generate
return client.chat.completions.create(
../../Library/Caches/pypoetry/virtualenvs/discount-email-response-fgEnZF0Y-py3.11/lib/python3.11/site-packages/braintrust/oai.py:333: in create
return ChatCompletionWrapper(self.__completions.with_raw_response.create, None).create(*args, **kwargs)
../../Library/Caches/pypoetry/virtualenvs/discount-email-response-fgEnZF0Y-py3.11/lib/python3.11/site-packages/braintrust/oai.py:104: in create
create_response = self.create_fn(*args, **kwargs)
../../Library/Caches/pypoetry/virtualenvs/discount-email-response-fgEnZF0Y-py3.11/lib/python3.11/site-packages/openai/_legacy_response.py:356: in wrapped
return cast(LegacyAPIResponse[R], func(*args, **kwargs))
../../Library/Caches/pypoetry/virtualenvs/discount-email-response-fgEnZF0Y-py3.11/lib/python3.11/site-packages/instructor/patch.py:188: in new_create_sync
response = retry_sync(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
At one point this probably worked as outlined in the documentation: https://www.braintrust.dev/docs/guides/tracing#instructor
Monkey patching code is treacherous...
I'm on the latest version of the relevant packages:
Here's how I create the client:
Here's how the client is used:
Here's the error: