Complex Workflow with All Stages

User Intent

"How do I configure a workflow with all processing stages? Show me complete workflow setup."

Operation

SDK Method: createWorkflow() with all stages Use Case: Comprehensive content processing pipeline


Code Example (TypeScript)

import { Graphlit } from 'graphlit-client';
import {
  FilePreparationServiceTypes,
  ExtractionServiceTypes,
  ObservableTypes
} from 'graphlit-client/dist/generated/graphql-types';

const graphlit = new Graphlit();

const workflow = await graphlit.createWorkflow({
  name: "Complete Processing Pipeline",
  
  // Stage 1: Preparation (text extraction, OCR, transcription)
  preparation: {
    jobs: [{
      connector: {
        type: FilePreparationServiceTypes.ModelDocument,
        chunkSize: 1000,
        chunkOverlap: 200
      }
    }]
  },
  
  // Stage 2: Extraction (entity extraction)
  extraction: {
    jobs: [{
      connector: {
        type: EntityExtractionServiceTypes.ModelText,
        extractedTypes: [
          ObservableTypes.Person,
          ObservableTypes.Organization,
          ObservableTypes.Place,
          ObservableTypes.Event
        ]
      }
    }]
  },
  
  // Stage 3: Enrichment (future feature)
  // enrichment: {
  //   jobs: [{ /* enrichment config */ }]
  // },
  
  // Specification (which model to use)
  specification: { id: 'specification-id' }
});

console.log(`Created comprehensive workflow: ${workflow.createWorkflow.id}`);

Workflow Stages

Preparation: Text extraction, OCR, transcription Extraction: Entity extraction, classification Enrichment: External data augmentation (future)


Last updated

Was this helpful?