fix(ai): request structured JSON for queued strategies

This commit is contained in:
cesnimda
2026-10-29 13:03:57 +01:00
parent 994bf8f8bb
commit caa0c6a2ef
8 changed files with 69 additions and 6 deletions
@@ -72,7 +72,7 @@ public sealed class AiWorkspaceNotePersistenceTests
var job = await SeedJobWithCvAsync(db);
var summarizer = new Mock<ISummarizerService>();
summarizer.Setup(x => x.GenerateSectionWithMetadataAsync(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<int>(), It.IsAny<int>(), It.IsAny<CancellationToken>()))
summarizer.Setup(x => x.GenerateSectionWithMetadataAsync(It.IsAny<string>(), It.IsAny<string>(), AiGenerationOutputMode.StructuredJson, It.IsAny<int>(), It.IsAny<int>(), It.IsAny<CancellationToken>()))
.ReturnsAsync(new AiGenerationResult("""{"strategicSummary":"Lead with backend delivery.","cvBulletIdeas":["Built APIs"],"proofPointsToLeadWith":["Led delivery"],"coverLetterAngles":["Relevant platform work"]}""", "ollama", "test-model"));
var service = new StrategySnapshotService(db, summarizer.Object);