Update to M.E.AI 9.7.0 (#602)
This commit is contained in:
parent
984aa9ae1b
commit
1232456153
1 changed files with 10 additions and 10 deletions
|
|
@ -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}";
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue