You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 the response_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:
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: