@@ -1,21 +1,17 @@
|
||||
using api.Services.Contracts.Rag;
|
||||
using Api.Models.Rag;
|
||||
using Api.Services.Contracts.Rag;
|
||||
using Api.Settings;
|
||||
using Microsoft.Extensions.Options;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Api.Services.Rag;
|
||||
|
||||
public interface ICvRagService
|
||||
{
|
||||
Task<CvIngestResponse> IngestCvAsync(IFormFile file, bool gdprConsent, CancellationToken ct);
|
||||
Task<JobMatchResponse> MatchJobAsync(JobMatchRequest request, CancellationToken ct);
|
||||
}
|
||||
|
||||
public sealed class CvRagService : ICvRagService
|
||||
{
|
||||
private readonly IPdfTextExtractor _pdfTextExtractor;
|
||||
private readonly ITextChunker _textChunker;
|
||||
private readonly IOpenAiRagClient _openAi;
|
||||
private readonly IAiRagClient _openAi;
|
||||
private readonly ICvVectorStore _store;
|
||||
private readonly IJobTextExtractor _jobTextExtractor;
|
||||
private readonly RagSettings _settings;
|
||||
@@ -24,7 +20,7 @@ public sealed class CvRagService : ICvRagService
|
||||
public CvRagService(
|
||||
IPdfTextExtractor pdfTextExtractor,
|
||||
ITextChunker textChunker,
|
||||
IOpenAiRagClient openAi,
|
||||
IAiRagClient openAi,
|
||||
ICvVectorStore store,
|
||||
IJobTextExtractor jobTextExtractor,
|
||||
IOptions<RagSettings> options,
|
||||
|
||||
Reference in New Issue
Block a user