I have the following JSON for a tool.
{
"type": "function",
"function": {
"name": "save_recipe",
"description": "Saves a recipe for later recall.",
"parameters": {
"type": "object",
"properties": {
"name": {"type": "string", "description": "The name of the recipe. e.g. Mean Green Machine" },
"author": {"type": "string", "description": "The creator of the recipe. e.g. Joseph Gold" },
"sku": {"type": "string", "description": "The sku of the recipe. e.g. GJN001" },
"ingredients": {
"type": "object",
"additionalProperties": {"type":"string"},
"minProperties": 1,
"description": "The ingredients that are used in the recipe. Each key:val pair in this dictionary uses the ingredient name as the key and the amount as the value. e.g. Carrot: 360g"
},
"yield": {"type": "string", "description": "The amount that the user wants to make. e.g. 8oz" },
"instructions": {"type": "string", "description": "Optional instructions on how to make the recipe. Can be many sentences. e.g. Put all ingredients in a bowl and mix well." },
"notes": {"type": "string", "description": "Optional special notes the user leaves for the recipe. If none, use an empty string. e.g. Green Joe" }
},
"required": [
"name", "author", "ingredients", "yield"
]
}
}
}
The expected JSON that the Assistant generates should look something like:
{
"name": "Bad Apple",
"author": "GoldenJoe",
"sku": "GJN01",
"ingredients": {
"Apple, Gala": "200g",
"Foo": "130g",
"Bar": "25g"
},
"yield": "8oz"
}
The Assistant never asks for ingredients, however. Even if prompted directly, it hallucinates and suggests entering them as instructions or notes:
You: What about the ingredients?
Assistant: My apologies for any confusion. The ingredients are indeed a crucial part of the recipe. However, in the context of the save_recipe function that we're using, the ingredients are not listed as a separate parameter because they are typically included within the instructions or notes. When you provide the instructions for making the recipe, you should include the list of ingredients and their respective quantities as part of those instructions.
So, to clarify, the ingredients should be included in the instructions section when you provide that information.
Please provide the ingredients within the instructions, or if you have a separate ingredients list, I can help integrate that into the instructions for you.
Am I misunderstanding the JSON schema for what I’m trying to accomplish?