How to assign a default value?

#11
by piyush333 - opened

As the title suggests, I am trying assign a default value to the parameters. For example, If the user does not give the value for the given parameter use null.

Gorilla LLM (UC Berkeley) org

Hi @piyush333 , thanks for your interest!

You can either put in the parameter description, or have a field called default in parameter. You can take a look at some examples in the Berkeley Function-Calling Leaderboard.

"diffandsplits": {"type": "boolean", "description": "The diffandsplits of the stock history. Allows one of following : true|false. Default to true"}

and

"reverse": {"type": "boolean", "description": "Whether to sort the array in reverse order.", "default": false}

Let me know if you have additional questions!

CharlieJi changed discussion status to closed

Sign up or log in to comment