openai-python icon indicating copy to clipboard operation
openai-python copied to clipboard

Fix: 'ModelField' object has no attribute 'annotation'

Open Konnor-Young opened this issue 9 months ago • 0 comments

  • [x] I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested

Made a change to check the field_info for 'annotation' prior to accessing. In an attempt to prevent the "'ModelField' object has no attribute 'annotation'" error.

Additional context & links

This is a potential fix for issue #2155

The issue mentions running into this error on library version 1.52.0 I was running into this error up to version 1.65.3

pydantic version 1.9.0 python version 3.9

Konnor-Young avatar Mar 05 '25 17:03 Konnor-Young