Skip to content

Instantly share code, notes, and snippets.

@pavlovmilen
Created September 2, 2024 15:14
Show Gist options
  • Save pavlovmilen/aa1261e6fdeb91f72fddb7d795df2417 to your computer and use it in GitHub Desktop.
Save pavlovmilen/aa1261e6fdeb91f72fddb7d795df2417 to your computer and use it in GitHub Desktop.
ChatToolGenerator
public static class ChatToolGenerator
{
public static ChatTool CreateCrimeContextTool()
{
var crimeContextTool = ChatTool.CreateFunctionTool(
functionName: "CrimeAtLocationForPostcode",
functionDescription: "Produce crime context for a given postcode",
functionParameters: BinaryData.FromString("""
{
"type": "object",
"properties": {
"postcode": {
"type": "string",
"description": "postcode name"
}
}
}
""")
);
return crimeContextTool;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment