- Apply Using XUserInfoClaims to RefreshAsync on McpServers ...
- Adding DateTime Prompt Handling in XAiServiceBase ... - Adding Support for Function Tools Attachment into ChatOptions when Asking Ai ... - Adding XDateTimeDescriptor class for Configuring DateTime attaching in Prompt Context, attached it on XAiApiConfiguration and also Configure it in appSettings File ...
This commit is contained in:
@@ -468,16 +468,25 @@ namespace xAiApi.Controllers
|
||||
/// <summary>
|
||||
/// Refresh MCP Servers ...
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("Refresh")]
|
||||
[Authorize(Policy = XPolicies.EnabledAdmin)]
|
||||
public async Task<ActionResult> RefreshMcpServers()
|
||||
public async Task<ActionResult> RefreshMcpServers(
|
||||
CancellationToken cancellationToken = default
|
||||
)
|
||||
{
|
||||
//
|
||||
try
|
||||
{
|
||||
//
|
||||
await mcpServerProvider.RefreshAsync();
|
||||
var userInfo = await GetUserInfo();
|
||||
|
||||
//
|
||||
await mcpServerProvider.RefreshAsync(
|
||||
userInfo: userInfo,
|
||||
cancellationToken: cancellationToken
|
||||
);
|
||||
|
||||
//
|
||||
return Ok();
|
||||
|
||||
Reference in New Issue
Block a user