Split configuration of request and message filters (#1308)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
27a3196c7f
commit
d21aa9e5a2
1 changed files with 1288 additions and 1078 deletions
|
|
@ -38,7 +38,7 @@ public class Program
|
|||
})
|
||||
.WithTools<ConformanceTools>()
|
||||
.WithTools([ConformanceTools.CreateJsonSchema202012Tool()])
|
||||
.AddCallToolFilter(next => async (request, cancellationToken) =>
|
||||
.WithRequestFilters(filters => filters.AddCallToolFilter(next => async (request, cancellationToken) =>
|
||||
{
|
||||
var result = await next(request, cancellationToken);
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ public class Program
|
|||
}
|
||||
|
||||
return result;
|
||||
})
|
||||
}))
|
||||
.WithPrompts<ConformancePrompts>()
|
||||
.WithResources<ConformanceResources>()
|
||||
.WithSubscribeToResourcesHandler(async (ctx, ct) =>
|
||||
|
|
|
|||
Loading…
Reference in a new issue