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
When generating the response format in JSONAdapter, an exception is systematically triggered and thus, under the hood, the response_format parameter sent is always {"type": "json_object"}
Traceback (most recent call last):
File "/Users/poudro/dspy/tt.py", line 6, in <module>
response_format = _get_structured_outputs_response_format(predictor.signature)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/poudro/.pyenv/versions/dspy/lib/python3.12/site-packages/dspy/adapters/json_adapter.py", line 210, in _get_structured_outputs_response_format
pydantic_model = pydantic.create_model(
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/poudro/.pyenv/versions/dspy/lib/python3.12/site-packages/pydantic/main.py", line 1761, in create_model
return meta(
^^^^^
File "/Users/poudro/.pyenv/versions/dspy/lib/python3.12/site-packages/pydantic/_internal/_model_construction.py", line 110, in __new__
config_wrapper = ConfigWrapper.for_model(bases, namespace, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/poudro/.pyenv/versions/dspy/lib/python3.12/site-packages/pydantic/_internal/_config.py", line 138, in for_model
config_new.update(config_from_namespace)
TypeError: 'type' object is not iterable
What happened?
When generating the response format in JSONAdapter, an exception is systematically triggered and thus, under the hood, the response_format parameter sent is always
{"type": "json_object"}
Steps to reproduce
Can be reproduced with
Which triggers exception
There is an easy fix
DSPy version
2.6.24
The text was updated successfully, but these errors were encountered: