mirror of
https://github.com/hexastack/hexabot
synced 2025-02-23 12:59:14 +00:00
fix: nlu format return
This commit is contained in:
parent
af7b8e7204
commit
0243c71740
@ -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:
|
* 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.
|
* 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission.
|
||||||
@ -120,7 +120,10 @@ export default abstract class BaseNlpHelper<
|
|||||||
*
|
*
|
||||||
* @returns The formatted NLP training set
|
* @returns The formatted NLP training set
|
||||||
*/
|
*/
|
||||||
async format(samples: NlpSampleFull[], entities: NlpEntityFull[]) {
|
async format(
|
||||||
|
samples: NlpSampleFull[],
|
||||||
|
entities: NlpEntityFull[],
|
||||||
|
): Promise<Record<string, any>[]> {
|
||||||
const entityMap = NlpEntity.getEntityMap(entities);
|
const entityMap = NlpEntity.getEntityMap(entities);
|
||||||
const valueMap = NlpValue.getValueMap(
|
const valueMap = NlpValue.getValueMap(
|
||||||
NlpValue.getValuesFromEntities(entities),
|
NlpValue.getValuesFromEntities(entities),
|
||||||
|
Loading…
Reference in New Issue
Block a user