8000
Raw response is not present when the response model is an
Raw response is not present when the response model is an Iterable
#1305
Labels
bug
Something isn't working
Discussed in #365
Originally posted by chrishiste January 25, 2024
Describe the bug
When using the instructor library, there seems to be an issue with the raw response not being available when the response model is an Iterable.
To Reproduce
Expected behavior
The expected behavior is that the raw response should be available and accessible.
Extracting Tasks using Iterable in the docs makes it seem as if this is supposed to work in general with models (regardless of if they also include the raw response).
The issue happens due to create_with_completion() in client.py attempting to access
_raw_response
when theresponse_model
is an Iterable (i.e., a list), resulting in the error AttributeError: 'list' object has no attribute '_raw_response'.The text was updated successfully, but these errors were encountered: