diff --git a/api/Controllers/RagController.cs b/api/Controllers/CvMatcherController.cs
similarity index 98%
rename from api/Controllers/RagController.cs
rename to api/Controllers/CvMatcherController.cs
index 94fb7d5..ca464c9 100644
--- a/api/Controllers/RagController.cs
+++ b/api/Controllers/CvMatcherController.cs
@@ -8,8 +8,8 @@ using System.Text.Json;
namespace Api.Controllers;
[ApiController]
-[Route("api/rag")]
-[EnableRateLimiting("rag")]
+[Route("api/cv-matcher")]
+[EnableRateLimiting("cv-matcher")]
public sealed class RagController : ControllerBase
{
private readonly IHttpClientFactory _httpClientFactory;
@@ -26,7 +26,7 @@ public sealed class RagController : ControllerBase
_logger = logger;
}
- [HttpPost("cv")]
+ [HttpPost("upload")]
[RequestSizeLimit(8 * 1024 * 1024)]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status400BadRequest)]
diff --git a/api/Program.cs b/api/Program.cs
index 3ad17ec..493590c 100644
--- a/api/Program.cs
+++ b/api/Program.cs
@@ -164,7 +164,7 @@ try
});
// Policy: CV matcher, expensive because it calls AI APIs.
- options.AddPolicy("rag", httpContext =>
+ options.AddPolicy("cv-matcher", httpContext =>
{
var ip = httpContext.Connection.RemoteIpAddress?.ToString() ?? "unknown";
return RateLimitPartition.GetFixedWindowLimiter(
diff --git a/api/Settings/OpenAiSettings.cs b/api/Settings/OpenAiSettings.cs
deleted file mode 100644
index c6762b6..0000000
--- a/api/Settings/OpenAiSettings.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace Api.Settings;
-
-public sealed class OpenAiSettings
-{
- public string ApiKey { get; set; } = string.Empty;
- public string ChatModel { get; set; } = "gpt-4o-mini";
- public string EmbeddingModel { get; set; } = "text-embedding-3-small";
- public int TimeoutSeconds { get; set; } = 60;
-}
diff --git a/api/Settings/RagSettings.cs b/api/Settings/RagSettings.cs
deleted file mode 100644
index 405ecb8..0000000
--- a/api/Settings/RagSettings.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace Api.Settings;
-
-public sealed class RagSettings
-{
- public int MaxPdfSizeMb { get; set; } = 5;
- public int ChunkSize { get; set; } = 900;
- public int ChunkOverlap { get; set; } = 150;
- public int CvTtlMinutes { get; set; } = 60;
- public int MaxJobTextChars { get; set; } = 20000;
- public int TopK { get; set; } = 6;
-}
diff --git a/api/appsettings.Development.json b/api/appsettings.Development.json
index c39ae92..f3cde72 100644
--- a/api/appsettings.Development.json
+++ b/api/appsettings.Development.json
@@ -76,18 +76,8 @@
"FromEmail": "",
"SubjectPrefix": "[File Download]"
},
- "OpenAI": {
- "ApiKey": "",
- "ChatModel": "gpt-4o-mini",
- "EmbeddingModel": "text-embedding-3-small",
- "TimeoutSeconds": 60
- },
- "Rag": {
- "MaxPdfSizeMb": 5,
- "ChunkSize": 900,
- "ChunkOverlap": 150,
- "CvTtlMinutes": 60,
- "MaxJobTextChars": 20000,
- "TopK": 6
+ "CvMatcherApi": {
+ "BaseUrl": "",
+ "InternalApiKey": ""
}
}
diff --git a/api/appsettings.json b/api/appsettings.json
index 80f5c9a..6fb2ddd 100644
--- a/api/appsettings.json
+++ b/api/appsettings.json
@@ -105,9 +105,5 @@
"ToEmail": "",
"FromEmail": "",
"SubjectPrefix": "[File Download]"
- },
- "CvMatcherApi": {
- "BaseUrl": "",
- "InternalApiKey": ""
}
}
\ No newline at end of file
diff --git a/cv-matcher-api/cv-matcher-api.csproj b/cv-matcher-api/cv-matcher-api.csproj
index 1ebc13d..b586214 100644
--- a/cv-matcher-api/cv-matcher-api.csproj
+++ b/cv-matcher-api/cv-matcher-api.csproj
@@ -6,6 +6,54 @@
Linux
Api
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/web/wwwroot/cv-matcher/index.html b/web/wwwroot/cv-matcher/index.html
index e149797..5b5a784 100644
--- a/web/wwwroot/cv-matcher/index.html
+++ b/web/wwwroot/cv-matcher/index.html
@@ -194,6 +194,6 @@
Cookie settings
-
+