@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.
- package/dist/cjs/api/resources/Ai.d.ts +6 -0
- package/dist/cjs/api/resources/Ai.d.ts.map +1 -0
- package/dist/cjs/api/resources/Ai.js +11 -0
- package/dist/cjs/api/resources/Ai.js.map +1 -0
- package/dist/cjs/api/resources.d.ts +2 -0
- package/dist/cjs/api/resources.d.ts.map +1 -1
- package/dist/cjs/api/resources.js +2 -0
- package/dist/cjs/api/resources.js.map +1 -1
- package/dist/cjs/types/Enum/AIPrompt.d.ts +13 -0
- package/dist/cjs/types/Enum/AIPrompt.d.ts.map +1 -0
- package/dist/cjs/types/Enum/AIPrompt.js +43 -0
- package/dist/cjs/types/Enum/AIPrompt.js.map +1 -0
- package/dist/cjs/types/Enum/CommercialManagement.js +1 -1
- package/dist/cjs/types/Enum/CommercialManagement.js.map +1 -1
- package/dist/cjs/types/Enum/Role.d.ts +2 -1
- package/dist/cjs/types/Enum/Role.d.ts.map +1 -1
- package/dist/cjs/types/Enum/Role.js +1 -0
- package/dist/cjs/types/Enum/Role.js.map +1 -1
- package/dist/cjs/types/Enum/RoleDetail.d.ts +10 -0
- package/dist/cjs/types/Enum/RoleDetail.d.ts.map +1 -1
- package/dist/cjs/types/Enum/RoleDetail.js +10 -0
- package/dist/cjs/types/Enum/RoleDetail.js.map +1 -1
- package/dist/cjs/types/Interface/api/ai/AskQuestionCollaborator.d.ts +4 -0
- package/dist/cjs/types/Interface/api/ai/AskQuestionCollaborator.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/ai/AskQuestionCollaborator.js +24 -0
- package/dist/cjs/types/Interface/api/ai/AskQuestionCollaborator.js.map +1 -0
- package/dist/cjs/types/Interface/models/IAIQuestion.d.ts +15 -0
- package/dist/cjs/types/Interface/models/IAIQuestion.d.ts.map +1 -0
- package/dist/cjs/types/Interface/models/IAIQuestion.js +3 -0
- package/dist/cjs/types/Interface/models/IAIQuestion.js.map +1 -0
- package/dist/cjs/types/Interface/models/IPayment.d.ts +1 -0
- package/dist/cjs/types/Interface/models/IPayment.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IPayment.js.map +1 -1
- package/dist/cjs/types/index.d.ts +3 -1
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js +3 -1
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/mjs/api/resources/Ai.d.ts +6 -0
- package/dist/mjs/api/resources/Ai.d.ts.map +1 -0
- package/dist/mjs/api/resources/Ai.js +7 -0
- package/dist/mjs/api/resources/Ai.js.map +1 -0
- package/dist/mjs/api/resources.d.ts +2 -0
- package/dist/mjs/api/resources.d.ts.map +1 -1
- package/dist/mjs/api/resources.js +2 -0
- package/dist/mjs/api/resources.js.map +1 -1
- package/dist/mjs/types/Enum/AIPrompt.d.ts +13 -0
- package/dist/mjs/types/Enum/AIPrompt.d.ts.map +1 -0
- package/dist/mjs/types/Enum/AIPrompt.js +40 -0
- package/dist/mjs/types/Enum/AIPrompt.js.map +1 -0
- package/dist/mjs/types/Enum/CommercialManagement.js +1 -1
- package/dist/mjs/types/Enum/CommercialManagement.js.map +1 -1
- package/dist/mjs/types/Enum/Role.d.ts +2 -1
- package/dist/mjs/types/Enum/Role.d.ts.map +1 -1
- package/dist/mjs/types/Enum/Role.js +1 -0
- package/dist/mjs/types/Enum/Role.js.map +1 -1
- package/dist/mjs/types/Enum/RoleDetail.d.ts +10 -0
- package/dist/mjs/types/Enum/RoleDetail.d.ts.map +1 -1
- package/dist/mjs/types/Enum/RoleDetail.js +10 -0
- package/dist/mjs/types/Enum/RoleDetail.js.map +1 -1
- package/dist/mjs/types/Interface/api/ai/AskQuestionCollaborator.d.ts +4 -0
- package/dist/mjs/types/Interface/api/ai/AskQuestionCollaborator.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/ai/AskQuestionCollaborator.js +21 -0
- package/dist/mjs/types/Interface/api/ai/AskQuestionCollaborator.js.map +1 -0
- package/dist/mjs/types/Interface/models/IAIQuestion.d.ts +15 -0
- package/dist/mjs/types/Interface/models/IAIQuestion.d.ts.map +1 -0
- package/dist/mjs/types/Interface/models/IAIQuestion.js +2 -0
- package/dist/mjs/types/Interface/models/IAIQuestion.js.map +1 -0
- package/dist/mjs/types/Interface/models/IPayment.d.ts +1 -0
- package/dist/mjs/types/Interface/models/IPayment.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IPayment.js.map +1 -1
- package/dist/mjs/types/index.d.ts +3 -1
- package/dist/mjs/types/index.d.ts.map +1 -1
- package/dist/mjs/types/index.js +3 -1
- package/dist/mjs/types/index.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Ai.ts +8 -0
- package/ts/api/resources.ts +2 -0
- package/ts/types/Enum/AIPrompt.ts +44 -0
- package/ts/types/Enum/CommercialManagement.ts +1 -1
- package/ts/types/Enum/Role.ts +1 -0
- package/ts/types/Enum/RoleDetail.ts +10 -0
- package/ts/types/Interface/api/ai/AskQuestionCollaborator.ts +9 -0
- package/ts/types/Interface/models/IAIQuestion.ts +17 -0
- package/ts/types/Interface/models/IPayment.ts +1 -0
- package/ts/types/index.ts +3 -1
- package/dist/cjs/types/Enum/OCRPrompt.d.ts +0 -12
- package/dist/cjs/types/Enum/OCRPrompt.d.ts.map +0 -1
- package/dist/cjs/types/Enum/OCRPrompt.js +0 -24
- package/dist/cjs/types/Enum/OCRPrompt.js.map +0 -1
- package/dist/mjs/types/Enum/OCRPrompt.d.ts +0 -12
- package/dist/mjs/types/Enum/OCRPrompt.d.ts.map +0 -1
- package/dist/mjs/types/Enum/OCRPrompt.js +0 -21
- package/dist/mjs/types/Enum/OCRPrompt.js.map +0 -1
- package/ts/types/Enum/OCRPrompt.ts +0 -25
package/ts/api/resources.ts
CHANGED
|
@@ -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
|
|
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
|
},
|
package/ts/types/Enum/Role.ts
CHANGED
|
@@ -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,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
|
+
}
|
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/
|
|
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;
|