This commit is contained in:
@@ -4,7 +4,7 @@ using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using Api.Clients.Ai.Contracts;
|
||||
using Api.Data.Repositories.Contracts;
|
||||
using Api.Models.Settings;
|
||||
using CvMatcher.Models.Settings;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace Api.Clients.Ai;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Api.Models.Requests;
|
||||
using Api.Models.Responses;
|
||||
using CvMatcher.Models.Requests;
|
||||
using CvMatcher.Models.Responses;
|
||||
|
||||
namespace Api.Clients.Api.Contracts;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Refit;
|
||||
using Api.Models.Responses;
|
||||
using Api.Models.Requests;
|
||||
using CvMatcher.Models.Responses;
|
||||
using CvMatcher.Models.Requests;
|
||||
|
||||
namespace Api.Clients.Api.Contracts;
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@ using System.Net;
|
||||
using Refit;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Api.Clients.Api.Contracts;
|
||||
using Api.Models.Responses;
|
||||
using Api.Models.Settings;
|
||||
using Api.Models.Requests;
|
||||
using CvMatcher.Models.Responses;
|
||||
using CvMatcher.Models.Settings;
|
||||
using CvMatcher.Models.Requests;
|
||||
|
||||
namespace Api.Clients.Api;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Api.Models.Requests;
|
||||
using CvMatcher.Models.Requests;
|
||||
using Api.Services.Contracts;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Api.Models.Responses;
|
||||
using CvMatcher.Models.Responses;
|
||||
|
||||
namespace Api.Data.Repositories.Contracts;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ using System.Text.Json;
|
||||
using Api.Data;
|
||||
using Api.Data.Entities;
|
||||
using Api.Data.Repositories.Contracts;
|
||||
using Api.Models.Responses;
|
||||
using CvMatcher.Models.Responses;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Api.Data.Repositories;
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
namespace Api.Models.Requests
|
||||
{
|
||||
public sealed class FindJobsRequest
|
||||
{
|
||||
public required string CvDocumentId { get; init; }
|
||||
public int? TopK { get; init; }
|
||||
public string? Email { get; init; }
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
namespace Api.Models.Requests
|
||||
{
|
||||
public sealed class MatchJobRequest
|
||||
{
|
||||
public string? CvDocumentId { get; set; }
|
||||
public string? JobUrl { get; set; }
|
||||
public string? JobDescription { get; set; }
|
||||
public bool GdprConsent { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? CaptchaToken { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
namespace Api.Models.Requests
|
||||
{
|
||||
public sealed class RagSearchRequest
|
||||
{
|
||||
public required string QueryText { get; init; }
|
||||
public IReadOnlyList<string>? TargetDocumentTypes { get; init; }
|
||||
public int? TopK { get; init; }
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
namespace Api.Models.Responses
|
||||
{
|
||||
public sealed class CvUploadResponse
|
||||
{
|
||||
public required string DocumentId { get; init; }
|
||||
public required string TextHash { get; init; }
|
||||
public required string DocumentType { get; init; }
|
||||
public required string Title { get; init; }
|
||||
public int Chunks { get; init; }
|
||||
public int Characters { get; init; }
|
||||
public bool Cached { get; init; }
|
||||
public string Summary { get; init; } = "CV indexed successfully.";
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace Api.Models.Responses
|
||||
{
|
||||
public sealed class FindJobsResponse
|
||||
{
|
||||
public required string CvDocumentId { get; init; }
|
||||
public IReadOnlyList<JobMatchResponse> Jobs { get; init; } = [];
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
namespace Api.Models.Responses
|
||||
{
|
||||
public sealed class JobMatchResponse
|
||||
{
|
||||
public int Score { get; set; }
|
||||
public string Summary { get; set; } = string.Empty;
|
||||
public List<string> Strengths { get; set; } = [];
|
||||
public List<string> Gaps { get; set; } = [];
|
||||
public List<string> Recommendations { get; set; } = [];
|
||||
public List<string> Evidence { get; set; } = [];
|
||||
public bool Cached { get; set; }
|
||||
public string? JobDocumentId { get; set; }
|
||||
public string? JobUrl { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
namespace Api.Models.Responses
|
||||
{
|
||||
public sealed class RagIndexResponse
|
||||
{
|
||||
public required string DocumentId { get; init; }
|
||||
public required string TextHash { get; init; }
|
||||
public required string DocumentType { get; init; }
|
||||
public double DocumentTypeConfidence { get; init; }
|
||||
public required string Title { get; init; }
|
||||
public int Chunks { get; init; }
|
||||
public int Characters { get; init; }
|
||||
public bool Cached { get; init; }
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
namespace Api.Models.Responses
|
||||
{
|
||||
public sealed class RagSearchResponse
|
||||
{
|
||||
public IReadOnlyList<RagSearchDocumentResult> Results { get; init; } = [];
|
||||
}
|
||||
|
||||
public sealed class RagDocumentDetails
|
||||
{
|
||||
public required string Id { get; init; }
|
||||
public required string DocumentType { get; init; }
|
||||
public required string Title { get; init; }
|
||||
public string? SourceUrl { get; init; }
|
||||
public required string Text { get; init; }
|
||||
public required string TextHash { get; init; }
|
||||
}
|
||||
public sealed class RagSearchDocumentResult
|
||||
{
|
||||
public required string DocumentId { get; init; }
|
||||
public required string DocumentType { get; init; }
|
||||
public required string Title { get; init; }
|
||||
public string? SourceUrl { get; init; }
|
||||
public double Score { get; init; }
|
||||
public IReadOnlyList<RagSearchChunkResult> MatchedChunks { get; init; } = [];
|
||||
}
|
||||
|
||||
public sealed class RagSearchChunkResult
|
||||
{
|
||||
public required string ChunkId { get; init; }
|
||||
public int ChunkIndex { get; init; }
|
||||
public required string Text { get; init; }
|
||||
public double Score { get; init; }
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace Api.Models.Settings;
|
||||
|
||||
public sealed class AiSettings
|
||||
{
|
||||
public string Provider { get; set; } = "OpenAI";
|
||||
public OpenAiSettings OpenAI { get; set; } = new();
|
||||
public OllamaSettings Ollama { get; set; } = new();
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
namespace Api.Models.Settings;
|
||||
|
||||
public sealed class InternalApiSettings
|
||||
{
|
||||
public string ApiKey { get; set; } = string.Empty;
|
||||
public bool RequireApiKey { get; set; } = false;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace Api.Models.Settings;
|
||||
|
||||
public sealed class MatcherSettings
|
||||
{
|
||||
public int TopK { get; set; } = 10;
|
||||
public int DeepScoreTopN { get; set; } = 5;
|
||||
public int MaxJobTextChars { get; set; } = 60000;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace Api.Models.Settings;
|
||||
|
||||
public sealed class OllamaSettings
|
||||
{
|
||||
public string BaseUrl { get; set; } = "http://localhost:11434";
|
||||
public string ChatModel { get; set; } = "llama3.1:8b";
|
||||
public int TimeoutSeconds { get; set; } = 180;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace Api.Models.Settings;
|
||||
|
||||
public sealed class OpenAiSettings
|
||||
{
|
||||
public string ApiKey { get; set; } = string.Empty;
|
||||
public string ChatModel { get; set; } = "gpt-4o-mini";
|
||||
public int TimeoutSeconds { get; set; } = 90;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
namespace Api.Models.Settings;
|
||||
|
||||
public sealed class RagApiSettings
|
||||
{
|
||||
public string BaseUrl { get; set; } = "http://localhost:8081";
|
||||
public string InternalApiKey { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
namespace Api.Models.Settings;
|
||||
|
||||
public sealed class SmtpSettings
|
||||
{
|
||||
public string Host { get; set; } = string.Empty;
|
||||
public int Port { get; set; } = 587;
|
||||
public string Username { get; set; } = string.Empty;
|
||||
public string Password { get; set; } = string.Empty;
|
||||
public bool UseStartTls { get; set; } = true;
|
||||
public string FromEmail { get; set; } = "noreply@myai.ro";
|
||||
public string ToEmail { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -15,7 +15,7 @@ using Api.Clients.Api;
|
||||
using Api.Clients.Api.Contracts;
|
||||
using Api.Clients.Ai;
|
||||
using Api.Clients.Ai.Contracts;
|
||||
using Api.Models.Settings;
|
||||
using CvMatcher.Models.Settings;
|
||||
|
||||
DotNetEnv.Env.Load();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Api.Models.Requests;
|
||||
using Api.Models.Responses;
|
||||
using CvMatcher.Models.Requests;
|
||||
using CvMatcher.Models.Responses;
|
||||
|
||||
namespace Api.Services.Contracts;
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@ using System.Text.Json;
|
||||
using Api.Clients.Ai.Contracts;
|
||||
using Api.Clients.Api.Contracts;
|
||||
using Api.Data.Repositories.Contracts;
|
||||
using Api.Models.Requests;
|
||||
using Api.Models.Responses;
|
||||
using Api.Models.Settings;
|
||||
using CvMatcher.Models.Requests;
|
||||
using CvMatcher.Models.Responses;
|
||||
using CvMatcher.Models.Settings;
|
||||
using Api.Services.Contracts;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Api.Models.Settings;
|
||||
using CvMatcher.Models.Settings;
|
||||
using Api.Services.Contracts;
|
||||
using MailKit.Net.Smtp;
|
||||
using MailKit.Security;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Net;
|
||||
using System.Text.RegularExpressions;
|
||||
using Api.Models.Settings;
|
||||
using CvMatcher.Models.Settings;
|
||||
using Api.Services.Contracts;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
|
||||
@@ -75,4 +75,8 @@
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="10.1.7" />
|
||||
<PackageReference Include="Refit.HttpClientFactory" Version="10.1.6" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\cv-matcher-api-models\cv-matcher-api-models.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user