NALU/src/Nalu.Api/Models/ReplyResponse.cs
Ricardo Carneiro ea6cdb5395 Initial commit — NALU AI web platform
- 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>
2026-05-10 16:39:04 -03:00

51 lines
1.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.Text.Json.Serialization;
namespace Nalu.Web.Models;
[JsonConverter(typeof(JsonStringEnumConverter))]
public enum ReplyType
{
Answer,
Question,
CounterProposal,
Confirmation,
Rejection,
OffTopic,
Greeting,
Handoff,
Cancel,
Unclear
}
public record ReplyResponse
{
[JsonPropertyName("obtained")]
public bool Obtained { get; init; }
[JsonPropertyName("reply_type")]
public ReplyType? ReplyType { get; init; }
[JsonPropertyName("extracted_value")]
public string? ExtractedValue { get; init; }
/// "quantity" | "amount" | "date" | "text" | "boolean" | null
[JsonPropertyName("value_type")]
public string? ValueType { get; init; }
[JsonPropertyName("extracted_meaning")]
public string? ExtractedMeaning { get; init; }
/// 0.0 1.0 float (validate_reply exposes raw confidence — it's a premium endpoint)
[JsonPropertyName("confidence")]
public double Confidence { get; init; }
[JsonPropertyName("needs_clarification")]
public bool NeedsClarification { get; init; }
[JsonPropertyName("suggestion_to_agent")]
public string? SuggestionToAgent { get; init; }
[JsonPropertyName("has_suggestion")]
public bool HasSuggestion => SuggestionToAgent is not null;
}