Slide 29
Slide 29 text
Toolの指定と作成
ラボのコード構成について
agent = await agentClient.CreateAgentAsync(
model: ModelName,
name: "Constoso Sales AI Agent",
instructions: instructions,
tools: tools, //ここで指定
temperature: temperature,
toolResources: toolResources
);
private IEnumerable InitialiseTools() => [
new FunctionToolDefinition(
name: nameof(SalesData.FetchSalesDataAsync),
description: "This function is used to answer user questions about Contoso sales data by executing SQLite qu…
parameters: BinaryData.FromObjectAsJson(new {
Type = "object",
Properties = new {
Query = new {
Type = "string",
Description = "The input should be a well-formed SQLite query to…
}
},
Required = new [] { "query" }
},
new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })
),
..IntialiseLabTools()
];