Skip to content

Commit

Permalink
Revert "fix(js): Make flow.run's first parameter optional"
Browse files Browse the repository at this point in the history
This reverts commit 46aa16a.
  • Loading branch information
inlined committed Feb 3, 2025
1 parent 46aa16a commit f158dd9
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 7 deletions.
10 changes: 3 additions & 7 deletions js/genkit/src/genkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export class Genkit implements HasRegistry {
options: DefineModelOptions<CustomOptionsSchema>,
runner: (
request: GenerateRequest<CustomOptionsSchema>,
sendChunk?: StreamingCallback<GenerateResponseChunkData>
streamingCallback?: StreamingCallback<GenerateResponseChunkData>
) => Promise<GenerateResponseData>
): ModelAction<CustomOptionsSchema> {
return defineModel(this.registry, options, runner);
Expand Down Expand Up @@ -721,9 +721,7 @@ export class Genkit implements HasRegistry {
* A flow step that executes the provided function. Each run step is recorded separately in the trace.
*
* ```ts
* ai.defineFlow({
* name: 'hello'
* }, async() => {
* ai.defineFlow('hello', async() => {
* await ai.run('step1', async () => {
* // ... step 1
* });
Expand All @@ -740,9 +738,7 @@ export class Genkit implements HasRegistry {
* A flow step that executes the provided function. Each run step is recorded separately in the trace.
*
* ```ts
* ai.defineFlow({
* name: 'hello'
* }, async() => {
* ai.defineFlow('hello', async() => {
* await ai.run('step1', async () => {
* // ... step 1
* });
Expand Down
46 changes: 46 additions & 0 deletions js/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f158dd9

Please sign in to comment.