Implement AI

This commit is contained in:
Chris Chen
2026-06-25 11:11:26 -07:00
parent fa3e75a333
commit a89e936f4d
11 changed files with 377 additions and 5 deletions
@@ -0,0 +1,14 @@
using ROLAC.API.DTOs.Expense;
namespace ROLAC.API.Services.Ai;
/// <summary>AI assistance for expense entry: translate a description and suggest a category.</summary>
public interface IExpenseAiService
{
/// <summary>
/// Translate <paramref name="chineseText"/> to concise accounting English and suggest the best
/// major/sub category from the live catalog, using <paramref name="amount"/> as a hint.
/// Never throws on an upstream/AI failure — returns a suggestion with null fields instead.
/// </summary>
Task<ExpenseAiSuggestion> SuggestAsync(string chineseText, decimal amount, CancellationToken ct = default);
}