Update M.E.AI and delete a bunch of dead code (#676)

This commit is contained in:
Stephen Toub
2025-09-11 00:40:58 +00:00
committed by GitHub
parent 57d09afe04
commit f9e133237d
28 changed files with 67 additions and 5189 deletions
@@ -22,11 +22,11 @@ AIAgent agent = new OpenAIClient(apiKey)
UserChatMessage chatMessage = new("Tell me a joke about a pirate.");
// Invoke the agent and output the text result.
ChatCompletion chatCompletion = await agent.RunAsync(chatMessage);
ChatCompletion chatCompletion = await agent.RunAsync([chatMessage]);
Console.WriteLine(chatCompletion.Content.Last().Text);
// Invoke the agent with streaming support.
AsyncCollectionResult<StreamingChatCompletionUpdate> completionUpdates = agent.RunStreamingAsync(chatMessage);
AsyncCollectionResult<StreamingChatCompletionUpdate> completionUpdates = agent.RunStreamingAsync([chatMessage]);
await foreach (StreamingChatCompletionUpdate completionUpdate in completionUpdates)
{
if (completionUpdate.ContentUpdate.Count > 0)