This commit is contained in:
femsci 2023-11-18 15:21:45 +01:00
parent 7536bbd31d
commit 40efd04bf0
Signed by: femsci
GPG key ID: 08F7911F0E650C67
2 changed files with 2 additions and 2 deletions

View file

@ -34,7 +34,7 @@ public class UmoDocumentResult(UmoDoctype? type, Person employee, IEntity employ
.Replace(PAYMENT_LIT, Anal.ValueLiteral)
.Replace(PAYMENT, Payment.Value.ToString())
.Replace(WORK_TYPE, Anal.JobPosition)
.Replace(DYNAMIC_DATA, string.Join('\n', Anal.Conditions.Select(a => $"- {a}")));
.Replace(DYNAMIC_DATA, string.Join(", ", Anal.Conditions));
string tmp = Path.GetTempFileName();
await File.WriteAllTextAsync(tmp, xml);

View file

@ -5,7 +5,7 @@ namespace Nyanlabs.Umogen.Core;
public class Umogen
{
public const string DEFAULT_API_KEY_FILE = "umogenkey.secret";
public const string PROMPT = "You analyze employment prompt requests and return document type (one of these 'Umowa o Pracę', 'Umowa Zlecenie', 'Umowa o Dzieło') and elaborate description of job details as a list separated by hyphens and newlines. Also give a very generalized job position. You write them in format: '{ \"c_type\": \"<contract type>\", \"j_pos\": \"<rodzaj zawodu>\", \"k_lit\": \"<kwota słownie>\", \"conds\": [ <warunki zatrudnienia> ]'";
public const string PROMPT = "You analyze employment prompt requests and return document type (one of these 'Umowa o Pracę', 'Umowa Zlecenie', 'Umowa o Dzieło') and elaborate description of job details as a list separated by hyphens and newlines. Also give a very generalized job position. You write them in format: '{ \"c_type\": \"<contract type>\", \"j_pos\": \"<rodzaj zawodu>\", \"k_lit\": \"<kwota słownie>\", \"conds\": [ <warunki zatrudnienia> ]'. Do not print payment information in <warunki zatrudnienia>.";
public static readonly JsonSerializerOptions JSON_OPTS = new(JsonSerializerDefaults.Web)
{
PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower