- Add Proxy Configuration in AppSettings;
- Remap Proxy Configurations in AiApiConfiguration; - Implement AiModelProxy Middleware for Proxifing Requests to Models; - ad DI Extensions Method for Handling Proxy Middleware Usage in AiApi; - Implement Proxy Middleware for Handling Proxifying Requests to Models for Test;
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
using System;
|
||||
using xAiApi.Constants;
|
||||
using xAiApi.Extensions;
|
||||
using xAiApi.Middlewares;
|
||||
using xCommons.Extensions;
|
||||
using xAiApi.Configurations;
|
||||
using xExceptions.Constants;
|
||||
using xAiApi.Providers.Extractors;
|
||||
using xAiApi.Interfaces.Extractors;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
@@ -97,6 +99,18 @@ namespace xAiApi.DI
|
||||
source.AddSingleton<IXFileContentExtractor, XFileContentExtractor>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Use Model Proxy Provider ...
|
||||
/// </summary>
|
||||
/// <param name="source"></param>
|
||||
/// <returns></returns>
|
||||
public static IApplicationBuilder UseXAiModelProxy(
|
||||
this IApplicationBuilder source
|
||||
)
|
||||
{
|
||||
return source.UseMiddleware<XAiModelProxyMiddleware>();
|
||||
}
|
||||
|
||||
//
|
||||
#region Private ...
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user