Skip to content

How do you control which parameters are included in a tool's request schema? #578

Closed Answered by wazzamatazz
wazzamatazz asked this question in Q&A
Discussion options

You must be logged in to vote

Okay, I've figured out the answer. I had assumed that TimeProvider was added to the service collection by default when creating the web application builder, but is actually only registered when you add authentication services to the builder:

var builder = WebApplication.CreateBuilder(); builder.Services.AddAuthentication(); await using var app = builder.Build(); var isRegistered = app.Services.GetRequiredService<IServiceProviderIsService>().IsService(typeof(TimeProvider)); Console.WriteLine(isRegistered); // true
var builder = WebApplication.CreateBuilder(); //builder.Services.AddAuthentication(); await using var app = builder.Build(); var isRegistered = app.Services.GetRequiredSer…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@wazzamatazz
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by wazzamatazz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants