Function calling is editing my json and creating an error

I’m creating an assistant, and I puting a json but when I save. The editor modify my json and return an error

original json

{
    "name": "past date",
    "description": "When the trip start date is in the past, the assistant needs to finish the conversation",
    "parameters": {
        "type": "object",
        "properties": {
            "bot_end": {
                "type": "boolean",
                "description": "Finish the chat"
            }
        },
        "required": [
            "bot_end"
        ]
    }
}

Am I doing something wrong?

PS: I changed the json to see if doesn’t return an error

2 Likes

A function name cannot have a space. You can use an underscore.

Trying to save this gave me “cannot save”.

Correcting the name, I didn’t see any rewriting.

PS: a “disconnect_user” may be more direct, with “the user must be disconnected if the trip start date is in the past. Call this function to terminate the connection. Do not engage in conversation for old trip start dates.” A function call will still need a return value from a tool and an AI saying something if you want the thread to be still used.

2 Likes

Thank you so much for your help with my JSON issue in the function calling! Your detailed explanation and the description you provided were exactly what I needed to resolve the problem. I really appreciate your time and effort in helping me out.

1 Like