mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-14 05:33:47 +00:00
Improve ipc (#102)
This commit is contained in:
1 parent
47f5756e5a
commit
fc64c0b505
81 files changed
+2408
-799
No files matched your search
@@ -1,3 +1,5 @@
|
||||
using RustService = AIStudio.Tools.RustService;
|
||||
|
||||
namespace AIStudio.Provider;
|
||||
|
||||
/// <summary>
|
||||
@@ -9,13 +11,31 @@ public abstract class BaseProvider
|
||||
/// The HTTP client to use for all requests.
|
||||
/// </summary>
|
||||
protected readonly HttpClient httpClient = new();
|
||||
|
||||
/// <summary>
|
||||
/// The logger to use.
|
||||
/// </summary>
|
||||
protected readonly ILogger logger;
|
||||
|
||||
static BaseProvider()
|
||||
{
|
||||
RUST_SERVICE = Program.RUST_SERVICE;
|
||||
ENCRYPTION = Program.ENCRYPTION;
|
||||
}
|
||||
|
||||
protected static readonly RustService RUST_SERVICE;
|
||||
|
||||
protected static readonly Encryption ENCRYPTION;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor for the base provider.
|
||||
/// </summary>
|
||||
/// <param name="url">The base URL for the provider.</param>
|
||||
protected BaseProvider(string url)
|
||||
/// <param name="loggerService">The logger service to use.</param>
|
||||
protected BaseProvider(string url, ILogger loggerService)
|
||||
{
|
||||
this.logger = loggerService;
|
||||
|
||||
// Set the base URL:
|
||||
this.httpClient.BaseAddress = new(url);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user