Update to M.E.AI 9.7.0 (#602)

This commit is contained in:
Stephen Toub 2025-07-09 23:41:57 -04:00 • committed by GitHub
commit 1232456153
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,19 +17,14 @@ public sealed class SampleLlmTool
[Description("Maximum number of tokens to generate")] int maxTokens,
CancellationToken cancellationToken)
{
ChatMessage[] messages =
[
new(ChatRole.System, "You are a helpful test server."),
new(ChatRole.User, prompt),
];
ChatOptions options = new()
{
Instructions = "You are a helpful test server.",
MaxOutputTokens = maxTokens,
Temperature = 0.7f,
};
var samplingResponse = await thisServer.AsSamplingChatClient().GetResponseAsync(messages, options, cancellationToken);
var samplingResponse = await thisServer.AsSamplingChatClient().GetResponseAsync(prompt, options, cancellationToken);
return $"LLM sampling result: {samplingResponse}";
}