a79d8282dc
- 15 Controller-Klassen ersetzen Minimal APIs in Program.cs - Repository Pattern mit Interfaces + Implementierungen (Project, Task, Activity, User) - AuthService verwendet jetzt IUserRepository statt direktem DbContext-Zugriff - SecurityHeadersMiddleware als eigenständige Middleware-Klasse - PathSecurityHelper als gemeinsamer Helper für Pfadvalidierung - DTOs in eigenem Namespace Nexus.Api.DTOs - EF-Entities in Nexus.Api.Data (vorher Nexus.Api.Domain) - Program.cs auf DI-Registrierung + Middleware reduziert - Alle 43 Endpoints unverändert erhalten - Build + 3/3 Tests erfolgreich
26 lines
805 B
C#
26 lines
805 B
C#
using Nexus.Api.Data;
|
|
|
|
namespace Nexus.Api.Integrations;
|
|
|
|
public sealed class NvidiaProvider(IConfiguration configuration) : IModelProvider
|
|
{
|
|
public string Name => "NVIDIA";
|
|
|
|
public Task<IReadOnlyCollection<ModelProviderStatus>> GetModelsAsync(
|
|
CancellationToken cancellationToken)
|
|
{
|
|
var configured = !string.IsNullOrWhiteSpace(
|
|
configuration["Integrations:Nvidia:ApiKey"]);
|
|
IReadOnlyCollection<ModelProviderStatus> models =
|
|
[
|
|
new(
|
|
Name,
|
|
"moonshotai/kimi-k2.6",
|
|
configured ? OperationalStatus.Online : OperationalStatus.Unknown,
|
|
false,
|
|
configured ? "Credential configured" : "Credential required")
|
|
];
|
|
return Task.FromResult(models);
|
|
}
|
|
}
|