-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathToolDefinitions.cs
More file actions
33 lines (31 loc) · 880 Bytes
/
ToolDefinitions.cs
File metadata and controls
33 lines (31 loc) · 880 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
namespace YAOLlm;
/// <summary>
/// Shared tool definitions for function calling
/// </summary>
public static class ToolDefinitions
{
/// <summary>
/// Web search tool definition
/// </summary>
public static ToolDefinition WebSearch => new(
"web_search",
"Search the web for current information. Use this when you need up-to-date information or to find specific facts.",
new
{
type = "object",
properties = new
{
query = new
{
type = "string",
description = "The search query to look up"
}
},
required = new[] { "query" }
}
);
/// <summary>
/// Get all available tools
/// </summary>
public static List<ToolDefinition> GetAll() => new() { WebSearch };
}