Skip to content

Instantly share code, notes, and snippets.

@wullemsb
Created September 21, 2024 12:23
Show Gist options
  • Save wullemsb/852b7d43358619a1e8dcd5e2518f1077 to your computer and use it in GitHub Desktop.
Save wullemsb/852b7d43358619a1e8dcd5e2518f1077 to your computer and use it in GitHub Desktop.
var tool = new Tool()
{
Function = new Function
{
Description = "Get the current weather for a location",
Name = "GetWeather",
Parameters = new Parameters
{
Properties = new Dictionary<string, Properties>
{
["location"] = new()
{
Type = "string",
Description = "The location to get the weather for, e.g. San Francisco, CA"
},
["format"] = new()
{
Type = "string",
Description = "The format to return the weather in, e.g. 'celsius' or 'fahrenheit'",
Enum = ["celsius", "fahrenheit"]
},
},
Required = ["location", "format"],
}
},
Type = "function"
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment