Skip to content

Commit

Permalink
chore: export some types
Browse files Browse the repository at this point in the history
  • Loading branch information
grabbou committed Jan 16, 2025
1 parent 2c6b3f8 commit f2b4643
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { generateObject, generateText } from 'ai'
import { z } from 'zod'

// tbd: return type
type Agent<T = any> = (prompt: T, context: string) => Promise<any>
export type Agent<T = any> = (prompt: T, context: string) => Promise<any>

/**
* On a high-level, Flow is a very simple structure.
Expand Down Expand Up @@ -73,7 +73,7 @@ function hydrate(definition: FlowDefinition<string>, agents: Record<string, Agen
}
}

function run({ agent, ...input }: Flow, context: string) {
export function run({ agent, ...input }: Flow, context: string) {
return agent(input, context)
}

Expand Down

0 comments on commit f2b4643

Please sign in to comment.