Skip to content

Commit

Permalink
Merge pull request #624 from Hexastack/fix/nlu-helper-format
Browse files Browse the repository at this point in the history
fix: nlu format return
  • Loading branch information
marrouchi authored Jan 24, 2025
2 parents 26c9470 + 43d63cf commit fe5420e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions api/src/helper/lib/base-nlp-helper.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright © 2024 Hexastack. All rights reserved.
* Copyright © 2025 Hexastack. All rights reserved.
*
* Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms:
* 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission.
Expand Down Expand Up @@ -120,7 +120,10 @@ export default abstract class BaseNlpHelper<
*
* @returns The formatted NLP training set
*/
async format(samples: NlpSampleFull[], entities: NlpEntityFull[]) {
async format(
samples: NlpSampleFull[],
entities: NlpEntityFull[],
): Promise<Record<string, any>[] | Record<string, any>> {
const entityMap = NlpEntity.getEntityMap(entities);
const valueMap = NlpValue.getValueMap(
NlpValue.getValuesFromEntities(entities),
Expand Down

0 comments on commit fe5420e

Please sign in to comment.