Update Microsoft.Extensions.AI version & expose JSON configuration on McpServerResourceCreateOptions (#511)
* Update Microsoft.Extensions.AI version * Update Microsoft.Extensions.AI.OpenAI * Fix failing tests; add JSON configuration options to McpServerResourceCreateOptions. * Replace temporary code with `AIFunction.ReturnJsonSchema` --------- Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
This commit is contained in:
parent
1e8fb04037
commit
28d65470f4
1 changed files with 45 additions and 35 deletions
|
|
@ -190,7 +190,7 @@ public partial class McpServerToolTests
|
|||
new DataContent("data:image/png;base64,1234"),
|
||||
new DataContent("data:audio/wav;base64,1234")
|
||||
};
|
||||
});
|
||||
}, new() { SerializerOptions = JsonContext2.Default.Options });
|
||||
|
||||
var result = await tool.InvokeAsync(
|
||||
new RequestContext<CallToolRequestParams>(mockServer.Object),
|
||||
|
|
@ -288,7 +288,7 @@ public partial class McpServerToolTests
|
|||
{
|
||||
Assert.Same(mockServer.Object, server);
|
||||
return new List<string>() { "42", "43" };
|
||||
});
|
||||
}, new() { SerializerOptions = JsonContext2.Default.Options });
|
||||
var result = await tool.InvokeAsync(
|
||||
new RequestContext<CallToolRequestParams>(mockServer.Object),
|
||||
TestContext.Current.CancellationToken);
|
||||
|
|
@ -632,5 +632,7 @@ public partial class McpServerToolTests
|
|||
[JsonSerializable(typeof(AsyncDisposableToolType))]
|
||||
[JsonSerializable(typeof(AsyncDisposableAndDisposableToolType))]
|
||||
[JsonSerializable(typeof(JsonSchema))]
|
||||
[JsonSerializable(typeof(List<AIContent>))]
|
||||
[JsonSerializable(typeof(List<string>))]
|
||||
partial class JsonContext2 : JsonSerializerContext;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue