feat(backend): add LLM provider abstraction, contextual ranking and explanations

Add a pluggable LLM provider with an offline template fallback, prompt builder, contextual match scoring (area/location boosts, availability), per-solution explanations and in-memory request limiting for cost control.
This commit is contained in:
Rafał Tyński
2026-10-04 02:52:45 +02:00
parent 182c26d9f8
commit 03e2d66ca4
11 changed files with 385 additions and 23 deletions
@@ -0,0 +1,13 @@
namespace TarninaHub.Application.Matchmaking;
public interface ILlmProvider
{
/// <summary>True when a real provider is configured (API key etc.).</summary>
bool IsConfigured { get; }
/// <summary>Returns the completion text or null when unavailable.</summary>
Task<string?> CompleteAsync(
string systemPrompt,
string userPrompt,
CancellationToken cancellationToken);
}