Skip to content

Commit 2156a5e

Browse files
authored
Consistently use _parse_values=False from functional.py (#1701)
* Improve ChatAdapter's handling of typed values and Pydantic models * Fixes for Literal * Fixes for formatting complex-typed values * Improve ChatAdapter, introduce JsonAdapter, add default retries with the latter. * Minor fixes * Update lock file * Updates for json retries * Consistently use _parse_values=False from functional.py
1 parent 9f8c26d commit 2156a5e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dspy/functional/functional.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ def _make_example(self, field) -> str:
153153
"json_schema -> json_object",
154154
"Make a very succinct json object that validates with the following schema",
155155
),
156+
_parse_values=False,
156157
)(json_schema=schema).json_object
157158
# We use the parser to make sure the json object is valid.
158159
try:
@@ -220,6 +221,7 @@ class Signature(dspy.Signature):
220221
task_description=task_description,
221222
language_model_output=model_output,
222223
error=error,
224+
_parse_values=False,
223225
).advice
224226

225227
def _prepare_signature(self) -> dspy.Signature:

0 commit comments

Comments
 (0)