Skip to content

Commit

Permalink
Merge pull request #1136 from digital-value-apps/output_model_fields
Browse files Browse the repository at this point in the history
fix: do not request the LLM to provide a $defs field
  • Loading branch information
ashpreetbedi authored Sep 23, 2024
2 parents b0828b1 + 6e9bd63 commit 7c1d6a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion phi/assistant/assistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ def get_json_output_prompt(self) -> str:

if len(output_model_properties) > 0:
json_output_prompt += "\n<json_fields>"
json_output_prompt += f"\n{json.dumps(list(output_model_properties.keys()))}"
json_output_prompt += f"\n{json.dumps([key for key in output_model_properties.keys() if key != '$defs'])}"
json_output_prompt += "\n</json_fields>"
json_output_prompt += "\nHere are the properties for each field:"
json_output_prompt += "\n<json_field_properties>"
Expand Down

0 comments on commit 7c1d6a1

Please sign in to comment.