last ...
This commit is contained in:
@@ -16,7 +16,7 @@ namespace xAiApi.Constants
|
|||||||
public const string XAiApiContentExtractionPromptName = "ContentExtraction";
|
public const string XAiApiContentExtractionPromptName = "ContentExtraction";
|
||||||
|
|
||||||
//
|
//
|
||||||
public const string XAiDefaultModelName = "Gemma";
|
public const string XAiDefaultModelName = "Arion";
|
||||||
public const string XAiEmbeddingModelName = "Embed";
|
public const string XAiEmbeddingModelName = "Embed";
|
||||||
public const string XAiDefaultVisionModelName = "Qwen";
|
public const string XAiDefaultVisionModelName = "Qwen";
|
||||||
public const string XAiDefaultThinkingModelName = "Qwen";
|
public const string XAiDefaultThinkingModelName = "Qwen";
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ using System.Collections.Generic;
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using xAiApi.Interfaces.Extractors;
|
using xAiApi.Interfaces.Extractors;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.IO;
|
|
||||||
|
|
||||||
namespace xAiApi.Providers
|
namespace xAiApi.Providers
|
||||||
{
|
{
|
||||||
@@ -130,7 +129,7 @@ namespace xAiApi.Providers
|
|||||||
);
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
Options.Tools = [.. availableTools.Cast<AITool>()];
|
Options.Tools = [.. availableTools];
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
+14
-2
@@ -1,8 +1,10 @@
|
|||||||
|
using xLoggingService.DI;
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using xAiApi.DI;
|
using xAiApi.DI;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using xAiModels.DI;
|
using xAiModels.DI;
|
||||||
|
using xAiService.DI;
|
||||||
using xTagService.DI;
|
using xTagService.DI;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using xAiApi.Database;
|
using xAiApi.Database;
|
||||||
@@ -29,7 +31,6 @@ using Newtonsoft.Json.Serialization;
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using IdentityModel.AspNetCore.OAuth2Introspection;
|
using IdentityModel.AspNetCore.OAuth2Introspection;
|
||||||
using xAiService.DI;
|
|
||||||
|
|
||||||
namespace xAiApi
|
namespace xAiApi
|
||||||
{
|
{
|
||||||
@@ -61,6 +62,7 @@ namespace xAiApi
|
|||||||
|
|
||||||
public void ConfigureServices(IServiceCollection services)
|
public void ConfigureServices(IServiceCollection services)
|
||||||
{
|
{
|
||||||
|
services.AddXLoggingService(Configuration);
|
||||||
//
|
//
|
||||||
// Register Validation Provider and all XCommons Module Services ...
|
// Register Validation Provider and all XCommons Module Services ...
|
||||||
services.AddXCommons(Configuration);
|
services.AddXCommons(Configuration);
|
||||||
@@ -214,7 +216,10 @@ namespace xAiApi
|
|||||||
services.AddXAiServices();
|
services.AddXAiServices();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
public void Configure(
|
||||||
|
IApplicationBuilder app,
|
||||||
|
IWebHostEnvironment env
|
||||||
|
)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Configure the HTTP request pipeline.
|
// Configure the HTTP request pipeline.
|
||||||
@@ -231,6 +236,10 @@ namespace xAiApi
|
|||||||
app.UseHsts();
|
app.UseHsts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Setting Environment in App Confiuration ...
|
||||||
|
app.AddEnvironmentToXAppConfiguration(env.EnvironmentName);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Force Https Redirection ...
|
// Force Https Redirection ...
|
||||||
app.UseHttpsRedirection();
|
app.UseHttpsRedirection();
|
||||||
@@ -315,3 +324,6 @@ namespace xAiApi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -37,9 +37,16 @@
|
|||||||
},
|
},
|
||||||
"AiApiConfiguration": {
|
"AiApiConfiguration": {
|
||||||
"Models": [
|
"Models": [
|
||||||
|
{
|
||||||
|
"Name": "Arion",
|
||||||
|
"Provider": "OpenAI",
|
||||||
|
"LLM": "claude-fable-5-1",
|
||||||
|
"Url": "https://arionhub.pro/v1",
|
||||||
|
"ApiKey": "sk-AKJGD8J9gOCrQgc5oWPGtRGUo25PnnQGnMoipzdliYHa3otZ"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"ApiKey": "",
|
"ApiKey": "",
|
||||||
"Name": "Gemma",
|
"Name": "Gemma_BKP",
|
||||||
"LLM": "gemma3:1b",
|
"LLM": "gemma3:1b",
|
||||||
"Provider": "OpenAI",
|
"Provider": "OpenAI",
|
||||||
"Url": "http://178.131.88.93:1112/v1"
|
"Url": "http://178.131.88.93:1112/v1"
|
||||||
|
|||||||
+34
-1
@@ -22,7 +22,6 @@
|
|||||||
"DefaultValues": {
|
"DefaultValues": {
|
||||||
"version": "1.0"
|
"version": "1.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
"HttpServiceConfiguration": {
|
"HttpServiceConfiguration": {
|
||||||
"DisableSSLCheck": true,
|
"DisableSSLCheck": true,
|
||||||
@@ -56,6 +55,40 @@
|
|||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
"Default": "Information",
|
"Default": "Information",
|
||||||
"Microsoft.AspNetCore": "Warning"
|
"Microsoft.AspNetCore": "Warning"
|
||||||
|
},
|
||||||
|
"XLogger": {
|
||||||
|
"Enabled": true,
|
||||||
|
"ApplicationName": "xAiApi",
|
||||||
|
"EnvironmentName": "Production",
|
||||||
|
"MinimumLevel": "Information",
|
||||||
|
"Queue": {
|
||||||
|
"Enabled": true,
|
||||||
|
"Capacity": 10000,
|
||||||
|
"ShutdownTimeoutSeconds": 10
|
||||||
|
},
|
||||||
|
"File": {
|
||||||
|
"Enabled": true,
|
||||||
|
"Directory": "./Logs",
|
||||||
|
"FileName": "xAiApi-.log",
|
||||||
|
"Format": "Json",
|
||||||
|
"MinimumLevel": "Information",
|
||||||
|
"RetainedFileCountLimit": 30
|
||||||
|
},
|
||||||
|
"Database": {
|
||||||
|
"Enabled": false,
|
||||||
|
"Provider": "Microsoft.Data.Sqlite",
|
||||||
|
"ConnectionString": "Filename=./Db/XLogs.db",
|
||||||
|
"TableName": "XLogs",
|
||||||
|
"AutoCreateTable": true,
|
||||||
|
"MinimumLevel": "Warning"
|
||||||
|
},
|
||||||
|
"Event": {
|
||||||
|
"Enabled": false,
|
||||||
|
"Topic": "application-logs",
|
||||||
|
"Action": "ApplicationLogCreated",
|
||||||
|
"Sender": "xAiApi",
|
||||||
|
"MinimumLevel": "Error"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"AllowedHosts": "*"
|
"AllowedHosts": "*"
|
||||||
|
|||||||
+3
-12
@@ -1,5 +1,4 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<!-- Runtime Definition -->
|
<!-- Runtime Definition -->
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>1.0.0</Version>
|
<Version>1.0.0</Version>
|
||||||
@@ -8,28 +7,22 @@
|
|||||||
<Company>SaherElm IT Center</Company>
|
<Company>SaherElm IT Center</Company>
|
||||||
<PackageId>xSaherElm.xAiApi</PackageId>
|
<PackageId>xSaherElm.xAiApi</PackageId>
|
||||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
|
|
||||||
<Description>
|
<Description>
|
||||||
a WebAPI Project which contains all Business Logic of xSaherElm Project's AI.
|
a WebAPI Project which contains all Business Logic of xSaherElm Project's AI.
|
||||||
</Description>
|
</Description>
|
||||||
|
|
||||||
<!-- Icon Definition -->
|
<!-- Icon Definition -->
|
||||||
<PackageIcon>icon.png</PackageIcon>
|
<PackageIcon>icon.png</PackageIcon>
|
||||||
|
|
||||||
<!-- Fix Duplicate TargetFramework Issue -->
|
<!-- Fix Duplicate TargetFramework Issue -->
|
||||||
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
|
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- Icon Handling -->
|
<!-- Icon Handling -->
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="../../Resources/Images/favicon.png" Link="icon.png" Pack="true" PackagePath="\icon.png" />
|
<None Include="../../Resources/Images/favicon.png" Link="icon.png" Pack="true" PackagePath="\icon.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<!-- Local Modules -->
|
<!-- Local Modules -->
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<!-- Local Dependencies -->
|
<!-- Local Dependencies -->
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="../Modules/xCommons/xCommons.csproj" />
|
<ProjectReference Include="../Modules/xCommons/xCommons.csproj" />
|
||||||
@@ -42,7 +35,6 @@
|
|||||||
<ProjectReference Include="../Modules/xStorageService/xStorageService.csproj" />
|
<ProjectReference Include="../Modules/xStorageService/xStorageService.csproj" />
|
||||||
<ProjectReference Include="../Modules/xIdentityHelper/xIdentityHelper.csproj" />
|
<ProjectReference Include="../Modules/xIdentityHelper/xIdentityHelper.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<!-- Dependencies -->
|
<!-- Dependencies -->
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Tesseract" Version="5.2.0" />
|
<PackageReference Include="Tesseract" Version="5.2.0" />
|
||||||
@@ -66,14 +58,12 @@
|
|||||||
<PackageReference Include="IdentityModel.AspNetCore.OAuth2Introspection" Version="5.0.0" />
|
<PackageReference Include="IdentityModel.AspNetCore.OAuth2Introspection" Version="5.0.0" />
|
||||||
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="3.116.1" />
|
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="3.116.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<!-- For XML Documentation Support -->
|
<!-- For XML Documentation Support -->
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<NoWarn>$(NoWarn);1591</NoWarn>
|
<NoWarn>$(NoWarn);1591</NoWarn>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- Ef Core -->
|
<!-- Ef Core -->
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.5">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.5">
|
||||||
@@ -81,10 +71,11 @@
|
|||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<!-- Create Required Folders -->
|
<!-- Create Required Folders -->
|
||||||
<Target Name="CreateRequiredFolder" AfterTargets="AfterPublish">
|
<Target Name="CreateRequiredFolder" AfterTargets="AfterPublish">
|
||||||
<MakeDir Directories="$(PublishDir)wwwroot" Condition="!Exists('$(PublishDir)wwwroot')" />
|
<MakeDir Directories="$(PublishDir)wwwroot" Condition="!Exists('$(PublishDir)wwwroot')" />
|
||||||
</Target>
|
</Target>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Modules\xLoggingService\xLoggingService.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
Reference in New Issue
Block a user