diff --git a/api/src/chat/schemas/types/pattern.ts b/api/src/chat/schemas/types/pattern.ts index 6b430f69..48df5efe 100644 --- a/api/src/chat/schemas/types/pattern.ts +++ b/api/src/chat/schemas/types/pattern.ts @@ -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; - -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' - ); -} diff --git a/api/src/nlp/dto/nlp-entity.dto.ts b/api/src/nlp/dto/nlp-entity.dto.ts index 98c1002b..8c5c49e7 100644 --- a/api/src/nlp/dto/nlp-entity.dto.ts +++ b/api/src/nlp/dto/nlp-entity.dto.ts @@ -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' })