Creating a Tool
You can declare a new function within the Tools panel in a Prompt by selecting the Add Tool button.
You will be presented with a new function for which you can define name and JSON schema.
Here is an example of a JSON object for a function get_current_weather
that declares the fields location (string)
and unit (string)
:
{
"type": "object",
"required": [
"location",
"unit"
],
"properties": {
"unit": {
"type": "string",
"description": "The temperature unit, e.g. Celsius"
},
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA"
}
}
}
Updated 3 days ago