mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix: remove unnecessary zod schema
This commit is contained in:
parent
828fdd9683
commit
949c5aded0
@ -6,8 +6,6 @@
|
||||
* 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file).
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
|
||||
import { SettingCreateDto } from '@/setting/dto/setting.dto';
|
||||
import { HyphenToUnderscore } from '@/utils/types/extension';
|
||||
|
||||
@ -17,15 +15,13 @@ import BaseNlpHelper from './lib/base-nlp-helper';
|
||||
import BaseStorageHelper from './lib/base-storage-helper';
|
||||
|
||||
export namespace NLU {
|
||||
const ParseEntitySchema = z.object({
|
||||
entity: z.string(),
|
||||
value: z.string(),
|
||||
confidence: z.number().min(0).max(1),
|
||||
start: z.number().optional(),
|
||||
end: z.number().optional(),
|
||||
});
|
||||
|
||||
export type ParseEntity = z.infer<typeof ParseEntitySchema>;
|
||||
export interface ParseEntity {
|
||||
entity: string; // Entity name
|
||||
value: string; // Value name
|
||||
confidence: number;
|
||||
start?: number;
|
||||
end?: number;
|
||||
}
|
||||
|
||||
export interface ParseEntities {
|
||||
entities: ParseEntity[];
|
||||
|
Loading…
Reference in New Issue
Block a user