Update MEAI 9.8.0 and accepted proposed abstractions

This commit is contained in:
Roger Barreto
2025-08-15 15:58:17 +01:00
Unverified
parent dea736e550
commit 4a0e98c217
12 changed files with 279 additions and 240 deletions
@@ -21,7 +21,7 @@ public sealed class Step03_ChatClientAgent_UsingCodeInterpreterTools(ITestOutput
[InlineData(ChatClientProviders.OpenAIAssistant)]
public async Task RunningWithFileReferenceAsync(ChatClientProviders provider)
{
var codeInterpreterTool = new NewHostedCodeInterpreterTool()
var codeInterpreterTool = new HostedCodeInterpreterTool()
{
Inputs = [new HostedFileContent(await UploadFileAsync("Resources/groceries.txt", provider))]
};
@@ -6,6 +6,7 @@ using Azure.Identity;
using Microsoft.Extensions.AI;
using Microsoft.Extensions.AI.Agents;
using Microsoft.Shared.Samples;
using OpenAI.Assistants;
using OpenAI.Files;
using OpenAI.VectorStores;
@@ -29,7 +30,7 @@ public sealed class Step07_ChatClientAgent_UsingFileSearchTools(ITestOutputHelpe
var vectorStoreId = await CreateVectorStoreAsync([fileId], provider);
// Create a file search tool that can access the vector store.
var fileSearchTool = new NewHostedFileSearchTool()
var fileSearchTool = new HostedFileSearchTool()
{
Inputs = [new HostedVectorStoreContent(vectorStoreId)],
};
@@ -44,7 +45,8 @@ public sealed class Step07_ChatClientAgent_UsingFileSearchTools(ITestOutputHelpe
// Create the server-side agent Id when applicable (depending on the provider).
agentOptions.Id = await base.AgentCreateAsync(provider, agentOptions);
using var chatClient = base.GetChatClient(provider, agentOptions);
using var chatClient = new NewOpenAIAssistantChatClient(new AssistantClient(TestConfiguration.OpenAI.ApiKey), agentOptions.Id!);
//using var chatClient = base.GetChatClient(provider, agentOptions);
ChatClientAgent agent = new(chatClient, agentOptions);