Move models in separate projects
Build and Push Docker Images / build (push) Failing after 27s

This commit is contained in:
2026-05-06 17:11:44 +03:00
parent c02cf1c754
commit 64b0219038
80 changed files with 166 additions and 89 deletions
@@ -0,0 +1,9 @@
namespace CvMatcher.Models.Requests
{
public sealed class FindJobsRequest
{
public required string CvDocumentId { get; init; }
public int? TopK { get; init; }
public string? Email { get; init; }
}
}
@@ -0,0 +1,12 @@
namespace CvMatcher.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; }
}
}
@@ -0,0 +1,9 @@
namespace CvMatcher.Models.Requests
{
public sealed class RagSearchRequest
{
public required string QueryText { get; init; }
public IReadOnlyList<string>? TargetDocumentTypes { get; init; }
public int? TopK { get; init; }
}
}
@@ -0,0 +1,14 @@
namespace CvMatcher.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.";
}
}
@@ -0,0 +1,8 @@
namespace CvMatcher.Models.Responses
{
public sealed class FindJobsResponse
{
public required string CvDocumentId { get; init; }
public IReadOnlyList<JobMatchResponse> Jobs { get; init; } = [];
}
}
@@ -0,0 +1,15 @@
namespace CvMatcher.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; }
}
}
@@ -0,0 +1,14 @@
namespace CvMatcher.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; }
}
}
@@ -0,0 +1,34 @@
namespace CvMatcher.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; }
}
}
@@ -0,0 +1,8 @@
namespace CvMatcher.Models.Settings;
public sealed class AiSettings
{
public string Provider { get; set; } = "OpenAI";
public OpenAiSettings OpenAI { get; set; } = new();
public OllamaSettings Ollama { get; set; } = new();
}
@@ -0,0 +1,7 @@
namespace CvMatcher.Models.Settings;
public sealed class InternalApiSettings
{
public string ApiKey { get; set; } = string.Empty;
public bool RequireApiKey { get; set; } = false;
}
@@ -0,0 +1,8 @@
namespace CvMatcher.Models.Settings;
public sealed class MatcherSettings
{
public int TopK { get; set; } = 10;
public int DeepScoreTopN { get; set; } = 5;
public int MaxJobTextChars { get; set; } = 60000;
}
@@ -0,0 +1,8 @@
namespace CvMatcher.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;
}
@@ -0,0 +1,8 @@
namespace CvMatcher.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;
}
@@ -0,0 +1,7 @@
namespace CvMatcher.Models.Settings;
public sealed class RagApiSettings
{
public string BaseUrl { get; set; } = "http://localhost:8081";
public string InternalApiKey { get; set; } = string.Empty;
}
@@ -0,0 +1,12 @@
namespace CvMatcher.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;
}
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<RootNamespace>CvMatcher.Models</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>