mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix: remove unsued utils
This commit is contained in:
parent
bab2e3082f
commit
04a008b6fd
@ -8,8 +8,6 @@
|
||||
|
||||
import { z } from 'zod';
|
||||
|
||||
import { BlockFull } from '../block.schema';
|
||||
|
||||
import { PayloadType } from './button';
|
||||
|
||||
export const payloadPatternSchema = z.object({
|
||||
@ -59,19 +57,3 @@ export const patternSchema = z.union([
|
||||
]);
|
||||
|
||||
export type Pattern = z.infer<typeof patternSchema>;
|
||||
|
||||
export type NlpPatternMatchResult = {
|
||||
block: BlockFull;
|
||||
matchedPattern: NlpPattern[];
|
||||
};
|
||||
|
||||
export function isNlpPattern(pattern: NlpPattern) {
|
||||
return (
|
||||
(typeof pattern === 'object' &&
|
||||
pattern !== null &&
|
||||
'entity' in pattern &&
|
||||
'match' in pattern &&
|
||||
pattern.match === 'entity') ||
|
||||
pattern.match === 'value'
|
||||
);
|
||||
}
|
||||
|
@ -13,7 +13,6 @@ import {
|
||||
IsIn,
|
||||
IsInt,
|
||||
IsNotEmpty,
|
||||
IsNumber,
|
||||
IsOptional,
|
||||
IsString,
|
||||
Matches,
|
||||
@ -56,7 +55,6 @@ export class NlpEntityCreateDto {
|
||||
type: Number,
|
||||
minimum: 1,
|
||||
})
|
||||
@IsNumber()
|
||||
@IsOptional()
|
||||
@Min(1, { message: 'Weight must be a positive integer' })
|
||||
@IsInt({ message: 'Weight must be an integer' })
|
||||
|
Loading…
Reference in New Issue
Block a user