Genkit JS API reference
Preparing search index...
genkit
/
Action
Type Alias Action<I, O, S, RunOptions, Init>
Action
:
(
input
?:
z
.
TypeOf
<
I
>
,
options
?:
RunOptions
)
=>
Promise
<
z
.
TypeOf
<
O
>
>
&
{
run
(
input
?:
z
.
TypeOf
<
I
>
,
options
?:
RunOptions
,
)
:
Promise
<
ActionResult
<
z
.
TypeOf
<
O
>
>
>
;
stream
(
input
?:
z
.
TypeOf
<
I
>
,
opts
?:
RunOptions
)
:
StreamingResponse
<
O
,
S
>
;
}
Self-describing, validating, observable, locally and remotely callable function.
Type Parameters
I
extends
z
.
ZodTypeAny
=
z
.
ZodTypeAny
O
extends
z
.
ZodTypeAny
=
z
.
ZodTypeAny
S
extends
z
.
ZodTypeAny
=
z
.
ZodTypeAny
RunOptions
extends
ActionRunOptions
<
z
.
TypeOf
<
S
>
,
z
.
TypeOf
<
Init
>
>
=
ActionRunOptions
<
z
.
TypeOf
<
S
>
,
any
>
Init
extends
z
.
ZodTypeAny
=
z
.
ZodTypeAny
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Genkit JS API reference
Loading...
Self-describing, validating, observable, locally and remotely callable function.