Skip to content

Instantly share code, notes, and snippets.

@pavlovmilen
Created September 21, 2024 16:45
Show Gist options
  • Save pavlovmilen/2bef4623398967602e7631bfd535a4e9 to your computer and use it in GitHub Desktop.
Save pavlovmilen/2bef4623398967602e7631bfd535a4e9 to your computer and use it in GitHub Desktop.
CreateImageContextTool
public static ChatTool CreateImageContextTool()
{
var imageContextTool = ChatTool.CreateFunctionTool(
functionName: "GetImageDataAsync",
functionDescription: "Get image bytes from a given image link",
functionParameters: BinaryData.FromString("""
{
"type": "object",
"properties": {
"imageLink": {
"type": "string",
"description": "image link"
}
}
}
""")
);
return imageContextTool;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment