Creates the initial state object for a research pipeline
The research query string
A Zod schema that defines the expected output structure
A fresh ResearchState object initialized with the provided query and schema
import { z } from 'zod';import { createInitialState } from '@plust/datasleuth';const outputSchema = z.object({ summary: z.string(), findings: z.array(z.string())});const initialState = createInitialState( "What are the latest advancements in renewable energy?", outputSchema); Copy
import { z } from 'zod';import { createInitialState } from '@plust/datasleuth';const outputSchema = z.object({ summary: z.string(), findings: z.array(z.string())});const initialState = createInitialState( "What are the latest advancements in renewable energy?", outputSchema);
Creates the initial state object for a research pipeline