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
"Structured Imagination" is a placeholder name for controlling how many "draft" tokens and "imagination" tokens the model generates first before generating the final answer.
Sample json schema:
json_schema = {"name": "Fruit Generator",
"description": "A tool that generates details about a fruit with text and images in one go!",
"type": "object",
"properties": {
"imagination" : {
"type": "image",
"maxLength": 100,
},
"draft_reasoning": {
"type": "string",
"pattern": "[a-zA-Z0-9]{1,100}",
},
"imagination_2" : {
"type": "image",
"maxLength": 100,
},
"draft_reasoning_2": {
"type": "string",
"pattern": "[a-zA-Z0-9]{1,100}",
},
"cat_dog": {
"type": "image",
}
},
"required": ["imagination", "draft_reasoning", "imagination_2", "draft_reasoning_2", "cat_dog"],
}
"Structured Imagination" is a placeholder name for controlling how many "draft" tokens and "imagination" tokens the model generates first before generating the final answer.
Sample json schema:
Equivalent regex expression:
\{[ ]?"imagination"[ ]?:[ ]?"<image>{,100}"[ ]?,[ ]?"draft_reasoning"[ ]?:[ ]?("[a-zA-Z0-9]{1,100}")[ ]?,[ ]?"imagination_2"[ ]?:[ ]?"<image>{,100}"[ ]?,[ ]?"draft_reasoning_2"[ ]?:[ ]?("[a-zA-Z0-9]{1,100}")[ ]?,[ ]?"cat_dog"[ ]?:[ ]?"<image>{1024,1024}"[ ]?\}
The text was updated successfully, but these errors were encountered: