@silexpert/core 1.3.16 → 1.3.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/dist/cjs/api/resources/Ai.d.ts +6 -0
  2. package/dist/cjs/api/resources/Ai.d.ts.map +1 -0
  3. package/dist/cjs/api/resources/Ai.js +11 -0
  4. package/dist/cjs/api/resources/Ai.js.map +1 -0
  5. package/dist/cjs/api/resources.d.ts +2 -0
  6. package/dist/cjs/api/resources.d.ts.map +1 -1
  7. package/dist/cjs/api/resources.js +2 -0
  8. package/dist/cjs/api/resources.js.map +1 -1
  9. package/dist/cjs/types/Enum/AIPrompt.d.ts +13 -0
  10. package/dist/cjs/types/Enum/AIPrompt.d.ts.map +1 -0
  11. package/dist/cjs/types/Enum/AIPrompt.js +43 -0
  12. package/dist/cjs/types/Enum/AIPrompt.js.map +1 -0
  13. package/dist/cjs/types/Enum/CommercialManagement.js +1 -1
  14. package/dist/cjs/types/Enum/CommercialManagement.js.map +1 -1
  15. package/dist/cjs/types/Enum/Role.d.ts +2 -1
  16. package/dist/cjs/types/Enum/Role.d.ts.map +1 -1
  17. package/dist/cjs/types/Enum/Role.js +1 -0
  18. package/dist/cjs/types/Enum/Role.js.map +1 -1
  19. package/dist/cjs/types/Enum/RoleDetail.d.ts +10 -0
  20. package/dist/cjs/types/Enum/RoleDetail.d.ts.map +1 -1
  21. package/dist/cjs/types/Enum/RoleDetail.js +10 -0
  22. package/dist/cjs/types/Enum/RoleDetail.js.map +1 -1
  23. package/dist/cjs/types/Interface/api/ai/AskQuestionCollaborator.d.ts +4 -0
  24. package/dist/cjs/types/Interface/api/ai/AskQuestionCollaborator.d.ts.map +1 -0
  25. package/dist/cjs/types/Interface/api/ai/AskQuestionCollaborator.js +24 -0
  26. package/dist/cjs/types/Interface/api/ai/AskQuestionCollaborator.js.map +1 -0
  27. package/dist/cjs/types/Interface/models/IAIQuestion.d.ts +15 -0
  28. package/dist/cjs/types/Interface/models/IAIQuestion.d.ts.map +1 -0
  29. package/dist/cjs/types/Interface/models/IAIQuestion.js +3 -0
  30. package/dist/cjs/types/Interface/models/IAIQuestion.js.map +1 -0
  31. package/dist/cjs/types/Interface/models/IPayment.d.ts +1 -0
  32. package/dist/cjs/types/Interface/models/IPayment.d.ts.map +1 -1
  33. package/dist/cjs/types/Interface/models/IPayment.js.map +1 -1
  34. package/dist/cjs/types/index.d.ts +3 -1
  35. package/dist/cjs/types/index.d.ts.map +1 -1
  36. package/dist/cjs/types/index.js +3 -1
  37. package/dist/cjs/types/index.js.map +1 -1
  38. package/dist/mjs/api/resources/Ai.d.ts +6 -0
  39. package/dist/mjs/api/resources/Ai.d.ts.map +1 -0
  40. package/dist/mjs/api/resources/Ai.js +7 -0
  41. package/dist/mjs/api/resources/Ai.js.map +1 -0
  42. package/dist/mjs/api/resources.d.ts +2 -0
  43. package/dist/mjs/api/resources.d.ts.map +1 -1
  44. package/dist/mjs/api/resources.js +2 -0
  45. package/dist/mjs/api/resources.js.map +1 -1
  46. package/dist/mjs/types/Enum/AIPrompt.d.ts +13 -0
  47. package/dist/mjs/types/Enum/AIPrompt.d.ts.map +1 -0
  48. package/dist/mjs/types/Enum/AIPrompt.js +40 -0
  49. package/dist/mjs/types/Enum/AIPrompt.js.map +1 -0
  50. package/dist/mjs/types/Enum/CommercialManagement.js +1 -1
  51. package/dist/mjs/types/Enum/CommercialManagement.js.map +1 -1
  52. package/dist/mjs/types/Enum/Role.d.ts +2 -1
  53. package/dist/mjs/types/Enum/Role.d.ts.map +1 -1
  54. package/dist/mjs/types/Enum/Role.js +1 -0
  55. package/dist/mjs/types/Enum/Role.js.map +1 -1
  56. package/dist/mjs/types/Enum/RoleDetail.d.ts +10 -0
  57. package/dist/mjs/types/Enum/RoleDetail.d.ts.map +1 -1
  58. package/dist/mjs/types/Enum/RoleDetail.js +10 -0
  59. package/dist/mjs/types/Enum/RoleDetail.js.map +1 -1
  60. package/dist/mjs/types/Interface/api/ai/AskQuestionCollaborator.d.ts +4 -0
  61. package/dist/mjs/types/Interface/api/ai/AskQuestionCollaborator.d.ts.map +1 -0
  62. package/dist/mjs/types/Interface/api/ai/AskQuestionCollaborator.js +21 -0
  63. package/dist/mjs/types/Interface/api/ai/AskQuestionCollaborator.js.map +1 -0
  64. package/dist/mjs/types/Interface/models/IAIQuestion.d.ts +15 -0
  65. package/dist/mjs/types/Interface/models/IAIQuestion.d.ts.map +1 -0
  66. package/dist/mjs/types/Interface/models/IAIQuestion.js +2 -0
  67. package/dist/mjs/types/Interface/models/IAIQuestion.js.map +1 -0
  68. package/dist/mjs/types/Interface/models/IPayment.d.ts +1 -0
  69. package/dist/mjs/types/Interface/models/IPayment.d.ts.map +1 -1
  70. package/dist/mjs/types/Interface/models/IPayment.js.map +1 -1
  71. package/dist/mjs/types/index.d.ts +3 -1
  72. package/dist/mjs/types/index.d.ts.map +1 -1
  73. package/dist/mjs/types/index.js +3 -1
  74. package/dist/mjs/types/index.js.map +1 -1
  75. package/package.json +1 -1
  76. package/ts/api/resources/Ai.ts +8 -0
  77. package/ts/api/resources.ts +2 -0
  78. package/ts/types/Enum/AIPrompt.ts +44 -0
  79. package/ts/types/Enum/CommercialManagement.ts +1 -1
  80. package/ts/types/Enum/Role.ts +1 -0
  81. package/ts/types/Enum/RoleDetail.ts +10 -0
  82. package/ts/types/Interface/api/ai/AskQuestionCollaborator.ts +9 -0
  83. package/ts/types/Interface/models/IAIQuestion.ts +17 -0
  84. package/ts/types/Interface/models/IPayment.ts +1 -0
  85. package/ts/types/index.ts +3 -1
  86. package/dist/cjs/types/Enum/OCRPrompt.d.ts +0 -12
  87. package/dist/cjs/types/Enum/OCRPrompt.d.ts.map +0 -1
  88. package/dist/cjs/types/Enum/OCRPrompt.js +0 -24
  89. package/dist/cjs/types/Enum/OCRPrompt.js.map +0 -1
  90. package/dist/mjs/types/Enum/OCRPrompt.d.ts +0 -12
  91. package/dist/mjs/types/Enum/OCRPrompt.d.ts.map +0 -1
  92. package/dist/mjs/types/Enum/OCRPrompt.js +0 -21
  93. package/dist/mjs/types/Enum/OCRPrompt.js.map +0 -1
  94. package/ts/types/Enum/OCRPrompt.ts +0 -25
@@ -179,6 +179,7 @@ import { StatisticMarketing } from './resources/statistic/Marketing';
179
179
  import { Follow } from './resources/Follow';
180
180
  import { AbsenceRequest } from './resources/AbsenceRequest';
181
181
  import { CompanyMarketingInformation } from './resources/CompanyMarketingInformation';
182
+ import { Ai } from './resources/Ai';
182
183
 
183
184
  export const resources = {
184
185
  simulation: Simulation,
@@ -362,4 +363,5 @@ export const resources = {
362
363
  follow: Follow,
363
364
  absenceRequest: AbsenceRequest,
364
365
  companyMarketingInformation: CompanyMarketingInformation,
366
+ ai: Ai,
365
367
  };
@@ -0,0 +1,44 @@
1
+ export enum AIPromptKey {
2
+ BANK_STATEMENT = 'bank_statement',
3
+ INVOICE = 'invoice',
4
+ INVOICE_CSV = 'invoice_csv',
5
+ ASK_COLLABORATOR = 'ask_collaborator',
6
+ }
7
+
8
+ interface AIPromptInfo {
9
+ userPrompt: string;
10
+ systemPrompt: string;
11
+ }
12
+
13
+ export const AIPrompt: Record<AIPromptKey, AIPromptInfo> = {
14
+ [AIPromptKey.BANK_STATEMENT]: {
15
+ userPrompt: 'Here are some lines from a bank statement (this might be a french one "relevé de comptes"), I need you to extract all the transactions from it.',
16
+ systemPrompt: 'Extract transactions from this bank statement in a json format like this: [{"dateValue": string (format like this YYYY-MM-DD), "label": string | null, "debit": number, "credit": number}, ...]',
17
+ },
18
+ [AIPromptKey.INVOICE]: {
19
+ userPrompt: 'Can you give me the info of this document in json format? (all the articles with their prices)',
20
+ systemPrompt: 'Convert this into a sensible structured json response. The output should be strictly be json with no extra commentary if you find a image in the document this is an invoice and you should return the info of the invoice',
21
+ },
22
+ [AIPromptKey.INVOICE_CSV]: {
23
+ userPrompt: 'Can you give me the info of this document in csv format? (all the articles with their prices)',
24
+ systemPrompt: 'Convert this into a sensible structured csv response (date, label, débit, crédit). The output should be strictly be csv with no extra commentary if you find a image in the document this is an invoice and you should return the info of the invoice'
25
+ },
26
+ [AIPromptKey.ASK_COLLABORATOR]: {
27
+ userPrompt: '', // this is not used
28
+ systemPrompt: `
29
+ Vous êtes un spécialiste reconnu en comptabilité française, droit fiscal, droit des entreprises et droit social.
30
+ Vous êtes parfaitement à jour des dernières lois, réglementations et jurisprudences en vigueur.
31
+ Votre mission est de fournir des réponses précises et professionnelles basées sur le contexte fourni,
32
+ dans un français irréprochable et un style concis.
33
+ Si le contexte ne contient pas les informations pertinentes pour répondre à la question,
34
+ veuillez l'indiquer clairement plutôt que d'inventer des informations.
35
+ Ne citez les sources que si cela est explicitement demandé.
36
+ Vous devez retourner votre réponse sous forme d'un objet JSON avec les champs suivants:
37
+ - 'category': la catégorie principale de la question (comptabilité, fiscalité, législation, sociale, ou autre si nécessaire)
38
+ - 'sub_category': la sous-catégorie spécifique de la question
39
+ - 'response': votre réponse détaillée à la question selon les critères mentionnés ci-dessus
40
+ - 'references': les références utilisées si demandée
41
+ Si la question est en dehors de votre domaine d'expertise, indiquez-le clairement et indiquez que la category et sub_category sont "hors sujet".
42
+ `,
43
+ },
44
+ } as const;
@@ -221,7 +221,7 @@ export const DefaultEmailTemplateList: Array<Omit<ISaleEmail, 'idSociety'>> = [
221
221
  name: 'modèle avoir par défaut',
222
222
  subject: 'Votre avoir',
223
223
  content:
224
- '<p>Bonjour <span style="color: rgb(131, 131, 132);">[nom_client]</span>, </p> <p>Vous trouverez ci-joint votre facture.</p> <p>Vous trouverez ci-joint votre bon de commande N°<span style="color: rgb(131, 131, 132);">[reference_document]</span> d’un montant de <span style="color: rgb(131, 131, 132);">[montant_ttc_document]</span>. </p> <p>Vous en souhaitant bonne réception.</p> <p>Cordialement,</p><p><span style="color: rgb(131, 131, 132);">[raison_sociale]</span></p>',
224
+ '<p>Bonjour <span style="color: rgb(131, 131, 132);">[nom_client]</span>, </p> <p>Vous trouverez ci-joint votre facture N°<span style="color: rgb(131, 131, 132);">[reference_document]</span> d’un montant de <span style="color: rgb(131, 131, 132);">[montant_ttc_document]</span>. </p> <p>Vous en souhaitant bonne réception.</p> <p>Cordialement,</p><p><span style="color: rgb(131, 131, 132);">[raison_sociale]</span></p>',
225
225
  type: EmailType.ASSET,
226
226
  isDefault: false,
227
227
  },
@@ -52,6 +52,7 @@ export enum Role {
52
52
  RATING = 56,
53
53
  INTERNAL_ACCOUNTANT = 57,
54
54
  MARKETING = 58,
55
+ RECOVERY_MANAGER = 59,
55
56
  }
56
57
 
57
58
  export const RoleAllowedToLogInAsClient = [
@@ -527,4 +527,14 @@ export const RoleDetail = {
527
527
  cnVpn: 'COMPTABLE',
528
528
  isGrade: false,
529
529
  },
530
+ RECOVERY_MANAGER: {
531
+ id: Role.RECOVERY_MANAGER,
532
+ name: 'Gestionnaire Recouvrement',
533
+ colorPrimary: '#8765D0',
534
+ colorSecondary: '#DED7F6',
535
+ handledInUserSocietyPermissionTable: false,
536
+ isService: false,
537
+ subRole: false,
538
+ isGrade: false,
539
+ },
530
540
  };
@@ -0,0 +1,9 @@
1
+ import { IsNotEmpty, IsString } from 'class-validator';
2
+ import { ApiProperty } from '../../../../utils';
3
+
4
+ export class AskQuestionCollaborator {
5
+ @ApiProperty()
6
+ @IsString()
7
+ @IsNotEmpty()
8
+ question: string;
9
+ }
@@ -0,0 +1,17 @@
1
+ import { IUser } from './IUser';
2
+
3
+ export interface IAIQuestion {
4
+ id: number;
5
+ question: string;
6
+ answer: string;
7
+ references?: string | null;
8
+ category?: string | null;
9
+ subCategory?: string | null;
10
+ totalTokens: number;
11
+ idUser: number;
12
+ createdAt?: Date | string;
13
+ updatedAt?: Date | string;
14
+
15
+ // Associations
16
+ user?: IUser;
17
+ }
@@ -34,6 +34,7 @@ export interface IPayment {
34
34
  idFile?: number | null;
35
35
  createdAt?: Date | null;
36
36
  updatedAt?: Date | null;
37
+ deletedAt?: Date | null;
37
38
 
38
39
  // Associations
39
40
  paymentsPrestations?: IPrestation;
package/ts/types/index.ts CHANGED
@@ -347,6 +347,7 @@ export * from './Interface/models/IReminder';
347
347
  export * from './Interface/models/IScheduledReminder';
348
348
  export * from './Interface/models/IReminderAttachment';
349
349
  export * from './Interface/models/IStateBankAccount';
350
+ export * from './Interface/models/IAIQuestion';
350
351
 
351
352
  // Schemas
352
353
  export * from './Interface/schemas/IRegistrationDetail';
@@ -574,7 +575,7 @@ export * from './Enum/QualificationLead';
574
575
  export * from './Enum/Template';
575
576
  export * from './Enum/Marketing';
576
577
  export * from './Enum/EnglishLevel';
577
- export * from './Enum/OCRPrompt';
578
+ export * from './Enum/AIPrompt';
578
579
  export * from './Enum/SocietyTypeExportCsv';
579
580
 
580
581
  // Interfaces API
@@ -1207,3 +1208,4 @@ export * from './Interface/api/regulation/Query';
1207
1208
  export * from './Interface/api/regulation/Read';
1208
1209
  export * from './Interface/api/regulation/Create';
1209
1210
  export * from './Interface/api/marketing/NewLeadSheet';
1211
+ export * from './Interface/api/ai/AskQuestionCollaborator';
@@ -1,12 +0,0 @@
1
- export declare enum OCRPromptKey {
2
- BANK_STATEMENT = "bank_statement",
3
- INVOICE = "invoice",
4
- INVOICE_CSV = "invoice_csv"
5
- }
6
- interface OCRPromptInfo {
7
- userPrompt: string;
8
- systemPrompt: string;
9
- }
10
- export declare const OCRPrompt: Record<OCRPromptKey, OCRPromptInfo>;
11
- export {};
12
- //# sourceMappingURL=OCRPrompt.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OCRPrompt.d.ts","sourceRoot":"","sources":["../../../../ts/types/Enum/OCRPrompt.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,cAAc,mBAAmB;IACjC,OAAO,YAAY;IACnB,WAAW,gBAAgB;CAC5B;AAED,UAAU,aAAa;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,YAAY,EAAE,aAAa,CAahD,CAAC"}
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OCRPrompt = exports.OCRPromptKey = void 0;
4
- var OCRPromptKey;
5
- (function (OCRPromptKey) {
6
- OCRPromptKey["BANK_STATEMENT"] = "bank_statement";
7
- OCRPromptKey["INVOICE"] = "invoice";
8
- OCRPromptKey["INVOICE_CSV"] = "invoice_csv";
9
- })(OCRPromptKey || (exports.OCRPromptKey = OCRPromptKey = {}));
10
- exports.OCRPrompt = {
11
- [OCRPromptKey.BANK_STATEMENT]: {
12
- userPrompt: 'Here are some lines from a bank statement (this might be a french one "relevé de comptes"), I need you to extract all the transactions from it.',
13
- systemPrompt: 'Extract transactions from this bank statement in a json format like this: [{"dateValue": string (format like this YYYY-MM-DD), "label": string | null, "debit": number, "credit": number}, ...]',
14
- },
15
- [OCRPromptKey.INVOICE]: {
16
- userPrompt: 'Can you give me the info of this document in json format? (all the articles with their prices)',
17
- systemPrompt: 'Convert this into a sensible structured json response. The output should be strictly be json with no extra commentary if you find a image in the document this is an invoice and you should return the info of the invoice',
18
- },
19
- [OCRPromptKey.INVOICE_CSV]: {
20
- userPrompt: 'Can you give me the info of this document in csv format? (all the articles with their prices)',
21
- systemPrompt: 'Convert this into a sensible structured csv response (date, label, débit, crédit). The output should be strictly be csv with no extra commentary if you find a image in the document this is an invoice and you should return the info of the invoice'
22
- }
23
- };
24
- //# sourceMappingURL=OCRPrompt.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OCRPrompt.js","sourceRoot":"","sources":["../../../../ts/types/Enum/OCRPrompt.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,iDAAiC,CAAA;IACjC,mCAAmB,CAAA;IACnB,2CAA2B,CAAA;AAC7B,CAAC,EAJW,YAAY,4BAAZ,YAAY,QAIvB;AAOY,QAAA,SAAS,GAAwC;IAC5D,CAAC,YAAY,CAAC,cAAc,CAAC,EAAE;QAC7B,UAAU,EAAE,iJAAiJ;QAC7J,YAAY,EAAE,iMAAiM;KAChN;IACD,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE;QACtB,UAAU,EAAE,gGAAgG;QAC5G,YAAY,EAAE,4NAA4N;KAC3O;IACD,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE;QAC1B,UAAU,EAAE,+FAA+F;QAC3G,YAAY,EAAE,uPAAuP;KACtQ;CACO,CAAC","sourcesContent":["export enum OCRPromptKey {\n BANK_STATEMENT = 'bank_statement',\n INVOICE = 'invoice',\n INVOICE_CSV = 'invoice_csv',\n}\n\ninterface OCRPromptInfo {\n userPrompt: string;\n systemPrompt: string;\n}\n\nexport const OCRPrompt: Record<OCRPromptKey, OCRPromptInfo> = {\n [OCRPromptKey.BANK_STATEMENT]: {\n userPrompt: 'Here are some lines from a bank statement (this might be a french one \"relevé de comptes\"), I need you to extract all the transactions from it.',\n systemPrompt: 'Extract transactions from this bank statement in a json format like this: [{\"dateValue\": string (format like this YYYY-MM-DD), \"label\": string | null, \"debit\": number, \"credit\": number}, ...]',\n },\n [OCRPromptKey.INVOICE]: {\n userPrompt: 'Can you give me the info of this document in json format? (all the articles with their prices)',\n systemPrompt: 'Convert this into a sensible structured json response. The output should be strictly be json with no extra commentary if you find a image in the document this is an invoice and you should return the info of the invoice',\n },\n [OCRPromptKey.INVOICE_CSV]: {\n userPrompt: 'Can you give me the info of this document in csv format? (all the articles with their prices)',\n systemPrompt: 'Convert this into a sensible structured csv response (date, label, débit, crédit). The output should be strictly be csv with no extra commentary if you find a image in the document this is an invoice and you should return the info of the invoice'\n }\n} as const;"]}
@@ -1,12 +0,0 @@
1
- export declare enum OCRPromptKey {
2
- BANK_STATEMENT = "bank_statement",
3
- INVOICE = "invoice",
4
- INVOICE_CSV = "invoice_csv"
5
- }
6
- interface OCRPromptInfo {
7
- userPrompt: string;
8
- systemPrompt: string;
9
- }
10
- export declare const OCRPrompt: Record<OCRPromptKey, OCRPromptInfo>;
11
- export {};
12
- //# sourceMappingURL=OCRPrompt.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OCRPrompt.d.ts","sourceRoot":"","sources":["../../../../ts/types/Enum/OCRPrompt.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,cAAc,mBAAmB;IACjC,OAAO,YAAY;IACnB,WAAW,gBAAgB;CAC5B;AAED,UAAU,aAAa;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,YAAY,EAAE,aAAa,CAahD,CAAC"}
@@ -1,21 +0,0 @@
1
- export var OCRPromptKey;
2
- (function (OCRPromptKey) {
3
- OCRPromptKey["BANK_STATEMENT"] = "bank_statement";
4
- OCRPromptKey["INVOICE"] = "invoice";
5
- OCRPromptKey["INVOICE_CSV"] = "invoice_csv";
6
- })(OCRPromptKey || (OCRPromptKey = {}));
7
- export const OCRPrompt = {
8
- [OCRPromptKey.BANK_STATEMENT]: {
9
- userPrompt: 'Here are some lines from a bank statement (this might be a french one "relevé de comptes"), I need you to extract all the transactions from it.',
10
- systemPrompt: 'Extract transactions from this bank statement in a json format like this: [{"dateValue": string (format like this YYYY-MM-DD), "label": string | null, "debit": number, "credit": number}, ...]',
11
- },
12
- [OCRPromptKey.INVOICE]: {
13
- userPrompt: 'Can you give me the info of this document in json format? (all the articles with their prices)',
14
- systemPrompt: 'Convert this into a sensible structured json response. The output should be strictly be json with no extra commentary if you find a image in the document this is an invoice and you should return the info of the invoice',
15
- },
16
- [OCRPromptKey.INVOICE_CSV]: {
17
- userPrompt: 'Can you give me the info of this document in csv format? (all the articles with their prices)',
18
- systemPrompt: 'Convert this into a sensible structured csv response (date, label, débit, crédit). The output should be strictly be csv with no extra commentary if you find a image in the document this is an invoice and you should return the info of the invoice'
19
- }
20
- };
21
- //# sourceMappingURL=OCRPrompt.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OCRPrompt.js","sourceRoot":"","sources":["../../../../ts/types/Enum/OCRPrompt.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,iDAAiC,CAAA;IACjC,mCAAmB,CAAA;IACnB,2CAA2B,CAAA;AAC7B,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB;AAOD,MAAM,CAAC,MAAM,SAAS,GAAwC;IAC5D,CAAC,YAAY,CAAC,cAAc,CAAC,EAAE;QAC7B,UAAU,EAAE,iJAAiJ;QAC7J,YAAY,EAAE,iMAAiM;KAChN;IACD,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE;QACtB,UAAU,EAAE,gGAAgG;QAC5G,YAAY,EAAE,4NAA4N;KAC3O;IACD,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE;QAC1B,UAAU,EAAE,+FAA+F;QAC3G,YAAY,EAAE,uPAAuP;KACtQ;CACO,CAAC","sourcesContent":["export enum OCRPromptKey {\n BANK_STATEMENT = 'bank_statement',\n INVOICE = 'invoice',\n INVOICE_CSV = 'invoice_csv',\n}\n\ninterface OCRPromptInfo {\n userPrompt: string;\n systemPrompt: string;\n}\n\nexport const OCRPrompt: Record<OCRPromptKey, OCRPromptInfo> = {\n [OCRPromptKey.BANK_STATEMENT]: {\n userPrompt: 'Here are some lines from a bank statement (this might be a french one \"relevé de comptes\"), I need you to extract all the transactions from it.',\n systemPrompt: 'Extract transactions from this bank statement in a json format like this: [{\"dateValue\": string (format like this YYYY-MM-DD), \"label\": string | null, \"debit\": number, \"credit\": number}, ...]',\n },\n [OCRPromptKey.INVOICE]: {\n userPrompt: 'Can you give me the info of this document in json format? (all the articles with their prices)',\n systemPrompt: 'Convert this into a sensible structured json response. The output should be strictly be json with no extra commentary if you find a image in the document this is an invoice and you should return the info of the invoice',\n },\n [OCRPromptKey.INVOICE_CSV]: {\n userPrompt: 'Can you give me the info of this document in csv format? (all the articles with their prices)',\n systemPrompt: 'Convert this into a sensible structured csv response (date, label, débit, crédit). The output should be strictly be csv with no extra commentary if you find a image in the document this is an invoice and you should return the info of the invoice'\n }\n} as const;"]}
@@ -1,25 +0,0 @@
1
- export enum OCRPromptKey {
2
- BANK_STATEMENT = 'bank_statement',
3
- INVOICE = 'invoice',
4
- INVOICE_CSV = 'invoice_csv',
5
- }
6
-
7
- interface OCRPromptInfo {
8
- userPrompt: string;
9
- systemPrompt: string;
10
- }
11
-
12
- export const OCRPrompt: Record<OCRPromptKey, OCRPromptInfo> = {
13
- [OCRPromptKey.BANK_STATEMENT]: {
14
- userPrompt: 'Here are some lines from a bank statement (this might be a french one "relevé de comptes"), I need you to extract all the transactions from it.',
15
- systemPrompt: 'Extract transactions from this bank statement in a json format like this: [{"dateValue": string (format like this YYYY-MM-DD), "label": string | null, "debit": number, "credit": number}, ...]',
16
- },
17
- [OCRPromptKey.INVOICE]: {
18
- userPrompt: 'Can you give me the info of this document in json format? (all the articles with their prices)',
19
- systemPrompt: 'Convert this into a sensible structured json response. The output should be strictly be json with no extra commentary if you find a image in the document this is an invoice and you should return the info of the invoice',
20
- },
21
- [OCRPromptKey.INVOICE_CSV]: {
22
- userPrompt: 'Can you give me the info of this document in csv format? (all the articles with their prices)',
23
- systemPrompt: 'Convert this into a sensible structured csv response (date, label, débit, crédit). The output should be strictly be csv with no extra commentary if you find a image in the document this is an invoice and you should return the info of the invoice'
24
- }
25
- } as const;