import {Annotation} from '@langchain/langgraph'; import {ChangeType, DatabaseSchema, Status} from './types'; import {AnyObject} from '@loopback/repository'; export const DbQueryGraphStateAnnotation = Annotation.Root({ prompt: Annotation, schema: Annotation, sql: Annotation, status: Annotation, id: Annotation, feedbacks: Annotation, replyToUser: Annotation, datasetId: Annotation, sampleSqlPrompt: Annotation, sampleSql: Annotation, fromCache: Annotation, done: Annotation, resultArray: Annotation, description: Annotation, directCall: Annotation, validationChecklist: Annotation, syntacticStatus: Annotation, syntacticFeedback: Annotation, semanticStatus: Annotation, semanticFeedback: Annotation, syntacticErrorTables: Annotation, semanticErrorTables: Annotation, changeType: Annotation, fromTemplate: Annotation, templateId: Annotation, }); export type DbQueryState = typeof DbQueryGraphStateAnnotation.State;