fix: return type

This commit is contained in:
Mohamed Marrouchi 2025-01-23 18:21:35 +01:00
parent 0243c71740
commit 43d63cfa82

View File

@ -123,7 +123,7 @@ export default abstract class BaseNlpHelper<
async format(
samples: NlpSampleFull[],
entities: NlpEntityFull[],
): Promise<Record<string, any>[]> {
): Promise<Record<string, any>[] | Record<string, any>> {
const entityMap = NlpEntity.getEntityMap(entities);
const valueMap = NlpValue.getValueMap(
NlpValue.getValuesFromEntities(entities),