- ASP.NET Core 9 Razor Pages + Minimal API hybrid - 14 validators (CPF, CEP, CNPJ, email, phone, name, yes-no, birthdate, handoff, cancel-intent, company-name, plate-br, postal-code, validate_reply) - OAuth login (Google, Microsoft, GitHub) + cookie auth - MongoDB usage tracking + CEP cache collection - Stripe checkout with inline PriceData (no Price IDs) - MCP server for Claude Code / Cursor integration - Playground (10 calls/IP/day, no auth) - Docs: Quickstart, API Reference, N8N, MCP, Créditos, Erros, Fluxos - Credit system: 3 cr standard validators, 5 cr validate_reply - SmartSuggestion: contextual re-ask via IA when obtained=false - Per-IP rate limiting + daily cap + shared-IP abuse detection - Lightbox for comic images - Validadores page split: Brasileiros / Universais + Em breve Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
24 lines
671 B
C#
24 lines
671 B
C#
namespace Nalu.Web.Services.LlmRouter;
|
|
|
|
public record LlmRequest
|
|
{
|
|
public required string SystemPrompt { get; init; }
|
|
public required string UserMessage { get; init; }
|
|
public int MaxTokens { get; init; } = 800;
|
|
public double Temperature { get; init; } = 0.1;
|
|
}
|
|
|
|
public record LlmResponse
|
|
{
|
|
public required string Content { get; init; }
|
|
public required string Provider { get; init; }
|
|
public int LatencyMs { get; init; }
|
|
}
|
|
|
|
public class RateLimitException(string provider) : Exception($"{provider} rate limited")
|
|
{
|
|
public string Provider { get; } = provider;
|
|
}
|
|
|
|
public class ServiceUnavailableException(string message) : Exception(message);
|