Some checks failed
CI Pipeline / Code Quality & Typecheck (push) Waiting to run
CI Pipeline / Test Suite (macos-latest) (push) Blocked by required conditions
CI Pipeline / Test Suite (ubuntu-latest) (push) Blocked by required conditions
CI Pipeline / Test Suite (windows-latest) (push) Blocked by required conditions
CI Pipeline / Build Validation (admin) (push) Blocked by required conditions
CI Pipeline / Build Validation (desktop) (push) Blocked by required conditions
Deploy Landing Page / deploy (push) Blocked by required conditions
Deploy Landing Page / build (push) Waiting to run
Release & Packaging Pipeline / Build & Publish Admin Docker Image (push) Failing after 8s
Release & Code Signing CA Pipeline / build-and-sign-windows (push) Failing after 1m51s
Build macOS / Build & Package (macOS) (push) Failing after 4s
Build macOS / Build & Package (macOS)-1 (push) Failing after 5s
Release & Code Signing CA Pipeline / build-and-sign-macos (push) Failing after 3s
Release & Packaging Pipeline / Package macOS Desktop App (push) Failing after 4s
Release & Packaging Pipeline / Package Windows Desktop App (push) Failing after 2m28s
Release & Packaging Pipeline / Publish Official GitHub Release (push) Has been skipped
175 lines
4.5 KiB
C#
175 lines
4.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace D3ROVoice.Api.Dtos;
|
|
|
|
// Auth DTOs
|
|
public record RegisterDto(string Email, string Password);
|
|
public record LoginDto(string Email, string Password);
|
|
public record AuthResponseDto(string Token, string Email, string Role, DateTime ExpiresAt);
|
|
public record UserInfoDto(int Id, string Email, string Role, DateTime CreatedAt, DateTime? LastLoginAt, bool IsActive);
|
|
|
|
// LLM DTOs
|
|
public record LlmGenerateRequest(string Prompt, string? Model = null, string? SystemPrompt = null, double Temperature = 0.7, int MaxTokens = 2048);
|
|
public record LlmGenerateResponse(string Text, string Model, int PromptTokens, int CompletionTokens, double TotalDurationMs, decimal Cost);
|
|
public record LlmChatMessage(string Role, string Content);
|
|
public record LlmChatRequest(List<LlmChatMessage> Messages, string? Model = null, double Temperature = 0.7, int MaxTokens = 2048);
|
|
|
|
// Admin DTOs
|
|
public record CreateModelEndpointDto(
|
|
string ModelId,
|
|
string ModelName,
|
|
string Provider,
|
|
string EndpointUrl,
|
|
string ApiKey,
|
|
decimal CostPer1kPromptTokens,
|
|
decimal CostPer1kCompletionTokens
|
|
);
|
|
|
|
public record UpdateModelEndpointDto(
|
|
string ModelName,
|
|
string Provider,
|
|
string EndpointUrl,
|
|
string ApiKey,
|
|
decimal CostPer1kPromptTokens,
|
|
decimal CostPer1kCompletionTokens,
|
|
bool IsActive
|
|
);
|
|
|
|
public record ServerStatsDto(
|
|
int TotalUsers,
|
|
int ActiveUsersToday,
|
|
int TotalRequests,
|
|
decimal TotalCost,
|
|
double ServerUptimeSeconds,
|
|
int ErrorCount,
|
|
List<ServerErrorLogDto> RecentErrors
|
|
);
|
|
|
|
public record ServerErrorLogDto(int Id, string ErrorType, string Message, string? Endpoint, DateTime CreatedAt);
|
|
|
|
public record UsageReportDto(
|
|
int TotalRequests,
|
|
int TotalPromptTokens,
|
|
int TotalCompletionTokens,
|
|
decimal TotalCost,
|
|
List<UserUsageSummaryDto> UserSummaries,
|
|
List<ModelUsageSummaryDto> ModelSummaries
|
|
);
|
|
|
|
public record UserUsageSummaryDto(int UserId, string Email, int TotalRequests, int TotalTokens, decimal TotalCost);
|
|
public record ModelUsageSummaryDto(string ModelId, string ModelName, int TotalRequests, int TotalTokens, decimal TotalCost);
|
|
|
|
// STT DTOs
|
|
public record SttTranscribeRequest(
|
|
string? AudioBase64 = null,
|
|
string? Language = "ko",
|
|
string? InitialPrompt = null,
|
|
string? ModelId = null,
|
|
string? Provider = null,
|
|
double? Temperature = 0.0
|
|
);
|
|
|
|
public record SttTranscribeResponse(
|
|
string Text,
|
|
double Confidence,
|
|
string Language,
|
|
double DurationSeconds,
|
|
string Provider,
|
|
string ModelId,
|
|
double LatencyMs,
|
|
decimal Cost
|
|
);
|
|
|
|
public record SttProviderEndpointDto(
|
|
int Id,
|
|
string Name,
|
|
string ProviderType,
|
|
string EndpointUrl,
|
|
string ApiKey,
|
|
string ModelId,
|
|
string Method,
|
|
string Language,
|
|
string? Prompt,
|
|
double Temperature,
|
|
decimal CostPerMinute,
|
|
decimal CostPerSecond,
|
|
bool IsDefault,
|
|
bool IsActive,
|
|
int FallbackPriority,
|
|
string? ExtraHeadersJson,
|
|
DateTime CreatedAt,
|
|
DateTime? UpdatedAt
|
|
);
|
|
|
|
public record CreateSttEndpointDto(
|
|
string Name,
|
|
string ProviderType,
|
|
string EndpointUrl,
|
|
string? ApiKey,
|
|
string ModelId,
|
|
string Method,
|
|
string? Language,
|
|
string? Prompt,
|
|
double Temperature,
|
|
decimal CostPerMinute,
|
|
decimal CostPerSecond,
|
|
bool IsDefault,
|
|
bool IsActive,
|
|
int FallbackPriority,
|
|
string? ExtraHeadersJson
|
|
);
|
|
|
|
public record UpdateSttEndpointDto(
|
|
string Name,
|
|
string ProviderType,
|
|
string EndpointUrl,
|
|
string? ApiKey,
|
|
string ModelId,
|
|
string Method,
|
|
string? Language,
|
|
string? Prompt,
|
|
double Temperature,
|
|
decimal CostPerMinute,
|
|
decimal CostPerSecond,
|
|
bool IsDefault,
|
|
bool IsActive,
|
|
int FallbackPriority,
|
|
string? ExtraHeadersJson
|
|
);
|
|
|
|
public record SttTestResultDto(
|
|
bool Success,
|
|
string Message,
|
|
double LatencyMs,
|
|
string? TranscriptPreview,
|
|
string? Provider,
|
|
string? ModelId
|
|
);
|
|
|
|
public record SttUsageReportDto(
|
|
int TotalTranscriptions,
|
|
double TotalAudioMinutes,
|
|
decimal TotalCost,
|
|
double AvgLatencyMs,
|
|
List<SttProviderUsageSummaryDto> ProviderSummaries,
|
|
List<SttUserUsageSummaryDto> UserSummaries
|
|
);
|
|
|
|
public record SttProviderUsageSummaryDto(
|
|
string Provider,
|
|
string ModelId,
|
|
int TotalRequests,
|
|
double TotalAudioMinutes,
|
|
decimal TotalCost,
|
|
double AvgLatencyMs
|
|
);
|
|
|
|
public record SttUserUsageSummaryDto(
|
|
int UserId,
|
|
string Email,
|
|
int TotalRequests,
|
|
double TotalAudioMinutes,
|
|
decimal TotalCost
|
|
);
|
|
|