Compare commits
3 Commits
a94102e136
...
40325c6df5
| Author | SHA1 | Date | |
|---|---|---|---|
|
40325c6df5
|
|||
|
bbcaa27ac5
|
|||
|
19d833a522
|
2
.github/workflows/docker-build.yml
vendored
2
.github/workflows/docker-build.yml
vendored
@@ -28,6 +28,8 @@ jobs:
|
|||||||
image: develop
|
image: develop
|
||||||
- service: Gateway
|
- service: Gateway
|
||||||
image: gateway
|
image: gateway
|
||||||
|
- service: Insight
|
||||||
|
image: insight
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
|
|||||||
@@ -21,11 +21,16 @@ var developService = builder.AddProject<Projects.DysonNetwork_Develop>("develop"
|
|||||||
.WithReference(passService)
|
.WithReference(passService)
|
||||||
.WithReference(ringService)
|
.WithReference(ringService)
|
||||||
.WithReference(sphereService);
|
.WithReference(sphereService);
|
||||||
|
var insightService = builder.AddProject<Projects.DysonNetwork_Insight>("insight")
|
||||||
|
.WithReference(passService)
|
||||||
|
.WithReference(ringService)
|
||||||
|
.WithReference(sphereService)
|
||||||
|
.WithReference(developService);
|
||||||
|
|
||||||
passService.WithReference(developService).WithReference(driveService);
|
passService.WithReference(developService).WithReference(driveService);
|
||||||
|
|
||||||
List<IResourceBuilder<ProjectResource>> services =
|
List<IResourceBuilder<ProjectResource>> services =
|
||||||
[ringService, passService, driveService, sphereService, developService];
|
[ringService, passService, driveService, sphereService, developService, insightService];
|
||||||
|
|
||||||
for (var idx = 0; idx < services.Count; idx++)
|
for (var idx = 0; idx < services.Count; idx++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,5 +21,6 @@
|
|||||||
<ProjectReference Include="..\DysonNetwork.Ring\DysonNetwork.Ring.csproj" />
|
<ProjectReference Include="..\DysonNetwork.Ring\DysonNetwork.Ring.csproj" />
|
||||||
<ProjectReference Include="..\DysonNetwork.Sphere\DysonNetwork.Sphere.csproj" />
|
<ProjectReference Include="..\DysonNetwork.Sphere\DysonNetwork.Sphere.csproj" />
|
||||||
<ProjectReference Include="..\DysonNetwork.Gateway\DysonNetwork.Gateway.csproj" />
|
<ProjectReference Include="..\DysonNetwork.Gateway\DysonNetwork.Gateway.csproj" />
|
||||||
|
<ProjectReference Include="..\DysonNetwork.Insight\DysonNetwork.Insight.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -17,7 +17,6 @@
|
|||||||
<PackageReference Include="NodaTime.Serialization.Protobuf" Version="2.0.2" />
|
<PackageReference Include="NodaTime.Serialization.Protobuf" Version="2.0.2" />
|
||||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4"/>
|
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4"/>
|
||||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime" Version="9.0.4" />
|
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime" Version="9.0.4" />
|
||||||
<PackageReference Include="prometheus-net.AspNetCore" Version="8.2.1"/>
|
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="9.0.6" />
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="9.0.6" />
|
||||||
<PackageReference Include="NodaTime" Version="3.2.2"/>
|
<PackageReference Include="NodaTime" Version="3.2.2"/>
|
||||||
<PackageReference Include="NodaTime.Serialization.SystemTextJson" Version="1.3.0"/>
|
<PackageReference Include="NodaTime.Serialization.SystemTextJson" Version="1.3.0"/>
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
using DysonNetwork.Develop.Identity;
|
using DysonNetwork.Develop.Identity;
|
||||||
using DysonNetwork.Shared.Auth;
|
using DysonNetwork.Shared.Auth;
|
||||||
using DysonNetwork.Shared.Http;
|
using DysonNetwork.Shared.Http;
|
||||||
using Prometheus;
|
|
||||||
|
|
||||||
namespace DysonNetwork.Develop.Startup;
|
namespace DysonNetwork.Develop.Startup;
|
||||||
|
|
||||||
@@ -9,7 +8,6 @@ public static class ApplicationConfiguration
|
|||||||
{
|
{
|
||||||
public static WebApplication ConfigureAppMiddleware(this WebApplication app, IConfiguration configuration)
|
public static WebApplication ConfigureAppMiddleware(this WebApplication app, IConfiguration configuration)
|
||||||
{
|
{
|
||||||
app.MapMetrics();
|
|
||||||
app.MapOpenApi();
|
app.MapOpenApi();
|
||||||
|
|
||||||
app.UseRequestLocalization();
|
app.UseRequestLocalization();
|
||||||
|
|||||||
@@ -18,9 +18,5 @@
|
|||||||
},
|
},
|
||||||
"Etcd": {
|
"Etcd": {
|
||||||
"Insecure": true
|
"Insecure": true
|
||||||
},
|
|
||||||
"Service": {
|
|
||||||
"Name": "DysonNetwork.Develop",
|
|
||||||
"Url": "https://localhost:7192"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,11 +43,6 @@
|
|||||||
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.13.0" />
|
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.13.0" />
|
||||||
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.12.0" />
|
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.12.0" />
|
||||||
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.12.0" />
|
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.12.0" />
|
||||||
<PackageReference Include="prometheus-net.AspNetCore" Version="8.2.1" />
|
|
||||||
<PackageReference Include="prometheus-net.AspNetCore.HealthChecks" Version="8.2.1" />
|
|
||||||
<PackageReference Include="prometheus-net.DotNetRuntime" Version="4.4.1" />
|
|
||||||
<PackageReference Include="prometheus-net.EntityFramework" Version="0.9.5" />
|
|
||||||
<PackageReference Include="prometheus-net.SystemMetrics" Version="3.1.0" />
|
|
||||||
<PackageReference Include="Quartz" Version="3.14.0" />
|
<PackageReference Include="Quartz" Version="3.14.0" />
|
||||||
<PackageReference Include="Quartz.AspNetCore" Version="3.14.0" />
|
<PackageReference Include="Quartz.AspNetCore" Version="3.14.0" />
|
||||||
<PackageReference Include="Quartz.Extensions.Hosting" Version="3.14.0" />
|
<PackageReference Include="Quartz.Extensions.Hosting" Version="3.14.0" />
|
||||||
|
|||||||
@@ -117,9 +117,5 @@
|
|||||||
"KnownProxies": [
|
"KnownProxies": [
|
||||||
"127.0.0.1",
|
"127.0.0.1",
|
||||||
"::1"
|
"::1"
|
||||||
],
|
]
|
||||||
"Service": {
|
|
||||||
"Name": "DysonNetwork.Drive",
|
|
||||||
"Url": "https://localhost:7092"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ builder.Services.AddRateLimiter(options =>
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
var serviceNames = new[] { "ring", "pass", "drive", "sphere", "develop" };
|
var serviceNames = new[] { "ring", "pass", "drive", "sphere", "develop", "insight" };
|
||||||
|
|
||||||
var specialRoutes = new[]
|
var specialRoutes = new[]
|
||||||
{
|
{
|
||||||
|
|||||||
42
DysonNetwork.Insight/AppDatabase.cs
Normal file
42
DysonNetwork.Insight/AppDatabase.cs
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Design;
|
||||||
|
|
||||||
|
namespace DysonNetwork.Insight;
|
||||||
|
|
||||||
|
public class AppDatabase(
|
||||||
|
DbContextOptions<AppDatabase> options,
|
||||||
|
IConfiguration configuration
|
||||||
|
) : DbContext(options)
|
||||||
|
{
|
||||||
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||||
|
{
|
||||||
|
optionsBuilder.UseNpgsql(
|
||||||
|
configuration.GetConnectionString("App"),
|
||||||
|
opt => opt
|
||||||
|
.ConfigureDataSource(optSource => optSource.EnableDynamicJson())
|
||||||
|
.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery)
|
||||||
|
.UseNodaTime()
|
||||||
|
).UseSnakeCaseNamingConvention();
|
||||||
|
|
||||||
|
base.OnConfiguring(optionsBuilder);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
base.OnModelCreating(modelBuilder);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class AppDatabaseFactory : IDesignTimeDbContextFactory<AppDatabase>
|
||||||
|
{
|
||||||
|
public AppDatabase CreateDbContext(string[] args)
|
||||||
|
{
|
||||||
|
var configuration = new ConfigurationBuilder()
|
||||||
|
.SetBasePath(Directory.GetCurrentDirectory())
|
||||||
|
.AddJsonFile("appsettings.json")
|
||||||
|
.Build();
|
||||||
|
|
||||||
|
var optionsBuilder = new DbContextOptionsBuilder<AppDatabase>();
|
||||||
|
return new AppDatabase(optionsBuilder.Options, configuration);
|
||||||
|
}
|
||||||
|
}
|
||||||
27
DysonNetwork.Insight/Dockerfile
Normal file
27
DysonNetwork.Insight/Dockerfile
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||||
|
|
||||||
|
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
|
||||||
|
USER app
|
||||||
|
WORKDIR /app
|
||||||
|
EXPOSE 8080
|
||||||
|
EXPOSE 8081
|
||||||
|
|
||||||
|
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
|
||||||
|
ARG BUILD_CONFIGURATION=Release
|
||||||
|
WORKDIR /src
|
||||||
|
COPY ["DysonNetwork.Insight/DysonNetwork.Insight.csproj", "DysonNetwork.Insight/"]
|
||||||
|
COPY ["DysonNetwork.Shared/DysonNetwork.Shared.csproj", "DysonNetwork.Shared/"]
|
||||||
|
COPY ["DysonNetwork.Develop/DysonNetwork.Develop.csproj", "DysonNetwork.Develop/"]
|
||||||
|
RUN dotnet restore "DysonNetwork.Insight/DysonNetwork.Insight.csproj"
|
||||||
|
COPY . .
|
||||||
|
WORKDIR "/src/DysonNetwork.Insight"
|
||||||
|
RUN dotnet build "DysonNetwork.Insight.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
||||||
|
|
||||||
|
FROM build AS publish
|
||||||
|
ARG BUILD_CONFIGURATION=Release
|
||||||
|
RUN dotnet publish "DysonNetwork.Insight.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
||||||
|
|
||||||
|
FROM base AS final
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=publish /app/publish .
|
||||||
|
ENTRYPOINT ["dotnet", "DysonNetwork.Insight.dll"]
|
||||||
26
DysonNetwork.Insight/DysonNetwork.Insight.csproj
Normal file
26
DysonNetwork.Insight/DysonNetwork.Insight.csproj
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="EFCore.NamingConventions" Version="9.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.10" />
|
||||||
|
<PackageReference Include="Microsoft.SemanticKernel" Version="1.66.0" />
|
||||||
|
<PackageReference Include="Microsoft.SemanticKernel.Connectors.Ollama" Version="1.66.0-alpha" />
|
||||||
|
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
|
||||||
|
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime" Version="9.0.4" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\DysonNetwork.Shared\DysonNetwork.Shared.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="Controllers\" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
38
DysonNetwork.Insight/Program.cs
Normal file
38
DysonNetwork.Insight/Program.cs
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
using DysonNetwork.Insight;
|
||||||
|
using DysonNetwork.Insight.Startup;
|
||||||
|
using DysonNetwork.Shared.Http;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
|
builder.AddServiceDefaults();
|
||||||
|
|
||||||
|
builder.ConfigureAppKestrel(builder.Configuration);
|
||||||
|
|
||||||
|
builder.Services.AddControllers();
|
||||||
|
builder.Services.AddAppServices(builder.Configuration);
|
||||||
|
builder.Services.AddAppAuthentication();
|
||||||
|
builder.Services.AddAppFlushHandlers();
|
||||||
|
builder.Services.AddAppBusinessServices();
|
||||||
|
builder.Services.AddThinkingServices(builder.Configuration);
|
||||||
|
|
||||||
|
builder.AddSwaggerManifest(
|
||||||
|
"DysonNetwork.Insight",
|
||||||
|
"The insight service in the Solar Network."
|
||||||
|
);
|
||||||
|
|
||||||
|
var app = builder.Build();
|
||||||
|
|
||||||
|
app.MapDefaultEndpoints();
|
||||||
|
|
||||||
|
using (var scope = app.Services.CreateScope())
|
||||||
|
{
|
||||||
|
var db = scope.ServiceProvider.GetRequiredService<AppDatabase>();
|
||||||
|
await db.Database.MigrateAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
app.ConfigureAppMiddleware(builder.Configuration);
|
||||||
|
|
||||||
|
app.UseSwaggerManifest("DysonNetwork.Insight");
|
||||||
|
|
||||||
|
app.Run();
|
||||||
21
DysonNetwork.Insight/Properties/launchSettings.json
Normal file
21
DysonNetwork.Insight/Properties/launchSettings.json
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||||
|
"profiles": {
|
||||||
|
"http": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"dotnetRunMessages": true,
|
||||||
|
"launchBrowser": false,
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"https": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"dotnetRunMessages": true,
|
||||||
|
"launchBrowser": false,
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
22
DysonNetwork.Insight/Startup/ApplicationConfiguration.cs
Normal file
22
DysonNetwork.Insight/Startup/ApplicationConfiguration.cs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
using DysonNetwork.Shared.Http;
|
||||||
|
|
||||||
|
namespace DysonNetwork.Insight.Startup;
|
||||||
|
|
||||||
|
public static class ApplicationConfiguration
|
||||||
|
{
|
||||||
|
public static WebApplication ConfigureAppMiddleware(this WebApplication app, IConfiguration configuration)
|
||||||
|
{
|
||||||
|
app.MapOpenApi();
|
||||||
|
|
||||||
|
app.UseRequestLocalization();
|
||||||
|
|
||||||
|
app.ConfigureForwardedHeaders(configuration);
|
||||||
|
|
||||||
|
app.UseAuthentication();
|
||||||
|
app.UseAuthorization();
|
||||||
|
|
||||||
|
app.MapControllers();
|
||||||
|
|
||||||
|
return app;
|
||||||
|
}
|
||||||
|
}
|
||||||
73
DysonNetwork.Insight/Startup/ServiceCollectionExtensions.cs
Normal file
73
DysonNetwork.Insight/Startup/ServiceCollectionExtensions.cs
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
using System.Text.Json;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
using DysonNetwork.Insight.Thinking;
|
||||||
|
using DysonNetwork.Shared.Cache;
|
||||||
|
using Microsoft.SemanticKernel;
|
||||||
|
using NodaTime;
|
||||||
|
using NodaTime.Serialization.SystemTextJson;
|
||||||
|
|
||||||
|
namespace DysonNetwork.Insight.Startup;
|
||||||
|
|
||||||
|
public static class ServiceCollectionExtensions
|
||||||
|
{
|
||||||
|
public static IServiceCollection AddAppServices(this IServiceCollection services, IConfiguration configuration)
|
||||||
|
{
|
||||||
|
services.AddDbContext<AppDatabase>();
|
||||||
|
services.AddSingleton<IClock>(SystemClock.Instance);
|
||||||
|
services.AddHttpContextAccessor();
|
||||||
|
services.AddSingleton<ICacheService, CacheServiceRedis>();
|
||||||
|
|
||||||
|
services.AddHttpClient();
|
||||||
|
|
||||||
|
// Register gRPC services
|
||||||
|
services.AddGrpc(options =>
|
||||||
|
{
|
||||||
|
options.EnableDetailedErrors = true; // Will be adjusted in Program.cs
|
||||||
|
options.MaxReceiveMessageSize = 16 * 1024 * 1024; // 16MB
|
||||||
|
options.MaxSendMessageSize = 16 * 1024 * 1024; // 16MB
|
||||||
|
});
|
||||||
|
|
||||||
|
// Register gRPC reflection for service discovery
|
||||||
|
services.AddGrpc();
|
||||||
|
|
||||||
|
// Register gRPC services
|
||||||
|
|
||||||
|
// Register OIDC services
|
||||||
|
services.AddControllers().AddJsonOptions(options =>
|
||||||
|
{
|
||||||
|
options.JsonSerializerOptions.NumberHandling = JsonNumberHandling.AllowNamedFloatingPointLiterals;
|
||||||
|
options.JsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower;
|
||||||
|
options.JsonSerializerOptions.DictionaryKeyPolicy = JsonNamingPolicy.SnakeCaseLower;
|
||||||
|
|
||||||
|
options.JsonSerializerOptions.ConfigureForNodaTime(DateTimeZoneProviders.Tzdb);
|
||||||
|
});
|
||||||
|
|
||||||
|
return services;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IServiceCollection AddAppAuthentication(this IServiceCollection services)
|
||||||
|
{
|
||||||
|
services.AddAuthorization();
|
||||||
|
return services;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IServiceCollection AddAppFlushHandlers(this IServiceCollection services)
|
||||||
|
{
|
||||||
|
services.AddSingleton<FlushBufferService>();
|
||||||
|
|
||||||
|
return services;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IServiceCollection AddAppBusinessServices(this IServiceCollection services)
|
||||||
|
{
|
||||||
|
return services;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IServiceCollection AddThinkingServices(this IServiceCollection services, IConfiguration configuration)
|
||||||
|
{
|
||||||
|
var thinkingProvider = new ThinkingProvider(configuration);
|
||||||
|
services.AddSingleton(thinkingProvider);
|
||||||
|
|
||||||
|
return services;
|
||||||
|
}
|
||||||
|
}
|
||||||
68
DysonNetwork.Insight/Thinking/ThinkingController.cs
Normal file
68
DysonNetwork.Insight/Thinking/ThinkingController.cs
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.SemanticKernel.ChatCompletion;
|
||||||
|
using System.Text;
|
||||||
|
using Microsoft.SemanticKernel;
|
||||||
|
using Microsoft.SemanticKernel.Connectors.Ollama;
|
||||||
|
|
||||||
|
namespace DysonNetwork.Insight.Thinking;
|
||||||
|
|
||||||
|
[ApiController]
|
||||||
|
[Route("/api/thinking")]
|
||||||
|
public class ThinkingController(ThinkingProvider provider) : ControllerBase
|
||||||
|
{
|
||||||
|
public class StreamThinkingRequest
|
||||||
|
{
|
||||||
|
[Required] public string UserMessage { get; set; } = null!;
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost("stream")]
|
||||||
|
public async Task ChatStream([FromBody] StreamThinkingRequest request)
|
||||||
|
{
|
||||||
|
// Set response for streaming
|
||||||
|
Response.Headers.Append("Content-Type", "text/event-stream");
|
||||||
|
Response.StatusCode = 200;
|
||||||
|
|
||||||
|
var kernel = provider.Kernel;
|
||||||
|
|
||||||
|
var chatCompletionService = kernel.GetRequiredService<IChatCompletionService>();
|
||||||
|
|
||||||
|
var chatHistory = new ChatHistory(
|
||||||
|
"You're a helpful assistant on the Solar Network, a social network.\n" +
|
||||||
|
"Your name is Sn-chan, a cute sweet heart with passion for almost everything.\n" +
|
||||||
|
"\n" +
|
||||||
|
"Your aim is to helping solving questions for the users on the Solar Network.\n" +
|
||||||
|
"And the Solar Network is the social network platform you live on.\n" +
|
||||||
|
"When the user ask questions about the Solar Network (also known as SN and Solian), try use the tools you have to get latest and accurate data."
|
||||||
|
);
|
||||||
|
chatHistory.AddUserMessage(request.UserMessage);
|
||||||
|
|
||||||
|
// Kick off streaming generation
|
||||||
|
var accumulatedContent = new StringBuilder();
|
||||||
|
await foreach (var chunk in chatCompletionService.GetStreamingChatMessageContentsAsync(
|
||||||
|
chatHistory,
|
||||||
|
new OllamaPromptExecutionSettings
|
||||||
|
{
|
||||||
|
FunctionChoiceBehavior = FunctionChoiceBehavior.Auto(
|
||||||
|
options: new FunctionChoiceBehaviorOptions()
|
||||||
|
{
|
||||||
|
AllowParallelCalls = true,
|
||||||
|
AllowConcurrentInvocation = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
kernel: kernel
|
||||||
|
))
|
||||||
|
{
|
||||||
|
// Write each chunk to the HTTP response as SSE
|
||||||
|
var data = chunk.Content ?? "";
|
||||||
|
accumulatedContent.Append(data);
|
||||||
|
if (string.IsNullOrEmpty(data)) continue;
|
||||||
|
|
||||||
|
var bytes = Encoding.UTF8.GetBytes(data);
|
||||||
|
await Response.Body.WriteAsync(bytes);
|
||||||
|
await Response.Body.FlushAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Optionally: after finishing streaming, you can save the assistant message to history.
|
||||||
|
}
|
||||||
|
}
|
||||||
48
DysonNetwork.Insight/Thinking/ThinkingProvider.cs
Normal file
48
DysonNetwork.Insight/Thinking/ThinkingProvider.cs
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
using Microsoft.SemanticKernel;
|
||||||
|
|
||||||
|
namespace DysonNetwork.Insight.Thinking;
|
||||||
|
|
||||||
|
public class ThinkingProvider
|
||||||
|
{
|
||||||
|
public readonly Kernel Kernel;
|
||||||
|
public readonly string? ModelProviderType;
|
||||||
|
public readonly string? ModelDefault;
|
||||||
|
|
||||||
|
public ThinkingProvider(IConfiguration configuration)
|
||||||
|
{
|
||||||
|
var cfg = configuration.GetSection("Thinking");
|
||||||
|
ModelProviderType = cfg.GetValue<string>("Provider")?.ToLower();
|
||||||
|
ModelDefault = cfg.GetValue<string>("Model");
|
||||||
|
var endpoint = cfg.GetValue<string>("Endpoint");
|
||||||
|
|
||||||
|
var builder = Kernel.CreateBuilder();
|
||||||
|
|
||||||
|
switch (ModelProviderType)
|
||||||
|
{
|
||||||
|
case "ollama":
|
||||||
|
builder.AddOllamaChatCompletion(ModelDefault!, new Uri(endpoint ?? "http://localhost:11434/api"));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new IndexOutOfRangeException("Unknown thinking provider: " + ModelProviderType);
|
||||||
|
}
|
||||||
|
|
||||||
|
Kernel = builder.Build();
|
||||||
|
|
||||||
|
// Add Solar Network tools plugin
|
||||||
|
Kernel.ImportPluginFromFunctions("helper_functions", [
|
||||||
|
KernelFunctionFactory.CreateFromMethod(async (string userId) =>
|
||||||
|
{
|
||||||
|
// MOCK: simulate fetching user profile
|
||||||
|
await Task.Delay(100);
|
||||||
|
return $"{{\"userId\":\"{userId}\",\"name\":\"MockUser\",\"bio\":\"Loves music and tech.\"}}";
|
||||||
|
}, "get_user_profile", "Get a user profile from the Solar Network."),
|
||||||
|
KernelFunctionFactory.CreateFromMethod(async (string topic) =>
|
||||||
|
{
|
||||||
|
// MOCK: simulate fetching recent posts
|
||||||
|
await Task.Delay(200);
|
||||||
|
return
|
||||||
|
$"[{{\"postId\":\"p1\",\"topic\":\"{topic}\",\"content\":\"Mock post content 1.\"}}, {{\"postId\":\"p2\",\"topic\":\"{topic}\",\"content\":\"Mock post content 2.\"}}]";
|
||||||
|
}, "get_recent_posts", "Get recent posts from the Solar Network.")
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
27
DysonNetwork.Insight/appsettings.json
Normal file
27
DysonNetwork.Insight/appsettings.json
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"Debug": true,
|
||||||
|
"BaseUrl": "http://localhost:5071",
|
||||||
|
"SiteUrl": "https://solian.app",
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Microsoft.AspNetCore": "Warning"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"AllowedHosts": "*",
|
||||||
|
"ConnectionStrings": {
|
||||||
|
"App": "Host=localhost;Port=5432;Database=dyson_insight;Username=postgres;Password=postgres;Include Error Detail=True;Maximum Pool Size=20;Connection Idle Lifetime=60"
|
||||||
|
},
|
||||||
|
"KnownProxies": [
|
||||||
|
"127.0.0.1",
|
||||||
|
"::1"
|
||||||
|
],
|
||||||
|
"Etcd": {
|
||||||
|
"Insecure": true
|
||||||
|
},
|
||||||
|
"Thinking": {
|
||||||
|
"Provider": "ollama",
|
||||||
|
"Model": "qwen3:8b",
|
||||||
|
"Endpoint": "http://localhost:11434/api"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -32,11 +32,6 @@
|
|||||||
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.12.0"/>
|
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.12.0"/>
|
||||||
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.12.0"/>
|
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.12.0"/>
|
||||||
<PackageReference Include="Otp.NET" Version="1.4.0"/>
|
<PackageReference Include="Otp.NET" Version="1.4.0"/>
|
||||||
<PackageReference Include="prometheus-net.AspNetCore" Version="8.2.1"/>
|
|
||||||
<PackageReference Include="prometheus-net.AspNetCore.HealthChecks" Version="8.2.1"/>
|
|
||||||
<PackageReference Include="prometheus-net.DotNetRuntime" Version="4.4.1"/>
|
|
||||||
<PackageReference Include="prometheus-net.EntityFramework" Version="0.9.5"/>
|
|
||||||
<PackageReference Include="prometheus-net.SystemMetrics" Version="3.1.0"/>
|
|
||||||
<PackageReference Include="Quartz" Version="3.14.0"/>
|
<PackageReference Include="Quartz" Version="3.14.0"/>
|
||||||
<PackageReference Include="Quartz.AspNetCore" Version="3.14.0"/>
|
<PackageReference Include="Quartz.AspNetCore" Version="3.14.0"/>
|
||||||
<PackageReference Include="Quartz.Extensions.Hosting" Version="3.14.0"/>
|
<PackageReference Include="Quartz.Extensions.Hosting" Version="3.14.0"/>
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ public class LotteryService(
|
|||||||
WalletService walletService,
|
WalletService walletService,
|
||||||
ILogger<LotteryService> logger)
|
ILogger<LotteryService> logger)
|
||||||
{
|
{
|
||||||
private readonly ILogger<LotteryService> _logger = logger;
|
|
||||||
|
|
||||||
private static bool ValidateNumbers(List<int> region1, int region2)
|
private static bool ValidateNumbers(List<int> region1, int region2)
|
||||||
{
|
{
|
||||||
if (region1.Count != 5 || region1.Distinct().Count() != 5)
|
if (region1.Count != 5 || region1.Distinct().Count() != 5)
|
||||||
@@ -180,7 +178,7 @@ public class LotteryService(
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_logger.LogInformation("Starting drawing lotteries...");
|
logger.LogInformation("Starting drawing lotteries...");
|
||||||
|
|
||||||
var now = SystemClock.Instance.GetCurrentInstant();
|
var now = SystemClock.Instance.GetCurrentInstant();
|
||||||
|
|
||||||
@@ -191,17 +189,17 @@ public class LotteryService(
|
|||||||
|
|
||||||
if (tickets.Count == 0)
|
if (tickets.Count == 0)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("No pending lottery tickets");
|
logger.LogInformation("No pending lottery tickets");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.LogInformation("Found {Count} pending lottery tickets for draw", tickets.Count);
|
logger.LogInformation("Found {Count} pending lottery tickets for draw", tickets.Count);
|
||||||
|
|
||||||
// Generate winning numbers
|
// Generate winning numbers
|
||||||
var winningRegion1 = GenerateUniqueRandomNumbers(5, 0, 99);
|
var winningRegion1 = GenerateUniqueRandomNumbers(5, 0, 99);
|
||||||
var winningRegion2 = GenerateUniqueRandomNumbers(1, 0, 99)[0];
|
var winningRegion2 = GenerateUniqueRandomNumbers(1, 0, 99)[0];
|
||||||
|
|
||||||
_logger.LogInformation("Winning numbers generated: Region1 [{Region1}], Region2 [{Region2}]",
|
logger.LogInformation("Winning numbers generated: Region1 [{Region1}], Region2 [{Region2}]",
|
||||||
string.Join(",", winningRegion1), winningRegion2);
|
string.Join(",", winningRegion1), winningRegion2);
|
||||||
|
|
||||||
var drawDate = Instant.FromDateTimeUtc(new DateTime(DateTime.UtcNow.Year, DateTime.UtcNow.Month,
|
var drawDate = Instant.FromDateTimeUtc(new DateTime(DateTime.UtcNow.Year, DateTime.UtcNow.Month,
|
||||||
@@ -233,7 +231,7 @@ public class LotteryService(
|
|||||||
amount: reward,
|
amount: reward,
|
||||||
remarks: $"Lottery prize: {region1Matches} matches{(region2Match ? " + special" : "")}"
|
remarks: $"Lottery prize: {region1Matches} matches{(region2Match ? " + special" : "")}"
|
||||||
);
|
);
|
||||||
_logger.LogInformation(
|
logger.LogInformation(
|
||||||
"Awarded {Amount} to account {AccountId} for {Matches} matches{(Special ? \" + special\" : \"\")}",
|
"Awarded {Amount} to account {AccountId} for {Matches} matches{(Special ? \" + special\" : \"\")}",
|
||||||
reward, ticket.AccountId, region1Matches, region2Match ? " + special" : "");
|
reward, ticket.AccountId, region1Matches, region2Match ? " + special" : "");
|
||||||
totalPrizesAwarded++;
|
totalPrizesAwarded++;
|
||||||
@@ -241,7 +239,7 @@ public class LotteryService(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_logger.LogWarning("Wallet not found for account {AccountId}, skipping prize award",
|
logger.LogWarning("Wallet not found for account {AccountId}, skipping prize award",
|
||||||
ticket.AccountId);
|
ticket.AccountId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -264,12 +262,12 @@ public class LotteryService(
|
|||||||
db.LotteryRecords.Add(lotteryRecord);
|
db.LotteryRecords.Add(lotteryRecord);
|
||||||
await db.SaveChangesAsync();
|
await db.SaveChangesAsync();
|
||||||
|
|
||||||
_logger.LogInformation("Daily lottery draw completed: {Prizes} prizes awarded, total amount {Amount}",
|
logger.LogInformation("Daily lottery draw completed: {Prizes} prizes awarded, total amount {Amount}",
|
||||||
totalPrizesAwarded, totalPrizeAmount);
|
totalPrizesAwarded, totalPrizeAmount);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_logger.LogError(ex, "An error occurred during the daily lottery draw");
|
logger.LogError(ex, "An error occurred during the daily lottery draw");
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ using DysonNetwork.Pass.Permission;
|
|||||||
using DysonNetwork.Pass.Realm;
|
using DysonNetwork.Pass.Realm;
|
||||||
using DysonNetwork.Pass.Wallet;
|
using DysonNetwork.Pass.Wallet;
|
||||||
using DysonNetwork.Shared.Http;
|
using DysonNetwork.Shared.Http;
|
||||||
using Prometheus;
|
|
||||||
|
|
||||||
namespace DysonNetwork.Pass.Startup;
|
namespace DysonNetwork.Pass.Startup;
|
||||||
|
|
||||||
@@ -14,7 +13,6 @@ public static class ApplicationConfiguration
|
|||||||
{
|
{
|
||||||
public static WebApplication ConfigureAppMiddleware(this WebApplication app, IConfiguration configuration)
|
public static WebApplication ConfigureAppMiddleware(this WebApplication app, IConfiguration configuration)
|
||||||
{
|
{
|
||||||
app.MapMetrics();
|
|
||||||
app.MapOpenApi();
|
app.MapOpenApi();
|
||||||
|
|
||||||
app.UseRequestLocalization();
|
app.UseRequestLocalization();
|
||||||
|
|||||||
@@ -71,12 +71,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"KnownProxies": ["127.0.0.1", "::1"],
|
"KnownProxies": ["127.0.0.1", "::1"]
|
||||||
"Service": {
|
|
||||||
"Name": "DysonNetwork.Pass",
|
|
||||||
"Url": "https://localhost:7058"
|
|
||||||
},
|
|
||||||
"Etcd": {
|
|
||||||
"Insecure": true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,11 +47,6 @@
|
|||||||
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.13.0" />
|
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.13.0" />
|
||||||
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.12.0"/>
|
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.12.0"/>
|
||||||
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.12.0"/>
|
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.12.0"/>
|
||||||
<PackageReference Include="prometheus-net.AspNetCore" Version="8.2.1"/>
|
|
||||||
<PackageReference Include="prometheus-net.AspNetCore.HealthChecks" Version="8.2.1"/>
|
|
||||||
<PackageReference Include="prometheus-net.DotNetRuntime" Version="4.4.1"/>
|
|
||||||
<PackageReference Include="prometheus-net.EntityFramework" Version="0.9.5"/>
|
|
||||||
<PackageReference Include="prometheus-net.SystemMetrics" Version="3.1.0"/>
|
|
||||||
<PackageReference Include="Quartz" Version="3.14.0"/>
|
<PackageReference Include="Quartz" Version="3.14.0"/>
|
||||||
<PackageReference Include="Quartz.AspNetCore" Version="3.14.0"/>
|
<PackageReference Include="Quartz.AspNetCore" Version="3.14.0"/>
|
||||||
<PackageReference Include="Quartz.Extensions.Hosting" Version="3.14.0"/>
|
<PackageReference Include="Quartz.Extensions.Hosting" Version="3.14.0"/>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
#
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DysonNetwork.Sphere", "DysonNetwork.Sphere\DysonNetwork.Sphere.csproj", "{CFF62EFA-F4C2-4FC7-8D97-25570B4DB452}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DysonNetwork.Sphere", "DysonNetwork.Sphere\DysonNetwork.Sphere.csproj", "{CFF62EFA-F4C2-4FC7-8D97-25570B4DB452}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A444D180-5B51-49C3-A35D-AA55832BBC66}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A444D180-5B51-49C3-A35D-AA55832BBC66}"
|
||||||
@@ -22,43 +21,128 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DysonNetwork.Control", "Dys
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DysonNetwork.Gateway", "DysonNetwork.Gateway\DysonNetwork.Gateway.csproj", "{AA4D244C-6C3A-4CD0-9DA4-5CAFFBB55085}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DysonNetwork.Gateway", "DysonNetwork.Gateway\DysonNetwork.Gateway.csproj", "{AA4D244C-6C3A-4CD0-9DA4-5CAFFBB55085}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DysonNetwork.Insight", "DysonNetwork.Insight\DysonNetwork.Insight.csproj", "{E603CDF2-8BA0-49AE-A1F9-BD2DA5CB983D}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
Release|Any CPU = Release|Any CPU
|
Release|Any CPU = Release|Any CPU
|
||||||
|
Release|x64 = Release|x64
|
||||||
|
Release|x86 = Release|x86
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{CFF62EFA-F4C2-4FC7-8D97-25570B4DB452}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{CFF62EFA-F4C2-4FC7-8D97-25570B4DB452}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{CFF62EFA-F4C2-4FC7-8D97-25570B4DB452}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{CFF62EFA-F4C2-4FC7-8D97-25570B4DB452}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{CFF62EFA-F4C2-4FC7-8D97-25570B4DB452}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{CFF62EFA-F4C2-4FC7-8D97-25570B4DB452}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{CFF62EFA-F4C2-4FC7-8D97-25570B4DB452}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{CFF62EFA-F4C2-4FC7-8D97-25570B4DB452}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
{CFF62EFA-F4C2-4FC7-8D97-25570B4DB452}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{CFF62EFA-F4C2-4FC7-8D97-25570B4DB452}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{CFF62EFA-F4C2-4FC7-8D97-25570B4DB452}.Release|Any CPU.Build.0 = Release|Any CPU
|
{CFF62EFA-F4C2-4FC7-8D97-25570B4DB452}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{CFF62EFA-F4C2-4FC7-8D97-25570B4DB452}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{CFF62EFA-F4C2-4FC7-8D97-25570B4DB452}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{CFF62EFA-F4C2-4FC7-8D97-25570B4DB452}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{CFF62EFA-F4C2-4FC7-8D97-25570B4DB452}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{A8F37E9E-52A4-4159-8227-F2F65CBA0606}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{A8F37E9E-52A4-4159-8227-F2F65CBA0606}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{A8F37E9E-52A4-4159-8227-F2F65CBA0606}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{A8F37E9E-52A4-4159-8227-F2F65CBA0606}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{A8F37E9E-52A4-4159-8227-F2F65CBA0606}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{A8F37E9E-52A4-4159-8227-F2F65CBA0606}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{A8F37E9E-52A4-4159-8227-F2F65CBA0606}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{A8F37E9E-52A4-4159-8227-F2F65CBA0606}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
{A8F37E9E-52A4-4159-8227-F2F65CBA0606}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{A8F37E9E-52A4-4159-8227-F2F65CBA0606}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{A8F37E9E-52A4-4159-8227-F2F65CBA0606}.Release|Any CPU.Build.0 = Release|Any CPU
|
{A8F37E9E-52A4-4159-8227-F2F65CBA0606}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{A8F37E9E-52A4-4159-8227-F2F65CBA0606}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{A8F37E9E-52A4-4159-8227-F2F65CBA0606}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{A8F37E9E-52A4-4159-8227-F2F65CBA0606}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{A8F37E9E-52A4-4159-8227-F2F65CBA0606}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{DB46D1A6-79B4-43FC-A9A9-115CDA26947A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{DB46D1A6-79B4-43FC-A9A9-115CDA26947A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{DB46D1A6-79B4-43FC-A9A9-115CDA26947A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{DB46D1A6-79B4-43FC-A9A9-115CDA26947A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{DB46D1A6-79B4-43FC-A9A9-115CDA26947A}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{DB46D1A6-79B4-43FC-A9A9-115CDA26947A}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{DB46D1A6-79B4-43FC-A9A9-115CDA26947A}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{DB46D1A6-79B4-43FC-A9A9-115CDA26947A}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
{DB46D1A6-79B4-43FC-A9A9-115CDA26947A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{DB46D1A6-79B4-43FC-A9A9-115CDA26947A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{DB46D1A6-79B4-43FC-A9A9-115CDA26947A}.Release|Any CPU.Build.0 = Release|Any CPU
|
{DB46D1A6-79B4-43FC-A9A9-115CDA26947A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{DB46D1A6-79B4-43FC-A9A9-115CDA26947A}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{DB46D1A6-79B4-43FC-A9A9-115CDA26947A}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{DB46D1A6-79B4-43FC-A9A9-115CDA26947A}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{DB46D1A6-79B4-43FC-A9A9-115CDA26947A}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{D5DAFB0D-487E-48EF-BA2F-C581C846F63B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{D5DAFB0D-487E-48EF-BA2F-C581C846F63B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{D5DAFB0D-487E-48EF-BA2F-C581C846F63B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{D5DAFB0D-487E-48EF-BA2F-C581C846F63B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{D5DAFB0D-487E-48EF-BA2F-C581C846F63B}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{D5DAFB0D-487E-48EF-BA2F-C581C846F63B}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{D5DAFB0D-487E-48EF-BA2F-C581C846F63B}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{D5DAFB0D-487E-48EF-BA2F-C581C846F63B}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
{D5DAFB0D-487E-48EF-BA2F-C581C846F63B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{D5DAFB0D-487E-48EF-BA2F-C581C846F63B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{D5DAFB0D-487E-48EF-BA2F-C581C846F63B}.Release|Any CPU.Build.0 = Release|Any CPU
|
{D5DAFB0D-487E-48EF-BA2F-C581C846F63B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{D5DAFB0D-487E-48EF-BA2F-C581C846F63B}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{D5DAFB0D-487E-48EF-BA2F-C581C846F63B}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{D5DAFB0D-487E-48EF-BA2F-C581C846F63B}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{D5DAFB0D-487E-48EF-BA2F-C581C846F63B}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{8DE0B783-8852-494D-B90A-201ABBB71202}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{8DE0B783-8852-494D-B90A-201ABBB71202}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{8DE0B783-8852-494D-B90A-201ABBB71202}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{8DE0B783-8852-494D-B90A-201ABBB71202}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{8DE0B783-8852-494D-B90A-201ABBB71202}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{8DE0B783-8852-494D-B90A-201ABBB71202}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{8DE0B783-8852-494D-B90A-201ABBB71202}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{8DE0B783-8852-494D-B90A-201ABBB71202}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
{8DE0B783-8852-494D-B90A-201ABBB71202}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{8DE0B783-8852-494D-B90A-201ABBB71202}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{8DE0B783-8852-494D-B90A-201ABBB71202}.Release|Any CPU.Build.0 = Release|Any CPU
|
{8DE0B783-8852-494D-B90A-201ABBB71202}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{8DE0B783-8852-494D-B90A-201ABBB71202}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{8DE0B783-8852-494D-B90A-201ABBB71202}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{8DE0B783-8852-494D-B90A-201ABBB71202}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{8DE0B783-8852-494D-B90A-201ABBB71202}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{C577AA78-B11D-4076-89A6-1C7F0ECC04E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{C577AA78-B11D-4076-89A6-1C7F0ECC04E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{C577AA78-B11D-4076-89A6-1C7F0ECC04E2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{C577AA78-B11D-4076-89A6-1C7F0ECC04E2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{C577AA78-B11D-4076-89A6-1C7F0ECC04E2}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{C577AA78-B11D-4076-89A6-1C7F0ECC04E2}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{C577AA78-B11D-4076-89A6-1C7F0ECC04E2}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{C577AA78-B11D-4076-89A6-1C7F0ECC04E2}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
{C577AA78-B11D-4076-89A6-1C7F0ECC04E2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{C577AA78-B11D-4076-89A6-1C7F0ECC04E2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{C577AA78-B11D-4076-89A6-1C7F0ECC04E2}.Release|Any CPU.Build.0 = Release|Any CPU
|
{C577AA78-B11D-4076-89A6-1C7F0ECC04E2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{C577AA78-B11D-4076-89A6-1C7F0ECC04E2}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{C577AA78-B11D-4076-89A6-1C7F0ECC04E2}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{C577AA78-B11D-4076-89A6-1C7F0ECC04E2}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{C577AA78-B11D-4076-89A6-1C7F0ECC04E2}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{7FFED190-51C7-4302-A8B5-96C839463458}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{7FFED190-51C7-4302-A8B5-96C839463458}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{7FFED190-51C7-4302-A8B5-96C839463458}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{7FFED190-51C7-4302-A8B5-96C839463458}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{7FFED190-51C7-4302-A8B5-96C839463458}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{7FFED190-51C7-4302-A8B5-96C839463458}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{7FFED190-51C7-4302-A8B5-96C839463458}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{7FFED190-51C7-4302-A8B5-96C839463458}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
{7FFED190-51C7-4302-A8B5-96C839463458}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{7FFED190-51C7-4302-A8B5-96C839463458}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{7FFED190-51C7-4302-A8B5-96C839463458}.Release|Any CPU.Build.0 = Release|Any CPU
|
{7FFED190-51C7-4302-A8B5-96C839463458}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{7FFED190-51C7-4302-A8B5-96C839463458}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{7FFED190-51C7-4302-A8B5-96C839463458}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{7FFED190-51C7-4302-A8B5-96C839463458}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{7FFED190-51C7-4302-A8B5-96C839463458}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{AA4D244C-6C3A-4CD0-9DA4-5CAFFBB55085}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{AA4D244C-6C3A-4CD0-9DA4-5CAFFBB55085}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{AA4D244C-6C3A-4CD0-9DA4-5CAFFBB55085}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{AA4D244C-6C3A-4CD0-9DA4-5CAFFBB55085}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{AA4D244C-6C3A-4CD0-9DA4-5CAFFBB55085}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{AA4D244C-6C3A-4CD0-9DA4-5CAFFBB55085}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{AA4D244C-6C3A-4CD0-9DA4-5CAFFBB55085}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{AA4D244C-6C3A-4CD0-9DA4-5CAFFBB55085}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
{AA4D244C-6C3A-4CD0-9DA4-5CAFFBB55085}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{AA4D244C-6C3A-4CD0-9DA4-5CAFFBB55085}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{AA4D244C-6C3A-4CD0-9DA4-5CAFFBB55085}.Release|Any CPU.Build.0 = Release|Any CPU
|
{AA4D244C-6C3A-4CD0-9DA4-5CAFFBB55085}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{AA4D244C-6C3A-4CD0-9DA4-5CAFFBB55085}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{AA4D244C-6C3A-4CD0-9DA4-5CAFFBB55085}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{AA4D244C-6C3A-4CD0-9DA4-5CAFFBB55085}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{AA4D244C-6C3A-4CD0-9DA4-5CAFFBB55085}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{E603CDF2-8BA0-49AE-A1F9-BD2DA5CB983D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{E603CDF2-8BA0-49AE-A1F9-BD2DA5CB983D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{E603CDF2-8BA0-49AE-A1F9-BD2DA5CB983D}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{E603CDF2-8BA0-49AE-A1F9-BD2DA5CB983D}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{E603CDF2-8BA0-49AE-A1F9-BD2DA5CB983D}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{E603CDF2-8BA0-49AE-A1F9-BD2DA5CB983D}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{E603CDF2-8BA0-49AE-A1F9-BD2DA5CB983D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{E603CDF2-8BA0-49AE-A1F9-BD2DA5CB983D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{E603CDF2-8BA0-49AE-A1F9-BD2DA5CB983D}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{E603CDF2-8BA0-49AE-A1F9-BD2DA5CB983D}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{E603CDF2-8BA0-49AE-A1F9-BD2DA5CB983D}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{E603CDF2-8BA0-49AE-A1F9-BD2DA5CB983D}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|||||||
@@ -12,12 +12,5 @@
|
|||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"App": "Host=host.docker.internal;Port=5432;Database=dyson_network_dev;Username=postgres;Password=postgres;Include Error Detail=True;Maximum Pool Size=20;Connection Idle Lifetime=60"
|
"App": "Host=host.docker.internal;Port=5432;Database=dyson_network_dev;Username=postgres;Password=postgres;Include Error Detail=True;Maximum Pool Size=20;Connection Idle Lifetime=60"
|
||||||
},
|
},
|
||||||
"KnownProxies": ["127.0.0.1", "::1"],
|
"KnownProxies": ["127.0.0.1", "::1"]
|
||||||
"Etcd": {
|
|
||||||
"Insecure": true
|
|
||||||
},
|
|
||||||
"Service": {
|
|
||||||
"Name": "DysonNetwork.Develop",
|
|
||||||
"Url": "https://localhost:7192"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,9 +119,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"KnownProxies": ["127.0.0.1", "::1"],
|
"KnownProxies": ["127.0.0.1", "::1"]
|
||||||
"Service": {
|
|
||||||
"Name": "DysonNetwork.Drive",
|
|
||||||
"Url": "https://localhost:7092"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,12 +71,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"KnownProxies": ["127.0.0.1", "::1"],
|
"KnownProxies": ["127.0.0.1", "::1"]
|
||||||
"Service": {
|
|
||||||
"Name": "DysonNetwork.Pass",
|
|
||||||
"Url": "https://localhost:7058"
|
|
||||||
},
|
|
||||||
"Etcd": {
|
|
||||||
"Insecure": true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,12 +36,5 @@
|
|||||||
"GeoIp": {
|
"GeoIp": {
|
||||||
"DatabasePath": "./Keys/GeoLite2-City.mmdb"
|
"DatabasePath": "./Keys/GeoLite2-City.mmdb"
|
||||||
},
|
},
|
||||||
"KnownProxies": ["127.0.0.1", "::1"],
|
"KnownProxies": ["127.0.0.1", "::1"]
|
||||||
"Service": {
|
|
||||||
"Name": "DysonNetwork.Ring",
|
|
||||||
"Url": "https://localhost:7259"
|
|
||||||
},
|
|
||||||
"Etcd": {
|
|
||||||
"Insecure": true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,12 +27,5 @@
|
|||||||
"SecretId": "",
|
"SecretId": "",
|
||||||
"SecretKey": ""
|
"SecretKey": ""
|
||||||
},
|
},
|
||||||
"KnownProxies": ["127.0.0.1", "::1"],
|
"KnownProxies": ["127.0.0.1", "::1"]
|
||||||
"Etcd": {
|
|
||||||
"Insecure": true
|
|
||||||
},
|
|
||||||
"Service": {
|
|
||||||
"Name": "DysonNetwork.Sphere",
|
|
||||||
"Url": "https://localhost:7099"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,12 +12,5 @@
|
|||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"App": "Host=host.docker.internal;Port=5432;Database=dyson_develop;Username=postgres;Password=postgres;Include Error Detail=True;Maximum Pool Size=20;Connection Idle Lifetime=60"
|
"App": "Host=host.docker.internal;Port=5432;Database=dyson_develop;Username=postgres;Password=postgres;Include Error Detail=True;Maximum Pool Size=20;Connection Idle Lifetime=60"
|
||||||
},
|
},
|
||||||
"KnownProxies": ["127.0.0.1", "::1"],
|
"KnownProxies": ["127.0.0.1", "::1"]
|
||||||
"Etcd": {
|
|
||||||
"Insecure": true
|
|
||||||
},
|
|
||||||
"Service": {
|
|
||||||
"Name": "DysonNetwork.Develop",
|
|
||||||
"Url": "https://localhost:7192"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,9 +119,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"KnownProxies": ["127.0.0.1", "::1"],
|
"KnownProxies": ["127.0.0.1", "::1"]
|
||||||
"Service": {
|
|
||||||
"Name": "DysonNetwork.Drive",
|
|
||||||
"Url": "https://localhost:7092"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,12 +71,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"KnownProxies": ["127.0.0.1", "::1"],
|
"KnownProxies": ["127.0.0.1", "::1"]
|
||||||
"Service": {
|
|
||||||
"Name": "DysonNetwork.Pass",
|
|
||||||
"Url": "https://localhost:7058"
|
|
||||||
},
|
|
||||||
"Etcd": {
|
|
||||||
"Insecure": true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,12 +36,5 @@
|
|||||||
"GeoIp": {
|
"GeoIp": {
|
||||||
"DatabasePath": "/app/keys/GeoLite2-City.mmdb"
|
"DatabasePath": "/app/keys/GeoLite2-City.mmdb"
|
||||||
},
|
},
|
||||||
"KnownProxies": ["127.0.0.1", "::1"],
|
"KnownProxies": ["127.0.0.1", "::1"]
|
||||||
"Service": {
|
|
||||||
"Name": "DysonNetwork.Ring",
|
|
||||||
"Url": "https://localhost:7259"
|
|
||||||
},
|
|
||||||
"Etcd": {
|
|
||||||
"Insecure": true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,12 +27,5 @@
|
|||||||
"SecretId": "",
|
"SecretId": "",
|
||||||
"SecretKey": ""
|
"SecretKey": ""
|
||||||
},
|
},
|
||||||
"KnownProxies": ["127.0.0.1", "::1"],
|
"KnownProxies": ["127.0.0.1", "::1"]
|
||||||
"Etcd": {
|
|
||||||
"Insecure": true
|
|
||||||
},
|
|
||||||
"Service": {
|
|
||||||
"Name": "DysonNetwork.Sphere",
|
|
||||||
"Url": "https://localhost:7099"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user