Skip to content

Commit

Permalink
chore(js/client): moved client to beta namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelgj committed Feb 1, 2025
1 parent 6de1b10 commit 277f8d3
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions js/genkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
"import": "./lib/plugin.mjs",
"default": "./lib/plugin.js"
},
"./client": {
"./beta/client": {
"types": "./lib/client/index.d.ts",
"require": "./lib/client/index.js",
"import": "./lib/client/index.mjs",
Expand Down Expand Up @@ -214,7 +214,7 @@
"plugin": [
"lib/plugin"
],
"client": [
"beta/client": [
"lib/client/index"
]
}
Expand Down
2 changes: 1 addition & 1 deletion js/genkit/src/client/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const __flowStreamDelimiter = '\n\n';
* For example:
*
* ```js
* import { streamFlow } from 'genkit/client';
* import { streamFlow } from 'genkit/beta/client';
*
* const response = streamFlow({
* url: 'https://my-flow-deployed-url',
Expand Down
4 changes: 2 additions & 2 deletions js/plugins/express/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ app.post(
);
```

Flows and actions exposed using the `expressHandler` function can be accessed using `genkit/client` library:
Flows and actions exposed using the `expressHandler` function can be accessed using `genkit/beta/client` library:

```ts
import { runFlow, streamFlow } from 'genkit/client';
import { runFlow, streamFlow } from 'genkit/beta/client';

const result = await runFlow({
url: `http://localhost:${port}/simpleFlow`,
Expand Down
2 changes: 1 addition & 1 deletion js/plugins/express/tests/express_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import * as assert from 'assert';
import express from 'express';
import { GenerateResponseData, Genkit, genkit, z } from 'genkit';
import { runFlow, streamFlow } from 'genkit/client';
import { runFlow, streamFlow } from 'genkit/beta/client';
import { GenerateResponseChunkData, ModelAction } from 'genkit/model';
import getPort from 'get-port';
import * as http from 'http';
Expand Down
2 changes: 1 addition & 1 deletion js/plugins/firebase/tests/functions_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import * as express from 'express';
import { initializeApp } from 'firebase/app';
import { getFunctions, httpsCallableFromURL } from 'firebase/functions';
import { Genkit, genkit } from 'genkit';
import { runFlow, streamFlow } from 'genkit/client';
import { runFlow, streamFlow } from 'genkit/beta/client';
import * as getPort from 'get-port';
import * as http from 'http';
import { RequestWithAuth, noAuth, onFlow } from '../lib/functions.js';
Expand Down
2 changes: 1 addition & 1 deletion js/plugins/next/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { appRoute } from '@genkit-ai/nextjs';
export const POST = appRoute(simpleFlow);
```

APIs can be called with the generic `genkit/client` library, or `@genkit-ai/nextjs/client`
APIs can be called with the generic `genkit/beta/client` library, or `@genkit-ai/nextjs/client`

```ts
import { runFlow, streamFlow } from '@genkit-ai/nextjs/client';
Expand Down
2 changes: 1 addition & 1 deletion js/plugins/next/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { Action } from '@genkit-ai/core';
import {
runFlow as baseRunFlow,
streamFlow as baseStreamFlow,
} from 'genkit/client';
} from 'genkit/beta/client';

type Input<A extends Action> =
A extends Action<infer I, any, any> ? I['_output'] : never;
Expand Down
2 changes: 1 addition & 1 deletion tests/src/flow_server_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import { readFileSync } from 'fs';
import { streamFlow } from 'genkit/client';
import { streamFlow } from 'genkit/beta/client';
import * as yaml from 'yaml';
import { retriable, runTestsForApp } from './utils.js';

Expand Down

0 comments on commit 277f8d3

Please sign in to comment.