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