Preparing search index...
The search index is not available
Genkit JS API reference
Genkit JS API reference
genkit
/
Flow
Interface Flow<I, O, S>
Flow is an observable, streamable, (optionally) strongly typed function.
interface
Flow
<
I
extends
ZodTypeAny
=
ZodTypeAny
,
O
extends
ZodTypeAny
=
ZodTypeAny
,
S
extends
ZodTypeAny
=
ZodTypeAny
,
>
{
__action
:
ActionMetadata
<
I
,
O
,
S
>
;
__registry
:
Registry
;
run
(
input
:
TypeOf
<
I
>
,
options
?:
ActionRunOptions
<
TypeOf
<
S
>
>
,
)
:
Promise
<
ActionResult
<
TypeOf
<
O
>
>
>
;
stream
(
input
?:
TypeOf
<
I
>
,
opts
?:
ActionRunOptions
<
TypeOf
<
S
>
>
,
)
:
StreamingResponse
<
O
,
S
>
;
(
input
?:
TypeOf
<
I
>
,
options
?:
ActionRunOptions
<
S
>
)
:
Promise
<
TypeOf
<
O
>
>
;
}
Type Parameters
I
extends
ZodTypeAny
=
ZodTypeAny
O
extends
ZodTypeAny
=
ZodTypeAny
S
extends
ZodTypeAny
=
ZodTypeAny
Hierarchy (
View Summary
)
Action
<
I
,
O
,
S
>
Flow
Flow
(
input
?:
TypeOf
<
I
>
,
options
?:
ActionRunOptions
<
S
>
)
:
Promise
<
TypeOf
<
O
>
>
Parameters
Optional
input
:
TypeOf
<
I
>
Optional
options
:
ActionRunOptions
<
S
>
Returns
Promise
<
TypeOf
<
O
>
>
Index
Properties
__action
__registry
Methods
run
stream
Properties
__action
__action
:
ActionMetadata
<
I
,
O
,
S
>
__registry
__registry
:
Registry
Methods
run
run
(
input
:
TypeOf
<
I
>
,
options
?:
ActionRunOptions
<
TypeOf
<
S
>
>
,
)
:
Promise
<
ActionResult
<
TypeOf
<
O
>
>
>
Parameters
input
:
TypeOf
<
I
>
Optional
options
:
ActionRunOptions
<
TypeOf
<
S
>
>
Returns
Promise
<
ActionResult
<
TypeOf
<
O
>
>
>
stream
stream
(
input
?:
TypeOf
<
I
>
,
opts
?:
ActionRunOptions
<
TypeOf
<
S
>
>
,
)
:
StreamingResponse
<
O
,
S
>
Parameters
Optional
input
:
TypeOf
<
I
>
Optional
opts
:
ActionRunOptions
<
TypeOf
<
S
>
>
Returns
StreamingResponse
<
O
,
S
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Properties
__action
__registry
Methods
run
stream
Genkit JS API reference
Loading...
Flow is an observable, streamable, (optionally) strongly typed function.