Skip to content

Commit

Permalink
Consistently use _parse_values=False from functional.py (#1701)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
okhat authored Oct 26, 2024
1 parent 9f8c26d commit 2156a5e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dspy/functional/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ def _make_example(self, field) -> str:
"json_schema -> json_object",
"Make a very succinct json object that validates with the following schema",
),
_parse_values=False,
)(json_schema=schema).json_object
# We use the parser to make sure the json object is valid.
try:
Expand Down Expand Up @@ -220,6 +221,7 @@ class Signature(dspy.Signature):
task_description=task_description,
language_model_output=model_output,
error=error,
_parse_values=False,
).advice

def _prepare_signature(self) -> dspy.Signature:
Expand Down

0 comments on commit 2156a5e

Please sign in to comment.