Eric Botti commited on
Commit
63c7598
·
1 Parent(s): 270b042

format instruction use double quotes

Browse files
Files changed (1) hide show
  1. src/output_formats.py +2 -2
src/output_formats.py CHANGED
@@ -20,7 +20,7 @@ class OutputFormatModel(BaseModel):
20
  json_format[field] = cls.model_fields[field].description
21
 
22
  # In the future, we could instead use get_annotations() to get the field descriptions
23
- return FORMAT_INSTRUCTIONS.format(schema=json_format)
24
 
25
 
26
  class AnimalDescriptionFormat(OutputFormatModel):
@@ -37,7 +37,7 @@ class AnimalDescriptionFormat(OutputFormatModel):
37
 
38
 
39
  class ChameleonGuessFormat(OutputFormatModel):
40
- animal: str = Field(description='Name of the animal you think the Herd is in its singular form, e.g. "animal" not "animals"')
41
 
42
  @field_validator('animal')
43
  @classmethod
 
20
  json_format[field] = cls.model_fields[field].description
21
 
22
  # In the future, we could instead use get_annotations() to get the field descriptions
23
+ return FORMAT_INSTRUCTIONS.format(schema=json.dumps(json_format))
24
 
25
 
26
  class AnimalDescriptionFormat(OutputFormatModel):
 
37
 
38
 
39
  class ChameleonGuessFormat(OutputFormatModel):
40
+ animal: str = Field(description="Name of the animal you think the Herd is in its singular form, e.g. 'animal' not 'animals'")
41
 
42
  @field_validator('animal')
43
  @classmethod