|
//----------------------
// <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 Microsoft.ML.GenAI.Samples.Mistral
{
public partial class Mistral_7B_Instruct
{
private class GetWeatherSchema
{
[JsonPropertyName(@"city")]
public string city {get; set;}
}
public Task<string> GetWeatherWrapper(string arguments)
{
var schema = JsonSerializer.Deserialize<GetWeatherSchema>(
arguments,
new JsonSerializerOptions
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
});
return GetWeather(schema.city);
}
public FunctionContract GetWeatherFunctionContract
{
get => new FunctionContract
{
Namespace = @"Microsoft.ML.GenAI.Samples.Mistral",
ClassName = @"Mistral_7B_Instruct",
Name = @"GetWeather",
Description = @"get weather from city",
ReturnType = typeof(Task<string>),
Parameters = new global::AutoGen.Core.FunctionParameterContract[]
{
new FunctionParameterContract
{
Name = @"city",
Description = @"city. type is string",
ParameterType = typeof(string),
IsRequired = true,
},
},
};
}
}
}
|