fix(cv): gate AI proposals on grounding and source freshness
This commit is contained in:
@@ -30,6 +30,15 @@ public sealed class MeteredSummarizerService(
|
||||
=> MeterAsync("synchronous.generate", instruction + "\n\n" + text, maxLength,
|
||||
ct => inner.GenerateSectionWithMetadataAsync(instruction, text, maxLength, minLength, ct), cancellationToken);
|
||||
|
||||
public Task<AiGenerationResult?> EvaluateCvRewriteAsync(string candidateSource, string proposal, string? contextOnly, CancellationToken cancellationToken = default)
|
||||
=> MeterAsync("synchronous.cv-factual-review", candidateSource + "\n" + proposal + "\n" + contextOnly, 4096,
|
||||
ct => inner.EvaluateCvRewriteAsync(candidateSource, proposal, contextOnly, ct), cancellationToken);
|
||||
|
||||
public Task<AiGenerationResult?> GenerateSectionWithMetadataAsync(string instruction, string text,
|
||||
AiGenerationOutputMode outputMode, int maxLength = 180, int minLength = 40, CancellationToken cancellationToken = default)
|
||||
=> MeterAsync("synchronous.generate", instruction + "\n\n" + text, maxLength,
|
||||
ct => inner.GenerateSectionWithMetadataAsync(instruction, text, outputMode, maxLength, minLength, ct), cancellationToken);
|
||||
|
||||
public Task<AiTextExtractionResult?> ExtractTextAsync(
|
||||
Stream stream,
|
||||
string fileName,
|
||||
|
||||
Reference in New Issue
Block a user