Created
September 2, 2024 15:14
-
-
Save pavlovmilen/aa1261e6fdeb91f72fddb7d795df2417 to your computer and use it in GitHub Desktop.
ChatToolGenerator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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