autogen/dotnet/test/AutoGen.SourceGenerator.Tests/ApprovalTests/FunctionCallTemplateTests.TestFunctionCallTemplate.approved.txt
Xiaoyun Zhang a375d7ac38
[.Net] Remove Azure.AI.OpenAI from AutoGen.DotnetInteractive package (#3274)
* remove Azure.AI.OpenAI dependencies

* fix build error

* revert change
2024-08-02 16:35:07 +00:00

66 lines
2.0 KiB
Plaintext

//----------------------
// <auto-generated>
// This code was generated by a tool.
// </auto-generated>
//----------------------
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using System;
using AutoGen.Core;
namespace AutoGen.SourceGenerator.Tests
{
public partial class FunctionExamples
{
private class AddAsyncSchema
{
[JsonPropertyName(@"a")]
public System.Int32 a {get; set;}
[JsonPropertyName(@"b")]
public System.Int32 b {get; set;}
}
public System.Threading.Tasks.Task`1[System.String] AddAsyncWrapper(string arguments)
{
var schema = JsonSerializer.Deserialize<AddAsyncSchema>(
arguments,
new JsonSerializerOptions
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
});
return AddAsync(schema.a, schema.b);
}
public FunctionContract AddAsyncFunctionContract
{
get => new FunctionContract
{
Name = @"AddAsync",
Description = @"Add two numbers.",
ReturnType = typeof(System.Threading.Tasks.Task`1[System.String]),
Parameters = new global::AutoGen.Core.FunctionParameterContract[]
{
new FunctionParameterContract
{
Name = @"a",
Description = @"The first number.",
ParameterType = typeof(System.Int32),
IsRequired = true,
},
new FunctionParameterContract
{
Name = @"b",
Description = @"The second number.",
ParameterType = typeof(System.Int32),
IsRequired = true,
},
},
};
}
}
}