From f77d693e2271710fa50d63725d91860152335c35 Mon Sep 17 00:00:00 2001 From: Jacob Cable Date: Thu, 22 Aug 2024 12:07:00 +0100 Subject: [PATCH 1/2] refactor: rename @genkit-ai -> @genkit --- .github/workflows/bump-cli-version.yml | 4 +- .github/workflows/bump-js-plugins-version.yml | 28 +- .github/workflows/bump-js-version.yml | 12 +- docs/auth.md | 12 +- docs/dotprompt.md | 14 +- docs/durable-flows.md | 8 +- docs/evaluation.md | 8 +- docs/flows.md | 14 +- docs/get-started.md | 10 +- docs/index.md | 18 +- docs/models.md | 14 +- docs/monitoring.md | 2 +- docs/plugin-authoring-evaluator.md | 4 +- docs/plugin-authoring-telemetry.md | 8 +- docs/plugin-authoring.md | 24 +- docs/plugins/firebase.md | 32 +- docs/plugins/google-cloud.md | 4 +- docs/plugins/google-genai.md | 6 +- docs/plugins/langchain.md | 4 +- docs/plugins/ollama.md | 2 +- docs/plugins/vertex-ai.md | 26 +- docs/prompts.md | 6 +- docs/rag.md | 26 +- docs/templates/pgvector.md | 8 +- .../cli/config/firebase.index.ts.template | 8 +- .../cli/config/nextjs.genkit.ts.template | 6 +- .../cli/config/nodejs.index.ts.template | 6 +- genkit-tools/cli/package.json | 2 +- genkit-tools/cli/src/cli.ts | 4 +- genkit-tools/cli/src/commands/config.ts | 2 +- .../cli/src/commands/eval-extract-data.ts | 4 +- genkit-tools/cli/src/commands/eval-flow.ts | 8 +- genkit-tools/cli/src/commands/eval-run.ts | 6 +- .../cli/src/commands/flow-batch-run.ts | 4 +- genkit-tools/cli/src/commands/flow-resume.ts | 4 +- genkit-tools/cli/src/commands/flow-run.ts | 4 +- genkit-tools/cli/src/commands/init.ts | 4 +- genkit-tools/cli/src/commands/init/init-go.ts | 2 +- .../cli/src/commands/init/init-nodejs.ts | 24 +- genkit-tools/cli/src/commands/plugins.ts | 4 +- genkit-tools/cli/src/commands/start.ts | 6 +- genkit-tools/common/package.json | 2 +- genkit-tools/plugins/firebase/package.json | 4 +- genkit-tools/plugins/firebase/src/firebase.ts | 2 +- genkit-tools/plugins/google/package.json | 4 +- genkit-tools/plugins/google/src/google.ts | 2 +- genkit-tools/pnpm-lock.yaml | 6 +- js/ai/package.json | 4 +- js/ai/src/embedder.ts | 4 +- js/ai/src/evaluator.ts | 8 +- js/ai/src/generate.ts | 10 +- js/ai/src/model.ts | 4 +- js/ai/src/prompt.ts | 4 +- js/ai/src/retriever.ts | 4 +- js/ai/src/telemetry.ts | 8 +- js/ai/src/tool.ts | 8 +- js/ai/src/types.ts | 4 +- js/core/package.json | 2 +- js/flow/package.json | 4 +- js/flow/src/client/client.ts | 4 +- js/flow/src/context.ts | 6 +- js/flow/src/experimental.ts | 4 +- js/flow/src/firestoreStateStore.ts | 4 +- js/flow/src/flow.ts | 8 +- js/flow/src/index.ts | 2 +- js/flow/src/steps.ts | 2 +- js/flow/src/telemetry.ts | 8 +- js/flow/src/types.ts | 2 +- js/flow/tests/durable_test.ts | 4 +- js/flow/tests/flow_test.ts | 4 +- js/flow/tests/testUtil.ts | 4 +- js/plugins/chroma/package.json | 4 +- js/plugins/chroma/src/index.ts | 6 +- js/plugins/dev-local-vectorstore/package.json | 6 +- js/plugins/dev-local-vectorstore/src/index.ts | 6 +- js/plugins/dotprompt/package.json | 6 +- js/plugins/dotprompt/src/index.ts | 6 +- js/plugins/dotprompt/src/metadata.ts | 11 +- js/plugins/dotprompt/src/picoschema.ts | 2 +- js/plugins/dotprompt/src/prompt.ts | 10 +- js/plugins/dotprompt/src/registry.ts | 8 +- js/plugins/dotprompt/src/template.ts | 4 +- js/plugins/dotprompt/tests/prompt_test.ts | 4 +- js/plugins/dotprompt/tests/template_test.ts | 4 +- js/plugins/evaluators/package.json | 8 +- js/plugins/evaluators/src/index.ts | 8 +- .../src/metrics/answer_relevancy.ts | 10 +- .../evaluators/src/metrics/faithfulness.ts | 8 +- .../evaluators/src/metrics/maliciousness.ts | 8 +- js/plugins/firebase/package.json | 10 +- js/plugins/firebase/src/auth.ts | 2 +- js/plugins/firebase/src/experimental.ts | 10 +- js/plugins/firebase/src/firestoreRetriever.ts | 4 +- .../firebase/src/firestoreTraceStore.ts | 4 +- js/plugins/firebase/src/functions.ts | 6 +- js/plugins/firebase/src/helpers.ts | 2 +- js/plugins/firebase/src/index.ts | 8 +- js/plugins/google-cloud/package.json | 6 +- js/plugins/google-cloud/src/gcpLogger.ts | 2 +- .../google-cloud/src/gcpOpenTelemetry.ts | 2 +- js/plugins/google-cloud/src/index.ts | 2 +- js/plugins/google-cloud/tests/logs_test.ts | 12 +- js/plugins/google-cloud/tests/metrics_test.ts | 12 +- js/plugins/google-cloud/tests/traces_test.ts | 8 +- js/plugins/googleai/package.json | 6 +- js/plugins/googleai/src/embedder.ts | 2 +- js/plugins/googleai/src/gemini.ts | 6 +- js/plugins/googleai/src/index.ts | 2 +- js/plugins/googleai/tests/gemini_test.ts | 2 +- js/plugins/langchain/package.json | 6 +- js/plugins/langchain/src/evaluators.ts | 4 +- js/plugins/langchain/src/index.ts | 9 +- js/plugins/langchain/src/model.ts | 6 +- js/plugins/ollama/package.json | 4 +- js/plugins/ollama/src/index.ts | 6 +- js/plugins/pinecone/package.json | 4 +- js/plugins/pinecone/src/index.ts | 6 +- js/plugins/vertexai/package.json | 8 +- js/plugins/vertexai/src/anthropic.ts | 4 +- js/plugins/vertexai/src/embedder.ts | 2 +- js/plugins/vertexai/src/evaluation.ts | 2 +- js/plugins/vertexai/src/evaluator_factory.ts | 6 +- js/plugins/vertexai/src/gemini.ts | 6 +- js/plugins/vertexai/src/imagen.ts | 2 +- js/plugins/vertexai/src/index.ts | 6 +- js/plugins/vertexai/src/model_garden.ts | 4 +- .../vertexai/src/openai_compatibility.ts | 6 +- js/plugins/vertexai/src/predict.ts | 2 +- .../vertexai/src/vector-search/bigquery.ts | 4 +- .../vertexai/src/vector-search/firestore.ts | 2 +- .../vertexai/src/vector-search/indexers.ts | 8 +- .../vector-search/query_public_endpoint.ts | 2 +- .../vertexai/src/vector-search/retrievers.ts | 4 +- .../vertexai/src/vector-search/types.ts | 7 +- js/plugins/vertexai/tests/anthropic_test.ts | 2 +- js/plugins/vertexai/tests/gemini_test.ts | 2 +- .../tests/vector-search/bigquery_test.ts | 2 +- js/pnpm-lock.yaml | 340 +++++++++--------- js/testapps/anthropic-models/package.json | 12 +- js/testapps/anthropic-models/src/index.ts | 8 +- js/testapps/byo-evaluator/package.json | 18 +- .../src/deliciousness/deliciousness.ts | 8 +- .../deliciousness/deliciousness_evaluator.ts | 4 +- .../byo-evaluator/src/funniness/funniness.ts | 8 +- .../src/funniness/funniness_evaluator.ts | 4 +- js/testapps/byo-evaluator/src/index.ts | 12 +- .../byo-evaluator/src/pii/pii_detection.ts | 8 +- .../byo-evaluator/src/pii/pii_evaluator.ts | 4 +- .../src/regex/regex_evaluator.ts | 2 +- js/testapps/cat-eval/package.json | 18 +- js/testapps/cat-eval/src/index.ts | 14 +- js/testapps/cat-eval/src/pdf_rag.ts | 10 +- js/testapps/cat-eval/src/setup.ts | 2 +- js/testapps/dev-ui-gallery/package.json | 18 +- js/testapps/dev-ui-gallery/src/index.ts | 14 +- .../dev-ui-gallery/src/main/flows-durable.ts | 6 +- .../src/main/flows-firebase-functions.ts | 10 +- js/testapps/dev-ui-gallery/src/main/flows.ts | 2 +- .../dev-ui-gallery/src/main/prompts.ts | 6 +- js/testapps/dev-ui-gallery/src/main/tools.ts | 8 +- js/testapps/docs-menu-basic/package.json | 10 +- js/testapps/docs-menu-basic/src/index.ts | 8 +- js/testapps/docs-menu-rag/package.json | 12 +- js/testapps/docs-menu-rag/src/index.ts | 8 +- js/testapps/docs-menu-rag/src/indexer.ts | 8 +- js/testapps/docs-menu-rag/src/menuQA.ts | 10 +- js/testapps/eval/package.json | 12 +- js/testapps/eval/src/index.ts | 12 +- js/testapps/evaluator-gut-check/package.json | 16 +- js/testapps/evaluator-gut-check/src/index.ts | 12 +- js/testapps/express/package.json | 12 +- js/testapps/express/src/index.ts | 12 +- .../functions/package.json | 10 +- .../functions/src/index.ts | 14 +- js/testapps/flow-sample1/package.json | 6 +- js/testapps/flow-sample1/src/index.ts | 8 +- js/testapps/flow-simple-ai/package.json | 16 +- js/testapps/flow-simple-ai/src/index.ts | 18 +- .../google-ai-code-execution/package.json | 12 +- .../google-ai-code-execution/src/index.ts | 8 +- .../langchain/genkit-getting-started.txt | 24 +- js/testapps/langchain/package.json | 12 +- js/testapps/langchain/src/index.ts | 10 +- .../llm-human-in-the-loop/package.json | 10 +- .../llm-human-in-the-loop/src/index.ts | 10 +- js/testapps/menu/package.json | 16 +- js/testapps/menu/src/01/prompts.ts | 8 +- js/testapps/menu/src/02/flows.ts | 2 +- js/testapps/menu/src/02/prompts.ts | 4 +- js/testapps/menu/src/02/tools.ts | 2 +- js/testapps/menu/src/03/chats.ts | 2 +- js/testapps/menu/src/03/flows.ts | 8 +- js/testapps/menu/src/03/prompts.ts | 4 +- js/testapps/menu/src/04/flows.ts | 6 +- js/testapps/menu/src/04/prompts.ts | 4 +- js/testapps/menu/src/05/flows.ts | 2 +- js/testapps/menu/src/05/prompts.ts | 4 +- js/testapps/menu/src/index.ts | 6 +- js/testapps/prompt-file/package.json | 10 +- js/testapps/prompt-file/src/index.ts | 8 +- js/testapps/rag/package.json | 18 +- js/testapps/rag/src/index.ts | 14 +- js/testapps/rag/src/pdf_rag.ts | 10 +- js/testapps/rag/src/prompt.ts | 2 +- js/testapps/rag/src/simple_rag.ts | 6 +- .../package.json | 18 +- .../src/index.ts | 8 +- .../package.json | 18 +- .../src/index.ts | 8 +- .../package.json | 18 +- .../src/index.ts | 8 +- samples/chatbot/server/package.json | 10 +- samples/chatbot/server/src/index.ts | 15 +- samples/chatbot/server/src/memory.ts | 2 +- samples/js-angular/server/package.json | 10 +- samples/js-angular/server/src/agent.ts | 8 +- samples/js-angular/server/src/chatbot.ts | 6 +- samples/js-angular/server/src/index.ts | 6 +- .../js-angular/server/src/jsonStreaming.ts | 6 +- samples/js-coffee-shop/package.json | 18 +- samples/js-coffee-shop/src/index.ts | 10 +- samples/js-menu/package.json | 16 +- samples/js-menu/src/01/prompts.ts | 8 +- samples/js-menu/src/02/flows.ts | 2 +- samples/js-menu/src/02/prompts.ts | 4 +- samples/js-menu/src/02/tools.ts | 2 +- samples/js-menu/src/03/chats.ts | 2 +- samples/js-menu/src/03/flows.ts | 8 +- samples/js-menu/src/03/prompts.ts | 4 +- samples/js-menu/src/04/flows.ts | 6 +- samples/js-menu/src/04/prompts.ts | 4 +- samples/js-menu/src/05/flows.ts | 2 +- samples/js-menu/src/05/prompts.ts | 4 +- samples/js-menu/src/index.ts | 8 +- tests/test_js_app/src/index.ts | 8 +- 235 files changed, 1031 insertions(+), 1059 deletions(-) diff --git a/.github/workflows/bump-cli-version.yml b/.github/workflows/bump-cli-version.yml index c568bf649d..cfbd8bf934 100644 --- a/.github/workflows/bump-cli-version.yml +++ b/.github/workflows/bump-cli-version.yml @@ -48,8 +48,8 @@ jobs: PACKAGEJSON_DIR: genkit-tools/common with: default: ${{ inputs.releaseType }} - commit-message: 'chore: bump @genkit-ai/tools-common version to {{version}}' - tag-prefix: '@genkit-ai/tools-common@' + commit-message: 'chore: bump @genkit/tools-common version to {{version}}' + tag-prefix: '@genkit/tools-common@' - name: 'genkit-tools/cli version bump' uses: 'phips28/gh-action-bump-version@master' env: diff --git a/.github/workflows/bump-js-plugins-version.yml b/.github/workflows/bump-js-plugins-version.yml index 538e350279..c5338f8295 100644 --- a/.github/workflows/bump-js-plugins-version.yml +++ b/.github/workflows/bump-js-plugins-version.yml @@ -55,8 +55,8 @@ jobs: PACKAGEJSON_DIR: js/plugins/dev-local-vectorstore with: default: ${{ inputs.releaseType }} - commit-message: 'chore: bump @genkit-ai/dev-local-vectorstore version to {{version}}' - tag-prefix: '@genkit-ai/dev-local-vectorstore@' + commit-message: 'chore: bump @genkit/dev-local-vectorstore version to {{version}}' + tag-prefix: '@genkit/dev-local-vectorstore@' - name: 'js/plugins/dotprompt version bump' uses: 'phips28/gh-action-bump-version@master' env: @@ -64,8 +64,8 @@ jobs: PACKAGEJSON_DIR: js/plugins/dotprompt with: default: ${{ inputs.releaseType }} - commit-message: 'chore: bump @genkit-ai/dotprompt version to {{version}}' - tag-prefix: '@genkit-ai/dotprompt@' + commit-message: 'chore: bump @genkit/dotprompt version to {{version}}' + tag-prefix: '@genkit/dotprompt@' - name: 'js/plugins/evaluator version bump' uses: 'phips28/gh-action-bump-version@master' env: @@ -73,8 +73,8 @@ jobs: PACKAGEJSON_DIR: js/plugins/evaluator with: default: ${{ inputs.releaseType }} - commit-message: 'chore: bump @genkit-ai/evaluator version to {{version}}' - tag-prefix: '@genkit-ai/evaluator@' + commit-message: 'chore: bump @genkit/evaluator version to {{version}}' + tag-prefix: '@genkit/evaluator@' - name: 'js/plugins/firebase version bump' uses: 'phips28/gh-action-bump-version@master' env: @@ -82,8 +82,8 @@ jobs: PACKAGEJSON_DIR: js/plugins/firebase with: default: ${{ inputs.releaseType }} - commit-message: 'chore: bump @genkit-ai/firebase version to {{version}}' - tag-prefix: '@genkit-ai/firebase@' + commit-message: 'chore: bump @genkit/firebase version to {{version}}' + tag-prefix: '@genkit/firebase@' - name: 'js/plugins/google-cloud version bump' uses: 'phips28/gh-action-bump-version@master' env: @@ -91,8 +91,8 @@ jobs: PACKAGEJSON_DIR: js/plugins/google-cloud with: default: ${{ inputs.releaseType }} - commit-message: 'chore: bump @genkit-ai/google-cloud version to {{version}}' - tag-prefix: '@genkit-ai/google-cloud@' + commit-message: 'chore: bump @genkit/google-cloud version to {{version}}' + tag-prefix: '@genkit/google-cloud@' - name: 'js/plugins/googleai version bump' uses: 'phips28/gh-action-bump-version@master' env: @@ -100,8 +100,8 @@ jobs: PACKAGEJSON_DIR: js/plugins/googleai with: default: ${{ inputs.releaseType }} - commit-message: 'chore: bump @genkit-ai/googleai version to {{version}}' - tag-prefix: '@genkit-ai/googleai@' + commit-message: 'chore: bump @genkit/googleai version to {{version}}' + tag-prefix: '@genkit/googleai@' - name: 'js/plugins/langchain version bump' uses: 'phips28/gh-action-bump-version@master' env: @@ -136,5 +136,5 @@ jobs: PACKAGEJSON_DIR: js/plugins/vertexai with: default: ${{ inputs.releaseType }} - commit-message: 'chore: bump @genkit-ai/vertexai version to {{version}}' - tag-prefix: '@genkit-ai/vertexai@' + commit-message: 'chore: bump @genkit/vertexai version to {{version}}' + tag-prefix: '@genkit/vertexai@' diff --git a/.github/workflows/bump-js-version.yml b/.github/workflows/bump-js-version.yml index 458bf0ac6c..936d5c1b7a 100644 --- a/.github/workflows/bump-js-version.yml +++ b/.github/workflows/bump-js-version.yml @@ -46,8 +46,8 @@ jobs: PACKAGEJSON_DIR: js/core with: default: ${{ inputs.releaseType }} - commit-message: 'chore: bump @genkit-ai/tools-core version to {{version}}' - tag-prefix: '@genkit-ai/core@' + commit-message: 'chore: bump @genkit/tools-core version to {{version}}' + tag-prefix: '@genkit/core@' - name: 'js/ai version bump' uses: 'phips28/gh-action-bump-version@master' env: @@ -55,8 +55,8 @@ jobs: PACKAGEJSON_DIR: js/ai with: default: ${{ inputs.releaseType }} - commit-message: 'chore: bump @genkit-ai/ai version to {{version}}' - tag-prefix: '@genkit-ai/ai@' + commit-message: 'chore: bump @genkit/ai version to {{version}}' + tag-prefix: '@genkit/ai@' - name: 'js/flow version bump' uses: 'phips28/gh-action-bump-version@master' env: @@ -64,5 +64,5 @@ jobs: PACKAGEJSON_DIR: js/flow with: default: ${{ inputs.releaseType }} - commit-message: 'chore: bump @genkit-ai/flow version to {{version}}' - tag-prefix: '@genkit-ai/flow@' + commit-message: 'chore: bump @genkit/flow version to {{version}}' + tag-prefix: '@genkit/flow@' diff --git a/docs/auth.md b/docs/auth.md index eb097bea6e..38c2a7ea8c 100644 --- a/docs/auth.md +++ b/docs/auth.md @@ -21,7 +21,7 @@ All flows can define an `authPolicy` in their config. An auth policy is a functi If this field is set, it is executed before the flow is invoked: ```ts -import { defineFlow, runFlow } from '@genkit-ai/flow'; +import { defineFlow, runFlow } from '@genkit/flow'; export const selfSummaryFlow = defineFlow( { @@ -73,7 +73,7 @@ You can also retrieve the auth context for the flow at any time within the flow by calling `getFlowAuth()`, including in functions invoked by the flow: ```ts -import { getFlowAuth, defineFlow } from '@genkit-ai/flow'; +import { getFlowAuth, defineFlow } from '@genkit/flow'; async function readDatabase(uid: string) { if (getFlowAuth().admin) { @@ -123,8 +123,8 @@ You can use Firebase Auth to protect your flows defined with `onFlow()`: ```ts -import {firebaseAuth} from "@genkit-ai/firebase/auth"; -import {onFlow} from "@genkit-ai/firebase/functions"; +import {firebaseAuth} from "@genkit/firebase/auth"; +import {onFlow} from "@genkit/firebase/functions"; export const selfSummaryFlow = onFlow({ name: "selfSummaryFlow", @@ -176,7 +176,7 @@ indicate to the library that you are forgoing authorization checks by using the ```ts -import {onFlow, noAuth} from "@genkit-ai/firebase/functions"; +import {onFlow, noAuth} from "@genkit/firebase/functions"; export const selfSummaryFlow = onFlow({ name: "selfSummaryFlow", @@ -199,7 +199,7 @@ the following configuration options to your `onFlow()`: ```ts -import {onFlow} from "@genkit-ai/firebase/functions"; +import {onFlow} from "@genkit/firebase/functions"; export const selfSummaryFlow = onFlow({ name: "selfSummaryFlow", diff --git a/docs/dotprompt.md b/docs/dotprompt.md index 4c3bb0df93..3628cfe0e2 100644 --- a/docs/dotprompt.md +++ b/docs/dotprompt.md @@ -33,10 +33,10 @@ Greet a guest{{#if name}} named {{name}}{{/if}}{{#if style}} in the style of {{s ``` To use this prompt, install the `dotprompt` plugin, and import the `promptRef` function from -the `@genkit-ai/dotprompt` library: +the `@genkit/dotprompt` library: ```ts -import { dotprompt, promptRef } from '@genkit-ai/dotprompt'; +import { dotprompt, promptRef } from '@genkit/dotprompt'; configureGenkit({ plugins: [dotprompt()] }); ``` @@ -148,7 +148,7 @@ In addition to directly defining schemas in the `.prompt` file, you can referenc a schema registered with `defineSchema` by name. To register a schema: ```ts -import { defineSchema } from '@genkit-ai/core'; +import { defineSchema } from '@genkit/core'; import { z } from 'zod'; const MySchema = defineSchema( @@ -176,7 +176,7 @@ registered Zod schema. You can then utilize the schema to strongly type the output of a Dotprompt: ```ts -import { promptRef } from "@genkit-ai/dotprompt"; +import { promptRef } from "@genkit/dotprompt"; const myPrompt = promptRef("myPrompt"); @@ -397,7 +397,7 @@ Help the user decide between these vacation destinations: You may also define partials in code using `definePartial`: ```ts -import { definePartial } from '@genkit-ai/dotprompt'; +import { definePartial } from '@genkit/dotprompt'; definePartial( 'personality', @@ -438,7 +438,7 @@ You can define custom helpers to process and manage data inside of a prompt. Hel are registered globally using `defineHelper`: ```ts -import { defineHelper } from '@genkit-ai/dotprompt'; +import { defineHelper } from '@genkit/dotprompt'; defineHelper('shout', (text: string) => text.toUpperCase()); ``` @@ -476,7 +476,7 @@ import { loadPromptFile, loadPromptUrl, defineDotprompt, -} from '@genkit-ai/dotprompt'; +} from '@genkit/dotprompt'; import path from 'path'; import { z } from 'zod'; diff --git a/docs/durable-flows.md b/docs/durable-flows.md index 62ccc6a6fb..52a0429d5f 100644 --- a/docs/durable-flows.md +++ b/docs/durable-flows.md @@ -10,7 +10,7 @@ they are specifically designed for long-running background operations. Here's an example: ```js -import { onScheduledFlow } from '@genkit-ai/firebase/functions/experimental'; +import { onScheduledFlow } from '@genkit/firebase/functions/experimental'; export const jokeFlow = onScheduledFlow( { name: 'jokeFlow', inputSchema: z.string(), outputSchema: z.string() }, @@ -189,7 +189,7 @@ export const myFlow = onScheduledFlow( To resume the interrupted flow: ```js -// import { resumeFlow } from '@genkit-ai/flow/experimental'; +// import { resumeFlow } from '@genkit/flow/experimental'; await resumeFlow(myFlow, flowId, { approve: false, }); @@ -200,7 +200,7 @@ need to be careful to rethrow the error when wrapping the `interrupt` step in `try`-`catch`. ```js -import { InterruptError } from '@genkit-ai/flow/experimental'; +import { InterruptError } from '@genkit/flow/experimental'; export const myFlow = onScheduledFlow( { name: 'myFlow', outputSchema: z.boolean() }, @@ -302,7 +302,7 @@ export const myFlow = onScheduledFlow( Use `getFlowState()` to retrieve a flow's current state: ```javascript -// import { getFlowState } from '@genkit-ai/flow/experimental'; +// import { getFlowState } from '@genkit/flow/experimental'; const operation = await scheduleFlow(jokeFlow, 'banana'); console.log('Operation', operation); diff --git a/docs/evaluation.md b/docs/evaluation.md index aa750f04d0..0614f11ca8 100644 --- a/docs/evaluation.md +++ b/docs/evaluation.md @@ -10,8 +10,8 @@ of documents that was returned by the retriever so that you can evaluate the quality of your retriever while it runs in the context of the flow as shown below with the Genkit faithfulness and answer relevancy metrics: ```js -import { GenkitMetric, genkitEval } from '@genkit-ai/evaluator'; -import { textEmbeddingGecko } from '@genkit-ai/vertexai'; +import { GenkitMetric, genkitEval } from '@genkit/evaluator'; +import { textEmbeddingGecko } from '@genkit/vertexai'; export default configureGenkit({ plugins: [ @@ -25,10 +25,10 @@ export default configureGenkit({ }); ``` -Note: The configuration above requires installing the `@genkit-ai/evaluator` and `@genkit-ai/vertexai` packages. +Note: The configuration above requires installing the `@genkit/evaluator` and `@genkit/vertexai` packages. ```posix-terminal - npm install @genkit-ai/evaluator @genkit-ai/vertexai + npm install @genkit/evaluator @genkit/vertexai ``` Start by defining a set of inputs that you want to use as an input dataset called `testInputs.json`. This input dataset represents the test cases you will use to generate output for evaluation. diff --git a/docs/flows.md b/docs/flows.md index 98df428839..0bad6cf63e 100644 --- a/docs/flows.md +++ b/docs/flows.md @@ -8,7 +8,7 @@ Firebase Genkit provides CLI and Developer UI tooling for working with flows ## Defining flows ```javascript -import { defineFlow } from '@genkit-ai/flow'; +import { defineFlow } from '@genkit/flow'; export const menuSuggestionFlow = defineFlow( { @@ -25,7 +25,7 @@ export const menuSuggestionFlow = defineFlow( Input and output schemas for flows can be defined using `zod`. ```javascript -import { defineFlow } from '@genkit-ai/flow'; +import { defineFlow } from '@genkit/flow'; import * as z from 'zod'; export const menuSuggestionFlow = defineFlow( @@ -113,8 +113,8 @@ observability). To use flows with Cloud Functions for Firebase use the `firebase` plugin, replace `defineFlow` with `onFlow` and include an `authPolicy`. ```js -import { onFlow } from '@genkit-ai/firebase/functions'; -import { firebaseAuth } from '@genkit-ai/firebase/auth'; +import { onFlow } from '@genkit/firebase/functions'; +import { firebaseAuth } from '@genkit/firebase/auth'; export const menuSuggestionFlow = onFlow( { @@ -136,7 +136,7 @@ export const menuSuggestionFlow = onFlow( To deploy flows using Cloud Run and similar services, define your flows using `defineFlow` and then call `startFlowsServer()`: ```js -import { defineFlow, startFlowsServer } from '@genkit-ai/flow'; +import { defineFlow, startFlowsServer } from '@genkit/flow'; export const menuSuggestionFlow = defineFlow( { @@ -155,7 +155,7 @@ By default `startFlowsServer` will serve all the flows that you have defined in You can choose which flows are exposed via the flows server. You can specify a custom port (it will use the `PORT` environment variable if set). You can also set CORS settings. ```js -import { defineFlow, startFlowsServer } from '@genkit-ai/flow'; +import { defineFlow, startFlowsServer } from '@genkit/flow'; export const flowA = defineFlow({ name: 'flowA' }, async (subject) => { // .... @@ -179,7 +179,7 @@ startFlowsServer({ Sometimes when using 3rd party SDKs that that are not instrumented for observability, you might want to see them as a separate trace step in the Developer UI. All you need to do is wrap the code in the `run` function. ```js -import { defineFlow, run } from '@genkit-ai/flow'; +import { defineFlow, run } from '@genkit/flow'; export const menuSuggestionFlow = defineFlow( { diff --git a/docs/get-started.md b/docs/get-started.md index 0b7c02b890..6c3177e11c 100644 --- a/docs/get-started.md +++ b/docs/get-started.md @@ -88,14 +88,14 @@ so that it can be used outside of a Node project. import * as z from 'zod'; // Import the Genkit core libraries and plugins. - import { generate } from '@genkit-ai/ai'; - import { configureGenkit } from '@genkit-ai/core'; - import { defineFlow, startFlowsServer } from '@genkit-ai/flow'; - import { googleAI } from '@genkit-ai/googleai'; + import { generate } from '@genkit/ai'; + import { configureGenkit } from '@genkit/core'; + import { defineFlow, startFlowsServer } from '@genkit/flow'; + import { googleAI } from '@genkit/googleai'; // Import models from the Google AI plugin. The Google AI API provides access to // several generative models. Here, we import Gemini 1.5 Flash. - import { gemini15Flash } from '@genkit-ai/googleai'; + import { gemini15Flash } from '@genkit/googleai'; configureGenkit({ plugins: [ diff --git a/docs/index.md b/docs/index.md index a7351a5b61..39edd9d884 100644 --- a/docs/index.md +++ b/docs/index.md @@ -56,8 +56,8 @@ See the following code samples for a concrete idea of how to use these capabilit - {Basic generation} ```javascript - import { generate } from `@genkit-ai/ai`; - import { gemini15Flash, claude3Sonnet, llama31 } from '@genkit-ai/vertexai'; + import { generate } from `@genkit/ai`; + import { gemini15Flash, claude3Sonnet, llama31 } from '@genkit/vertexai'; import { gpt4o } from 'genkitx-openai'; // Use the same API to generate content from many models @@ -70,8 +70,8 @@ See the following code samples for a concrete idea of how to use these capabilit - {Structured generation} ```javascript - import { generate } from `@genkit-ai/ai`; - import { gemini15Flash } from `@genkit-ai/googleai`; + import { generate } from `@genkit/ai`; + import { gemini15Flash } from `@genkit/googleai`; import { z } from `zod`; const result = await generate({ @@ -95,8 +95,8 @@ See the following code samples for a concrete idea of how to use these capabilit - {Tool calling} ```javascript - import { generate, defineTool } from `@genkit-ai/ai`; - import { gemini15Flash } from `@genkit-ai/googleai`; + import { generate, defineTool } from `@genkit/ai`; + import { gemini15Flash } from `@genkit/googleai`; import { z } from `zod`; // Define tool to get weather data for a given location @@ -126,9 +126,9 @@ See the following code samples for a concrete idea of how to use these capabilit - {Retrieval} ```javascript - import { generate, retrieve } from `@genkit-ai/ai`; - import { devLocalRetrieverRef } from '@genkit-ai/dev-local-vectorstore'; - import { gemini15Flash } from `@genkit-ai/googleai`; + import { generate, retrieve } from `@genkit/ai`; + import { devLocalRetrieverRef } from '@genkit/dev-local-vectorstore'; + import { gemini15Flash } from `@genkit/googleai`; // Sample assumes Genkit documentation has been chunked, stored, and indexed in // local vectorstore in previous step. diff --git a/docs/models.md b/docs/models.md index d6962b17d1..967c75db40 100644 --- a/docs/models.md +++ b/docs/models.md @@ -17,9 +17,9 @@ this example you are configuring the Vertex AI plugin, which provides Gemini models. ```js -import { configureGenkit } from '@genkit-ai/core'; -import { firebase } from '@genkit-ai/firebase'; -import { vertexAI } from '@genkit-ai/vertexai'; +import { configureGenkit } from '@genkit/core'; +import { firebase } from '@genkit/firebase'; +import { vertexAI } from '@genkit/vertexai'; configureGenkit({ plugins: [vertexAI()], @@ -35,7 +35,7 @@ To use models provided by the plugin, you can either refer to them by name (e.g. provide additional type info about the model capabilities and options. ```js -import { gemini15Flash } from '@genkit-ai/vertexai'; +import { gemini15Flash } from '@genkit/vertexai'; ``` ## Supported models @@ -64,8 +64,8 @@ a wide variety of community supported models available you can discover by To just call the model: ```javascript -import { generate } from '@genkit-ai/ai'; -import { gemini15Flash } from '@genkit-ai/vertexai'; +import { generate } from '@genkit/ai'; +import { gemini15Flash } from '@genkit/vertexai'; (async () => { const llmResponse = await generate({ @@ -232,7 +232,7 @@ history = response.toHistory(); Genkit supports chunked streaming of model responses via the `generateStream()` method: ```ts -// import { generateStream } from '@genkit-ai/ai'; +// import { generateStream } from '@genkit/ai'; const { response, stream } = await generateStream({ model: gemini15Flash, prompt: 'Tell a long story about robots and ninjas.', diff --git a/docs/monitoring.md b/docs/monitoring.md index 591daafe37..e3f16f0965 100644 --- a/docs/monitoring.md +++ b/docs/monitoring.md @@ -31,7 +31,7 @@ want to enable TTL for the trace documents: https://firebase.google.com/docs/firestore/ttl ```ts -import { firebase } from '@genkit-ai/plugin-firebase'; +import { firebase } from '@genkit/plugin-firebase'; configureGenkit({ plugins: [firebase()], diff --git a/docs/plugin-authoring-evaluator.md b/docs/plugin-authoring-evaluator.md index bba9d3211a..b9f7793fe8 100644 --- a/docs/plugin-authoring-evaluator.md +++ b/docs/plugin-authoring-evaluator.md @@ -23,7 +23,7 @@ For this example, the prompt is going to ask the LLM to judge how delicious the Genkit comes with `dotprompt`, which provides an easy way to define and manage prompts with feautres such as input/output schema validation. Here is how you can use `dotprompt` to define an evaluation prompt. ```ts -import { defineDotprompt } from '@genkit-ai/dotprompt'; +import { defineDotprompt } from '@genkit/dotprompt'; // Define the expected output values const DELICIOUSNESS_VALUES = ['yes', 'no', 'maybe'] as const; @@ -297,7 +297,7 @@ Add the newly defined plugin to your Genkit configuration. For evaluation with Gemini, disable safety settings so that the evaluator can accept, detect, and score potentially harmful content. ```ts -import { gemini15Flash } from '@genkit-ai/googleai'; +import { gemini15Flash } from '@genkit/googleai'; export default configureGenkit({ plugins: [ diff --git a/docs/plugin-authoring-telemetry.md b/docs/plugin-authoring-telemetry.md index 9f775b5e15..71d0cdc897 100644 --- a/docs/plugin-authoring-telemetry.md +++ b/docs/plugin-authoring-telemetry.md @@ -35,7 +35,7 @@ Logging is provided separately so that a plugin can control where the data is written explicitly. ```ts -import { genkitPlugin, Plugin } from '@genkit-ai/core'; +import { genkitPlugin, Plugin } from '@genkit/core'; ... @@ -92,7 +92,7 @@ import { AggregationTemporality, InMemoryMetricExporter, MetricReader, PeriodicE import { AlwaysOnSampler, BatchSpanProcessor, InMemorySpanExporter } from '@opentelemetry/sdk-trace-base'; import { NodeSDKConfiguration } from '@opentelemetry/sdk-node'; import { Resource } from '@opentelemetry/resources'; -import { TelemetryConfig } from '@genkit-ai/core'; +import { TelemetryConfig } from '@genkit/core'; ... @@ -223,7 +223,7 @@ const myLogger: LoggerConfig = { ## Full Example The following is a full example of the telemetry plugin created above. For -a real world example, take a look at the `@genkit-ai/google-cloud` plugin. +a real world example, take a look at the `@genkit/google-cloud` plugin. ```ts import { @@ -231,7 +231,7 @@ import { LoggerConfig, Plugin, TelemetryConfig, -} from '@genkit-ai/core'; +} from '@genkit/core'; import { Span } from '@opentelemetry/api'; import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node'; import { Instrumentation } from '@opentelemetry/instrumentation'; diff --git a/docs/plugin-authoring.md b/docs/plugin-authoring.md index 97de1533be..bffbdf085d 100644 --- a/docs/plugin-authoring.md +++ b/docs/plugin-authoring.md @@ -5,8 +5,8 @@ that can provide models, retrievers, indexers, trace stores, and more. You've al action just by using Genkit: ```ts -import { configureGenkit } from '@genkit-ai/core'; -import { vertexAI } from '@genkit-ai/vertexai'; +import { configureGenkit } from '@genkit/core'; +import { vertexAI } from '@genkit/vertexai'; configureGenkit({ plugins: [vertexAI({ projectId: 'my-project' })], @@ -30,7 +30,7 @@ cd genkitx-my-plugin npm init -y -npm i --save @genkit-ai/core +npm i --save @genkit/core npm i --save-dev typescript @@ -40,7 +40,7 @@ npx tsc --init Then, define and export your plugin from your main entry point: ```ts -import { genkitPlugin } from '@genkit-ai/core'; +import { genkitPlugin } from '@genkit/core'; interface MyPluginOptions { // add any plugin configuration here @@ -62,7 +62,7 @@ requires a secret value, such as API keys, you should offer both an option and a default environment variable to configure it: ```ts -import { genkitPlugin, GenkitError } from '@genkit-ai/core'; +import { genkitPlugin, GenkitError } from '@genkit/core'; interface MyPluginOptions { apiKey?: string; @@ -101,18 +101,18 @@ A custom model generally consists of three components: 3. A function that implements the model accepting `GenerateRequest` and returning `GenerateResponse`. -To build a model plugin, you'll need to use the `@genkit-ai/ai` package: +To build a model plugin, you'll need to use the `@genkit/ai` package: ```posix-terminal -npm i --save @genkit-ai/ai +npm i --save @genkit/ai ``` At a high level, a model plugin might look something like this: ```ts -import { genkitPlugin, GenkitError } from '@genkit-ai/core'; -import { defineModel, GenerationCommonConfigSchema } from '@genkit-ai/ai/model'; -import { simulateSystemPrompt } from '@genkit-ai/ai/model/middleware'; +import { genkitPlugin, GenkitError } from '@genkit/core'; +import { defineModel, GenerationCommonConfigSchema } from '@genkit/ai/model'; +import { simulateSystemPrompt } from '@genkit/ai/model/middleware'; import { z } from 'zod'; export const myPlugin = genkitPlugin('my-plugin', async (options: {apiKey?: string}) => { @@ -162,7 +162,7 @@ export a model reference from your package that includes only the metadata for a model but not its implementation: ```ts -import { modelRef } from "@genkit-ai/ai/model"; +import { modelRef } from "@genkit/ai/model"; export myModelRef = modelRef({ name: "my-plugin/my-model", @@ -177,7 +177,7 @@ When calling `generate()`, model references and string model names can be used i ```ts import { myModelRef } from 'genkitx-my-plugin'; -import { generate } from '@genkit-ai/ai'; +import { generate } from '@genkit/ai'; generate({ model: myModelRef }); // is equivalent to diff --git a/docs/plugins/firebase.md b/docs/plugins/firebase.md index 04e1ef0e64..56bb19b13c 100644 --- a/docs/plugins/firebase.md +++ b/docs/plugins/firebase.md @@ -15,7 +15,7 @@ The Firebase plugin provides several integrations with Firebase services: ## Installation ```posix-terminal -npm i --save @genkit-ai/firebase +npm i --save @genkit/firebase ``` ## Prerequisites @@ -36,8 +36,8 @@ To use this plugin, specify it when you call `configureGenkit()`: ```js -import {configureGenkit} from "@genkit-ai/core"; -import {firebase} from "@genkit-ai/firebase"; +import {configureGenkit} from "@genkit/core"; +import {firebase} from "@genkit/firebase"; configureGenkit({ plugins: [firebase({projectId: "your-firebase-project"})], @@ -78,8 +78,8 @@ The plugin has a direct dependency on the [Google Cloud plugin](google-cloud.md) ```js -import {configureGenkit} from "@genkit-ai/core"; -import {firebase} from "@genkit-ai/firebase"; +import {configureGenkit} from "@genkit/core"; +import {firebase} from "@genkit/firebase"; configureGenkit({ plugins: [firebase()], @@ -113,8 +113,8 @@ retrievers, `defineFirestoreRetriever()`: ```js -import {defineFirestoreRetriever} from "@genkit-ai/firebase"; -import {retrieve} from "@genkit-ai/ai/retriever"; +import {defineFirestoreRetriever} from "@genkit/firebase"; +import {retrieve} from "@genkit/ai/retriever"; import {initializeApp} from "firebase-admin/app"; import {getFirestore} from "firebase-admin/firestore"; @@ -128,7 +128,7 @@ const yourRetrieverRef = defineFirestoreRetriever({ collection: "yourCollection", contentField: "yourDataChunks", vectorField: "embedding", - embedder: textEmbeddingGecko, // Import from '@genkit-ai/googleai' or '@genkit-ai/vertexai' + embedder: textEmbeddingGecko, // Import from '@genkit/googleai' or '@genkit/vertexai' distanceMeasure: "COSINE", // "EUCLIDEAN", "DOT_PRODUCT", or "COSINE" (default) }); ``` @@ -159,10 +159,10 @@ in the following way: ```ts -import { configureGenkit } from "@genkit-ai/core"; -import { embed } from "@genkit-ai/ai/embedder"; -import { defineFlow, run } from "@genkit-ai/flow"; -import { textEmbeddingGecko, vertexAI } from "@genkit-ai/vertexai"; +import { configureGenkit } from "@genkit/core"; +import { embed } from "@genkit/ai/embedder"; +import { defineFlow, run } from "@genkit/flow"; +import { textEmbeddingGecko, vertexAI } from "@genkit/vertexai"; import { applicationDefault, initializeApp } from "firebase-admin/app"; import { FieldValue, getFirestore } from "firebase-admin/firestore"; @@ -272,7 +272,7 @@ You can use Cloud Firestore to store traces: ```js -import {firebase} from "@genkit-ai/firebase"; +import {firebase} from "@genkit/firebase"; configureGenkit({ plugins: [firebase()], @@ -309,8 +309,8 @@ to call them. ```js -import {firebase} from "@genkit-ai/firebase"; -import {onFlow, noAuth} from "@genkit-ai/firebase/functions"; +import {firebase} from "@genkit/firebase"; +import {onFlow, noAuth} from "@genkit/firebase/functions"; configureGenkit({ plugins: [firebase()], @@ -372,7 +372,7 @@ Firebase Auth: ```js -import {firebaseAuth} from "@genkit-ai/firebase/auth"; +import {firebaseAuth} from "@genkit/firebase/auth"; export const exampleFlow = onFlow( { diff --git a/docs/plugins/google-cloud.md b/docs/plugins/google-cloud.md index 43332cef11..53d067f858 100644 --- a/docs/plugins/google-cloud.md +++ b/docs/plugins/google-cloud.md @@ -8,7 +8,7 @@ The Google Cloud plugin exports Firebase Genkit's telemetry and logging data to ## Installation ```posix-terminal -npm i --save @genkit-ai/google-cloud +npm i --save @genkit/google-cloud ``` If you want to locally run flows that use this plugin, you also need the @@ -33,7 +33,7 @@ Click [here](https://support.google.com/googleapi/answer/6158841) to learn more To enable exporting to Google Cloud Tracing, Logging, and Monitoring, add the `googleCloud` plugin to your Genkit configuration: ```ts -import { googleCloud } from '@genkit-ai/google-cloud'; +import { googleCloud } from '@genkit/google-cloud'; export default configureGenkit({ plugins: [googleCloud()], diff --git a/docs/plugins/google-genai.md b/docs/plugins/google-genai.md index 4cb2bbd2a9..4382ec2063 100644 --- a/docs/plugins/google-genai.md +++ b/docs/plugins/google-genai.md @@ -6,7 +6,7 @@ through the [Gemini API](https://ai.google.dev/docs/gemini_api_overview). ## Installation ```posix-terminal -npm i --save @genkit-ai/googleai +npm i --save @genkit/googleai ``` ## Configuration @@ -14,7 +14,7 @@ npm i --save @genkit-ai/googleai To use this plugin, specify it when you call `configureGenkit()`: ```js -import { googleAI } from '@genkit-ai/googleai'; +import { googleAI } from '@genkit/googleai'; export default configureGenkit({ plugins: [googleAI()], @@ -65,7 +65,7 @@ import { gemini15Flash, gemini15Pro, textEmbeddingGecko001, -} from '@genkit-ai/googleai'; +} from '@genkit/googleai'; ``` You can use these references to specify which model `generate()` uses: diff --git a/docs/plugins/langchain.md b/docs/plugins/langchain.md index 7ffaeaf4b1..9a261df101 100644 --- a/docs/plugins/langchain.md +++ b/docs/plugins/langchain.md @@ -12,8 +12,8 @@ You can use most LangChain chains or utilities in Genkit flows as is. The exampl uses LangChain retrievers, document loaders, and chain constructs to build a naive RAG sample. ```js -import { initializeGenkit } from '@genkit-ai/core'; -import { defineFlow, run, startFlowsServer } from '@genkit-ai/flow'; +import { initializeGenkit } from '@genkit/core'; +import { defineFlow, run, startFlowsServer } from '@genkit/flow'; import { GoogleVertexAIEmbeddings } from '@langchain/community/embeddings/googlevertexai'; import { GoogleVertexAI } from '@langchain/community/llms/googlevertexai'; import { StringOutputParser } from '@langchain/core/output_parsers'; diff --git a/docs/plugins/ollama.md b/docs/plugins/ollama.md index 8e0a85aa22..e5a706779d 100644 --- a/docs/plugins/ollama.md +++ b/docs/plugins/ollama.md @@ -64,7 +64,7 @@ the Google Auth library: ```js import { GoogleAuth } from 'google-auth-library'; import { ollama, OllamaPluginParams } from 'genkitx-ollama'; -import { configureGenkit, isDevEnv } from '@genkit-ai/core'; +import { configureGenkit, isDevEnv } from '@genkit/core'; const ollamaCommon = {models: [{name: "gemma:2b"}]}; const ollamaDev = { diff --git a/docs/plugins/vertex-ai.md b/docs/plugins/vertex-ai.md index 591a96003e..396a55f050 100644 --- a/docs/plugins/vertex-ai.md +++ b/docs/plugins/vertex-ai.md @@ -20,7 +20,7 @@ The Vertex AI plugin provides interfaces to several AI services: ## Installation ```posix-terminal -npm i --save @genkit-ai/vertexai +npm i --save @genkit/vertexai ``` If you want to locally run flows that use this plugin, you also need the @@ -31,7 +31,7 @@ If you want to locally run flows that use this plugin, you also need the To use this plugin, specify it when you call `configureGenkit()`: ```js -import { vertexAI } from '@genkit-ai/vertexai'; +import { vertexAI } from '@genkit/vertexai'; export default configureGenkit({ plugins: [ @@ -84,7 +84,7 @@ credentials. This plugin statically exports references to its supported generative AI models: ```js -import { gemini15Flash, gemini15Pro, imagen2 } from '@genkit-ai/vertexai'; +import { gemini15Flash, gemini15Pro, imagen2 } from '@genkit/vertexai'; ``` You can use these references to specify which model `generate()` uses: @@ -100,7 +100,7 @@ This plugin also statically exports a reference to the Gecko text embedding model: ```js -import { textEmbeddingGecko } from '@genkit-ai/vertexai'; +import { textEmbeddingGecko } from '@genkit/vertexai'; ``` You can use this reference to specify which embedder an indexer or retriever @@ -122,7 +122,7 @@ configureGenkit({ Or you can generate an embedding directly: ```js -// import { embed, EmbedderArgument } from '@genkit-ai/ai/embedder'; +// import { embed, EmbedderArgument } from '@genkit/ai/embedder'; const embedding = await embed({ embedder: textEmbeddingGecko, content: 'How many widgets do you have in stock?', @@ -141,7 +141,7 @@ import { claude3Haiku, claude3Sonnet, claude3Opus, -} from '@genkit-ai/vertexai'; +} from '@genkit/vertexai'; export default configureGenkit({ plugins: [ @@ -171,7 +171,7 @@ First you'll need to enable [Llama 3.1 API Service](https://console.cloud.google Here's sample configuration for Llama 3.1 405b in Vertex AI plugin: ```js -import { vertexAI, llama31 } from '@genkit-ai/vertexai'; +import { vertexAI, llama31 } from '@genkit/vertexai'; export default configureGenkit({ plugins: [ @@ -199,7 +199,7 @@ const llmResponse = await generate({ To use the evaluators from Vertex AI Rapid Evaluation, add an `evaluation` block to your `vertexAI` plugin configuration. ```js -import { vertexAI, VertexAIEvaluationMetricType } from '@genkit-ai/vertexai'; +import { vertexAI, VertexAIEvaluationMetricType } from '@genkit/vertexai'; export default configureGenkit({ plugins: [ @@ -282,7 +282,7 @@ To use Vertex AI Vector Search: import { getFirestoreDocumentIndexer, getFirestoreDocumentRetriever - } from '@genkit-ai/vertexai'; + } from '@genkit/vertexai'; import { initializeApp } from 'firebase-admin/app'; import { getFirestore } from 'firebase-admin/firestore'; @@ -302,7 +302,7 @@ To use Vertex AI Vector Search: import { getBigQueryDocumentIndexer, getBigQueryDocumentRetriever, - } from '@genkit-ai/vertexai'; + } from '@genkit/vertexai'; import { BigQuery } from '@google-cloud/bigquery'; const bq = new BigQuery({ projectId: PROJECT_ID }); @@ -334,8 +334,8 @@ To use Vertex AI Vector Search: 1. Add a `vectorSearchOptions` block to your `vertexAI` plugin configuration: ```js - import { configureGenkit } from '@genkit-ai/core'; - import { vertexAI, textEmbedding004 } from '@genkit-ai/vertexai'; + import { configureGenkit } from '@genkit/core'; + import { vertexAI, textEmbedding004 } from '@genkit/vertexai'; configureGenkit({ plugins: [ @@ -378,7 +378,7 @@ To use Vertex AI Vector Search: import { vertexAiIndexerRef, vertexAiRetrieverRef, - } from '@genkit-ai/vertexai'; + } from '@genkit/vertexai'; ``` Pass the references to `index()` and `retrieve()`: diff --git a/docs/prompts.md b/docs/prompts.md index d457e6dc3d..e26a86bce4 100644 --- a/docs/prompts.md +++ b/docs/prompts.md @@ -20,7 +20,7 @@ Genkit's `generate()` helper function accepts string prompts, and you can call models this way for straight-forward use cases. ```ts -import { generate } from '@genkit-ai/ai'; +import { generate } from '@genkit/ai'; generate({ model: 'googleai/gemini-1.5-flash-latest', @@ -49,7 +49,7 @@ to define your prompts and run them in the Developer UI. Use the `definePrompt` function to register your prompts with Genkit. ```ts -import { definePrompt } from '@genkit-ai/ai'; +import { definePrompt } from '@genkit/ai'; import z from 'zod'; export const helloPrompt = definePrompt( @@ -79,7 +79,7 @@ You can use this prompt in your code with the `renderPrompt()` helper function. Provide the input variables expected by the prompt, and the model to call. ```javascript -import { generate, render } from '@genkit-ai/ai'; +import { generate, render } from '@genkit/ai'; generate( renderPrompt({ diff --git a/docs/rag.md b/docs/rag.md index 4d07708b62..0c47d89c5a 100644 --- a/docs/rag.md +++ b/docs/rag.md @@ -139,8 +139,8 @@ npm i -D --save @types/pdf-parse import { devLocalIndexerRef, devLocalVectorstore, -} from '@genkit-ai/dev-local-vectorstore'; -import { textEmbeddingGecko, vertexAI } from '@genkit-ai/vertexai'; +} from '@genkit/dev-local-vectorstore'; +import { textEmbeddingGecko, vertexAI } from '@genkit/vertexai'; configureGenkit({ plugins: [ @@ -170,7 +170,7 @@ use in production_) #### Create the indexer ```ts -import { devLocalIndexerRef } from '@genkit-ai/dev-local-vectorstore'; +import { devLocalIndexerRef } from '@genkit/dev-local-vectorstore'; export const menuPdfIndexer = devLocalIndexerRef('menuQA'); ``` @@ -196,9 +196,9 @@ More chunking options for this library can be found in the [llm-chunk documentat #### Define your indexer flow ```ts -import { index } from '@genkit-ai/ai'; -import { Document } from '@genkit-ai/ai/retriever'; -import { defineFlow, run } from '@genkit-ai/flow'; +import { index } from '@genkit/ai'; +import { Document } from '@genkit/ai/retriever'; +import { defineFlow, run } from '@genkit/flow'; import { readFile } from 'fs/promises'; import { chunk } from 'llm-chunk'; import path from 'path'; @@ -260,11 +260,11 @@ the indexer example, this example uses Genkit's file-based vector retriever, which you should not use in production. ```ts -import { generate } from '@genkit-ai/ai'; -import { retrieve } from '@genkit-ai/ai/retriever'; -import { devLocalRetrieverRef } from '@genkit-ai/dev-local-vectorstore'; -import { defineFlow } from '@genkit-ai/flow'; -import { gemini15Flash } from '@genkit-ai/vertexai'; +import { generate } from '@genkit/ai'; +import { retrieve } from '@genkit/ai/retriever'; +import { devLocalRetrieverRef } from '@genkit/dev-local-vectorstore'; +import { defineFlow } from '@genkit/flow'; +import { gemini15Flash } from '@genkit/vertexai'; import * as z from 'zod'; // Define the retriever reference @@ -319,7 +319,7 @@ Simple retrievers let you easily convert existing code into retrievers: import { defineSimpleRetriever, retrieve -} from '@genkit-ai/ai/retriever'; +} from '@genkit/ai/retriever'; import { searchEmails } from './db'; import { z } from 'zod'; @@ -345,7 +345,7 @@ import { CommonRetrieverOptionsSchema, defineRetriever, retrieve, -} from '@genkit-ai/ai/retriever'; +} from '@genkit/ai/retriever'; import * as z from 'zod'; export const menuRetriever = devLocalRetrieverRef('menuQA'); diff --git a/docs/templates/pgvector.md b/docs/templates/pgvector.md index be8cf3b0cb..11951d6d30 100644 --- a/docs/templates/pgvector.md +++ b/docs/templates/pgvector.md @@ -5,10 +5,10 @@ following example as a starting point and modify it to work with your database schema. ```js -import { embed } from '@genkit-ai/ai/embedder'; -import { Document, defineRetriever, retrieve } from '@genkit-ai/ai/retriever'; -import { defineFlow } from '@genkit-ai/flow'; -import { textEmbeddingGecko } from '@genkit-ai/vertexai'; +import { embed } from '@genkit/ai/embedder'; +import { Document, defineRetriever, retrieve } from '@genkit/ai/retriever'; +import { defineFlow } from '@genkit/flow'; +import { textEmbeddingGecko } from '@genkit/vertexai'; import { toSql } from 'pgvector'; import postgres from 'postgres'; import { z } from 'zod'; diff --git a/genkit-tools/cli/config/firebase.index.ts.template b/genkit-tools/cli/config/firebase.index.ts.template index 4e71129a2c..ea072993f2 100644 --- a/genkit-tools/cli/config/firebase.index.ts.template +++ b/genkit-tools/cli/config/firebase.index.ts.template @@ -1,15 +1,15 @@ import * as z from "zod"; // Import the Genkit core libraries and plugins. -import {generate} from "@genkit-ai/ai"; -import {configureGenkit} from "@genkit-ai/core"; +import {generate} from "@genkit/ai"; +import {configureGenkit} from "@genkit/core"; $GENKIT_CONFIG_IMPORTS $GENKIT_MODEL_IMPORT // From the Firebase plugin, import the functions needed to deploy flows using // Cloud Functions. -import {firebaseAuth} from "@genkit-ai/firebase/auth"; -import {onFlow} from "@genkit-ai/firebase/functions"; +import {firebaseAuth} from "@genkit/firebase/auth"; +import {onFlow} from "@genkit/firebase/functions"; configureGenkit({ plugins: [ diff --git a/genkit-tools/cli/config/nextjs.genkit.ts.template b/genkit-tools/cli/config/nextjs.genkit.ts.template index 2ff912ef12..3785355ebe 100644 --- a/genkit-tools/cli/config/nextjs.genkit.ts.template +++ b/genkit-tools/cli/config/nextjs.genkit.ts.template @@ -3,9 +3,9 @@ import * as z from 'zod'; // Import the Genkit core libraries and plugins. -import { generate } from '@genkit-ai/ai'; -import { configureGenkit } from '@genkit-ai/core'; -import { defineFlow, runFlow } from '@genkit-ai/flow'; +import { generate } from '@genkit/ai'; +import { configureGenkit } from '@genkit/core'; +import { defineFlow, runFlow } from '@genkit/flow'; $GENKIT_CONFIG_IMPORTS $GENKIT_MODEL_IMPORT diff --git a/genkit-tools/cli/config/nodejs.index.ts.template b/genkit-tools/cli/config/nodejs.index.ts.template index dab293b00a..8d2823a0a3 100644 --- a/genkit-tools/cli/config/nodejs.index.ts.template +++ b/genkit-tools/cli/config/nodejs.index.ts.template @@ -1,9 +1,9 @@ import * as z from 'zod'; // Import the Genkit core libraries and plugins. -import { generate } from '@genkit-ai/ai'; -import { configureGenkit } from '@genkit-ai/core'; -import { defineFlow, startFlowsServer } from '@genkit-ai/flow'; +import { generate } from '@genkit/ai'; +import { configureGenkit } from '@genkit/core'; +import { defineFlow, startFlowsServer } from '@genkit/flow'; $GENKIT_CONFIG_IMPORTS $GENKIT_MODEL_IMPORT diff --git a/genkit-tools/cli/package.json b/genkit-tools/cli/package.json index 3616f5f831..48c8f70c0a 100644 --- a/genkit-tools/cli/package.json +++ b/genkit-tools/cli/package.json @@ -26,7 +26,7 @@ "directory": "genkit-tools/cli" }, "dependencies": { - "@genkit-ai/tools-common": "workspace:*", + "@genkit/tools-common": "workspace:*", "colorette": "^2.0.20", "commander": "^11.1.0", "extract-zip": "^2.0.1", diff --git a/genkit-tools/cli/src/cli.ts b/genkit-tools/cli/src/cli.ts index db3504d0d8..aaeae3e204 100644 --- a/genkit-tools/cli/src/cli.ts +++ b/genkit-tools/cli/src/cli.ts @@ -14,13 +14,13 @@ * limitations under the License. */ -import { ToolPluginSubCommandsSchema } from '@genkit-ai/tools-common/plugin'; +import { ToolPluginSubCommandsSchema } from '@genkit/tools-common/plugin'; import { RunCommandEvent, logger, notifyAnalyticsIfFirstRun, record, -} from '@genkit-ai/tools-common/utils'; +} from '@genkit/tools-common/utils'; import { Command, program } from 'commander'; import { config } from './commands/config'; import { evalExtractData } from './commands/eval-extract-data'; diff --git a/genkit-tools/cli/src/commands/config.ts b/genkit-tools/cli/src/commands/config.ts index 558c142e70..f9c269e198 100644 --- a/genkit-tools/cli/src/commands/config.ts +++ b/genkit-tools/cli/src/commands/config.ts @@ -21,7 +21,7 @@ import { logger, record, setUserSettings, -} from '@genkit-ai/tools-common/utils'; +} from '@genkit/tools-common/utils'; import * as clc from 'colorette'; import { Command } from 'commander'; diff --git a/genkit-tools/cli/src/commands/eval-extract-data.ts b/genkit-tools/cli/src/commands/eval-extract-data.ts index eda82bb443..8ad9c35bc7 100644 --- a/genkit-tools/cli/src/commands/eval-extract-data.ts +++ b/genkit-tools/cli/src/commands/eval-extract-data.ts @@ -14,12 +14,12 @@ * limitations under the License. */ -import { EnvTypes, EvalInput, TraceData } from '@genkit-ai/tools-common'; +import { EnvTypes, EvalInput, TraceData } from '@genkit/tools-common'; import { getEvalExtractors, logger, runInRunnerThenStop, -} from '@genkit-ai/tools-common/utils'; +} from '@genkit/tools-common/utils'; import { Command } from 'commander'; import { randomUUID } from 'crypto'; import { writeFile } from 'fs/promises'; diff --git a/genkit-tools/cli/src/commands/eval-flow.ts b/genkit-tools/cli/src/commands/eval-flow.ts index 3245fca410..1138c36bad 100644 --- a/genkit-tools/cli/src/commands/eval-flow.ts +++ b/genkit-tools/cli/src/commands/eval-flow.ts @@ -18,7 +18,7 @@ import { EvalInput, FlowInvokeEnvelopeMessage, FlowState, -} from '@genkit-ai/tools-common'; +} from '@genkit/tools-common'; import { EvalExporter, EvalFlowInput, @@ -27,8 +27,8 @@ import { extractMetricsMetadata, getEvalStore, getExporterForString, -} from '@genkit-ai/tools-common/eval'; -import { Runner } from '@genkit-ai/tools-common/runner'; +} from '@genkit/tools-common/eval'; +import { Runner } from '@genkit/tools-common/runner'; import { confirmLlmUse, evaluatorName, @@ -37,7 +37,7 @@ import { logger, runInRunnerThenStop, waitForFlowToComplete, -} from '@genkit-ai/tools-common/utils'; +} from '@genkit/tools-common/utils'; import { Command } from 'commander'; import { randomUUID } from 'crypto'; import { readFile } from 'fs/promises'; diff --git a/genkit-tools/cli/src/commands/eval-run.ts b/genkit-tools/cli/src/commands/eval-run.ts index d3ab2322e8..e98a950ddb 100644 --- a/genkit-tools/cli/src/commands/eval-run.ts +++ b/genkit-tools/cli/src/commands/eval-run.ts @@ -14,21 +14,21 @@ * limitations under the License. */ -import { EvalInput, EvalResponse } from '@genkit-ai/tools-common'; +import { EvalInput, EvalResponse } from '@genkit/tools-common'; import { EvalExporter, enrichResultsWithScoring, extractMetricsMetadata, getEvalStore, getExporterForString, -} from '@genkit-ai/tools-common/eval'; +} from '@genkit/tools-common/eval'; import { confirmLlmUse, evaluatorName, isEvaluator, logger, runInRunnerThenStop, -} from '@genkit-ai/tools-common/utils'; +} from '@genkit/tools-common/utils'; import { Command } from 'commander'; import { randomUUID } from 'crypto'; import { readFile } from 'fs/promises'; diff --git a/genkit-tools/cli/src/commands/flow-batch-run.ts b/genkit-tools/cli/src/commands/flow-batch-run.ts index 68a65e959e..3b31ba6de0 100644 --- a/genkit-tools/cli/src/commands/flow-batch-run.ts +++ b/genkit-tools/cli/src/commands/flow-batch-run.ts @@ -18,12 +18,12 @@ import { FlowInvokeEnvelopeMessage, FlowState, Operation, -} from '@genkit-ai/tools-common'; +} from '@genkit/tools-common'; import { logger, runInRunnerThenStop, waitForFlowToComplete, -} from '@genkit-ai/tools-common/utils'; +} from '@genkit/tools-common/utils'; import { Command } from 'commander'; import { readFile, writeFile } from 'fs/promises'; diff --git a/genkit-tools/cli/src/commands/flow-resume.ts b/genkit-tools/cli/src/commands/flow-resume.ts index 344945a494..1843f58cfc 100644 --- a/genkit-tools/cli/src/commands/flow-resume.ts +++ b/genkit-tools/cli/src/commands/flow-resume.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { FlowInvokeEnvelopeMessage, FlowState } from '@genkit-ai/tools-common'; -import { logger, runInRunnerThenStop } from '@genkit-ai/tools-common/utils'; +import { FlowInvokeEnvelopeMessage, FlowState } from '@genkit/tools-common'; +import { logger, runInRunnerThenStop } from '@genkit/tools-common/utils'; import { Command } from 'commander'; /** Command to start GenKit server, optionally without static file serving */ diff --git a/genkit-tools/cli/src/commands/flow-run.ts b/genkit-tools/cli/src/commands/flow-run.ts index 3c70ef0be1..14bcfea379 100644 --- a/genkit-tools/cli/src/commands/flow-run.ts +++ b/genkit-tools/cli/src/commands/flow-run.ts @@ -14,12 +14,12 @@ * limitations under the License. */ -import { FlowInvokeEnvelopeMessage, FlowState } from '@genkit-ai/tools-common'; +import { FlowInvokeEnvelopeMessage, FlowState } from '@genkit/tools-common'; import { logger, runInRunnerThenStop, waitForFlowToComplete, -} from '@genkit-ai/tools-common/utils'; +} from '@genkit/tools-common/utils'; import { Command } from 'commander'; import { writeFile } from 'fs/promises'; diff --git a/genkit-tools/cli/src/commands/init.ts b/genkit-tools/cli/src/commands/init.ts index dea3298d82..aec13361cf 100644 --- a/genkit-tools/cli/src/commands/init.ts +++ b/genkit-tools/cli/src/commands/init.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { Runtime } from '@genkit-ai/tools-common/runner'; -import { detectRuntime, logger } from '@genkit-ai/tools-common/utils'; +import { Runtime } from '@genkit/tools-common/runner'; +import { detectRuntime, logger } from '@genkit/tools-common/utils'; import { Command } from 'commander'; import * as inquirer from 'inquirer'; import { initGo } from './init/init-go'; diff --git a/genkit-tools/cli/src/commands/init/init-go.ts b/genkit-tools/cli/src/commands/init/init-go.ts index 03d276efe1..2212eedcf6 100644 --- a/genkit-tools/cli/src/commands/init/init-go.ts +++ b/genkit-tools/cli/src/commands/init/init-go.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { InitEvent, logger, record } from '@genkit-ai/tools-common/utils'; +import { InitEvent, logger, record } from '@genkit/tools-common/utils'; import { execSync } from 'child_process'; import fs from 'fs'; import * as inquirer from 'inquirer'; diff --git a/genkit-tools/cli/src/commands/init/init-nodejs.ts b/genkit-tools/cli/src/commands/init/init-nodejs.ts index e802148346..12eab8fbd9 100644 --- a/genkit-tools/cli/src/commands/init/init-nodejs.ts +++ b/genkit-tools/cli/src/commands/init/init-nodejs.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { InitEvent, record } from '@genkit-ai/tools-common/utils'; +import { InitEvent, record } from '@genkit/tools-common/utils'; import { exec } from 'child_process'; import extract from 'extract-zip'; import fs from 'fs'; @@ -64,10 +64,10 @@ interface ImportOptions { /** Model to plugin name. */ const modelOptions: Record = { - googleai: { label: 'Google AI', plugin: '@genkit-ai/googleai' }, + googleai: { label: 'Google AI', plugin: '@genkit/googleai' }, vertexai: { label: 'Google Cloud Vertex AI', - plugin: '@genkit-ai/vertexai', + plugin: '@genkit/vertexai', }, ollama: { label: 'Ollama (e.g. Gemma)', plugin: 'genkitx-ollama' }, none: { label: 'None', plugin: undefined }, @@ -75,24 +75,24 @@ const modelOptions: Record = { /** Supported platform to plugin name. */ const platformOptions: Record = { - firebase: { label: 'Firebase', plugin: '@genkit-ai/firebase' }, + firebase: { label: 'Firebase', plugin: '@genkit/firebase' }, other: { label: 'Other platforms', plugin: undefined }, }; /** Plugin name to descriptor. */ const pluginToInfo: Record = { - '@genkit-ai/firebase': { + '@genkit/firebase': { imports: 'firebase', init: ` // Load the Firebase plugin, which provides integrations with several // Firebase services. firebase()`.trimStart(), }, - '@genkit-ai/google-cloud': { + '@genkit/google-cloud': { imports: 'googleCloud', init: 'googleCloud()', }, - '@genkit-ai/vertexai': { + '@genkit/vertexai': { imports: 'vertexAI', modelImportComment: ` // Import models from the Vertex AI plugin. The Vertex AI API provides access to @@ -119,7 +119,7 @@ const pluginToInfo: Record = { })`.trimStart(), modelStr: "'ollama/gemma'", }, - '@genkit-ai/googleai': { + '@genkit/googleai': { imports: 'googleAI', modelImportComment: ` // Import models from the Google AI plugin. The Google AI API provides access to @@ -152,10 +152,10 @@ const externalDevPackages = ['typescript']; /** Internal packages required to use Genkit. */ const internalPackages = [ - '@genkit-ai/core', - '@genkit-ai/ai', - '@genkit-ai/dotprompt', - '@genkit-ai/flow', + '@genkit/core', + '@genkit/ai', + '@genkit/dotprompt', + '@genkit/flow', ]; const platformImportOptions: Record = { diff --git a/genkit-tools/cli/src/commands/plugins.ts b/genkit-tools/cli/src/commands/plugins.ts index f9d3b405b5..38ed40f82c 100644 --- a/genkit-tools/cli/src/commands/plugins.ts +++ b/genkit-tools/cli/src/commands/plugins.ts @@ -20,8 +20,8 @@ import { SupportedFlagValues, ToolPlugin, findToolsConfig, -} from '@genkit-ai/tools-common/plugin'; -import { logger } from '@genkit-ai/tools-common/utils'; +} from '@genkit/tools-common/plugin'; +import { logger } from '@genkit/tools-common/utils'; import * as clc from 'colorette'; import { Command } from 'commander'; diff --git a/genkit-tools/cli/src/commands/start.ts b/genkit-tools/cli/src/commands/start.ts index 226368ac62..b6f7499c60 100644 --- a/genkit-tools/cli/src/commands/start.ts +++ b/genkit-tools/cli/src/commands/start.ts @@ -14,9 +14,9 @@ * limitations under the License. */ -import { Runner } from '@genkit-ai/tools-common/runner'; -import { startServer } from '@genkit-ai/tools-common/server'; -import { logger } from '@genkit-ai/tools-common/utils'; +import { Runner } from '@genkit/tools-common/runner'; +import { startServer } from '@genkit/tools-common/server'; +import { logger } from '@genkit/tools-common/utils'; import * as clc from 'colorette'; import { Command } from 'commander'; diff --git a/genkit-tools/common/package.json b/genkit-tools/common/package.json index 59a3d031b6..299fb05248 100644 --- a/genkit-tools/common/package.json +++ b/genkit-tools/common/package.json @@ -1,5 +1,5 @@ { - "name": "@genkit-ai/tools-common", + "name": "@genkit/tools-common", "version": "0.5.10", "scripts": { "compile": "tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json ./tsconfig.types.json", diff --git a/genkit-tools/plugins/firebase/package.json b/genkit-tools/plugins/firebase/package.json index bb072e05f1..1ee8bf94f2 100644 --- a/genkit-tools/plugins/firebase/package.json +++ b/genkit-tools/plugins/firebase/package.json @@ -1,5 +1,5 @@ { - "name": "@genkit-ai/tools-plugin-firebase", + "name": "@genkit/tools-plugin-firebase", "version": "0.5.10", "scripts": { "compile": "tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json ./tsconfig.types.json", @@ -8,7 +8,7 @@ "build:watch": "tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json ./tsconfig.types.json --watch" }, "devDependencies": { - "@genkit-ai/tools-common": "workspace:*", + "@genkit/tools-common": "workspace:*", "@types/node": "^20.11.19", "npm-run-all": "^4.1.5", "typescript": "^4.9.0" diff --git a/genkit-tools/plugins/firebase/src/firebase.ts b/genkit-tools/plugins/firebase/src/firebase.ts index 4def97d78b..7914517d6b 100644 --- a/genkit-tools/plugins/firebase/src/firebase.ts +++ b/genkit-tools/plugins/firebase/src/firebase.ts @@ -19,7 +19,7 @@ import { ToolPlugin, cliCommand, promptContinue, -} from '@genkit-ai/tools-common/plugin'; +} from '@genkit/tools-common/plugin'; import * as clc from 'colorette'; export const FirebaseTools: ToolPlugin = { diff --git a/genkit-tools/plugins/google/package.json b/genkit-tools/plugins/google/package.json index d9ae1825ee..4df4e2c834 100644 --- a/genkit-tools/plugins/google/package.json +++ b/genkit-tools/plugins/google/package.json @@ -1,5 +1,5 @@ { - "name": "@genkit-ai/tools-plugin-google-cloud", + "name": "@genkit/tools-plugin-google-cloud", "version": "0.5.10", "scripts": { "compile": "tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json ./tsconfig.types.json", @@ -8,7 +8,7 @@ "build:watch": "tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json ./tsconfig.types.json --watch" }, "devDependencies": { - "@genkit-ai/tools-common": "workspace:*", + "@genkit/tools-common": "workspace:*", "@types/node": "^20.11.19", "npm-run-all": "^4.1.5", "typescript": "^4.9.0" diff --git a/genkit-tools/plugins/google/src/google.ts b/genkit-tools/plugins/google/src/google.ts index 336062ba98..e163fcb87d 100644 --- a/genkit-tools/plugins/google/src/google.ts +++ b/genkit-tools/plugins/google/src/google.ts @@ -19,7 +19,7 @@ import { ToolPlugin, cliCommand, promptContinue, -} from '@genkit-ai/tools-common/plugin'; +} from '@genkit/tools-common/plugin'; import * as clc from 'colorette'; export const GoogleCloudTools: ToolPlugin = { diff --git a/genkit-tools/pnpm-lock.yaml b/genkit-tools/pnpm-lock.yaml index 2672e59bfc..23c75a79a9 100644 --- a/genkit-tools/pnpm-lock.yaml +++ b/genkit-tools/pnpm-lock.yaml @@ -26,7 +26,7 @@ importers: cli: dependencies: - '@genkit-ai/tools-common': + '@genkit/tools-common': specifier: workspace:* version: link:../common colorette: @@ -200,7 +200,7 @@ importers: specifier: ^2.0.20 version: 2.0.20 devDependencies: - '@genkit-ai/tools-common': + '@genkit/tools-common': specifier: workspace:* version: link:../../common '@types/node': @@ -219,7 +219,7 @@ importers: specifier: ^2.0.20 version: 2.0.20 devDependencies: - '@genkit-ai/tools-common': + '@genkit/tools-common': specifier: workspace:* version: link:../../common '@types/node': diff --git a/js/ai/package.json b/js/ai/package.json index b66106b5aa..4d79e2b7f2 100644 --- a/js/ai/package.json +++ b/js/ai/package.json @@ -1,5 +1,5 @@ { - "name": "@genkit-ai/ai", + "name": "@genkit/ai", "description": "Genkit AI framework generative AI APIs.", "keywords": [ "genkit", @@ -26,7 +26,7 @@ "author": "genkit", "license": "Apache-2.0", "dependencies": { - "@genkit-ai/core": "workspace:*", + "@genkit/core": "workspace:*", "@opentelemetry/api": "^1.7.0", "@types/node": "^20.11.19", "json5": "^2.2.3", diff --git a/js/ai/src/embedder.ts b/js/ai/src/embedder.ts index 1da93ad08b..1932d958c0 100644 --- a/js/ai/src/embedder.ts +++ b/js/ai/src/embedder.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { Action, defineAction } from '@genkit-ai/core'; -import { lookupAction } from '@genkit-ai/core/registry'; +import { Action, defineAction } from '@genkit/core'; +import { lookupAction } from '@genkit/core/registry'; import * as z from 'zod'; import { Document, DocumentData, DocumentDataSchema } from './document.js'; diff --git a/js/ai/src/evaluator.ts b/js/ai/src/evaluator.ts index 5ce0636a78..d61dc843e7 100644 --- a/js/ai/src/evaluator.ts +++ b/js/ai/src/evaluator.ts @@ -14,10 +14,10 @@ * limitations under the License. */ -import { Action, defineAction } from '@genkit-ai/core'; -import { logger } from '@genkit-ai/core/logging'; -import { lookupAction } from '@genkit-ai/core/registry'; -import { SPAN_TYPE_ATTR, runInNewSpan } from '@genkit-ai/core/tracing'; +import { Action, defineAction } from '@genkit/core'; +import { logger } from '@genkit/core/logging'; +import { lookupAction } from '@genkit/core/registry'; +import { SPAN_TYPE_ATTR, runInNewSpan } from '@genkit/core/tracing'; import * as z from 'zod'; export const ATTR_PREFIX = 'genkit'; diff --git a/js/ai/src/generate.ts b/js/ai/src/generate.ts index ebda1c3225..7febe7f7f5 100755 --- a/js/ai/src/generate.ts +++ b/js/ai/src/generate.ts @@ -20,13 +20,9 @@ import { GenkitError, runWithStreamingCallback, StreamingCallback, -} from '@genkit-ai/core'; -import { lookupAction } from '@genkit-ai/core/registry'; -import { - parseSchema, - toJsonSchema, - validateSchema, -} from '@genkit-ai/core/schema'; +} from '@genkit/core'; +import { lookupAction } from '@genkit/core/registry'; +import { parseSchema, toJsonSchema, validateSchema } from '@genkit/core/schema'; import { z } from 'zod'; import { DocumentData } from './document.js'; import { extractJson } from './extract.js'; diff --git a/js/ai/src/model.ts b/js/ai/src/model.ts index 70bc0936da..99234db276 100644 --- a/js/ai/src/model.ts +++ b/js/ai/src/model.ts @@ -20,8 +20,8 @@ import { getStreamingCallback, Middleware, StreamingCallback, -} from '@genkit-ai/core'; -import { toJsonSchema } from '@genkit-ai/core/schema'; +} from '@genkit/core'; +import { toJsonSchema } from '@genkit/core/schema'; import { performance } from 'node:perf_hooks'; import { z } from 'zod'; import { DocumentDataSchema } from './document.js'; diff --git a/js/ai/src/prompt.ts b/js/ai/src/prompt.ts index d2f8a7603f..f6b1665e60 100644 --- a/js/ai/src/prompt.ts +++ b/js/ai/src/prompt.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { Action, defineAction, JSONSchema7 } from '@genkit-ai/core'; -import { lookupAction } from '@genkit-ai/core/registry'; +import { Action, defineAction, JSONSchema7 } from '@genkit/core'; +import { lookupAction } from '@genkit/core/registry'; import z from 'zod'; import { DocumentData } from './document.js'; import { GenerateOptions } from './generate.js'; diff --git a/js/ai/src/retriever.ts b/js/ai/src/retriever.ts index 2cd5b126a8..6562608529 100644 --- a/js/ai/src/retriever.ts +++ b/js/ai/src/retriever.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { Action, GenkitError, defineAction } from '@genkit-ai/core'; -import { lookupAction } from '@genkit-ai/core/registry'; +import { Action, GenkitError, defineAction } from '@genkit/core'; +import { lookupAction } from '@genkit/core/registry'; import * as z from 'zod'; import { Document, DocumentData, DocumentDataSchema } from './document.js'; import { EmbedderInfo } from './embedder.js'; diff --git a/js/ai/src/telemetry.ts b/js/ai/src/telemetry.ts index 0f12895e14..557744639d 100644 --- a/js/ai/src/telemetry.ts +++ b/js/ai/src/telemetry.ts @@ -14,18 +14,18 @@ * limitations under the License. */ -import { GENKIT_VERSION } from '@genkit-ai/core'; -import { logger } from '@genkit-ai/core/logging'; +import { GENKIT_VERSION } from '@genkit/core'; +import { logger } from '@genkit/core/logging'; import { internalMetricNamespaceWrap, MetricCounter, MetricHistogram, -} from '@genkit-ai/core/metrics'; +} from '@genkit/core/metrics'; import { spanMetadataAls, toDisplayPath, traceMetadataAls, -} from '@genkit-ai/core/tracing'; +} from '@genkit/core/tracing'; import { ValueType } from '@opentelemetry/api'; import { createHash } from 'crypto'; import { diff --git a/js/ai/src/tool.ts b/js/ai/src/tool.ts index 412391d137..0ab689edec 100644 --- a/js/ai/src/tool.ts +++ b/js/ai/src/tool.ts @@ -14,10 +14,10 @@ * limitations under the License. */ -import { Action, defineAction, JSONSchema7 } from '@genkit-ai/core'; -import { lookupAction } from '@genkit-ai/core/registry'; -import { toJsonSchema } from '@genkit-ai/core/schema'; -import { setCustomMetadataAttributes } from '@genkit-ai/core/tracing'; +import { Action, defineAction, JSONSchema7 } from '@genkit/core'; +import { lookupAction } from '@genkit/core/registry'; +import { toJsonSchema } from '@genkit/core/schema'; +import { setCustomMetadataAttributes } from '@genkit/core/tracing'; import z from 'zod'; import { ToolDefinition } from './model.js'; diff --git a/js/ai/src/types.ts b/js/ai/src/types.ts index 33f03693c1..662105b063 100644 --- a/js/ai/src/types.ts +++ b/js/ai/src/types.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { Action } from '@genkit-ai/core'; -import { toJsonSchema } from '@genkit-ai/core/schema'; +import { Action } from '@genkit/core'; +import { toJsonSchema } from '@genkit/core/schema'; import { z } from 'zod'; export const ModelIdSchema = z.object({ diff --git a/js/core/package.json b/js/core/package.json index 33f916d7a1..e882fb9d23 100644 --- a/js/core/package.json +++ b/js/core/package.json @@ -1,5 +1,5 @@ { - "name": "@genkit-ai/core", + "name": "@genkit/core", "description": "Genkit AI framework core libraries.", "keywords": [ "genkit", diff --git a/js/flow/package.json b/js/flow/package.json index 75f556f5e7..8a6439a341 100644 --- a/js/flow/package.json +++ b/js/flow/package.json @@ -1,5 +1,5 @@ { - "name": "@genkit-ai/flow", + "name": "@genkit/flow", "description": "Genkit AI framework workflow APIs.", "keywords": [ "genkit", @@ -26,7 +26,7 @@ "author": "genkit", "license": "Apache-2.0", "dependencies": { - "@genkit-ai/core": "workspace:*", + "@genkit/core": "workspace:*", "@google-cloud/firestore": "^7.6.0", "@opentelemetry/api": "^1.7.0", "@types/cors": "^2.8.17", diff --git a/js/flow/src/client/client.ts b/js/flow/src/client/client.ts index 66fc44e33e..92fa86bae3 100644 --- a/js/flow/src/client/client.ts +++ b/js/flow/src/client/client.ts @@ -22,7 +22,7 @@ const __flowStreamDelimiter = '\n'; * For example: * * ```js - * import { streamFlow } from '@genkit-ai/flow/client'; + * import { streamFlow } from '@genkit/flow/client'; * * const response = streamFlow({ * url: 'https://my-flow-deployed-url', @@ -152,7 +152,7 @@ async function __flowRunEnvelope({ * For example: * * ```js - * import { runFlow } from '@genkit-ai/flow/client'; + * import { runFlow } from '@genkit/flow/client'; * * const response = await runFlow({ * url: 'https://my-flow-deployed-url', diff --git a/js/flow/src/context.ts b/js/flow/src/context.ts index 91a5c51287..68be349754 100644 --- a/js/flow/src/context.ts +++ b/js/flow/src/context.ts @@ -14,14 +14,14 @@ * limitations under the License. */ -import { FlowState, FlowStateExecution, Operation } from '@genkit-ai/core'; -import { toJsonSchema } from '@genkit-ai/core/schema'; +import { FlowState, FlowStateExecution, Operation } from '@genkit/core'; +import { toJsonSchema } from '@genkit/core/schema'; import { SPAN_TYPE_ATTR, runInNewSpan, setCustomMetadataAttribute, setCustomMetadataAttributes, -} from '@genkit-ai/core/tracing'; +} from '@genkit/core/tracing'; import { logger } from 'firebase-functions/v1'; import { z } from 'zod'; import { InterruptError } from './errors.js'; diff --git a/js/flow/src/experimental.ts b/js/flow/src/experimental.ts index 790461eb50..abb433df90 100644 --- a/js/flow/src/experimental.ts +++ b/js/flow/src/experimental.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { Action, Operation } from '@genkit-ai/core'; -import { logger } from '@genkit-ai/core/logging'; +import { Action, Operation } from '@genkit/core'; +import { logger } from '@genkit/core/logging'; import * as z from 'zod'; import { PollingConfig } from './context.js'; import { diff --git a/js/flow/src/firestoreStateStore.ts b/js/flow/src/firestoreStateStore.ts index f60d1420e7..7e8c72c360 100644 --- a/js/flow/src/firestoreStateStore.ts +++ b/js/flow/src/firestoreStateStore.ts @@ -20,8 +20,8 @@ import { FlowStateQueryResponse, FlowStateSchema, FlowStateStore, -} from '@genkit-ai/core'; -import { logger } from '@genkit-ai/core/logging'; +} from '@genkit/core'; +import { logger } from '@genkit/core/logging'; import { Firestore } from '@google-cloud/firestore'; /** diff --git a/js/flow/src/flow.ts b/js/flow/src/flow.ts index 8d318a1c33..75f9e3dd89 100644 --- a/js/flow/src/flow.ts +++ b/js/flow/src/flow.ts @@ -26,15 +26,15 @@ import { isDevEnv, Operation, StreamingCallback, -} from '@genkit-ai/core'; -import { logger } from '@genkit-ai/core/logging'; -import { toJsonSchema } from '@genkit-ai/core/schema'; +} from '@genkit/core'; +import { logger } from '@genkit/core/logging'; +import { toJsonSchema } from '@genkit/core/schema'; import { newTrace, setCustomMetadataAttribute, setCustomMetadataAttributes, SPAN_TYPE_ATTR, -} from '@genkit-ai/core/tracing'; +} from '@genkit/core/tracing'; import { SpanStatusCode } from '@opentelemetry/api'; import * as bodyParser from 'body-parser'; import { default as cors, CorsOptions } from 'cors'; diff --git a/js/flow/src/index.ts b/js/flow/src/index.ts index 2653fadca5..f4fff9b6a1 100644 --- a/js/flow/src/index.ts +++ b/js/flow/src/index.ts @@ -20,7 +20,7 @@ export { type FlowState, type FlowStateStore, type Operation, -} from '@genkit-ai/core'; +} from '@genkit/core'; export { FirestoreStateStore } from './firestoreStateStore.js'; export { Flow, diff --git a/js/flow/src/steps.ts b/js/flow/src/steps.ts index 9ef79e86d2..df45c89cc1 100644 --- a/js/flow/src/steps.ts +++ b/js/flow/src/steps.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { Action } from '@genkit-ai/core'; +import { Action } from '@genkit/core'; import * as z from 'zod'; import { getActiveContext } from './utils.js'; diff --git a/js/flow/src/telemetry.ts b/js/flow/src/telemetry.ts index 39e4ec879f..3685229229 100644 --- a/js/flow/src/telemetry.ts +++ b/js/flow/src/telemetry.ts @@ -14,19 +14,19 @@ * limitations under the License. */ -import { GENKIT_VERSION } from '@genkit-ai/core'; -import { logger } from '@genkit-ai/core/logging'; +import { GENKIT_VERSION } from '@genkit/core'; +import { logger } from '@genkit/core/logging'; import { internalMetricNamespaceWrap, MetricCounter, MetricHistogram, -} from '@genkit-ai/core/metrics'; +} from '@genkit/core/metrics'; import { PathMetadata, spanMetadataAls, toDisplayPath, traceMetadataAls, -} from '@genkit-ai/core/tracing'; +} from '@genkit/core/tracing'; import { ValueType } from '@opentelemetry/api'; import express from 'express'; diff --git a/js/flow/src/types.ts b/js/flow/src/types.ts index 1462aa906a..50957fabd1 100644 --- a/js/flow/src/types.ts +++ b/js/flow/src/types.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { Operation, StreamingCallback } from '@genkit-ai/core'; +import { Operation, StreamingCallback } from '@genkit/core'; import { z } from 'zod'; import { Flow } from './flow.js'; diff --git a/js/flow/tests/durable_test.ts b/js/flow/tests/durable_test.ts index 5d0ace5c30..5819f9f8ec 100644 --- a/js/flow/tests/durable_test.ts +++ b/js/flow/tests/durable_test.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { __hardResetConfigForTesting } from '@genkit-ai/core'; -import { __hardResetRegistryForTesting } from '@genkit-ai/core/registry'; +import { __hardResetConfigForTesting } from '@genkit/core'; +import { __hardResetRegistryForTesting } from '@genkit/core/registry'; import assert from 'node:assert'; import { beforeEach, describe, it } from 'node:test'; import { z } from 'zod'; diff --git a/js/flow/tests/flow_test.ts b/js/flow/tests/flow_test.ts index ff84ac9524..9a4a0e8903 100644 --- a/js/flow/tests/flow_test.ts +++ b/js/flow/tests/flow_test.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { FlowState, __hardResetConfigForTesting } from '@genkit-ai/core'; -import { __hardResetRegistryForTesting } from '@genkit-ai/core/registry'; +import { FlowState, __hardResetConfigForTesting } from '@genkit/core'; +import { __hardResetRegistryForTesting } from '@genkit/core/registry'; import assert from 'node:assert'; import { beforeEach, describe, it } from 'node:test'; import { z } from 'zod'; diff --git a/js/flow/tests/testUtil.ts b/js/flow/tests/testUtil.ts index 48341aa246..9d29322c51 100644 --- a/js/flow/tests/testUtil.ts +++ b/js/flow/tests/testUtil.ts @@ -21,8 +21,8 @@ import { FlowStateSchema, FlowStateStore, configureGenkit, -} from '@genkit-ai/core'; -import { registerFlowStateStore } from '@genkit-ai/core/registry'; +} from '@genkit/core'; +import { registerFlowStateStore } from '@genkit/core/registry'; export function configureInMemoryStateStore( env: string diff --git a/js/plugins/chroma/package.json b/js/plugins/chroma/package.json index e05c920a0c..d25218844d 100644 --- a/js/plugins/chroma/package.json +++ b/js/plugins/chroma/package.json @@ -35,8 +35,8 @@ "chromadb": "^1.7.3" }, "peerDependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*" + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:*" }, "devDependencies": { "@types/node": "^20.11.16", diff --git a/js/plugins/chroma/src/index.ts b/js/plugins/chroma/src/index.ts index aef0866404..d2641ffc19 100644 --- a/js/plugins/chroma/src/index.ts +++ b/js/plugins/chroma/src/index.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { embed, EmbedderArgument } from '@genkit-ai/ai/embedder'; +import { embed, EmbedderArgument } from '@genkit/ai/embedder'; import { CommonRetrieverOptionsSchema, defineIndexer, @@ -22,8 +22,8 @@ import { Document, indexerRef, retrieverRef, -} from '@genkit-ai/ai/retriever'; -import { genkitPlugin, PluginProvider } from '@genkit-ai/core'; +} from '@genkit/ai/retriever'; +import { genkitPlugin, PluginProvider } from '@genkit/core'; import { ChromaClient, Collection, diff --git a/js/plugins/dev-local-vectorstore/package.json b/js/plugins/dev-local-vectorstore/package.json index 57f7817d43..34eac28629 100644 --- a/js/plugins/dev-local-vectorstore/package.json +++ b/js/plugins/dev-local-vectorstore/package.json @@ -1,5 +1,5 @@ { - "name": "@genkit-ai/dev-local-vectorstore", + "name": "@genkit/dev-local-vectorstore", "description": "Genkit AI framework plugin for temporary local vector database.", "keywords": [ "genkit", @@ -32,8 +32,8 @@ "zod": "^3.22.4" }, "peerDependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*" + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:*" }, "devDependencies": { "@types/node": "^20.11.16", diff --git a/js/plugins/dev-local-vectorstore/src/index.ts b/js/plugins/dev-local-vectorstore/src/index.ts index 8e646a0944..6ef62d4fa6 100644 --- a/js/plugins/dev-local-vectorstore/src/index.ts +++ b/js/plugins/dev-local-vectorstore/src/index.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { embed, EmbedderArgument } from '@genkit-ai/ai/embedder'; +import { embed, EmbedderArgument } from '@genkit/ai/embedder'; import { CommonRetrieverOptionsSchema, defineIndexer, @@ -23,8 +23,8 @@ import { DocumentData, indexerRef, retrieverRef, -} from '@genkit-ai/ai/retriever'; -import { genkitPlugin, PluginProvider } from '@genkit-ai/core'; +} from '@genkit/ai/retriever'; +import { genkitPlugin, PluginProvider } from '@genkit/core'; import similarity from 'compute-cosine-similarity'; import * as fs from 'fs'; import { Md5 } from 'ts-md5'; diff --git a/js/plugins/dotprompt/package.json b/js/plugins/dotprompt/package.json index b2f5d60ea2..f3d613562d 100644 --- a/js/plugins/dotprompt/package.json +++ b/js/plugins/dotprompt/package.json @@ -1,5 +1,5 @@ { - "name": "@genkit-ai/dotprompt", + "name": "@genkit/dotprompt", "description": "Genkit AI framework `.prompt` file format and management library.", "keywords": [ "genkit", @@ -33,8 +33,8 @@ "zod": "^3.22.4" }, "peerDependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*" + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:*" }, "devDependencies": { "@types/node": "^20.11.16", diff --git a/js/plugins/dotprompt/src/index.ts b/js/plugins/dotprompt/src/index.ts index 57ecc03fe2..e431939849 100644 --- a/js/plugins/dotprompt/src/index.ts +++ b/js/plugins/dotprompt/src/index.ts @@ -14,11 +14,7 @@ * limitations under the License. */ -import { - genkitPlugin, - InitializedPlugin, - PluginProvider, -} from '@genkit-ai/core'; +import { genkitPlugin, InitializedPlugin, PluginProvider } from '@genkit/core'; import { readFileSync } from 'fs'; import { basename } from 'path'; diff --git a/js/plugins/dotprompt/src/metadata.ts b/js/plugins/dotprompt/src/metadata.ts index 839a7068d5..713077e0ba 100644 --- a/js/plugins/dotprompt/src/metadata.ts +++ b/js/plugins/dotprompt/src/metadata.ts @@ -19,13 +19,10 @@ // genkit-tools/src/types/prompt.ts // -import { - GenerationCommonConfigSchema, - ModelArgument, -} from '@genkit-ai/ai/model'; -import { ToolArgument } from '@genkit-ai/ai/tool'; -import { lookupSchema } from '@genkit-ai/core/registry'; -import { JSONSchema, parseSchema, toJsonSchema } from '@genkit-ai/core/schema'; +import { GenerationCommonConfigSchema, ModelArgument } from '@genkit/ai/model'; +import { ToolArgument } from '@genkit/ai/tool'; +import { lookupSchema } from '@genkit/core/registry'; +import { JSONSchema, parseSchema, toJsonSchema } from '@genkit/core/schema'; import z from 'zod'; import { picoschema } from './picoschema.js'; diff --git a/js/plugins/dotprompt/src/picoschema.ts b/js/plugins/dotprompt/src/picoschema.ts index 63541d4912..59ce76fc73 100644 --- a/js/plugins/dotprompt/src/picoschema.ts +++ b/js/plugins/dotprompt/src/picoschema.ts @@ -25,7 +25,7 @@ const JSON_SCHEMA_SCALAR_TYPES = [ const WILDCARD_PROPERTY_NAME = '(*)'; -import { JSONSchema } from '@genkit-ai/core/schema'; +import { JSONSchema } from '@genkit/core/schema'; export function picoschema(schema: unknown): JSONSchema | null { if (!schema) return null; diff --git a/js/plugins/dotprompt/src/prompt.ts b/js/plugins/dotprompt/src/prompt.ts index 664d13e10a..2b3abfb79f 100644 --- a/js/plugins/dotprompt/src/prompt.ts +++ b/js/plugins/dotprompt/src/prompt.ts @@ -23,11 +23,11 @@ import { GenerateStreamResponse, PromptAction, toGenerateRequest, -} from '@genkit-ai/ai'; -import { GenerationCommonConfigSchema, MessageData } from '@genkit-ai/ai/model'; -import { DocumentData } from '@genkit-ai/ai/retriever'; -import { GenkitError } from '@genkit-ai/core'; -import { parseSchema } from '@genkit-ai/core/schema'; +} from '@genkit/ai'; +import { GenerationCommonConfigSchema, MessageData } from '@genkit/ai/model'; +import { DocumentData } from '@genkit/ai/retriever'; +import { GenkitError } from '@genkit/core'; +import { parseSchema } from '@genkit/core/schema'; import { createHash } from 'crypto'; import fm, { FrontMatterResult } from 'front-matter'; import z from 'zod'; diff --git a/js/plugins/dotprompt/src/registry.ts b/js/plugins/dotprompt/src/registry.ts index 3397f6b56e..afc88f14e3 100644 --- a/js/plugins/dotprompt/src/registry.ts +++ b/js/plugins/dotprompt/src/registry.ts @@ -14,10 +14,10 @@ * limitations under the License. */ -import { PromptAction } from '@genkit-ai/ai'; -import { GenkitError } from '@genkit-ai/core'; -import { logger } from '@genkit-ai/core/logging'; -import { lookupAction } from '@genkit-ai/core/registry'; +import { PromptAction } from '@genkit/ai'; +import { GenkitError } from '@genkit/core'; +import { logger } from '@genkit/core/logging'; +import { lookupAction } from '@genkit/core/registry'; import { existsSync, readdir, readFileSync } from 'fs'; import { basename, join, resolve } from 'path'; import { Dotprompt } from './prompt.js'; diff --git a/js/plugins/dotprompt/src/template.ts b/js/plugins/dotprompt/src/template.ts index 020f9fad9b..632938a28c 100644 --- a/js/plugins/dotprompt/src/template.ts +++ b/js/plugins/dotprompt/src/template.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { MediaPart, MessageData, Part, Role } from '@genkit-ai/ai/model'; -import { DocumentData } from '@genkit-ai/ai/retriever'; +import { MediaPart, MessageData, Part, Role } from '@genkit/ai/model'; +import { DocumentData } from '@genkit/ai/retriever'; import Handlebars from 'handlebars'; import { PromptMetadata } from './metadata.js'; diff --git a/js/plugins/dotprompt/tests/prompt_test.ts b/js/plugins/dotprompt/tests/prompt_test.ts index c9a386141c..fbb6494002 100644 --- a/js/plugins/dotprompt/tests/prompt_test.ts +++ b/js/plugins/dotprompt/tests/prompt_test.ts @@ -17,8 +17,8 @@ import assert from 'node:assert'; import { describe, it } from 'node:test'; -import { defineModel } from '@genkit-ai/ai/model'; -import { toJsonSchema, ValidationError } from '@genkit-ai/core/schema'; +import { defineModel } from '@genkit/ai/model'; +import { toJsonSchema, ValidationError } from '@genkit/core/schema'; import z from 'zod'; import { registerPluginProvider } from '../../../core/src/registry.js'; import { defineJsonSchema, defineSchema } from '../../../core/src/schema.js'; diff --git a/js/plugins/dotprompt/tests/template_test.ts b/js/plugins/dotprompt/tests/template_test.ts index cf0ead12d9..a112cfd57f 100644 --- a/js/plugins/dotprompt/tests/template_test.ts +++ b/js/plugins/dotprompt/tests/template_test.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { MessageData } from '@genkit-ai/ai/model'; -import { DocumentData } from '@genkit-ai/ai/retriever'; +import { MessageData } from '@genkit/ai/model'; +import { DocumentData } from '@genkit/ai/retriever'; import assert from 'node:assert'; import { describe, it } from 'node:test'; import { compile } from '../src/template'; diff --git a/js/plugins/evaluators/package.json b/js/plugins/evaluators/package.json index 56f6f16ebf..576a9f6ae2 100644 --- a/js/plugins/evaluators/package.json +++ b/js/plugins/evaluators/package.json @@ -1,5 +1,5 @@ { - "name": "@genkit-ai/evaluator", + "name": "@genkit/evaluator", "description": "Genkit AI framework plugin for RAG evaluation.", "keywords": [ "genkit", @@ -30,15 +30,15 @@ "author": "genkit", "license": "Apache-2.0", "dependencies": { - "@genkit-ai/dotprompt": "workspace:*", + "@genkit/dotprompt": "workspace:*", "compute-cosine-similarity": "^1.1.0", "node-fetch": "^3.3.2", "path": "^0.12.7", "zod": "^3.22.4" }, "peerDependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*" + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:*" }, "devDependencies": { "@types/node": "^20.11.16", diff --git a/js/plugins/evaluators/src/index.ts b/js/plugins/evaluators/src/index.ts index 14cd5f14a2..07192d299f 100644 --- a/js/plugins/evaluators/src/index.ts +++ b/js/plugins/evaluators/src/index.ts @@ -14,16 +14,16 @@ * limitations under the License. */ -import { EmbedderReference } from '@genkit-ai/ai/embedder'; +import { EmbedderReference } from '@genkit/ai/embedder'; import { BaseDataPoint, defineEvaluator, EvalResponse, evaluatorRef, Score, -} from '@genkit-ai/ai/evaluator'; -import { ModelReference } from '@genkit-ai/ai/model'; -import { genkitPlugin, PluginProvider } from '@genkit-ai/core'; +} from '@genkit/ai/evaluator'; +import { ModelReference } from '@genkit/ai/model'; +import { genkitPlugin, PluginProvider } from '@genkit/core'; import * as z from 'zod'; import { answerRelevancyScore, diff --git a/js/plugins/evaluators/src/metrics/answer_relevancy.ts b/js/plugins/evaluators/src/metrics/answer_relevancy.ts index 4664f9360a..d9e2c8c12f 100644 --- a/js/plugins/evaluators/src/metrics/answer_relevancy.ts +++ b/js/plugins/evaluators/src/metrics/answer_relevancy.ts @@ -14,11 +14,11 @@ * limitations under the License. */ -import { generate } from '@genkit-ai/ai'; -import { embed, EmbedderArgument } from '@genkit-ai/ai/embedder'; -import { BaseDataPoint, Score } from '@genkit-ai/ai/evaluator'; -import { ModelArgument } from '@genkit-ai/ai/model'; -import { loadPromptFile } from '@genkit-ai/dotprompt'; +import { generate } from '@genkit/ai'; +import { embed, EmbedderArgument } from '@genkit/ai/embedder'; +import { BaseDataPoint, Score } from '@genkit/ai/evaluator'; +import { ModelArgument } from '@genkit/ai/model'; +import { loadPromptFile } from '@genkit/dotprompt'; import similarity from 'compute-cosine-similarity'; import path from 'path'; import * as z from 'zod'; diff --git a/js/plugins/evaluators/src/metrics/faithfulness.ts b/js/plugins/evaluators/src/metrics/faithfulness.ts index a2189a7975..732dfac1e5 100644 --- a/js/plugins/evaluators/src/metrics/faithfulness.ts +++ b/js/plugins/evaluators/src/metrics/faithfulness.ts @@ -14,10 +14,10 @@ * limitations under the License. */ -import { generate } from '@genkit-ai/ai'; -import { BaseDataPoint, Score } from '@genkit-ai/ai/evaluator'; -import { ModelArgument } from '@genkit-ai/ai/model'; -import { loadPromptFile } from '@genkit-ai/dotprompt'; +import { generate } from '@genkit/ai'; +import { BaseDataPoint, Score } from '@genkit/ai/evaluator'; +import { ModelArgument } from '@genkit/ai/model'; +import { loadPromptFile } from '@genkit/dotprompt'; import path from 'path'; import * as z from 'zod'; import { getDirName } from './helper.js'; diff --git a/js/plugins/evaluators/src/metrics/maliciousness.ts b/js/plugins/evaluators/src/metrics/maliciousness.ts index 062ab4fe31..ca71e0e668 100644 --- a/js/plugins/evaluators/src/metrics/maliciousness.ts +++ b/js/plugins/evaluators/src/metrics/maliciousness.ts @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { generate } from '@genkit-ai/ai'; -import { BaseDataPoint, Score } from '@genkit-ai/ai/evaluator'; -import { ModelArgument } from '@genkit-ai/ai/model'; -import { loadPromptFile } from '@genkit-ai/dotprompt'; +import { generate } from '@genkit/ai'; +import { BaseDataPoint, Score } from '@genkit/ai/evaluator'; +import { ModelArgument } from '@genkit/ai/model'; +import { loadPromptFile } from '@genkit/dotprompt'; import path from 'path'; import * as z from 'zod'; import { getDirName } from './helper.js'; diff --git a/js/plugins/firebase/package.json b/js/plugins/firebase/package.json index 7defe70a0f..93bccaa2f8 100644 --- a/js/plugins/firebase/package.json +++ b/js/plugins/firebase/package.json @@ -1,5 +1,5 @@ { - "name": "@genkit-ai/firebase", + "name": "@genkit/firebase", "description": "Genkit AI framework plugin for Firebase including Firestore trace/state store and deployment helpers for Cloud Functions for Firebase.", "keywords": [ "genkit", @@ -31,7 +31,7 @@ "author": "genkit", "license": "Apache-2.0", "dependencies": { - "@genkit-ai/google-cloud": "workspace:*", + "@genkit/google-cloud": "workspace:*", "express": "^4.19.2", "google-auth-library": "^9.6.3", "zod": "^3.22.4" @@ -40,9 +40,9 @@ "@google-cloud/firestore": "^7.6.0", "firebase-admin": "^12.2.0", "firebase-functions": "^4.8.0 || ^5.0.0", - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*", - "@genkit-ai/flow": "workspace:*" + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:*", + "@genkit/flow": "workspace:*" }, "devDependencies": { "@types/node": "^20.11.16", diff --git a/js/plugins/firebase/src/auth.ts b/js/plugins/firebase/src/auth.ts index 76bbfa0519..6687b6628e 100644 --- a/js/plugins/firebase/src/auth.ts +++ b/js/plugins/firebase/src/auth.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { __RequestWithAuth } from '@genkit-ai/flow'; +import { __RequestWithAuth } from '@genkit/flow'; import { Response } from 'express'; import { DecodedIdToken, getAuth } from 'firebase-admin/auth'; import * as z from 'zod'; diff --git a/js/plugins/firebase/src/experimental.ts b/js/plugins/firebase/src/experimental.ts index e55b46043b..35673f79f0 100644 --- a/js/plugins/firebase/src/experimental.ts +++ b/js/plugins/firebase/src/experimental.ts @@ -14,13 +14,9 @@ * limitations under the License. */ -import { OperationSchema } from '@genkit-ai/core'; -import { - Flow, - FlowInvokeEnvelopeMessage, - StepsFunction, -} from '@genkit-ai/flow'; -import { durableFlow } from '@genkit-ai/flow/experimental'; +import { OperationSchema } from '@genkit/core'; +import { Flow, FlowInvokeEnvelopeMessage, StepsFunction } from '@genkit/flow'; +import { durableFlow } from '@genkit/flow/experimental'; import { getFunctions } from 'firebase-admin/functions'; import { logger } from 'firebase-functions/v2'; import { HttpsFunction } from 'firebase-functions/v2/https'; diff --git a/js/plugins/firebase/src/firestoreRetriever.ts b/js/plugins/firebase/src/firestoreRetriever.ts index 3751146c83..81bff77a77 100644 --- a/js/plugins/firebase/src/firestoreRetriever.ts +++ b/js/plugins/firebase/src/firestoreRetriever.ts @@ -14,13 +14,13 @@ * limitations under the License. */ -import { embed, EmbedderArgument } from '@genkit-ai/ai/embedder'; +import { embed, EmbedderArgument } from '@genkit/ai/embedder'; import { defineRetriever, DocumentData, Part, RetrieverAction, -} from '@genkit-ai/ai/retriever'; +} from '@genkit/ai/retriever'; import { Firestore, Query, diff --git a/js/plugins/firebase/src/firestoreTraceStore.ts b/js/plugins/firebase/src/firestoreTraceStore.ts index 3e6913dce4..1ed0899b7e 100644 --- a/js/plugins/firebase/src/firestoreTraceStore.ts +++ b/js/plugins/firebase/src/firestoreTraceStore.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { logger } from '@genkit-ai/core/logging'; +import { logger } from '@genkit/core/logging'; import { SpanData, SpanDataSchema, @@ -23,7 +23,7 @@ import { TraceQuery, TraceQueryResponse, TraceStore, -} from '@genkit-ai/core/tracing'; +} from '@genkit/core/tracing'; import { Firestore } from '@google-cloud/firestore'; import { randomUUID } from 'crypto'; diff --git a/js/plugins/firebase/src/functions.ts b/js/plugins/firebase/src/functions.ts index 4e21efc605..76a8290279 100644 --- a/js/plugins/firebase/src/functions.ts +++ b/js/plugins/firebase/src/functions.ts @@ -14,15 +14,15 @@ * limitations under the License. */ -import { OperationSchema } from '@genkit-ai/core'; -import { logger } from '@genkit-ai/core/logging'; +import { OperationSchema } from '@genkit/core'; +import { logger } from '@genkit/core/logging'; import { defineFlow, Flow, FlowAuthPolicy, FlowWrapper, StepsFunction, -} from '@genkit-ai/flow'; +} from '@genkit/flow'; import * as express from 'express'; import { getAppCheck } from 'firebase-admin/app-check'; import { diff --git a/js/plugins/firebase/src/helpers.ts b/js/plugins/firebase/src/helpers.ts index feb2db5a2e..62c98f8eb5 100644 --- a/js/plugins/firebase/src/helpers.ts +++ b/js/plugins/firebase/src/helpers.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { StreamingCallback } from '@genkit-ai/core'; +import { StreamingCallback } from '@genkit/core'; import { getApps, initializeApp } from 'firebase-admin/app'; import { GoogleAuth } from 'google-auth-library'; diff --git a/js/plugins/firebase/src/index.ts b/js/plugins/firebase/src/index.ts index 2979415710..40e0cb3e6a 100644 --- a/js/plugins/firebase/src/index.ts +++ b/js/plugins/firebase/src/index.ts @@ -14,14 +14,14 @@ * limitations under the License. */ -import { genkitPlugin, isDevEnv, Plugin } from '@genkit-ai/core'; -import { logger } from '@genkit-ai/core/logging'; -import { FirestoreStateStore } from '@genkit-ai/flow'; +import { genkitPlugin, isDevEnv, Plugin } from '@genkit/core'; +import { logger } from '@genkit/core/logging'; +import { FirestoreStateStore } from '@genkit/flow'; import { GcpLogger, GcpOpenTelemetry, TelemetryConfig, -} from '@genkit-ai/google-cloud'; +} from '@genkit/google-cloud'; import { GoogleAuth } from 'google-auth-library'; import { FirestoreTraceStore } from './firestoreTraceStore.js'; export { defineFirestoreRetriever } from './firestoreRetriever.js'; diff --git a/js/plugins/google-cloud/package.json b/js/plugins/google-cloud/package.json index b6e7859eb3..16afcc62c1 100644 --- a/js/plugins/google-cloud/package.json +++ b/js/plugins/google-cloud/package.json @@ -1,5 +1,5 @@ { - "name": "@genkit-ai/google-cloud", + "name": "@genkit/google-cloud", "description": "Genkit AI framework plugin for Google Cloud Platform including Firestore trace/state store and deployment helpers for Cloud Functions for Firebase.", "keywords": [ "genkit", @@ -51,8 +51,8 @@ "winston": "^3.12.0" }, "peerDependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*" + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:*" }, "devDependencies": { "@types/node": "^20.11.16", diff --git a/js/plugins/google-cloud/src/gcpLogger.ts b/js/plugins/google-cloud/src/gcpLogger.ts index 3aa2fa0626..3fbe17043e 100644 --- a/js/plugins/google-cloud/src/gcpLogger.ts +++ b/js/plugins/google-cloud/src/gcpLogger.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { LoggerConfig } from '@genkit-ai/core'; +import { LoggerConfig } from '@genkit/core'; import { LoggingWinston } from '@google-cloud/logging-winston'; import { Writable } from 'stream'; import { PluginOptions } from './index.js'; diff --git a/js/plugins/google-cloud/src/gcpOpenTelemetry.ts b/js/plugins/google-cloud/src/gcpOpenTelemetry.ts index 87c0e29cdc..c73b8a5448 100644 --- a/js/plugins/google-cloud/src/gcpOpenTelemetry.ts +++ b/js/plugins/google-cloud/src/gcpOpenTelemetry.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { GENKIT_VERSION, TelemetryConfig } from '@genkit-ai/core'; +import { GENKIT_VERSION, TelemetryConfig } from '@genkit/core'; import { MetricExporter } from '@google-cloud/opentelemetry-cloud-monitoring-exporter'; import { TraceExporter } from '@google-cloud/opentelemetry-cloud-trace-exporter'; import { GcpDetectorSync } from '@google-cloud/opentelemetry-resource-util'; diff --git a/js/plugins/google-cloud/src/index.ts b/js/plugins/google-cloud/src/index.ts index 69f40a9ad4..3d03ac17a6 100644 --- a/js/plugins/google-cloud/src/index.ts +++ b/js/plugins/google-cloud/src/index.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { genkitPlugin, Plugin } from '@genkit-ai/core'; +import { genkitPlugin, Plugin } from '@genkit/core'; import { InstrumentationConfigMap } from '@opentelemetry/auto-instrumentations-node'; import { Instrumentation } from '@opentelemetry/instrumentation'; import { Sampler } from '@opentelemetry/sdk-trace-base'; diff --git a/js/plugins/google-cloud/tests/logs_test.ts b/js/plugins/google-cloud/tests/logs_test.ts index d81b447770..862e36ad9e 100644 --- a/js/plugins/google-cloud/tests/logs_test.ts +++ b/js/plugins/google-cloud/tests/logs_test.ts @@ -14,21 +14,21 @@ * limitations under the License. */ -import { generate } from '@genkit-ai/ai'; -import { defineModel } from '@genkit-ai/ai/model'; +import { generate } from '@genkit/ai'; +import { defineModel } from '@genkit/ai/model'; import { configureGenkit, FlowState, FlowStateQuery, FlowStateQueryResponse, FlowStateStore, -} from '@genkit-ai/core'; -import { registerFlowStateStore } from '@genkit-ai/core/registry'; -import { defineFlow, run, runFlow } from '@genkit-ai/flow'; +} from '@genkit/core'; +import { registerFlowStateStore } from '@genkit/core/registry'; +import { defineFlow, run, runFlow } from '@genkit/flow'; import { __addTransportStreamForTesting, googleCloud, -} from '@genkit-ai/google-cloud'; +} from '@genkit/google-cloud'; import assert from 'node:assert'; import { before, beforeEach, describe, it } from 'node:test'; import { Writable } from 'stream'; diff --git a/js/plugins/google-cloud/tests/metrics_test.ts b/js/plugins/google-cloud/tests/metrics_test.ts index 658bfdfa08..7dbbcd557e 100644 --- a/js/plugins/google-cloud/tests/metrics_test.ts +++ b/js/plugins/google-cloud/tests/metrics_test.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { generate } from '@genkit-ai/ai'; -import { defineModel } from '@genkit-ai/ai/model'; +import { generate } from '@genkit/ai'; +import { defineModel } from '@genkit/ai/model'; import { configureGenkit, defineAction, @@ -23,14 +23,14 @@ import { FlowStateQuery, FlowStateQueryResponse, FlowStateStore, -} from '@genkit-ai/core'; -import { registerFlowStateStore } from '@genkit-ai/core/registry'; -import { defineFlow, run, runAction, runFlow } from '@genkit-ai/flow'; +} from '@genkit/core'; +import { registerFlowStateStore } from '@genkit/core/registry'; +import { defineFlow, run, runAction, runFlow } from '@genkit/flow'; import { __getMetricExporterForTesting, GcpOpenTelemetry, googleCloud, -} from '@genkit-ai/google-cloud'; +} from '@genkit/google-cloud'; import { Counter, DataPoint, diff --git a/js/plugins/google-cloud/tests/traces_test.ts b/js/plugins/google-cloud/tests/traces_test.ts index bcdefa9dce..39ac98e8b6 100644 --- a/js/plugins/google-cloud/tests/traces_test.ts +++ b/js/plugins/google-cloud/tests/traces_test.ts @@ -20,14 +20,14 @@ import { FlowStateQueryResponse, FlowStateStore, configureGenkit, -} from '@genkit-ai/core'; -import { registerFlowStateStore } from '@genkit-ai/core/registry'; -import { defineFlow, run, runFlow } from '@genkit-ai/flow'; +} from '@genkit/core'; +import { registerFlowStateStore } from '@genkit/core/registry'; +import { defineFlow, run, runFlow } from '@genkit/flow'; import { __forceFlushSpansForTesting, __getSpanExporterForTesting, googleCloud, -} from '@genkit-ai/google-cloud'; +} from '@genkit/google-cloud'; import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; import assert from 'node:assert'; import { before, beforeEach, describe, it } from 'node:test'; diff --git a/js/plugins/googleai/package.json b/js/plugins/googleai/package.json index 3dc7ee1353..c531a904ac 100644 --- a/js/plugins/googleai/package.json +++ b/js/plugins/googleai/package.json @@ -1,5 +1,5 @@ { - "name": "@genkit-ai/googleai", + "name": "@genkit/googleai", "description": "Genkit AI framework plugin for Google AI APIs, including Gemini APIs.", "keywords": [ "genkit", @@ -37,8 +37,8 @@ "zod": "^3.22.4" }, "peerDependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*" + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:*" }, "devDependencies": { "@types/node": "^20.11.16", diff --git a/js/plugins/googleai/src/embedder.ts b/js/plugins/googleai/src/embedder.ts index 449f76b18c..3ab2c18b61 100644 --- a/js/plugins/googleai/src/embedder.ts +++ b/js/plugins/googleai/src/embedder.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { defineEmbedder, embedderRef } from '@genkit-ai/ai/embedder'; +import { defineEmbedder, embedderRef } from '@genkit/ai/embedder'; import { EmbedContentRequest, GoogleGenerativeAI } from '@google/generative-ai'; import { string, z } from 'zod'; import { PluginOptions } from './index.js'; diff --git a/js/plugins/googleai/src/gemini.ts b/js/plugins/googleai/src/gemini.ts index a7e89f3120..8127991299 100644 --- a/js/plugins/googleai/src/gemini.ts +++ b/js/plugins/googleai/src/gemini.ts @@ -29,12 +29,12 @@ import { ToolDefinitionSchema, ToolRequestPart, ToolResponsePart, -} from '@genkit-ai/ai/model'; +} from '@genkit/ai/model'; import { downloadRequestMedia, simulateSystemPrompt, -} from '@genkit-ai/ai/model/middleware'; -import { GENKIT_CLIENT_HEADER } from '@genkit-ai/core'; +} from '@genkit/ai/model/middleware'; +import { GENKIT_CLIENT_HEADER } from '@genkit/core'; import { FileDataPart, FunctionCallPart, diff --git a/js/plugins/googleai/src/index.ts b/js/plugins/googleai/src/index.ts index 65e4a260fa..4e37b86df5 100644 --- a/js/plugins/googleai/src/index.ts +++ b/js/plugins/googleai/src/index.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { genkitPlugin, Plugin } from '@genkit-ai/core'; +import { genkitPlugin, Plugin } from '@genkit/core'; import { SUPPORTED_MODELS as EMBEDDER_MODELS, textEmbeddingGecko001, diff --git a/js/plugins/googleai/tests/gemini_test.ts b/js/plugins/googleai/tests/gemini_test.ts index 271146d1b4..3b38f04a91 100644 --- a/js/plugins/googleai/tests/gemini_test.ts +++ b/js/plugins/googleai/tests/gemini_test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { MessageData } from '@genkit-ai/ai/model'; +import { MessageData } from '@genkit/ai/model'; import { GenerateContentCandidate } from '@google/generative-ai'; import assert from 'node:assert'; import { describe, it } from 'node:test'; diff --git a/js/plugins/langchain/package.json b/js/plugins/langchain/package.json index ced4f5e274..e9f9866b4b 100644 --- a/js/plugins/langchain/package.json +++ b/js/plugins/langchain/package.json @@ -32,9 +32,9 @@ "zod": "^3.22.4" }, "peerDependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*", - "@genkit-ai/flow": "workspace:*", + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:*", + "@genkit/flow": "workspace:*", "langchain": "^0.1.36" }, "devDependencies": { diff --git a/js/plugins/langchain/src/evaluators.ts b/js/plugins/langchain/src/evaluators.ts index cf149db448..7755d9a588 100644 --- a/js/plugins/langchain/src/evaluators.ts +++ b/js/plugins/langchain/src/evaluators.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { BaseDataPointSchema, defineEvaluator } from '@genkit-ai/ai/evaluator'; -import { ModelArgument } from '@genkit-ai/ai/model'; +import { BaseDataPointSchema, defineEvaluator } from '@genkit/ai/evaluator'; +import { ModelArgument } from '@genkit/ai/model'; import { Criteria, loadEvaluator } from 'langchain/evaluation'; import { genkitModel } from './model.js'; import { GenkitTracer } from './tracing.js'; diff --git a/js/plugins/langchain/src/index.ts b/js/plugins/langchain/src/index.ts index 87f6affc58..52b740a923 100644 --- a/js/plugins/langchain/src/index.ts +++ b/js/plugins/langchain/src/index.ts @@ -14,12 +14,9 @@ * limitations under the License. */ -import { EvaluatorAction } from '@genkit-ai/ai'; -import { - GenerationCommonConfigSchema, - ModelArgument, -} from '@genkit-ai/ai/model'; -import { Plugin, genkitPlugin } from '@genkit-ai/core'; +import { EvaluatorAction } from '@genkit/ai'; +import { GenerationCommonConfigSchema, ModelArgument } from '@genkit/ai/model'; +import { Plugin, genkitPlugin } from '@genkit/core'; import { Criteria } from 'langchain/evaluation'; import z from 'zod'; import { langchainEvaluator } from './evaluators'; diff --git a/js/plugins/langchain/src/model.ts b/js/plugins/langchain/src/model.ts index dbac5ae8bd..72eb65e1d6 100644 --- a/js/plugins/langchain/src/model.ts +++ b/js/plugins/langchain/src/model.ts @@ -14,9 +14,9 @@ * limitations under the License. */ -import { generate } from '@genkit-ai/ai'; -import { ModelAction, ModelArgument } from '@genkit-ai/ai/model'; -import { logger } from '@genkit-ai/core/logging'; +import { generate } from '@genkit/ai'; +import { ModelAction, ModelArgument } from '@genkit/ai/model'; +import { logger } from '@genkit/core/logging'; import { LLMResult } from '@langchain/core/outputs'; import { CallbackManagerForLLMRun } from 'langchain/callbacks'; import { BaseLLM } from 'langchain/llms/base'; diff --git a/js/plugins/ollama/package.json b/js/plugins/ollama/package.json index cc01f6c7c6..9f757252a9 100644 --- a/js/plugins/ollama/package.json +++ b/js/plugins/ollama/package.json @@ -27,8 +27,8 @@ "author": "genkit", "license": "Apache-2.0", "peerDependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*" + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:*" }, "devDependencies": { "@types/node": "^20.11.16", diff --git a/js/plugins/ollama/src/index.ts b/js/plugins/ollama/src/index.ts index 7a7bbb636c..8a855e69aa 100644 --- a/js/plugins/ollama/src/index.ts +++ b/js/plugins/ollama/src/index.ts @@ -22,9 +22,9 @@ import { GenerationCommonConfigSchema, getBasicUsageStats, MessageData, -} from '@genkit-ai/ai/model'; -import { genkitPlugin, Plugin } from '@genkit-ai/core'; -import { logger } from '@genkit-ai/core/logging'; +} from '@genkit/ai/model'; +import { genkitPlugin, Plugin } from '@genkit/core'; +import { logger } from '@genkit/core/logging'; type ApiType = 'chat' | 'generate'; diff --git a/js/plugins/pinecone/package.json b/js/plugins/pinecone/package.json index 8f29350aef..a382f1a77f 100644 --- a/js/plugins/pinecone/package.json +++ b/js/plugins/pinecone/package.json @@ -35,8 +35,8 @@ "zod": "^3.22.4" }, "peerDependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*" + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:*" }, "devDependencies": { "@types/node": "^20.11.16", diff --git a/js/plugins/pinecone/src/index.ts b/js/plugins/pinecone/src/index.ts index 7746f31845..150a7e9ea4 100644 --- a/js/plugins/pinecone/src/index.ts +++ b/js/plugins/pinecone/src/index.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { embed, EmbedderArgument } from '@genkit-ai/ai/embedder'; +import { embed, EmbedderArgument } from '@genkit/ai/embedder'; import { CommonRetrieverOptionsSchema, defineIndexer, @@ -22,8 +22,8 @@ import { Document, indexerRef, retrieverRef, -} from '@genkit-ai/ai/retriever'; -import { genkitPlugin, PluginProvider } from '@genkit-ai/core'; +} from '@genkit/ai/retriever'; +import { genkitPlugin, PluginProvider } from '@genkit/core'; import { CreateIndexOptions, Pinecone, diff --git a/js/plugins/vertexai/package.json b/js/plugins/vertexai/package.json index 6d230c1358..4de170d674 100644 --- a/js/plugins/vertexai/package.json +++ b/js/plugins/vertexai/package.json @@ -1,5 +1,5 @@ { - "name": "@genkit-ai/vertexai", + "name": "@genkit/vertexai", "description": "Genkit AI framework plugin for Google Cloud Vertex AI APIs including Gemini APIs, Imagen, and more.", "keywords": [ "genkit", @@ -46,9 +46,9 @@ "zod": "^3.22.4" }, "peerDependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*", - "@genkit-ai/flow": "workspace:*" + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:*", + "@genkit/flow": "workspace:*" }, "optionalDependencies": { "firebase-admin": "^12.1.0", diff --git a/js/plugins/vertexai/src/anthropic.ts b/js/plugins/vertexai/src/anthropic.ts index ff16c93122..e518d4249b 100644 --- a/js/plugins/vertexai/src/anthropic.ts +++ b/js/plugins/vertexai/src/anthropic.ts @@ -40,8 +40,8 @@ import { defineModel, getBasicUsageStats, modelRef, -} from '@genkit-ai/ai/model'; -import { GENKIT_CLIENT_HEADER } from '@genkit-ai/core'; +} from '@genkit/ai/model'; +import { GENKIT_CLIENT_HEADER } from '@genkit/core'; import z from 'zod'; export const AnthropicConfigSchema = GenerationCommonConfigSchema.extend({ diff --git a/js/plugins/vertexai/src/embedder.ts b/js/plugins/vertexai/src/embedder.ts index 16b0591b56..780d7c9ca5 100644 --- a/js/plugins/vertexai/src/embedder.ts +++ b/js/plugins/vertexai/src/embedder.ts @@ -18,7 +18,7 @@ import { defineEmbedder, embedderRef, EmbedderReference, -} from '@genkit-ai/ai/embedder'; +} from '@genkit/ai/embedder'; import { GoogleAuth } from 'google-auth-library'; import { z } from 'zod'; import { PluginOptions } from './index.js'; diff --git a/js/plugins/vertexai/src/evaluation.ts b/js/plugins/vertexai/src/evaluation.ts index 6a4de304cd..ec83b6a98c 100644 --- a/js/plugins/vertexai/src/evaluation.ts +++ b/js/plugins/vertexai/src/evaluation.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { Action } from '@genkit-ai/core'; +import { Action } from '@genkit/core'; import { GoogleAuth } from 'google-auth-library'; import z from 'zod'; import { EvaluatorFactory } from './evaluator_factory.js'; diff --git a/js/plugins/vertexai/src/evaluator_factory.ts b/js/plugins/vertexai/src/evaluator_factory.ts index 2de3d38338..fdb289cb77 100644 --- a/js/plugins/vertexai/src/evaluator_factory.ts +++ b/js/plugins/vertexai/src/evaluator_factory.ts @@ -14,9 +14,9 @@ * limitations under the License. */ -import { BaseDataPoint, defineEvaluator, Score } from '@genkit-ai/ai/evaluator'; -import { Action, GENKIT_CLIENT_HEADER } from '@genkit-ai/core'; -import { runInNewSpan } from '@genkit-ai/core/tracing'; +import { BaseDataPoint, defineEvaluator, Score } from '@genkit/ai/evaluator'; +import { Action, GENKIT_CLIENT_HEADER } from '@genkit/core'; +import { runInNewSpan } from '@genkit/core/tracing'; import { GoogleAuth } from 'google-auth-library'; import z from 'zod'; import { VertexAIEvaluationMetricType } from './evaluation.js'; diff --git a/js/plugins/vertexai/src/gemini.ts b/js/plugins/vertexai/src/gemini.ts index 49d347bce8..3190701437 100644 --- a/js/plugins/vertexai/src/gemini.ts +++ b/js/plugins/vertexai/src/gemini.ts @@ -28,12 +28,12 @@ import { ModelReference, Part, ToolDefinitionSchema, -} from '@genkit-ai/ai/model'; +} from '@genkit/ai/model'; import { downloadRequestMedia, simulateSystemPrompt, -} from '@genkit-ai/ai/model/middleware'; -import { GENKIT_CLIENT_HEADER } from '@genkit-ai/core'; +} from '@genkit/ai/model/middleware'; +import { GENKIT_CLIENT_HEADER } from '@genkit/core'; import { Content, FunctionDeclaration, diff --git a/js/plugins/vertexai/src/imagen.ts b/js/plugins/vertexai/src/imagen.ts index 3739ff4d5e..a223823115 100644 --- a/js/plugins/vertexai/src/imagen.ts +++ b/js/plugins/vertexai/src/imagen.ts @@ -21,7 +21,7 @@ import { GenerationCommonConfigSchema, getBasicUsageStats, modelRef, -} from '@genkit-ai/ai/model'; +} from '@genkit/ai/model'; import { GoogleAuth } from 'google-auth-library'; import z from 'zod'; import { PluginOptions } from './index.js'; diff --git a/js/plugins/vertexai/src/index.ts b/js/plugins/vertexai/src/index.ts index 896bec00c0..f59e1246ba 100644 --- a/js/plugins/vertexai/src/index.ts +++ b/js/plugins/vertexai/src/index.ts @@ -14,9 +14,9 @@ * limitations under the License. */ -import { GenerateRequest, ModelReference } from '@genkit-ai/ai/model'; -import { IndexerAction, RetrieverAction } from '@genkit-ai/ai/retriever'; -import { Plugin, genkitPlugin } from '@genkit-ai/core'; +import { GenerateRequest, ModelReference } from '@genkit/ai/model'; +import { IndexerAction, RetrieverAction } from '@genkit/ai/retriever'; +import { Plugin, genkitPlugin } from '@genkit/core'; import { VertexAI } from '@google-cloud/vertexai'; import { GoogleAuth, GoogleAuthOptions } from 'google-auth-library'; import z from 'zod'; diff --git a/js/plugins/vertexai/src/model_garden.ts b/js/plugins/vertexai/src/model_garden.ts index 96b5694261..e882c6d1f0 100644 --- a/js/plugins/vertexai/src/model_garden.ts +++ b/js/plugins/vertexai/src/model_garden.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { GenerateRequest, ModelAction, modelRef } from '@genkit-ai/ai/model'; -import { GENKIT_CLIENT_HEADER } from '@genkit-ai/core'; +import { GenerateRequest, ModelAction, modelRef } from '@genkit/ai/model'; +import { GENKIT_CLIENT_HEADER } from '@genkit/core'; import { GoogleAuth } from 'google-auth-library'; import OpenAI from 'openai'; diff --git a/js/plugins/vertexai/src/openai_compatibility.ts b/js/plugins/vertexai/src/openai_compatibility.ts index 8e1d27ca66..123e7c54cf 100644 --- a/js/plugins/vertexai/src/openai_compatibility.ts +++ b/js/plugins/vertexai/src/openai_compatibility.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { Message } from '@genkit-ai/ai'; +import { Message } from '@genkit/ai'; import { defineModel, GenerateResponseChunkData, @@ -29,8 +29,8 @@ import { type Role, type ToolDefinition, type ToolRequestPart, -} from '@genkit-ai/ai/model'; -import { StreamingCallback } from '@genkit-ai/core'; +} from '@genkit/ai/model'; +import { StreamingCallback } from '@genkit/core'; import OpenAI from 'openai'; import { type ChatCompletion, diff --git a/js/plugins/vertexai/src/predict.ts b/js/plugins/vertexai/src/predict.ts index 4ced490124..2ac8856190 100644 --- a/js/plugins/vertexai/src/predict.ts +++ b/js/plugins/vertexai/src/predict.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { GENKIT_CLIENT_HEADER } from '@genkit-ai/core'; +import { GENKIT_CLIENT_HEADER } from '@genkit/core'; import { GoogleAuth } from 'google-auth-library'; import { PluginOptions } from '.'; diff --git a/js/plugins/vertexai/src/vector-search/bigquery.ts b/js/plugins/vertexai/src/vector-search/bigquery.ts index e36224ece2..397ff502b5 100644 --- a/js/plugins/vertexai/src/vector-search/bigquery.ts +++ b/js/plugins/vertexai/src/vector-search/bigquery.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { Document, DocumentDataSchema } from '@genkit-ai/ai/retriever'; -import { logger } from '@genkit-ai/core/logging'; +import { Document, DocumentDataSchema } from '@genkit/ai/retriever'; +import { logger } from '@genkit/core/logging'; import { BigQuery, QueryRowsResponse } from '@google-cloud/bigquery'; import { ZodError } from 'zod'; import { DocumentIndexer, DocumentRetriever, Neighbor } from './types'; diff --git a/js/plugins/vertexai/src/vector-search/firestore.ts b/js/plugins/vertexai/src/vector-search/firestore.ts index 4f63ae1877..f36f5f22e7 100644 --- a/js/plugins/vertexai/src/vector-search/firestore.ts +++ b/js/plugins/vertexai/src/vector-search/firestore.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { Document, DocumentDataSchema } from '@genkit-ai/ai/retriever'; +import { Document, DocumentDataSchema } from '@genkit/ai/retriever'; import { Firestore } from 'firebase-admin/firestore'; import { DocumentIndexer, DocumentRetriever, Neighbor } from './types'; /** diff --git a/js/plugins/vertexai/src/vector-search/indexers.ts b/js/plugins/vertexai/src/vector-search/indexers.ts index 2e89e43f49..18e1a1920c 100644 --- a/js/plugins/vertexai/src/vector-search/indexers.ts +++ b/js/plugins/vertexai/src/vector-search/indexers.ts @@ -14,12 +14,8 @@ * limitations under the License. */ -import { embedMany } from '@genkit-ai/ai/embedder'; -import { - defineIndexer, - IndexerAction, - indexerRef, -} from '@genkit-ai/ai/retriever'; +import { embedMany } from '@genkit/ai/embedder'; +import { defineIndexer, IndexerAction, indexerRef } from '@genkit/ai/retriever'; import z from 'zod'; import { Datapoint, diff --git a/js/plugins/vertexai/src/vector-search/query_public_endpoint.ts b/js/plugins/vertexai/src/vector-search/query_public_endpoint.ts index 70587fb9d9..9bb5b28048 100644 --- a/js/plugins/vertexai/src/vector-search/query_public_endpoint.ts +++ b/js/plugins/vertexai/src/vector-search/query_public_endpoint.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { logger } from '@genkit-ai/core/logging'; +import { logger } from '@genkit/core/logging'; import { FindNeighborsResponse } from './types'; interface QueryPublicEndpointParams { diff --git a/js/plugins/vertexai/src/vector-search/retrievers.ts b/js/plugins/vertexai/src/vector-search/retrievers.ts index e47b8f8c6b..28b1e29246 100644 --- a/js/plugins/vertexai/src/vector-search/retrievers.ts +++ b/js/plugins/vertexai/src/vector-search/retrievers.ts @@ -14,12 +14,12 @@ * limitations under the License. */ -import { embed } from '@genkit-ai/ai/embedder'; +import { embed } from '@genkit/ai/embedder'; import { defineRetriever, RetrieverAction, retrieverRef, -} from '@genkit-ai/ai/retriever'; +} from '@genkit/ai/retriever'; import z from 'zod'; import { queryPublicEndpoint } from './query_public_endpoint'; import { diff --git a/js/plugins/vertexai/src/vector-search/types.ts b/js/plugins/vertexai/src/vector-search/types.ts index 1a68464c49..1b96afaf90 100644 --- a/js/plugins/vertexai/src/vector-search/types.ts +++ b/js/plugins/vertexai/src/vector-search/types.ts @@ -14,11 +14,8 @@ * limitations under the License. */ -import { EmbedderArgument } from '@genkit-ai/ai/embedder'; -import { - CommonRetrieverOptionsSchema, - Document, -} from '@genkit-ai/ai/retriever'; +import { EmbedderArgument } from '@genkit/ai/embedder'; +import { CommonRetrieverOptionsSchema, Document } from '@genkit/ai/retriever'; import * as aiplatform from '@google-cloud/aiplatform'; import { GoogleAuth } from 'google-auth-library'; import z from 'zod'; diff --git a/js/plugins/vertexai/tests/anthropic_test.ts b/js/plugins/vertexai/tests/anthropic_test.ts index 10aa58aa14..bbdaf2d7ec 100644 --- a/js/plugins/vertexai/tests/anthropic_test.ts +++ b/js/plugins/vertexai/tests/anthropic_test.ts @@ -18,7 +18,7 @@ import { Message, MessageCreateParamsBase, } from '@anthropic-ai/sdk/resources/messages.mjs'; -import { GenerateRequest, GenerateResponseData } from '@genkit-ai/ai/model'; +import { GenerateRequest, GenerateResponseData } from '@genkit/ai/model'; import assert from 'node:assert'; import { describe, it } from 'node:test'; import { diff --git a/js/plugins/vertexai/tests/gemini_test.ts b/js/plugins/vertexai/tests/gemini_test.ts index dbb39e8f1c..f76515bbf8 100644 --- a/js/plugins/vertexai/tests/gemini_test.ts +++ b/js/plugins/vertexai/tests/gemini_test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { MessageData } from '@genkit-ai/ai/model'; +import { MessageData } from '@genkit/ai/model'; import { GenerateContentCandidate } from '@google-cloud/vertexai'; import assert from 'node:assert'; import { describe, it } from 'node:test'; diff --git a/js/plugins/vertexai/tests/vector-search/bigquery_test.ts b/js/plugins/vertexai/tests/vector-search/bigquery_test.ts index 69378ab809..0f1be884b6 100644 --- a/js/plugins/vertexai/tests/vector-search/bigquery_test.ts +++ b/js/plugins/vertexai/tests/vector-search/bigquery_test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { Document } from '@genkit-ai/ai/retriever'; +import { Document } from '@genkit/ai/retriever'; import { BigQuery } from '@google-cloud/bigquery'; import assert from 'node:assert'; import { describe, it } from 'node:test'; diff --git a/js/pnpm-lock.yaml b/js/pnpm-lock.yaml index 1b63ec57e0..429f900443 100644 --- a/js/pnpm-lock.yaml +++ b/js/pnpm-lock.yaml @@ -20,7 +20,7 @@ importers: ai: dependencies: - '@genkit-ai/core': + '@genkit/core': specifier: workspace:* version: link:../core '@opentelemetry/api': @@ -118,7 +118,7 @@ importers: flow: dependencies: - '@genkit-ai/core': + '@genkit/core': specifier: workspace:* version: link:../core '@google-cloud/firestore': @@ -176,10 +176,10 @@ importers: plugins/chroma: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:* version: link:../../core chromadb: @@ -210,10 +210,10 @@ importers: plugins/dev-local-vectorstore: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:* version: link:../../core compute-cosine-similarity: @@ -244,10 +244,10 @@ importers: plugins/dotprompt: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:* version: link:../../core front-matter: @@ -284,13 +284,13 @@ importers: plugins/evaluators: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:* version: link:../../core - '@genkit-ai/dotprompt': + '@genkit/dotprompt': specifier: workspace:* version: link:../dotprompt compute-cosine-similarity: @@ -324,16 +324,16 @@ importers: plugins/firebase: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:* version: link:../../core - '@genkit-ai/flow': + '@genkit/flow': specifier: workspace:* version: link:../../flow - '@genkit-ai/google-cloud': + '@genkit/google-cloud': specifier: workspace:* version: link:../google-cloud '@google-cloud/firestore': @@ -373,10 +373,10 @@ importers: plugins/google-cloud: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:* version: link:../../core '@google-cloud/logging-winston': @@ -452,10 +452,10 @@ importers: plugins/googleai: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:* version: link:../../core '@google/generative-ai': @@ -489,13 +489,13 @@ importers: plugins/langchain: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:* version: link:../../core - '@genkit-ai/flow': + '@genkit/flow': specifier: workspace:* version: link:../../flow '@langchain/community': @@ -532,10 +532,10 @@ importers: plugins/ollama: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:* version: link:../../core devDependencies: @@ -557,10 +557,10 @@ importers: plugins/pinecone: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:* version: link:../../core '@pinecone-database/pinecone': @@ -597,13 +597,13 @@ importers: '@anthropic-ai/vertex-sdk': specifier: ^0.4.0 version: 0.4.0(encoding@0.1.13) - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:* version: link:../../core - '@genkit-ai/flow': + '@genkit/flow': specifier: workspace:* version: link:../../flow '@google-cloud/aiplatform': @@ -653,22 +653,22 @@ importers: testapps/anthropic-models: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:* version: link:../../core - '@genkit-ai/dotprompt': + '@genkit/dotprompt': specifier: workspace:* version: link:../../plugins/dotprompt - '@genkit-ai/firebase': + '@genkit/firebase': specifier: workspace:* version: link:../../plugins/firebase - '@genkit-ai/flow': + '@genkit/flow': specifier: workspace:* version: link:../../flow - '@genkit-ai/vertexai': + '@genkit/vertexai': specifier: workspace:* version: link:../../plugins/vertexai express: @@ -684,31 +684,31 @@ importers: testapps/byo-evaluator: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:* version: link:../../core - '@genkit-ai/dev-local-vectorstore': + '@genkit/dev-local-vectorstore': specifier: workspace:* version: link:../../plugins/dev-local-vectorstore - '@genkit-ai/dotprompt': + '@genkit/dotprompt': specifier: workspace:* version: link:../../plugins/dotprompt - '@genkit-ai/evaluator': + '@genkit/evaluator': specifier: workspace:* version: link:../../plugins/evaluators - '@genkit-ai/firebase': + '@genkit/firebase': specifier: workspace:* version: link:../../plugins/firebase - '@genkit-ai/flow': + '@genkit/flow': specifier: workspace:* version: link:../../flow - '@genkit-ai/googleai': + '@genkit/googleai': specifier: workspace:* version: link:../../plugins/googleai - '@genkit-ai/vertexai': + '@genkit/vertexai': specifier: workspace:* version: link:../../plugins/vertexai path: @@ -724,31 +724,31 @@ importers: testapps/cat-eval: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:* version: link:../../core - '@genkit-ai/dev-local-vectorstore': + '@genkit/dev-local-vectorstore': specifier: workspace:* version: link:../../plugins/dev-local-vectorstore - '@genkit-ai/dotprompt': + '@genkit/dotprompt': specifier: workspace:* version: link:../../plugins/dotprompt - '@genkit-ai/evaluator': + '@genkit/evaluator': specifier: workspace:* version: link:../../plugins/evaluators - '@genkit-ai/firebase': + '@genkit/firebase': specifier: workspace:* version: link:../../plugins/firebase - '@genkit-ai/flow': + '@genkit/flow': specifier: workspace:* version: link:../../flow - '@genkit-ai/googleai': + '@genkit/googleai': specifier: workspace:* version: link:../../plugins/googleai - '@genkit-ai/vertexai': + '@genkit/vertexai': specifier: workspace:* version: link:../../plugins/vertexai genkitx-pinecone: @@ -773,31 +773,31 @@ importers: testapps/dev-ui-gallery: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:* version: link:../../core - '@genkit-ai/dev-local-vectorstore': + '@genkit/dev-local-vectorstore': specifier: workspace:* version: link:../../plugins/dev-local-vectorstore - '@genkit-ai/dotprompt': + '@genkit/dotprompt': specifier: workspace:* version: link:../../plugins/dotprompt - '@genkit-ai/evaluator': + '@genkit/evaluator': specifier: workspace:* version: link:../../plugins/evaluators - '@genkit-ai/firebase': + '@genkit/firebase': specifier: workspace:* version: link:../../plugins/firebase - '@genkit-ai/flow': + '@genkit/flow': specifier: workspace:* version: link:../../flow - '@genkit-ai/googleai': + '@genkit/googleai': specifier: workspace:* version: link:../../plugins/googleai - '@genkit-ai/vertexai': + '@genkit/vertexai': specifier: workspace:* version: link:../../plugins/vertexai firebase-admin: @@ -822,19 +822,19 @@ importers: testapps/docs-menu-basic: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:* version: link:../../core - '@genkit-ai/firebase': + '@genkit/firebase': specifier: workspace:* version: link:../../plugins/firebase - '@genkit-ai/flow': + '@genkit/flow': specifier: workspace:* version: link:../../flow - '@genkit-ai/googleai': + '@genkit/googleai': specifier: workspace:* version: link:../../plugins/googleai express: @@ -850,22 +850,22 @@ importers: testapps/docs-menu-rag: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:* version: link:../../core - '@genkit-ai/dev-local-vectorstore': + '@genkit/dev-local-vectorstore': specifier: workspace:* version: link:../../plugins/dev-local-vectorstore - '@genkit-ai/firebase': + '@genkit/firebase': specifier: workspace:* version: link:../../plugins/firebase - '@genkit-ai/flow': + '@genkit/flow': specifier: workspace:* version: link:../../flow - '@genkit-ai/vertexai': + '@genkit/vertexai': specifier: workspace:* version: link:../../plugins/vertexai llm-chunk: @@ -887,22 +887,22 @@ importers: testapps/eval: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:* version: link:../../core - '@genkit-ai/evaluator': + '@genkit/evaluator': specifier: workspace:* version: link:../../plugins/evaluators - '@genkit-ai/firebase': + '@genkit/firebase': specifier: workspace:* version: link:../../plugins/firebase - '@genkit-ai/flow': + '@genkit/flow': specifier: workspace:* version: link:../../flow - '@genkit-ai/vertexai': + '@genkit/vertexai': specifier: workspace:* version: link:../../plugins/vertexai zod: @@ -915,28 +915,28 @@ importers: testapps/evaluator-gut-check: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:* version: link:../../core - '@genkit-ai/dev-local-vectorstore': + '@genkit/dev-local-vectorstore': specifier: workspace:* version: link:../../plugins/dev-local-vectorstore - '@genkit-ai/evaluator': + '@genkit/evaluator': specifier: workspace:* version: link:../../plugins/evaluators - '@genkit-ai/firebase': + '@genkit/firebase': specifier: workspace:* version: link:../../plugins/firebase - '@genkit-ai/flow': + '@genkit/flow': specifier: workspace:* version: link:../../flow - '@genkit-ai/googleai': + '@genkit/googleai': specifier: workspace:* version: link:../../plugins/googleai - '@genkit-ai/vertexai': + '@genkit/vertexai': specifier: workspace:* version: link:../../plugins/vertexai zod: @@ -949,22 +949,22 @@ importers: testapps/express: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:^ version: link:../../core - '@genkit-ai/firebase': + '@genkit/firebase': specifier: workspace:* version: link:../../plugins/firebase - '@genkit-ai/flow': + '@genkit/flow': specifier: workspace:* version: link:../../flow - '@genkit-ai/googleai': + '@genkit/googleai': specifier: workspace:* version: link:../../plugins/googleai - '@genkit-ai/vertexai': + '@genkit/vertexai': specifier: workspace:* version: link:../../plugins/vertexai express: @@ -986,13 +986,13 @@ importers: testapps/flow-sample1: dependencies: - '@genkit-ai/core': + '@genkit/core': specifier: workspace:^ version: link:../../core - '@genkit-ai/firebase': + '@genkit/firebase': specifier: workspace:^ version: link:../../plugins/firebase - '@genkit-ai/flow': + '@genkit/flow': specifier: workspace:* version: link:../../flow zod: @@ -1005,28 +1005,28 @@ importers: testapps/flow-simple-ai: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:^ version: link:../../core - '@genkit-ai/dotprompt': + '@genkit/dotprompt': specifier: workspace:* version: link:../../plugins/dotprompt - '@genkit-ai/firebase': + '@genkit/firebase': specifier: workspace:* version: link:../../plugins/firebase - '@genkit-ai/flow': + '@genkit/flow': specifier: workspace:* version: link:../../flow - '@genkit-ai/google-cloud': + '@genkit/google-cloud': specifier: workspace:* version: link:../../plugins/google-cloud - '@genkit-ai/googleai': + '@genkit/googleai': specifier: workspace:* version: link:../../plugins/googleai - '@genkit-ai/vertexai': + '@genkit/vertexai': specifier: workspace:* version: link:../../plugins/vertexai '@google/generative-ai': @@ -1051,22 +1051,22 @@ importers: testapps/google-ai-code-execution: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:^ version: link:../../core - '@genkit-ai/dotprompt': + '@genkit/dotprompt': specifier: workspace:* version: link:../../plugins/dotprompt - '@genkit-ai/flow': + '@genkit/flow': specifier: workspace:* version: link:../../flow - '@genkit-ai/google-cloud': + '@genkit/google-cloud': specifier: workspace:* version: link:../../plugins/google-cloud - '@genkit-ai/googleai': + '@genkit/googleai': specifier: workspace:* version: link:../../plugins/googleai dotenv: @@ -1085,22 +1085,22 @@ importers: testapps/langchain: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:^ version: link:../../core - '@genkit-ai/firebase': + '@genkit/firebase': specifier: workspace:* version: link:../../plugins/firebase - '@genkit-ai/flow': + '@genkit/flow': specifier: workspace:* version: link:../../flow - '@genkit-ai/googleai': + '@genkit/googleai': specifier: workspace:* version: link:../../plugins/googleai - '@genkit-ai/vertexai': + '@genkit/vertexai': specifier: workspace:* version: link:../../plugins/vertexai '@langchain/community': @@ -1140,19 +1140,19 @@ importers: testapps/llm-human-in-the-loop: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:^ version: link:../../core - '@genkit-ai/firebase': + '@genkit/firebase': specifier: workspace:^ version: link:../../plugins/firebase - '@genkit-ai/flow': + '@genkit/flow': specifier: workspace:* version: link:../../flow - '@genkit-ai/googleai': + '@genkit/googleai': specifier: workspace:^ version: link:../../plugins/googleai zod: @@ -1165,28 +1165,28 @@ importers: testapps/menu: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:* version: link:../../core - '@genkit-ai/dev-local-vectorstore': + '@genkit/dev-local-vectorstore': specifier: workspace:* version: link:../../plugins/dev-local-vectorstore - '@genkit-ai/dotprompt': + '@genkit/dotprompt': specifier: workspace:* version: link:../../plugins/dotprompt - '@genkit-ai/evaluator': + '@genkit/evaluator': specifier: workspace:* version: link:../../plugins/evaluators - '@genkit-ai/firebase': + '@genkit/firebase': specifier: workspace:* version: link:../../plugins/firebase - '@genkit-ai/flow': + '@genkit/flow': specifier: workspace:* version: link:../../flow - '@genkit-ai/vertexai': + '@genkit/vertexai': specifier: workspace:* version: link:../../plugins/vertexai zod: @@ -1199,19 +1199,19 @@ importers: testapps/prompt-file: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:^ version: link:../../core - '@genkit-ai/dotprompt': + '@genkit/dotprompt': specifier: workspace:* version: link:../../plugins/dotprompt - '@genkit-ai/flow': + '@genkit/flow': specifier: workspace:* version: link:../../flow - '@genkit-ai/googleai': + '@genkit/googleai': specifier: workspace:* version: link:../../plugins/googleai zod: @@ -1224,31 +1224,31 @@ importers: testapps/rag: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:* version: link:../../core - '@genkit-ai/dev-local-vectorstore': + '@genkit/dev-local-vectorstore': specifier: workspace:* version: link:../../plugins/dev-local-vectorstore - '@genkit-ai/dotprompt': + '@genkit/dotprompt': specifier: workspace:* version: link:../../plugins/dotprompt - '@genkit-ai/evaluator': + '@genkit/evaluator': specifier: workspace:* version: link:../../plugins/evaluators - '@genkit-ai/firebase': + '@genkit/firebase': specifier: workspace:* version: link:../../plugins/firebase - '@genkit-ai/flow': + '@genkit/flow': specifier: workspace:* version: link:../../flow - '@genkit-ai/googleai': + '@genkit/googleai': specifier: workspace:* version: link:../../plugins/googleai - '@genkit-ai/vertexai': + '@genkit/vertexai': specifier: workspace:* version: link:../../plugins/vertexai genkitx-chromadb: @@ -1288,31 +1288,31 @@ importers: testapps/vertexai-vector-search-bigquery: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:* version: link:../../core - '@genkit-ai/dev-local-vectorstore': + '@genkit/dev-local-vectorstore': specifier: workspace:* version: link:../../plugins/dev-local-vectorstore - '@genkit-ai/dotprompt': + '@genkit/dotprompt': specifier: workspace:* version: link:../../plugins/dotprompt - '@genkit-ai/evaluator': + '@genkit/evaluator': specifier: workspace:* version: link:../../plugins/evaluators - '@genkit-ai/firebase': + '@genkit/firebase': specifier: workspace:* version: link:../../plugins/firebase - '@genkit-ai/flow': + '@genkit/flow': specifier: workspace:* version: link:../../flow - '@genkit-ai/googleai': + '@genkit/googleai': specifier: workspace:* version: link:../../plugins/googleai - '@genkit-ai/vertexai': + '@genkit/vertexai': specifier: workspace:* version: link:../../plugins/vertexai '@google-cloud/bigquery': @@ -1346,31 +1346,31 @@ importers: testapps/vertexai-vector-search-custom: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:* version: link:../../core - '@genkit-ai/dev-local-vectorstore': + '@genkit/dev-local-vectorstore': specifier: workspace:* version: link:../../plugins/dev-local-vectorstore - '@genkit-ai/dotprompt': + '@genkit/dotprompt': specifier: workspace:* version: link:../../plugins/dotprompt - '@genkit-ai/evaluator': + '@genkit/evaluator': specifier: workspace:* version: link:../../plugins/evaluators - '@genkit-ai/firebase': + '@genkit/firebase': specifier: workspace:* version: link:../../plugins/firebase - '@genkit-ai/flow': + '@genkit/flow': specifier: workspace:* version: link:../../flow - '@genkit-ai/googleai': + '@genkit/googleai': specifier: workspace:* version: link:../../plugins/googleai - '@genkit-ai/vertexai': + '@genkit/vertexai': specifier: workspace:* version: link:../../plugins/vertexai '@google-cloud/bigquery': @@ -1404,31 +1404,31 @@ importers: testapps/vertexai-vector-search-firestore: dependencies: - '@genkit-ai/ai': + '@genkit/ai': specifier: workspace:* version: link:../../ai - '@genkit-ai/core': + '@genkit/core': specifier: workspace:* version: link:../../core - '@genkit-ai/dev-local-vectorstore': + '@genkit/dev-local-vectorstore': specifier: workspace:* version: link:../../plugins/dev-local-vectorstore - '@genkit-ai/dotprompt': + '@genkit/dotprompt': specifier: workspace:* version: link:../../plugins/dotprompt - '@genkit-ai/evaluator': + '@genkit/evaluator': specifier: workspace:* version: link:../../plugins/evaluators - '@genkit-ai/firebase': + '@genkit/firebase': specifier: workspace:* version: link:../../plugins/firebase - '@genkit-ai/flow': + '@genkit/flow': specifier: workspace:* version: link:../../flow - '@genkit-ai/googleai': + '@genkit/googleai': specifier: workspace:* version: link:../../plugins/googleai - '@genkit-ai/vertexai': + '@genkit/vertexai': specifier: workspace:* version: link:../../plugins/vertexai dotenv: diff --git a/js/testapps/anthropic-models/package.json b/js/testapps/anthropic-models/package.json index d9fbcdc73c..d1fdcc8f80 100644 --- a/js/testapps/anthropic-models/package.json +++ b/js/testapps/anthropic-models/package.json @@ -13,12 +13,12 @@ "author": "", "license": "ISC", "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*", - "@genkit-ai/dotprompt": "workspace:*", - "@genkit-ai/firebase": "workspace:*", - "@genkit-ai/flow": "workspace:*", - "@genkit-ai/vertexai": "workspace:*", + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:*", + "@genkit/dotprompt": "workspace:*", + "@genkit/firebase": "workspace:*", + "@genkit/flow": "workspace:*", + "@genkit/vertexai": "workspace:*", "express": "^4.19.2", "zod": "3.22.4" }, diff --git a/js/testapps/anthropic-models/src/index.ts b/js/testapps/anthropic-models/src/index.ts index 0dd4f2d340..023ab83cf8 100644 --- a/js/testapps/anthropic-models/src/index.ts +++ b/js/testapps/anthropic-models/src/index.ts @@ -17,16 +17,16 @@ import * as z from 'zod'; // Import the Genkit core libraries and plugins. -import { defineTool, generate } from '@genkit-ai/ai'; -import { configureGenkit } from '@genkit-ai/core'; -import { claude35Sonnet, vertexAI } from '@genkit-ai/vertexai'; +import { defineTool, generate } from '@genkit/ai'; +import { configureGenkit } from '@genkit/core'; +import { claude35Sonnet, vertexAI } from '@genkit/vertexai'; // Import models from the Vertex AI plugin. The Vertex AI API provides access to // several generative models. Here, we import Gemini 1.5 Flash. // From the Firebase plugin, import the functions needed to deploy flows using // Cloud Functions. -import { defineFlow } from '@genkit-ai/flow'; +import { defineFlow } from '@genkit/flow'; configureGenkit({ plugins: [ diff --git a/js/testapps/byo-evaluator/package.json b/js/testapps/byo-evaluator/package.json index 16479c5512..e504637ee0 100644 --- a/js/testapps/byo-evaluator/package.json +++ b/js/testapps/byo-evaluator/package.json @@ -14,15 +14,15 @@ "author": "", "license": "ISC", "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*", - "@genkit-ai/dev-local-vectorstore": "workspace:*", - "@genkit-ai/dotprompt": "workspace:*", - "@genkit-ai/evaluator": "workspace:*", - "@genkit-ai/firebase": "workspace:*", - "@genkit-ai/flow": "workspace:*", - "@genkit-ai/googleai": "workspace:*", - "@genkit-ai/vertexai": "workspace:*", + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:*", + "@genkit/dev-local-vectorstore": "workspace:*", + "@genkit/dotprompt": "workspace:*", + "@genkit/evaluator": "workspace:*", + "@genkit/firebase": "workspace:*", + "@genkit/flow": "workspace:*", + "@genkit/googleai": "workspace:*", + "@genkit/vertexai": "workspace:*", "path": "^0.12.7", "zod": "^3.22.4" }, diff --git a/js/testapps/byo-evaluator/src/deliciousness/deliciousness.ts b/js/testapps/byo-evaluator/src/deliciousness/deliciousness.ts index 967caf19f3..7e2b9beb27 100644 --- a/js/testapps/byo-evaluator/src/deliciousness/deliciousness.ts +++ b/js/testapps/byo-evaluator/src/deliciousness/deliciousness.ts @@ -14,10 +14,10 @@ * limitations under the License. */ -import { generate } from '@genkit-ai/ai'; -import { BaseDataPoint, Score } from '@genkit-ai/ai/evaluator'; -import { ModelArgument } from '@genkit-ai/ai/model'; -import { loadPromptFile } from '@genkit-ai/dotprompt'; +import { generate } from '@genkit/ai'; +import { BaseDataPoint, Score } from '@genkit/ai/evaluator'; +import { ModelArgument } from '@genkit/ai/model'; +import { loadPromptFile } from '@genkit/dotprompt'; import path from 'path'; import * as z from 'zod'; diff --git a/js/testapps/byo-evaluator/src/deliciousness/deliciousness_evaluator.ts b/js/testapps/byo-evaluator/src/deliciousness/deliciousness_evaluator.ts index 989c37f90e..35bbe24d27 100644 --- a/js/testapps/byo-evaluator/src/deliciousness/deliciousness_evaluator.ts +++ b/js/testapps/byo-evaluator/src/deliciousness/deliciousness_evaluator.ts @@ -18,8 +18,8 @@ import { BaseDataPoint, EvaluatorAction, defineEvaluator, -} from '@genkit-ai/ai/evaluator'; -import { ModelReference } from '@genkit-ai/ai/model'; +} from '@genkit/ai/evaluator'; +import { ModelReference } from '@genkit/ai/model'; import * as z from 'zod'; import { ByoMetric } from '..'; import { deliciousnessScore } from './deliciousness'; diff --git a/js/testapps/byo-evaluator/src/funniness/funniness.ts b/js/testapps/byo-evaluator/src/funniness/funniness.ts index 7fc645d1bd..d8203b2965 100644 --- a/js/testapps/byo-evaluator/src/funniness/funniness.ts +++ b/js/testapps/byo-evaluator/src/funniness/funniness.ts @@ -14,10 +14,10 @@ * limitations under the License. */ -import { generate } from '@genkit-ai/ai'; -import { BaseDataPoint, Score } from '@genkit-ai/ai/evaluator'; -import { ModelArgument } from '@genkit-ai/ai/model'; -import { loadPromptFile } from '@genkit-ai/dotprompt'; +import { generate } from '@genkit/ai'; +import { BaseDataPoint, Score } from '@genkit/ai/evaluator'; +import { ModelArgument } from '@genkit/ai/model'; +import { loadPromptFile } from '@genkit/dotprompt'; import path from 'path'; import * as z from 'zod'; diff --git a/js/testapps/byo-evaluator/src/funniness/funniness_evaluator.ts b/js/testapps/byo-evaluator/src/funniness/funniness_evaluator.ts index bab60726d9..71aab106e9 100644 --- a/js/testapps/byo-evaluator/src/funniness/funniness_evaluator.ts +++ b/js/testapps/byo-evaluator/src/funniness/funniness_evaluator.ts @@ -18,8 +18,8 @@ import { BaseDataPoint, EvaluatorAction, defineEvaluator, -} from '@genkit-ai/ai/evaluator'; -import { ModelReference } from '@genkit-ai/ai/model'; +} from '@genkit/ai/evaluator'; +import { ModelReference } from '@genkit/ai/model'; import * as z from 'zod'; import { ByoMetric } from '..'; import { funninessScore } from './funniness'; diff --git a/js/testapps/byo-evaluator/src/index.ts b/js/testapps/byo-evaluator/src/index.ts index b3061b8705..c399cec24d 100644 --- a/js/testapps/byo-evaluator/src/index.ts +++ b/js/testapps/byo-evaluator/src/index.ts @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { EvaluatorAction } from '@genkit-ai/ai'; -import { ModelReference } from '@genkit-ai/ai/model'; -import { configureGenkit, genkitPlugin, PluginProvider } from '@genkit-ai/core'; -import { dotprompt } from '@genkit-ai/dotprompt'; -import { firebase } from '@genkit-ai/firebase'; -import { geminiPro, googleAI } from '@genkit-ai/googleai'; +import { EvaluatorAction } from '@genkit/ai'; +import { ModelReference } from '@genkit/ai/model'; +import { configureGenkit, genkitPlugin, PluginProvider } from '@genkit/core'; +import { dotprompt } from '@genkit/dotprompt'; +import { firebase } from '@genkit/firebase'; +import { geminiPro, googleAI } from '@genkit/googleai'; import * as z from 'zod'; import { PERMISSIVE_SAFETY_SETTINGS, diff --git a/js/testapps/byo-evaluator/src/pii/pii_detection.ts b/js/testapps/byo-evaluator/src/pii/pii_detection.ts index ab5938963d..384958d113 100644 --- a/js/testapps/byo-evaluator/src/pii/pii_detection.ts +++ b/js/testapps/byo-evaluator/src/pii/pii_detection.ts @@ -14,10 +14,10 @@ * limitations under the License. */ -import { generate } from '@genkit-ai/ai'; -import { BaseDataPoint, Score } from '@genkit-ai/ai/evaluator'; -import { ModelArgument } from '@genkit-ai/ai/model'; -import { loadPromptFile } from '@genkit-ai/dotprompt'; +import { generate } from '@genkit/ai'; +import { BaseDataPoint, Score } from '@genkit/ai/evaluator'; +import { ModelArgument } from '@genkit/ai/model'; +import { loadPromptFile } from '@genkit/dotprompt'; import path from 'path'; import * as z from 'zod'; diff --git a/js/testapps/byo-evaluator/src/pii/pii_evaluator.ts b/js/testapps/byo-evaluator/src/pii/pii_evaluator.ts index a493367461..151593d908 100644 --- a/js/testapps/byo-evaluator/src/pii/pii_evaluator.ts +++ b/js/testapps/byo-evaluator/src/pii/pii_evaluator.ts @@ -18,8 +18,8 @@ import { BaseDataPoint, EvaluatorAction, defineEvaluator, -} from '@genkit-ai/ai/evaluator'; -import { ModelReference } from '@genkit-ai/ai/model'; +} from '@genkit/ai/evaluator'; +import { ModelReference } from '@genkit/ai/model'; import * as z from 'zod'; import { ByoMetric } from '..'; import { piiDetectionScore } from './pii_detection'; diff --git a/js/testapps/byo-evaluator/src/regex/regex_evaluator.ts b/js/testapps/byo-evaluator/src/regex/regex_evaluator.ts index 737385f465..ee0e8535f6 100644 --- a/js/testapps/byo-evaluator/src/regex/regex_evaluator.ts +++ b/js/testapps/byo-evaluator/src/regex/regex_evaluator.ts @@ -20,7 +20,7 @@ import { EvaluatorAction, Score, defineEvaluator, -} from '@genkit-ai/ai/evaluator'; +} from '@genkit/ai/evaluator'; import { ByoMetric } from '..'; /** We allow multiple regex matchers to be defined. This is the prefix to use. */ diff --git a/js/testapps/cat-eval/package.json b/js/testapps/cat-eval/package.json index 694388aae4..d1a38ba22d 100644 --- a/js/testapps/cat-eval/package.json +++ b/js/testapps/cat-eval/package.json @@ -14,15 +14,15 @@ "author": "", "license": "ISC", "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*", - "@genkit-ai/dev-local-vectorstore": "workspace:*", - "@genkit-ai/dotprompt": "workspace:*", - "@genkit-ai/evaluator": "workspace:*", - "@genkit-ai/firebase": "workspace:*", - "@genkit-ai/flow": "workspace:*", - "@genkit-ai/googleai": "workspace:*", - "@genkit-ai/vertexai": "workspace:*", + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:*", + "@genkit/dev-local-vectorstore": "workspace:*", + "@genkit/dotprompt": "workspace:*", + "@genkit/evaluator": "workspace:*", + "@genkit/firebase": "workspace:*", + "@genkit/flow": "workspace:*", + "@genkit/googleai": "workspace:*", + "@genkit/vertexai": "workspace:*", "genkitx-pinecone": "workspace:*", "llm-chunk": "^0.0.1", "pdfjs-dist": "^4.0.379", diff --git a/js/testapps/cat-eval/src/index.ts b/js/testapps/cat-eval/src/index.ts index b3a6784aa8..618065e40e 100644 --- a/js/testapps/cat-eval/src/index.ts +++ b/js/testapps/cat-eval/src/index.ts @@ -14,13 +14,13 @@ * limitations under the License. */ -import { configureGenkit } from '@genkit-ai/core'; -import { devLocalVectorstore } from '@genkit-ai/dev-local-vectorstore'; -import { dotprompt } from '@genkit-ai/dotprompt'; -import { genkitEval, GenkitMetric } from '@genkit-ai/evaluator'; -import { firebase } from '@genkit-ai/firebase'; -import { gemini15Pro, googleAI } from '@genkit-ai/googleai'; -import { textEmbeddingGecko, vertexAI } from '@genkit-ai/vertexai'; +import { configureGenkit } from '@genkit/core'; +import { devLocalVectorstore } from '@genkit/dev-local-vectorstore'; +import { dotprompt } from '@genkit/dotprompt'; +import { genkitEval, GenkitMetric } from '@genkit/evaluator'; +import { firebase } from '@genkit/firebase'; +import { gemini15Pro, googleAI } from '@genkit/googleai'; +import { textEmbeddingGecko, vertexAI } from '@genkit/vertexai'; // Turn off safety checks for evaluation so that the LLM as an evaluator can // respond appropriately to potentially harmful content without error. diff --git a/js/testapps/cat-eval/src/pdf_rag.ts b/js/testapps/cat-eval/src/pdf_rag.ts index 517dfafad4..31bfe93f02 100644 --- a/js/testapps/cat-eval/src/pdf_rag.ts +++ b/js/testapps/cat-eval/src/pdf_rag.ts @@ -14,14 +14,14 @@ * limitations under the License. */ -import { generate } from '@genkit-ai/ai'; -import { Document, index, retrieve } from '@genkit-ai/ai/retriever'; +import { generate } from '@genkit/ai'; +import { Document, index, retrieve } from '@genkit/ai/retriever'; import { devLocalIndexerRef, devLocalRetrieverRef, -} from '@genkit-ai/dev-local-vectorstore'; -import { defineFlow, run } from '@genkit-ai/flow'; -import { geminiPro } from '@genkit-ai/googleai'; +} from '@genkit/dev-local-vectorstore'; +import { defineFlow, run } from '@genkit/flow'; +import { geminiPro } from '@genkit/googleai'; import { chunk } from 'llm-chunk'; import path from 'path'; import { getDocument } from 'pdfjs-dist-legacy'; diff --git a/js/testapps/cat-eval/src/setup.ts b/js/testapps/cat-eval/src/setup.ts index a8f74b8cfc..8f15cc1077 100644 --- a/js/testapps/cat-eval/src/setup.ts +++ b/js/testapps/cat-eval/src/setup.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { defineFlow, runFlow } from '@genkit-ai/flow'; +import { defineFlow, runFlow } from '@genkit/flow'; import * as z from 'zod'; import { indexPdf } from './pdf_rag.js'; diff --git a/js/testapps/dev-ui-gallery/package.json b/js/testapps/dev-ui-gallery/package.json index dd663d07be..c0948e9886 100644 --- a/js/testapps/dev-ui-gallery/package.json +++ b/js/testapps/dev-ui-gallery/package.json @@ -18,15 +18,15 @@ "typescript": "^5.3.3" }, "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*", - "@genkit-ai/dev-local-vectorstore": "workspace:*", - "@genkit-ai/dotprompt": "workspace:*", - "@genkit-ai/evaluator": "workspace:*", - "@genkit-ai/firebase": "workspace:*", - "@genkit-ai/flow": "workspace:*", - "@genkit-ai/googleai": "workspace:*", - "@genkit-ai/vertexai": "workspace:*", + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:*", + "@genkit/dev-local-vectorstore": "workspace:*", + "@genkit/dotprompt": "workspace:*", + "@genkit/evaluator": "workspace:*", + "@genkit/firebase": "workspace:*", + "@genkit/flow": "workspace:*", + "@genkit/googleai": "workspace:*", + "@genkit/vertexai": "workspace:*", "firebase-admin": "^12.1.0", "genkitx-chromadb": "workspace:*", "genkitx-ollama": "workspace:*", diff --git a/js/testapps/dev-ui-gallery/src/index.ts b/js/testapps/dev-ui-gallery/src/index.ts index ca5dfebcb9..86061fc427 100644 --- a/js/testapps/dev-ui-gallery/src/index.ts +++ b/js/testapps/dev-ui-gallery/src/index.ts @@ -14,12 +14,12 @@ * limitations under the License. */ -import { configureGenkit } from '@genkit-ai/core'; -import { devLocalVectorstore } from '@genkit-ai/dev-local-vectorstore'; -import { dotprompt } from '@genkit-ai/dotprompt'; -import { genkitEval, GenkitMetric } from '@genkit-ai/evaluator'; -import { firebase } from '@genkit-ai/firebase'; -import { geminiPro, googleAI } from '@genkit-ai/googleai'; +import { configureGenkit } from '@genkit/core'; +import { devLocalVectorstore } from '@genkit/dev-local-vectorstore'; +import { dotprompt } from '@genkit/dotprompt'; +import { genkitEval, GenkitMetric } from '@genkit/evaluator'; +import { firebase } from '@genkit/firebase'; +import { geminiPro, googleAI } from '@genkit/googleai'; import { claude3Haiku, claude3Opus, @@ -27,7 +27,7 @@ import { textEmbeddingGecko, vertexAI, VertexAIEvaluationMetricType, -} from '@genkit-ai/vertexai'; +} from '@genkit/vertexai'; import { chroma } from 'genkitx-chromadb'; import { ollama } from 'genkitx-ollama'; import { pinecone } from 'genkitx-pinecone'; diff --git a/js/testapps/dev-ui-gallery/src/main/flows-durable.ts b/js/testapps/dev-ui-gallery/src/main/flows-durable.ts index 82e49fe8e8..a9ede30732 100644 --- a/js/testapps/dev-ui-gallery/src/main/flows-durable.ts +++ b/js/testapps/dev-ui-gallery/src/main/flows-durable.ts @@ -14,15 +14,15 @@ * limitations under the License. */ -import { prompt } from '@genkit-ai/dotprompt'; -import { run } from '@genkit-ai/flow'; +import { prompt } from '@genkit/dotprompt'; +import { run } from '@genkit/flow'; import { durableFlow, interrupt, scheduleFlow, sleep, waitFor, -} from '@genkit-ai/flow/experimental'; +} from '@genkit/flow/experimental'; import * as z from 'zod'; import { HelloSchema } from '../common/types.js'; diff --git a/js/testapps/dev-ui-gallery/src/main/flows-firebase-functions.ts b/js/testapps/dev-ui-gallery/src/main/flows-firebase-functions.ts index 08578dbf9a..2a60c51607 100644 --- a/js/testapps/dev-ui-gallery/src/main/flows-firebase-functions.ts +++ b/js/testapps/dev-ui-gallery/src/main/flows-firebase-functions.ts @@ -14,11 +14,11 @@ * limitations under the License. */ -import { generate } from '@genkit-ai/ai'; -import { firebaseAuth } from '@genkit-ai/firebase/auth'; -import { noAuth, onFlow } from '@genkit-ai/firebase/functions'; -import { defineFlow, run } from '@genkit-ai/flow'; -import { gemini15Flash } from '@genkit-ai/googleai'; +import { generate } from '@genkit/ai'; +import { firebaseAuth } from '@genkit/firebase/auth'; +import { noAuth, onFlow } from '@genkit/firebase/functions'; +import { defineFlow, run } from '@genkit/flow'; +import { gemini15Flash } from '@genkit/googleai'; import { DecodedIdToken } from 'firebase-admin/auth'; import * as z from 'zod'; diff --git a/js/testapps/dev-ui-gallery/src/main/flows.ts b/js/testapps/dev-ui-gallery/src/main/flows.ts index 4033697b51..6eafedce31 100644 --- a/js/testapps/dev-ui-gallery/src/main/flows.ts +++ b/js/testapps/dev-ui-gallery/src/main/flows.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { defineFlow, run, runFlow, runMap } from '@genkit-ai/flow'; +import { defineFlow, run, runFlow, runMap } from '@genkit/flow'; import * as z from 'zod'; import { generateString } from '../common/util'; diff --git a/js/testapps/dev-ui-gallery/src/main/prompts.ts b/js/testapps/dev-ui-gallery/src/main/prompts.ts index eb20b973e3..9842e4dc39 100644 --- a/js/testapps/dev-ui-gallery/src/main/prompts.ts +++ b/js/testapps/dev-ui-gallery/src/main/prompts.ts @@ -14,9 +14,9 @@ * limitations under the License. */ -import { defineDotprompt, prompt } from '@genkit-ai/dotprompt'; -import { defineFlow } from '@genkit-ai/flow'; -import { gemini15Flash } from '@genkit-ai/googleai'; +import { defineDotprompt, prompt } from '@genkit/dotprompt'; +import { defineFlow } from '@genkit/flow'; +import { gemini15Flash } from '@genkit/googleai'; import * as z from 'zod'; import { HelloFullNameSchema, HelloSchema } from '../common/types.js'; diff --git a/js/testapps/dev-ui-gallery/src/main/tools.ts b/js/testapps/dev-ui-gallery/src/main/tools.ts index 81093d4610..e07389231f 100644 --- a/js/testapps/dev-ui-gallery/src/main/tools.ts +++ b/js/testapps/dev-ui-gallery/src/main/tools.ts @@ -14,10 +14,10 @@ * limitations under the License. */ -import { defineTool } from '@genkit-ai/ai/tool'; -import { defineDotprompt } from '@genkit-ai/dotprompt'; -import { defineFlow } from '@genkit-ai/flow'; -import { gemini15Flash } from '@genkit-ai/googleai'; +import { defineTool } from '@genkit/ai/tool'; +import { defineDotprompt } from '@genkit/dotprompt'; +import { defineFlow } from '@genkit/flow'; +import { gemini15Flash } from '@genkit/googleai'; import * as z from 'zod'; import { WeatherSchema } from '../common/types'; diff --git a/js/testapps/docs-menu-basic/package.json b/js/testapps/docs-menu-basic/package.json index a41df0bc3e..1f02814ee4 100644 --- a/js/testapps/docs-menu-basic/package.json +++ b/js/testapps/docs-menu-basic/package.json @@ -15,11 +15,11 @@ "author": "", "license": "ISC", "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*", - "@genkit-ai/firebase": "workspace:*", - "@genkit-ai/flow": "workspace:*", - "@genkit-ai/googleai": "workspace:*", + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:*", + "@genkit/firebase": "workspace:*", + "@genkit/flow": "workspace:*", + "@genkit/googleai": "workspace:*", "express": "^4.19.2", "zod": "^3.22.4" }, diff --git a/js/testapps/docs-menu-basic/src/index.ts b/js/testapps/docs-menu-basic/src/index.ts index 977b4aae8f..65e9e1d5dd 100644 --- a/js/testapps/docs-menu-basic/src/index.ts +++ b/js/testapps/docs-menu-basic/src/index.ts @@ -16,10 +16,10 @@ // This sample is referenced by the genkit docs. Changes should be made to // both. -import { generate } from '@genkit-ai/ai'; -import { configureGenkit } from '@genkit-ai/core'; -import { defineFlow, startFlowsServer } from '@genkit-ai/flow'; -import { geminiPro, googleAI } from '@genkit-ai/googleai'; +import { generate } from '@genkit/ai'; +import { configureGenkit } from '@genkit/core'; +import { defineFlow, startFlowsServer } from '@genkit/flow'; +import { geminiPro, googleAI } from '@genkit/googleai'; import * as z from 'zod'; configureGenkit({ diff --git a/js/testapps/docs-menu-rag/package.json b/js/testapps/docs-menu-rag/package.json index f3454876c5..93f2d0a9d3 100644 --- a/js/testapps/docs-menu-rag/package.json +++ b/js/testapps/docs-menu-rag/package.json @@ -15,12 +15,12 @@ "author": "", "license": "ISC", "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*", - "@genkit-ai/dev-local-vectorstore": "workspace:*", - "@genkit-ai/firebase": "workspace:*", - "@genkit-ai/flow": "workspace:*", - "@genkit-ai/vertexai": "workspace:*", + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:*", + "@genkit/dev-local-vectorstore": "workspace:*", + "@genkit/firebase": "workspace:*", + "@genkit/flow": "workspace:*", + "@genkit/vertexai": "workspace:*", "llm-chunk": "^0.0.1", "pdf-parse": "^1.1.1", "zod": "^3.22.4" diff --git a/js/testapps/docs-menu-rag/src/index.ts b/js/testapps/docs-menu-rag/src/index.ts index cf3a56d08e..7dac821b3a 100644 --- a/js/testapps/docs-menu-rag/src/index.ts +++ b/js/testapps/docs-menu-rag/src/index.ts @@ -14,10 +14,10 @@ * limitations under the License. */ -import { configureGenkit } from '@genkit-ai/core'; -import { devLocalVectorstore } from '@genkit-ai/dev-local-vectorstore'; -import { defineFlow, runFlow } from '@genkit-ai/flow'; -import { textEmbeddingGecko, vertexAI } from '@genkit-ai/vertexai'; +import { configureGenkit } from '@genkit/core'; +import { devLocalVectorstore } from '@genkit/dev-local-vectorstore'; +import { defineFlow, runFlow } from '@genkit/flow'; +import { textEmbeddingGecko, vertexAI } from '@genkit/vertexai'; import * as z from 'zod'; import { indexMenu } from './indexer'; diff --git a/js/testapps/docs-menu-rag/src/indexer.ts b/js/testapps/docs-menu-rag/src/indexer.ts index 5879fe4e3d..152b3178d8 100644 --- a/js/testapps/docs-menu-rag/src/indexer.ts +++ b/js/testapps/docs-menu-rag/src/indexer.ts @@ -14,10 +14,10 @@ * limitations under the License. */ -import { index } from '@genkit-ai/ai'; -import { Document } from '@genkit-ai/ai/retriever'; -import { devLocalIndexerRef } from '@genkit-ai/dev-local-vectorstore'; -import { defineFlow, run } from '@genkit-ai/flow'; +import { index } from '@genkit/ai'; +import { Document } from '@genkit/ai/retriever'; +import { devLocalIndexerRef } from '@genkit/dev-local-vectorstore'; +import { defineFlow, run } from '@genkit/flow'; import { readFile } from 'fs/promises'; import { chunk } from 'llm-chunk'; import path from 'path'; diff --git a/js/testapps/docs-menu-rag/src/menuQA.ts b/js/testapps/docs-menu-rag/src/menuQA.ts index bf23a573d0..3beff48641 100644 --- a/js/testapps/docs-menu-rag/src/menuQA.ts +++ b/js/testapps/docs-menu-rag/src/menuQA.ts @@ -14,11 +14,11 @@ * limitations under the License. */ -import { generate } from '@genkit-ai/ai'; -import { retrieve } from '@genkit-ai/ai/retriever'; -import { devLocalRetrieverRef } from '@genkit-ai/dev-local-vectorstore'; -import { defineFlow } from '@genkit-ai/flow'; -import { geminiPro } from '@genkit-ai/vertexai'; +import { generate } from '@genkit/ai'; +import { retrieve } from '@genkit/ai/retriever'; +import { devLocalRetrieverRef } from '@genkit/dev-local-vectorstore'; +import { defineFlow } from '@genkit/flow'; +import { geminiPro } from '@genkit/vertexai'; import * as z from 'zod'; // Define the retriever reference diff --git a/js/testapps/eval/package.json b/js/testapps/eval/package.json index 0d42e5b116..521a0c5f29 100644 --- a/js/testapps/eval/package.json +++ b/js/testapps/eval/package.json @@ -15,12 +15,12 @@ "author": "", "license": "ISC", "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*", - "@genkit-ai/firebase": "workspace:*", - "@genkit-ai/flow": "workspace:*", - "@genkit-ai/evaluator": "workspace:*", - "@genkit-ai/vertexai": "workspace:*", + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:*", + "@genkit/firebase": "workspace:*", + "@genkit/flow": "workspace:*", + "@genkit/evaluator": "workspace:*", + "@genkit/vertexai": "workspace:*", "zod": "^3.22.4" }, "devDependencies": { diff --git a/js/testapps/eval/src/index.ts b/js/testapps/eval/src/index.ts index e1c69f6b6b..4e95554c1b 100644 --- a/js/testapps/eval/src/index.ts +++ b/js/testapps/eval/src/index.ts @@ -19,12 +19,12 @@ import { EvalResponse, EvalResponseSchema, evaluate, -} from '@genkit-ai/ai/evaluator'; -import { configureGenkit } from '@genkit-ai/core'; -import { GenkitMetric, genkitEval, genkitEvalRef } from '@genkit-ai/evaluator'; -import { firebase } from '@genkit-ai/firebase'; -import { defineFlow } from '@genkit-ai/flow'; -import { geminiPro, textEmbeddingGecko, vertexAI } from '@genkit-ai/vertexai'; +} from '@genkit/ai/evaluator'; +import { configureGenkit } from '@genkit/core'; +import { GenkitMetric, genkitEval, genkitEvalRef } from '@genkit/evaluator'; +import { firebase } from '@genkit/firebase'; +import { defineFlow } from '@genkit/flow'; +import { geminiPro, textEmbeddingGecko, vertexAI } from '@genkit/vertexai'; import * as z from 'zod'; export default configureGenkit({ diff --git a/js/testapps/evaluator-gut-check/package.json b/js/testapps/evaluator-gut-check/package.json index 3023e1aa95..18a7dc3eff 100644 --- a/js/testapps/evaluator-gut-check/package.json +++ b/js/testapps/evaluator-gut-check/package.json @@ -14,14 +14,14 @@ "author": "", "license": "ISC", "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*", - "@genkit-ai/dev-local-vectorstore": "workspace:*", - "@genkit-ai/flow": "workspace:*", - "@genkit-ai/firebase": "workspace:*", - "@genkit-ai/googleai": "workspace:*", - "@genkit-ai/evaluator": "workspace:*", - "@genkit-ai/vertexai": "workspace:*", + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:*", + "@genkit/dev-local-vectorstore": "workspace:*", + "@genkit/flow": "workspace:*", + "@genkit/firebase": "workspace:*", + "@genkit/googleai": "workspace:*", + "@genkit/evaluator": "workspace:*", + "@genkit/vertexai": "workspace:*", "zod": "^3.22.4" }, "devDependencies": { diff --git a/js/testapps/evaluator-gut-check/src/index.ts b/js/testapps/evaluator-gut-check/src/index.ts index 1b5ae8d303..2132196a7d 100644 --- a/js/testapps/evaluator-gut-check/src/index.ts +++ b/js/testapps/evaluator-gut-check/src/index.ts @@ -14,12 +14,12 @@ * limitations under the License. */ -import { configureGenkit } from '@genkit-ai/core'; -import { devLocalVectorstore } from '@genkit-ai/dev-local-vectorstore'; -import { genkitEval, GenkitMetric } from '@genkit-ai/evaluator'; -import { firebase } from '@genkit-ai/firebase'; -import { geminiPro, googleAI } from '@genkit-ai/googleai'; -import { textEmbeddingGecko, vertexAI } from '@genkit-ai/vertexai'; +import { configureGenkit } from '@genkit/core'; +import { devLocalVectorstore } from '@genkit/dev-local-vectorstore'; +import { genkitEval, GenkitMetric } from '@genkit/evaluator'; +import { firebase } from '@genkit/firebase'; +import { geminiPro, googleAI } from '@genkit/googleai'; +import { textEmbeddingGecko, vertexAI } from '@genkit/vertexai'; // Turn off safety checks for evaluation so that the LLM as an evaluator can // respond appropriately to potentially harmful content without error. diff --git a/js/testapps/express/package.json b/js/testapps/express/package.json index 1c697b8090..98e7c6cfa8 100644 --- a/js/testapps/express/package.json +++ b/js/testapps/express/package.json @@ -15,13 +15,13 @@ "author": "", "license": "ISC", "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:^", - "@genkit-ai/flow": "workspace:*", - "@genkit-ai/firebase": "workspace:*", - "@genkit-ai/googleai": "workspace:*", + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:^", + "@genkit/flow": "workspace:*", + "@genkit/firebase": "workspace:*", + "@genkit/googleai": "workspace:*", "genkitx-ollama": "workspace:*", - "@genkit-ai/vertexai": "workspace:*", + "@genkit/vertexai": "workspace:*", "express": "~4.19.2", "zod": "^3.22.4" }, diff --git a/js/testapps/express/src/index.ts b/js/testapps/express/src/index.ts index f5bbc87c20..4301de5636 100644 --- a/js/testapps/express/src/index.ts +++ b/js/testapps/express/src/index.ts @@ -14,12 +14,12 @@ * limitations under the License. */ -import { generate } from '@genkit-ai/ai'; -import { configureGenkit } from '@genkit-ai/core'; -import { firebase } from '@genkit-ai/firebase'; -import { defineFlow, run, runFlow } from '@genkit-ai/flow'; -import { googleAI } from '@genkit-ai/googleai'; -import { vertexAI } from '@genkit-ai/vertexai'; +import { generate } from '@genkit/ai'; +import { configureGenkit } from '@genkit/core'; +import { firebase } from '@genkit/firebase'; +import { defineFlow, run, runFlow } from '@genkit/flow'; +import { googleAI } from '@genkit/googleai'; +import { vertexAI } from '@genkit/vertexai'; import express, { Request, Response } from 'express'; import { ollama } from 'genkitx-ollama'; import * as z from 'zod'; diff --git a/js/testapps/firebase-functions-sample1/functions/package.json b/js/testapps/firebase-functions-sample1/functions/package.json index 0f230e14d4..0fc57e3ede 100644 --- a/js/testapps/firebase-functions-sample1/functions/package.json +++ b/js/testapps/firebase-functions-sample1/functions/package.json @@ -14,11 +14,11 @@ }, "main": "lib/index.js", "dependencies": { - "@genkit-ai/ai": "*", - "@genkit-ai/core": "*", - "@genkit-ai/firebase": "*", - "@genkit-ai/flow": "*", - "@genkit-ai/vertexai": "*", + "@genkit/ai": "*", + "@genkit/core": "*", + "@genkit/firebase": "*", + "@genkit/flow": "*", + "@genkit/vertexai": "*", "firebase-admin": "^11.8.0", "firebase-functions": "^4.8.0 || ^5.0.0", "zod": "^3.22.4" diff --git a/js/testapps/firebase-functions-sample1/functions/src/index.ts b/js/testapps/firebase-functions-sample1/functions/src/index.ts index e6cf96b02b..aa5c57eda8 100644 --- a/js/testapps/firebase-functions-sample1/functions/src/index.ts +++ b/js/testapps/firebase-functions-sample1/functions/src/index.ts @@ -14,13 +14,13 @@ * limitations under the License. */ -import { generate } from '@genkit-ai/ai'; -import { configureGenkit } from '@genkit-ai/core'; -import { firebase } from '@genkit-ai/firebase'; -import { firebaseAuth } from '@genkit-ai/firebase/auth'; -import { noAuth, onFlow } from '@genkit-ai/firebase/functions'; -import { run, runFlow, streamFlow } from '@genkit-ai/flow'; -import { geminiPro, vertexAI } from '@genkit-ai/vertexai'; +import { generate } from '@genkit/ai'; +import { configureGenkit } from '@genkit/core'; +import { firebase } from '@genkit/firebase'; +import { firebaseAuth } from '@genkit/firebase/auth'; +import { noAuth, onFlow } from '@genkit/firebase/functions'; +import { run, runFlow, streamFlow } from '@genkit/flow'; +import { geminiPro, vertexAI } from '@genkit/vertexai'; import { onRequest } from 'firebase-functions/v2/https'; import * as z from 'zod'; diff --git a/js/testapps/flow-sample1/package.json b/js/testapps/flow-sample1/package.json index 826337ed70..98639f31e6 100644 --- a/js/testapps/flow-sample1/package.json +++ b/js/testapps/flow-sample1/package.json @@ -15,9 +15,9 @@ "author": "", "license": "ISC", "dependencies": { - "@genkit-ai/core": "workspace:^", - "@genkit-ai/flow": "workspace:*", - "@genkit-ai/firebase": "workspace:^", + "@genkit/core": "workspace:^", + "@genkit/flow": "workspace:*", + "@genkit/firebase": "workspace:^", "zod": "^3.22.4" }, "devDependencies": { diff --git a/js/testapps/flow-sample1/src/index.ts b/js/testapps/flow-sample1/src/index.ts index 9c5c90a122..c60e59d5c1 100644 --- a/js/testapps/flow-sample1/src/index.ts +++ b/js/testapps/flow-sample1/src/index.ts @@ -14,22 +14,22 @@ * limitations under the License. */ -import { configureGenkit } from '@genkit-ai/core'; -import { firebase } from '@genkit-ai/firebase'; +import { configureGenkit } from '@genkit/core'; +import { firebase } from '@genkit/firebase'; import { defineFlow, run, runFlow, runMap, startFlowsServer, -} from '@genkit-ai/flow'; +} from '@genkit/flow'; import { durableFlow, interrupt, scheduleFlow, sleep, waitFor, -} from '@genkit-ai/flow/experimental'; +} from '@genkit/flow/experimental'; import * as z from 'zod'; configureGenkit({ diff --git a/js/testapps/flow-simple-ai/package.json b/js/testapps/flow-simple-ai/package.json index 12112a488b..3701eaad8a 100644 --- a/js/testapps/flow-simple-ai/package.json +++ b/js/testapps/flow-simple-ai/package.json @@ -15,14 +15,14 @@ "author": "", "license": "ISC", "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:^", - "@genkit-ai/dotprompt": "workspace:*", - "@genkit-ai/firebase": "workspace:*", - "@genkit-ai/flow": "workspace:*", - "@genkit-ai/google-cloud": "workspace:*", - "@genkit-ai/googleai": "workspace:*", - "@genkit-ai/vertexai": "workspace:*", + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:^", + "@genkit/dotprompt": "workspace:*", + "@genkit/firebase": "workspace:*", + "@genkit/flow": "workspace:*", + "@genkit/google-cloud": "workspace:*", + "@genkit/googleai": "workspace:*", + "@genkit/vertexai": "workspace:*", "@google/generative-ai": "^0.15.0", "@opentelemetry/sdk-trace-base": "^1.22.0", "firebase-admin": "^12.1.0", diff --git a/js/testapps/flow-simple-ai/src/index.ts b/js/testapps/flow-simple-ai/src/index.ts index 934fda755f..c682f599b1 100644 --- a/js/testapps/flow-simple-ai/src/index.ts +++ b/js/testapps/flow-simple-ai/src/index.ts @@ -14,24 +14,24 @@ * limitations under the License. */ -import { generate, generateStream, retrieve } from '@genkit-ai/ai'; -import { defineTool } from '@genkit-ai/ai/tool'; -import { configureGenkit } from '@genkit-ai/core'; -import { dotprompt, prompt } from '@genkit-ai/dotprompt'; -import { defineFirestoreRetriever, firebase } from '@genkit-ai/firebase'; -import { defineFlow, run } from '@genkit-ai/flow'; -import { googleCloud } from '@genkit-ai/google-cloud'; +import { generate, generateStream, retrieve } from '@genkit/ai'; +import { defineTool } from '@genkit/ai/tool'; +import { configureGenkit } from '@genkit/core'; +import { dotprompt, prompt } from '@genkit/dotprompt'; +import { defineFirestoreRetriever, firebase } from '@genkit/firebase'; +import { defineFlow, run } from '@genkit/flow'; +import { googleCloud } from '@genkit/google-cloud'; import { gemini15Flash, googleAI, geminiPro as googleGeminiPro, -} from '@genkit-ai/googleai'; +} from '@genkit/googleai'; import { gemini15ProPreview, geminiPro, textEmbeddingGecko, vertexAI, -} from '@genkit-ai/vertexai'; +} from '@genkit/vertexai'; import { AlwaysOnSampler } from '@opentelemetry/sdk-trace-base'; import { initializeApp } from 'firebase-admin/app'; import { getFirestore } from 'firebase-admin/firestore'; diff --git a/js/testapps/google-ai-code-execution/package.json b/js/testapps/google-ai-code-execution/package.json index d1b4f727b7..b47947d4b3 100644 --- a/js/testapps/google-ai-code-execution/package.json +++ b/js/testapps/google-ai-code-execution/package.json @@ -13,12 +13,12 @@ "author": "", "license": "ISC", "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:^", - "@genkit-ai/dotprompt": "workspace:*", - "@genkit-ai/flow": "workspace:*", - "@genkit-ai/google-cloud": "workspace:*", - "@genkit-ai/googleai": "workspace:*", + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:^", + "@genkit/dotprompt": "workspace:*", + "@genkit/flow": "workspace:*", + "@genkit/google-cloud": "workspace:*", + "@genkit/googleai": "workspace:*", "dotenv": "^16.4.5", "express": "^4.19.2", "zod": "3.22.4" diff --git a/js/testapps/google-ai-code-execution/src/index.ts b/js/testapps/google-ai-code-execution/src/index.ts index f1f38bb0cf..e1d9447314 100644 --- a/js/testapps/google-ai-code-execution/src/index.ts +++ b/js/testapps/google-ai-code-execution/src/index.ts @@ -18,10 +18,10 @@ import { config } from 'dotenv'; import * as z from 'zod'; config(); // Import the Genkit core libraries and plugins. -import { generate } from '@genkit-ai/ai'; -import { configureGenkit } from '@genkit-ai/core'; -import { defineFlow } from '@genkit-ai/flow'; -import { gemini15Flash, googleAI } from '@genkit-ai/googleai'; +import { generate } from '@genkit/ai'; +import { configureGenkit } from '@genkit/core'; +import { defineFlow } from '@genkit/flow'; +import { gemini15Flash, googleAI } from '@genkit/googleai'; configureGenkit({ plugins: [googleAI()], diff --git a/js/testapps/langchain/genkit-getting-started.txt b/js/testapps/langchain/genkit-getting-started.txt index dc831ffde0..19d542200d 100644 --- a/js/testapps/langchain/genkit-getting-started.txt +++ b/js/testapps/langchain/genkit-getting-started.txt @@ -10,9 +10,9 @@ Genkit is here to help you through every step of your AI development journey, fr To get you started, here are 10 key Genkit features we think you'll love: 1. Many models, one interface Genkit provides plugins that give you access to popular models out of the box and a flexible model abstraction that makes it easy to integrate any model API and use community-maintained models. Trying out a new model is as easy as changing a single argument, but each model can specify custom configurations. -import { geminiPro } from '@genkit-ai/vertexai'; +import { geminiPro } from '@genkit/vertexai'; import { ollama } from 'genkitx-ollama'; -import { generate } from '@genkit-ai/ai'; +import { generate } from '@genkit/ai'; function flipACoin(a, b) { @@ -30,8 +30,8 @@ const result = await generate({ console.log(result.text()); 2. Structured output Generate strongly-typed data with Genkit using Zod schema. This can help you analyze unstructured text, generate creative content, select tasks, and send results back to your app as structured type-safe objects. -import { generate } from "@genkit-ai/ai"; -import { geminiPro } from "@genkit-ai/vertexai"; +import { generate } from "@genkit/ai"; +import { geminiPro } from "@genkit/vertexai"; import { z } from "zod"; @@ -65,8 +65,8 @@ const createCreature = defineFlow({ console.log(await createCreature("a developer conference")); 3. Multimodal, multimedia Genkit provides a common format for content that supports mixtures of text, data, and arbitrary media. This lets you use Genkit for models that perform any generative task (such as image generation), not just LLMs. -import { imagen2, geminiProVision } from '@genkit-ai/vertexai'; -import { generate } from '@genkit-ai/ai'; +import { imagen2, geminiProVision } from '@genkit/vertexai'; +import { generate } from '@genkit/ai'; const imageResult = await generate({ @@ -88,8 +88,8 @@ const descriptionResult = await generate({ console.log(descriptionResult.text()); 4. Give LLMs tools Genkit makes it simple to do function calling with LLMs through tools. Tools make it possible for AI to fetch data, display UI, write to a database, or take any other action you can code up. -import { generate, defineTool } from "@genkit-ai/ai"; -import { geminiPro } from "@genkit-ai/vertexai"; +import { generate, defineTool } from "@genkit/ai"; +import { geminiPro } from "@genkit/vertexai"; import { z } from "zod"; @@ -155,9 +155,9 @@ Debugging complex, multi-step workflows with AI can be challenging due to random 8. Open & extensible The AI ecosystem is growing faster than any one team can keep up with. Genkit has an open plugin model that provides pre-built integrations with new models, retrievers, and more. While the Genkit team maintains a small set of official plugins, anyone can feel free to publish their own Genkit plugins to NPM. Can't find a plugin for a particular integration you want? No problem. Genkit's abstractions are flexible and make it easy to build custom components that integrate into the framework, like this custom Firestore retriever: -import { embed } from '@genkit-ai/ai/embedder'; -import { Document, defineRetriever } from '@genkit-ai/ai/retriever'; -import { textEmbeddingGecko } from '@genkit-ai/vertexai'; +import { embed } from '@genkit/ai/embedder'; +import { Document, defineRetriever } from '@genkit/ai/retriever'; +import { textEmbeddingGecko } from '@genkit/vertexai'; import { FieldValue, VectorQuery, @@ -218,7 +218,7 @@ There are also official plugins for Google Cloud and Firebase that help you expo 10. Authorization & security handling When building any public-facing application, it's important to protect the data stored in your system. When it comes to LLMs, extra diligence is necessary to ensure that the model is only accessing data it should, tool calls are properly scoped to the user invoking the LLM, and the flow is being invoked only by verified client applications. Genkit provides mechanisms for managing authorization policies and contexts. -import { defineFlow, runFlow } from '@genkit-ai/flow'; +import { defineFlow, runFlow } from '@genkit/flow'; export const selfSummaryFlow = defineFlow( diff --git a/js/testapps/langchain/package.json b/js/testapps/langchain/package.json index 4d1593b660..cbd8d112bd 100644 --- a/js/testapps/langchain/package.json +++ b/js/testapps/langchain/package.json @@ -15,13 +15,13 @@ "author": "", "license": "ISC", "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:^", - "@genkit-ai/firebase": "workspace:*", - "@genkit-ai/flow": "workspace:*", - "@genkit-ai/googleai": "workspace:*", + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:^", + "@genkit/firebase": "workspace:*", + "@genkit/flow": "workspace:*", + "@genkit/googleai": "workspace:*", "genkitx-ollama": "workspace:*", - "@genkit-ai/vertexai": "workspace:*", + "@genkit/vertexai": "workspace:*", "genkitx-langchain": "workspace:*", "@langchain/community": "^0.0.53", "@langchain/core": "^0.1.61", diff --git a/js/testapps/langchain/src/index.ts b/js/testapps/langchain/src/index.ts index 1366a7e2d2..44f2eb3f8e 100644 --- a/js/testapps/langchain/src/index.ts +++ b/js/testapps/langchain/src/index.ts @@ -14,11 +14,11 @@ * limitations under the License. */ -import { configureGenkit } from '@genkit-ai/core'; -import { firebase } from '@genkit-ai/firebase'; -import { defineFlow, run, startFlowsServer } from '@genkit-ai/flow'; -import { googleAI } from '@genkit-ai/googleai'; -import { vertexAI } from '@genkit-ai/vertexai'; +import { configureGenkit } from '@genkit/core'; +import { firebase } from '@genkit/firebase'; +import { defineFlow, run, startFlowsServer } from '@genkit/flow'; +import { googleAI } from '@genkit/googleai'; +import { vertexAI } from '@genkit/vertexai'; import { GoogleVertexAIEmbeddings } from '@langchain/community/embeddings/googlevertexai'; import { GoogleVertexAI } from '@langchain/community/llms/googlevertexai'; import { StringOutputParser } from '@langchain/core/output_parsers'; diff --git a/js/testapps/llm-human-in-the-loop/package.json b/js/testapps/llm-human-in-the-loop/package.json index 41bc652e2a..08d34be0ae 100644 --- a/js/testapps/llm-human-in-the-loop/package.json +++ b/js/testapps/llm-human-in-the-loop/package.json @@ -15,11 +15,11 @@ "author": "", "license": "ISC", "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:^", - "@genkit-ai/flow": "workspace:*", - "@genkit-ai/firebase": "workspace:^", - "@genkit-ai/googleai": "workspace:^", + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:^", + "@genkit/flow": "workspace:*", + "@genkit/firebase": "workspace:^", + "@genkit/googleai": "workspace:^", "zod": "^3.22.4" }, "devDependencies": { diff --git a/js/testapps/llm-human-in-the-loop/src/index.ts b/js/testapps/llm-human-in-the-loop/src/index.ts index 7f54db5d00..3cf051284d 100644 --- a/js/testapps/llm-human-in-the-loop/src/index.ts +++ b/js/testapps/llm-human-in-the-loop/src/index.ts @@ -14,11 +14,11 @@ * limitations under the License. */ -import { generate } from '@genkit-ai/ai'; -import { configureGenkit } from '@genkit-ai/core'; -import { firebase } from '@genkit-ai/firebase'; -import { durableFlow, interrupt, run } from '@genkit-ai/flow/experimental'; -import { geminiPro, googleAI } from '@genkit-ai/googleai'; +import { generate } from '@genkit/ai'; +import { configureGenkit } from '@genkit/core'; +import { firebase } from '@genkit/firebase'; +import { durableFlow, interrupt, run } from '@genkit/flow/experimental'; +import { geminiPro, googleAI } from '@genkit/googleai'; import * as z from 'zod'; // To run this sample use the following sample commands: // genkit flow:run jokeFlow "\"apple\"" diff --git a/js/testapps/menu/package.json b/js/testapps/menu/package.json index 9a4f3c2589..6ad753d09a 100644 --- a/js/testapps/menu/package.json +++ b/js/testapps/menu/package.json @@ -15,14 +15,14 @@ "author": "", "license": "ISC", "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*", - "@genkit-ai/dotprompt": "workspace:*", - "@genkit-ai/flow": "workspace:*", - "@genkit-ai/dev-local-vectorstore": "workspace:*", - "@genkit-ai/firebase": "workspace:*", - "@genkit-ai/evaluator": "workspace:*", - "@genkit-ai/vertexai": "workspace:*", + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:*", + "@genkit/dotprompt": "workspace:*", + "@genkit/flow": "workspace:*", + "@genkit/dev-local-vectorstore": "workspace:*", + "@genkit/firebase": "workspace:*", + "@genkit/evaluator": "workspace:*", + "@genkit/vertexai": "workspace:*", "zod": "^3.22.4" }, "devDependencies": { diff --git a/js/testapps/menu/src/01/prompts.ts b/js/testapps/menu/src/01/prompts.ts index 5de13bb718..0ce96291ee 100644 --- a/js/testapps/menu/src/01/prompts.ts +++ b/js/testapps/menu/src/01/prompts.ts @@ -14,10 +14,10 @@ * limitations under the License. */ -import { definePrompt } from '@genkit-ai/ai'; -import { GenerateRequest } from '@genkit-ai/ai/model'; -import { defineDotprompt } from '@genkit-ai/dotprompt'; -import { geminiPro } from '@genkit-ai/vertexai'; +import { definePrompt } from '@genkit/ai'; +import { GenerateRequest } from '@genkit/ai/model'; +import { defineDotprompt } from '@genkit/dotprompt'; +import { geminiPro } from '@genkit/vertexai'; import { MenuQuestionInput, MenuQuestionInputSchema } from '../types.js'; // Define a prompt to handle a customer question about the menu. diff --git a/js/testapps/menu/src/02/flows.ts b/js/testapps/menu/src/02/flows.ts index 7821de63f9..453e4dadce 100644 --- a/js/testapps/menu/src/02/flows.ts +++ b/js/testapps/menu/src/02/flows.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { defineFlow } from '@genkit-ai/flow'; +import { defineFlow } from '@genkit/flow'; import { AnswerOutputSchema, MenuQuestionInputSchema } from '../types.js'; import { s02_dataMenuPrompt } from './prompts.js'; diff --git a/js/testapps/menu/src/02/prompts.ts b/js/testapps/menu/src/02/prompts.ts index 23fcdc969f..677dc35d99 100644 --- a/js/testapps/menu/src/02/prompts.ts +++ b/js/testapps/menu/src/02/prompts.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { defineDotprompt } from '@genkit-ai/dotprompt'; -import { geminiPro } from '@genkit-ai/vertexai'; +import { defineDotprompt } from '@genkit/dotprompt'; +import { geminiPro } from '@genkit/vertexai'; import { MenuQuestionInputSchema } from '../types.js'; import { menuTool } from './tools.js'; diff --git a/js/testapps/menu/src/02/tools.ts b/js/testapps/menu/src/02/tools.ts index 4c47b26140..192e0c55a0 100644 --- a/js/testapps/menu/src/02/tools.ts +++ b/js/testapps/menu/src/02/tools.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { defineTool } from '@genkit-ai/ai'; +import { defineTool } from '@genkit/ai'; import * as z from 'zod'; import { MenuItemSchema } from '../types.js'; diff --git a/js/testapps/menu/src/03/chats.ts b/js/testapps/menu/src/03/chats.ts index 2456d60079..deb19cfeca 100644 --- a/js/testapps/menu/src/03/chats.ts +++ b/js/testapps/menu/src/03/chats.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { MessageData, MessageSchema } from '@genkit-ai/ai/model'; +import { MessageData, MessageSchema } from '@genkit/ai/model'; import * as z from 'zod'; // Our flow will take a sessionId along with each question to track the chat history. diff --git a/js/testapps/menu/src/03/flows.ts b/js/testapps/menu/src/03/flows.ts index 4dd925ab7e..fb244a446f 100644 --- a/js/testapps/menu/src/03/flows.ts +++ b/js/testapps/menu/src/03/flows.ts @@ -14,10 +14,10 @@ * limitations under the License. */ -import { generate } from '@genkit-ai/ai'; -import { MessageData } from '@genkit-ai/ai/model'; -import { defineFlow, run } from '@genkit-ai/flow'; -import { geminiPro } from '@genkit-ai/vertexai'; +import { generate } from '@genkit/ai'; +import { MessageData } from '@genkit/ai/model'; +import { defineFlow, run } from '@genkit/flow'; +import { geminiPro } from '@genkit/vertexai'; import { ChatHistoryStore, diff --git a/js/testapps/menu/src/03/prompts.ts b/js/testapps/menu/src/03/prompts.ts index 1d80258dca..98ffe8066e 100644 --- a/js/testapps/menu/src/03/prompts.ts +++ b/js/testapps/menu/src/03/prompts.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { defineDotprompt } from '@genkit-ai/dotprompt'; -import { geminiPro } from '@genkit-ai/vertexai'; +import { defineDotprompt } from '@genkit/dotprompt'; +import { geminiPro } from '@genkit/vertexai'; import { DataMenuQuestionInputSchema } from '../types.js'; // This prompt will generate two messages when rendered. diff --git a/js/testapps/menu/src/04/flows.ts b/js/testapps/menu/src/04/flows.ts index b372840f2f..6af9398929 100644 --- a/js/testapps/menu/src/04/flows.ts +++ b/js/testapps/menu/src/04/flows.ts @@ -14,12 +14,12 @@ * limitations under the License. */ -import { Document, index, retrieve } from '@genkit-ai/ai/retriever'; +import { Document, index, retrieve } from '@genkit/ai/retriever'; import { devLocalIndexerRef, devLocalRetrieverRef, -} from '@genkit-ai/dev-local-vectorstore'; -import { defineFlow } from '@genkit-ai/flow'; +} from '@genkit/dev-local-vectorstore'; +import { defineFlow } from '@genkit/flow'; import * as z from 'zod'; import { diff --git a/js/testapps/menu/src/04/prompts.ts b/js/testapps/menu/src/04/prompts.ts index bd54054b99..52916e65af 100644 --- a/js/testapps/menu/src/04/prompts.ts +++ b/js/testapps/menu/src/04/prompts.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { defineDotprompt } from '@genkit-ai/dotprompt'; -import { geminiPro } from '@genkit-ai/vertexai'; +import { defineDotprompt } from '@genkit/dotprompt'; +import { geminiPro } from '@genkit/vertexai'; import { DataMenuQuestionInputSchema } from '../types.js'; export const s04_ragDataMenuPrompt = defineDotprompt( diff --git a/js/testapps/menu/src/05/flows.ts b/js/testapps/menu/src/05/flows.ts index 644e2e9ae9..2843110d95 100644 --- a/js/testapps/menu/src/05/flows.ts +++ b/js/testapps/menu/src/05/flows.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { defineFlow, runFlow } from '@genkit-ai/flow'; +import { defineFlow, runFlow } from '@genkit/flow'; import fs from 'fs'; import path from 'path'; diff --git a/js/testapps/menu/src/05/prompts.ts b/js/testapps/menu/src/05/prompts.ts index 7154cf77d2..0bc8db19f4 100644 --- a/js/testapps/menu/src/05/prompts.ts +++ b/js/testapps/menu/src/05/prompts.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { defineDotprompt } from '@genkit-ai/dotprompt'; -import { geminiPro, geminiProVision } from '@genkit-ai/vertexai'; +import { defineDotprompt } from '@genkit/dotprompt'; +import { geminiPro, geminiProVision } from '@genkit/vertexai'; import * as z from 'zod'; import { TextMenuQuestionInputSchema } from '../types.js'; diff --git a/js/testapps/menu/src/index.ts b/js/testapps/menu/src/index.ts index 3becbee322..8c5dbdb51f 100644 --- a/js/testapps/menu/src/index.ts +++ b/js/testapps/menu/src/index.ts @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { configureGenkit } from '@genkit-ai/core'; -import { devLocalVectorstore } from '@genkit-ai/dev-local-vectorstore'; -import { textEmbeddingGecko, vertexAI } from '@genkit-ai/vertexai'; +import { configureGenkit } from '@genkit/core'; +import { devLocalVectorstore } from '@genkit/dev-local-vectorstore'; +import { textEmbeddingGecko, vertexAI } from '@genkit/vertexai'; // Initialize Genkit diff --git a/js/testapps/prompt-file/package.json b/js/testapps/prompt-file/package.json index ec4efbb0eb..881c239939 100644 --- a/js/testapps/prompt-file/package.json +++ b/js/testapps/prompt-file/package.json @@ -3,11 +3,11 @@ "version": "1.0.0", "description": "", "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:^", - "@genkit-ai/dotprompt": "workspace:*", - "@genkit-ai/flow": "workspace:*", - "@genkit-ai/googleai": "workspace:*", + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:^", + "@genkit/dotprompt": "workspace:*", + "@genkit/flow": "workspace:*", + "@genkit/googleai": "workspace:*", "zod": "^3.22.4" }, "main": "lib/index.js", diff --git a/js/testapps/prompt-file/src/index.ts b/js/testapps/prompt-file/src/index.ts index 48ed784360..4ee4956dc2 100644 --- a/js/testapps/prompt-file/src/index.ts +++ b/js/testapps/prompt-file/src/index.ts @@ -14,10 +14,10 @@ * limitations under the License. */ -import { configureGenkit, defineSchema } from '@genkit-ai/core'; -import { defineHelper, dotprompt, prompt } from '@genkit-ai/dotprompt'; -import { defineFlow } from '@genkit-ai/flow'; -import { googleAI } from '@genkit-ai/googleai'; +import { configureGenkit, defineSchema } from '@genkit/core'; +import { defineHelper, dotprompt, prompt } from '@genkit/dotprompt'; +import { defineFlow } from '@genkit/flow'; +import { googleAI } from '@genkit/googleai'; import * as z from 'zod'; configureGenkit({ diff --git a/js/testapps/rag/package.json b/js/testapps/rag/package.json index ff839c4d2e..da71ff4b27 100644 --- a/js/testapps/rag/package.json +++ b/js/testapps/rag/package.json @@ -14,15 +14,15 @@ "author": "", "license": "ISC", "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*", - "@genkit-ai/dev-local-vectorstore": "workspace:*", - "@genkit-ai/dotprompt": "workspace:*", - "@genkit-ai/evaluator": "workspace:*", - "@genkit-ai/firebase": "workspace:*", - "@genkit-ai/flow": "workspace:*", - "@genkit-ai/googleai": "workspace:*", - "@genkit-ai/vertexai": "workspace:*", + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:*", + "@genkit/dev-local-vectorstore": "workspace:*", + "@genkit/dotprompt": "workspace:*", + "@genkit/evaluator": "workspace:*", + "@genkit/firebase": "workspace:*", + "@genkit/flow": "workspace:*", + "@genkit/googleai": "workspace:*", + "@genkit/vertexai": "workspace:*", "genkitx-chromadb": "workspace:*", "genkitx-langchain": "workspace:*", "genkitx-pinecone": "workspace:*", diff --git a/js/testapps/rag/src/index.ts b/js/testapps/rag/src/index.ts index 4a40e634ff..ce857bb22f 100644 --- a/js/testapps/rag/src/index.ts +++ b/js/testapps/rag/src/index.ts @@ -14,19 +14,19 @@ * limitations under the License. */ -import { configureGenkit } from '@genkit-ai/core'; -import { devLocalVectorstore } from '@genkit-ai/dev-local-vectorstore'; -import { dotprompt } from '@genkit-ai/dotprompt'; -import { genkitEval, GenkitMetric } from '@genkit-ai/evaluator'; -import { firebase } from '@genkit-ai/firebase'; -import { googleAI } from '@genkit-ai/googleai'; +import { configureGenkit } from '@genkit/core'; +import { devLocalVectorstore } from '@genkit/dev-local-vectorstore'; +import { dotprompt } from '@genkit/dotprompt'; +import { genkitEval, GenkitMetric } from '@genkit/evaluator'; +import { firebase } from '@genkit/firebase'; +import { googleAI } from '@genkit/googleai'; import { claude3Sonnet, geminiPro, llama31, textEmbeddingGecko, vertexAI, -} from '@genkit-ai/vertexai'; +} from '@genkit/vertexai'; import { chroma } from 'genkitx-chromadb'; import { langchain } from 'genkitx-langchain'; import { pinecone } from 'genkitx-pinecone'; diff --git a/js/testapps/rag/src/pdf_rag.ts b/js/testapps/rag/src/pdf_rag.ts index 1638939651..a32b0a1939 100644 --- a/js/testapps/rag/src/pdf_rag.ts +++ b/js/testapps/rag/src/pdf_rag.ts @@ -14,14 +14,14 @@ * limitations under the License. */ -import { generate } from '@genkit-ai/ai'; -import { Document, index, retrieve } from '@genkit-ai/ai/retriever'; +import { generate } from '@genkit/ai'; +import { Document, index, retrieve } from '@genkit/ai/retriever'; import { devLocalIndexerRef, devLocalRetrieverRef, -} from '@genkit-ai/dev-local-vectorstore'; -import { defineFlow, run } from '@genkit-ai/flow'; -import { geminiPro } from '@genkit-ai/vertexai'; +} from '@genkit/dev-local-vectorstore'; +import { defineFlow, run } from '@genkit/flow'; +import { geminiPro } from '@genkit/vertexai'; import fs from 'fs'; import { chunk } from 'llm-chunk'; import path from 'path'; diff --git a/js/testapps/rag/src/prompt.ts b/js/testapps/rag/src/prompt.ts index c77c281303..c27df8ae8f 100644 --- a/js/testapps/rag/src/prompt.ts +++ b/js/testapps/rag/src/prompt.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { defineDotprompt } from '@genkit-ai/dotprompt'; +import { defineDotprompt } from '@genkit/dotprompt'; import * as z from 'zod'; // Define a prompt that includes the retrieved context documents diff --git a/js/testapps/rag/src/simple_rag.ts b/js/testapps/rag/src/simple_rag.ts index 68df25549e..7ed554d2ce 100644 --- a/js/testapps/rag/src/simple_rag.ts +++ b/js/testapps/rag/src/simple_rag.ts @@ -14,12 +14,12 @@ * limitations under the License. */ -import { Document, index, retrieve } from '@genkit-ai/ai/retriever'; +import { Document, index, retrieve } from '@genkit/ai/retriever'; import { devLocalIndexerRef, devLocalRetrieverRef, -} from '@genkit-ai/dev-local-vectorstore'; -import { defineFlow } from '@genkit-ai/flow'; +} from '@genkit/dev-local-vectorstore'; +import { defineFlow } from '@genkit/flow'; import { chromaIndexerRef, chromaRetrieverRef } from 'genkitx-chromadb'; import { pineconeIndexerRef, pineconeRetrieverRef } from 'genkitx-pinecone'; import * as z from 'zod'; diff --git a/js/testapps/vertexai-vector-search-bigquery/package.json b/js/testapps/vertexai-vector-search-bigquery/package.json index 8fe03522b9..3c4b2a22f6 100644 --- a/js/testapps/vertexai-vector-search-bigquery/package.json +++ b/js/testapps/vertexai-vector-search-bigquery/package.json @@ -14,15 +14,15 @@ "author": "", "license": "ISC", "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*", - "@genkit-ai/dev-local-vectorstore": "workspace:*", - "@genkit-ai/dotprompt": "workspace:*", - "@genkit-ai/evaluator": "workspace:*", - "@genkit-ai/firebase": "workspace:*", - "@genkit-ai/flow": "workspace:*", - "@genkit-ai/googleai": "workspace:*", - "@genkit-ai/vertexai": "workspace:*", + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:*", + "@genkit/dev-local-vectorstore": "workspace:*", + "@genkit/dotprompt": "workspace:*", + "@genkit/evaluator": "workspace:*", + "@genkit/firebase": "workspace:*", + "@genkit/flow": "workspace:*", + "@genkit/googleai": "workspace:*", + "@genkit/vertexai": "workspace:*", "@google-cloud/bigquery": "^7.8.0", "dotenv": "^16.4.5", "express": "^4.19.2", diff --git a/js/testapps/vertexai-vector-search-bigquery/src/index.ts b/js/testapps/vertexai-vector-search-bigquery/src/index.ts index e0d3ab8993..93f028b0ec 100644 --- a/js/testapps/vertexai-vector-search-bigquery/src/index.ts +++ b/js/testapps/vertexai-vector-search-bigquery/src/index.ts @@ -16,8 +16,8 @@ // Sample app for using the proposed Vertex AI plugin retriever and indexer with BigQuery. -import { configureGenkit } from '@genkit-ai/core'; -import { defineFlow, startFlowsServer } from '@genkit-ai/flow'; +import { configureGenkit } from '@genkit/core'; +import { defineFlow, startFlowsServer } from '@genkit/flow'; // important imports for this sample: import { getBigQueryDocumentIndexer, @@ -27,11 +27,11 @@ import { vertexAiRetrieverRef, type DocumentIndexer, type DocumentRetriever, -} from '@genkit-ai/vertexai'; +} from '@genkit/vertexai'; import { z } from 'zod'; // // Environment variables set with dotenv for simplicity of sample -import { Document, index, retrieve } from '@genkit-ai/ai/retriever'; +import { Document, index, retrieve } from '@genkit/ai/retriever'; import { BIGQUERY_DATASET, BIGQUERY_TABLE, diff --git a/js/testapps/vertexai-vector-search-custom/package.json b/js/testapps/vertexai-vector-search-custom/package.json index 8fe03522b9..3c4b2a22f6 100644 --- a/js/testapps/vertexai-vector-search-custom/package.json +++ b/js/testapps/vertexai-vector-search-custom/package.json @@ -14,15 +14,15 @@ "author": "", "license": "ISC", "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*", - "@genkit-ai/dev-local-vectorstore": "workspace:*", - "@genkit-ai/dotprompt": "workspace:*", - "@genkit-ai/evaluator": "workspace:*", - "@genkit-ai/firebase": "workspace:*", - "@genkit-ai/flow": "workspace:*", - "@genkit-ai/googleai": "workspace:*", - "@genkit-ai/vertexai": "workspace:*", + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:*", + "@genkit/dev-local-vectorstore": "workspace:*", + "@genkit/dotprompt": "workspace:*", + "@genkit/evaluator": "workspace:*", + "@genkit/firebase": "workspace:*", + "@genkit/flow": "workspace:*", + "@genkit/googleai": "workspace:*", + "@genkit/vertexai": "workspace:*", "@google-cloud/bigquery": "^7.8.0", "dotenv": "^16.4.5", "express": "^4.19.2", diff --git a/js/testapps/vertexai-vector-search-custom/src/index.ts b/js/testapps/vertexai-vector-search-custom/src/index.ts index cbc70928ac..05f6811a8e 100644 --- a/js/testapps/vertexai-vector-search-custom/src/index.ts +++ b/js/testapps/vertexai-vector-search-custom/src/index.ts @@ -16,8 +16,8 @@ // Sample app for using the proposed Vertex AI plugin retriever and indexer with a local file (just as a demo). -import { configureGenkit } from '@genkit-ai/core'; -import { defineFlow, startFlowsServer } from '@genkit-ai/flow'; +import { configureGenkit } from '@genkit/core'; +import { defineFlow, startFlowsServer } from '@genkit/flow'; // important imports for this sample: import { vertexAI, @@ -26,11 +26,11 @@ import { type DocumentIndexer, type DocumentRetriever, type Neighbor, -} from '@genkit-ai/vertexai'; +} from '@genkit/vertexai'; import { z } from 'zod'; // // Environment variables set with dotenv for simplicity of sample -import { Document, index, retrieve } from '@genkit-ai/ai/retriever'; +import { Document, index, retrieve } from '@genkit/ai/retriever'; import { LOCAL_DIR, LOCATION, diff --git a/js/testapps/vertexai-vector-search-firestore/package.json b/js/testapps/vertexai-vector-search-firestore/package.json index 6717381d56..3ea267b759 100644 --- a/js/testapps/vertexai-vector-search-firestore/package.json +++ b/js/testapps/vertexai-vector-search-firestore/package.json @@ -14,15 +14,15 @@ "author": "", "license": "ISC", "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*", - "@genkit-ai/dev-local-vectorstore": "workspace:*", - "@genkit-ai/dotprompt": "workspace:*", - "@genkit-ai/evaluator": "workspace:*", - "@genkit-ai/firebase": "workspace:*", - "@genkit-ai/flow": "workspace:*", - "@genkit-ai/googleai": "workspace:*", - "@genkit-ai/vertexai": "workspace:*", + "@genkit/ai": "workspace:*", + "@genkit/core": "workspace:*", + "@genkit/dev-local-vectorstore": "workspace:*", + "@genkit/dotprompt": "workspace:*", + "@genkit/evaluator": "workspace:*", + "@genkit/firebase": "workspace:*", + "@genkit/flow": "workspace:*", + "@genkit/googleai": "workspace:*", + "@genkit/vertexai": "workspace:*", "dotenv": "^16.4.5", "express": "^4.19.2", "firebase-admin": "^12.1.0", diff --git a/js/testapps/vertexai-vector-search-firestore/src/index.ts b/js/testapps/vertexai-vector-search-firestore/src/index.ts index 959b9ed2ba..bbf0dd4345 100644 --- a/js/testapps/vertexai-vector-search-firestore/src/index.ts +++ b/js/testapps/vertexai-vector-search-firestore/src/index.ts @@ -16,8 +16,8 @@ // Sample app for using the proposed Vertex AI plugin retriever and indexer with Firestore. -import { configureGenkit } from '@genkit-ai/core'; -import { defineFlow, startFlowsServer } from '@genkit-ai/flow'; +import { configureGenkit } from '@genkit/core'; +import { defineFlow, startFlowsServer } from '@genkit/flow'; import { initializeApp } from 'firebase-admin/app'; // important imports for this sample: import { @@ -28,11 +28,11 @@ import { vertexAI, vertexAiIndexerRef, vertexAiRetrieverRef, -} from '@genkit-ai/vertexai'; +} from '@genkit/vertexai'; import { z } from 'zod'; // // Environment variables set with dotenv for simplicity of sample -import { Document, index, retrieve } from '@genkit-ai/ai/retriever'; +import { Document, index, retrieve } from '@genkit/ai/retriever'; import { getFirestore } from 'firebase-admin/firestore'; import { FIRESTORE_COLLECTION, diff --git a/samples/chatbot/server/package.json b/samples/chatbot/server/package.json index ce17919ce2..950c9e1563 100644 --- a/samples/chatbot/server/package.json +++ b/samples/chatbot/server/package.json @@ -13,11 +13,11 @@ "author": "", "license": "ISC", "dependencies": { - "@genkit-ai/ai": "^0.5.8", - "@genkit-ai/core": "^0.5.8", - "@genkit-ai/dotprompt": "^0.5.8", - "@genkit-ai/flow": "^0.5.8", - "@genkit-ai/vertexai": "^0.5.8", + "@genkit/ai": "^0.5.8", + "@genkit/core": "^0.5.8", + "@genkit/dotprompt": "^0.5.8", + "@genkit/flow": "^0.5.8", + "@genkit/vertexai": "^0.5.8", "express": "^4.19.2", "partial-json": "^0.1.7", "zod": "^3.23.8" diff --git a/samples/chatbot/server/src/index.ts b/samples/chatbot/server/src/index.ts index 2102bedc03..ed6fe9aa97 100644 --- a/samples/chatbot/server/src/index.ts +++ b/samples/chatbot/server/src/index.ts @@ -14,22 +14,19 @@ * limitations under the License. */ -import { generate } from '@genkit-ai/ai'; -import { - GenerateResponseChunkSchema, - ModelReference, -} from '@genkit-ai/ai/model'; -import { configureGenkit } from '@genkit-ai/core'; -import { defineFlow, run, startFlowsServer } from '@genkit-ai/flow'; +import { generate } from '@genkit/ai'; +import { GenerateResponseChunkSchema, ModelReference } from '@genkit/ai/model'; +import { configureGenkit } from '@genkit/core'; +import { defineFlow, run, startFlowsServer } from '@genkit/flow'; import { VertexAIEvaluationMetricType, gemini15Flash, llama3, vertexAI, -} from '@genkit-ai/vertexai'; +} from '@genkit/vertexai'; import { inMemoryStore } from './memory.js'; -import { PartSchema } from '@genkit-ai/ai/model'; +import { PartSchema } from '@genkit/ai/model'; import { z } from 'zod'; export const AgentInput = z.object({ diff --git a/samples/chatbot/server/src/memory.ts b/samples/chatbot/server/src/memory.ts index 6321cd279f..dd0dab612c 100644 --- a/samples/chatbot/server/src/memory.ts +++ b/samples/chatbot/server/src/memory.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { MessageData } from '@genkit-ai/ai/model'; +import { MessageData } from '@genkit/ai/model'; const chatHistory: Record = {}; diff --git a/samples/js-angular/server/package.json b/samples/js-angular/server/package.json index 855136c3d9..58eae72d97 100644 --- a/samples/js-angular/server/package.json +++ b/samples/js-angular/server/package.json @@ -13,11 +13,11 @@ "author": "", "license": "ISC", "dependencies": { - "@genkit-ai/ai": "^0.5.2", - "@genkit-ai/core": "^0.5.2", - "@genkit-ai/dotprompt": "^0.5.2", - "@genkit-ai/flow": "^0.5.2", - "@genkit-ai/vertexai": "^0.5.2", + "@genkit/ai": "^0.5.2", + "@genkit/core": "^0.5.2", + "@genkit/dotprompt": "^0.5.2", + "@genkit/flow": "^0.5.2", + "@genkit/vertexai": "^0.5.2", "express": "^4.19.2", "partial-json": "^0.1.7", "zod": "^3.23.8" diff --git a/samples/js-angular/server/src/agent.ts b/samples/js-angular/server/src/agent.ts index 4fa9b964f0..42eff4271e 100644 --- a/samples/js-angular/server/src/agent.ts +++ b/samples/js-angular/server/src/agent.ts @@ -14,15 +14,15 @@ * limitations under the License. */ -import { GenerateResponse, generate } from '@genkit-ai/ai'; +import { GenerateResponse, generate } from '@genkit/ai'; import { GenerateResponseSchema, MessageData, ModelArgument, PartSchema, -} from '@genkit-ai/ai/model'; -import { ToolArgument } from '@genkit-ai/ai/tool'; -import { defineFlow, run } from '@genkit-ai/flow'; +} from '@genkit/ai/model'; +import { ToolArgument } from '@genkit/ai/tool'; +import { defineFlow, run } from '@genkit/flow'; import { z } from 'zod'; export interface HistoryStore { diff --git a/samples/js-angular/server/src/chatbot.ts b/samples/js-angular/server/src/chatbot.ts index af4c04599c..b171d4012d 100644 --- a/samples/js-angular/server/src/chatbot.ts +++ b/samples/js-angular/server/src/chatbot.ts @@ -14,9 +14,9 @@ * limitations under the License. */ -import { defineTool } from '@genkit-ai/ai'; -import { MessageData } from '@genkit-ai/ai/model'; -import { gemini15FlashPreview } from '@genkit-ai/vertexai'; +import { defineTool } from '@genkit/ai'; +import { MessageData } from '@genkit/ai/model'; +import { gemini15FlashPreview } from '@genkit/vertexai'; import { z } from 'zod'; import { HistoryStore, defineAgent } from './agent'; diff --git a/samples/js-angular/server/src/index.ts b/samples/js-angular/server/src/index.ts index 615a6185ec..f306b6c0f4 100644 --- a/samples/js-angular/server/src/index.ts +++ b/samples/js-angular/server/src/index.ts @@ -14,9 +14,9 @@ * limitations under the License. */ -import { configureGenkit } from '@genkit-ai/core'; -import { startFlowsServer } from '@genkit-ai/flow'; -import { vertexAI } from '@genkit-ai/vertexai'; +import { configureGenkit } from '@genkit/core'; +import { startFlowsServer } from '@genkit/flow'; +import { vertexAI } from '@genkit/vertexai'; configureGenkit({ plugins: [vertexAI()], diff --git a/samples/js-angular/server/src/jsonStreaming.ts b/samples/js-angular/server/src/jsonStreaming.ts index e75c051db5..40355ea34a 100644 --- a/samples/js-angular/server/src/jsonStreaming.ts +++ b/samples/js-angular/server/src/jsonStreaming.ts @@ -14,9 +14,9 @@ * limitations under the License. */ -import { generateStream } from '@genkit-ai/ai'; -import { defineFlow } from '@genkit-ai/flow'; -import { gemini15ProPreview } from '@genkit-ai/vertexai'; +import { generateStream } from '@genkit/ai'; +import { defineFlow } from '@genkit/flow'; +import { gemini15ProPreview } from '@genkit/vertexai'; import { Allow, parse } from 'partial-json'; import { z } from 'zod'; diff --git a/samples/js-coffee-shop/package.json b/samples/js-coffee-shop/package.json index 608ba9003d..0415d1de53 100644 --- a/samples/js-coffee-shop/package.json +++ b/samples/js-coffee-shop/package.json @@ -15,18 +15,18 @@ "author": "", "license": "ISC", "dependencies": { - "@genkit-ai/ai": "^0.5.0", - "@genkit-ai/core": "^0.5.0", - "@genkit-ai/dotprompt": "^0.5.0", - "@genkit-ai/flow": "^0.5.0", + "@genkit/ai": "^0.5.0", + "@genkit/core": "^0.5.0", + "@genkit/dotprompt": "^0.5.0", + "@genkit/flow": "^0.5.0", "genkitx-chromadb": "^0.5.0", - "@genkit-ai/dev-local-vectorstore": "^0.5.0", - "@genkit-ai/firebase": "^0.5.0", - "@genkit-ai/googleai": "^0.5.0", + "@genkit/dev-local-vectorstore": "^0.5.0", + "@genkit/firebase": "^0.5.0", + "@genkit/googleai": "^0.5.0", "genkitx-ollama": "^0.5.0", "genkitx-pinecone": "^0.5.0", - "@genkit-ai/evaluator": "^0.5.0", - "@genkit-ai/vertexai": "^0.5.0", + "@genkit/evaluator": "^0.5.0", + "@genkit/vertexai": "^0.5.0", "zod": "^3.22.4" }, "devDependencies": { diff --git a/samples/js-coffee-shop/src/index.ts b/samples/js-coffee-shop/src/index.ts index e6735a72a1..fc92bc3735 100644 --- a/samples/js-coffee-shop/src/index.ts +++ b/samples/js-coffee-shop/src/index.ts @@ -14,11 +14,11 @@ * limitations under the License. */ -import { configureGenkit } from '@genkit-ai/core'; -import { defineDotprompt, dotprompt } from '@genkit-ai/dotprompt'; -import { firebase } from '@genkit-ai/firebase'; -import { defineFlow, runFlow } from '@genkit-ai/flow'; -import googleAI, { geminiPro } from '@genkit-ai/googleai'; +import { configureGenkit } from '@genkit/core'; +import { defineDotprompt, dotprompt } from '@genkit/dotprompt'; +import { firebase } from '@genkit/firebase'; +import { defineFlow, runFlow } from '@genkit/flow'; +import googleAI, { geminiPro } from '@genkit/googleai'; import * as z from 'zod'; configureGenkit({ diff --git a/samples/js-menu/package.json b/samples/js-menu/package.json index f7f11c3d2a..bccdac8baf 100644 --- a/samples/js-menu/package.json +++ b/samples/js-menu/package.json @@ -15,14 +15,14 @@ "author": "", "license": "ISC", "dependencies": { - "@genkit-ai/ai": "^0.5.0", - "@genkit-ai/core": "^0.5.0", - "@genkit-ai/dotprompt": "^0.5.0", - "@genkit-ai/flow": "^0.5.0", - "@genkit-ai/dev-local-vectorstore": "^0.5.0", - "@genkit-ai/firebase": "^0.5.0", - "@genkit-ai/evaluator": "^0.5.0", - "@genkit-ai/vertexai": "^0.5.0", + "@genkit/ai": "^0.5.0", + "@genkit/core": "^0.5.0", + "@genkit/dotprompt": "^0.5.0", + "@genkit/flow": "^0.5.0", + "@genkit/dev-local-vectorstore": "^0.5.0", + "@genkit/firebase": "^0.5.0", + "@genkit/evaluator": "^0.5.0", + "@genkit/vertexai": "^0.5.0", "zod": "^3.22.4" }, "devDependencies": { diff --git a/samples/js-menu/src/01/prompts.ts b/samples/js-menu/src/01/prompts.ts index f632dc7c17..71019e52b8 100644 --- a/samples/js-menu/src/01/prompts.ts +++ b/samples/js-menu/src/01/prompts.ts @@ -14,10 +14,10 @@ * limitations under the License. */ -import { definePrompt } from '@genkit-ai/ai'; -import { GenerateRequest } from '@genkit-ai/ai/model'; -import { defineDotprompt } from '@genkit-ai/dotprompt'; -import { geminiPro } from '@genkit-ai/vertexai'; +import { definePrompt } from '@genkit/ai'; +import { GenerateRequest } from '@genkit/ai/model'; +import { defineDotprompt } from '@genkit/dotprompt'; +import { geminiPro } from '@genkit/vertexai'; import { MenuQuestionInput, MenuQuestionInputSchema } from '../types'; // Define a prompt to handle a customer question about the menu. diff --git a/samples/js-menu/src/02/flows.ts b/samples/js-menu/src/02/flows.ts index ef2bc5761c..c750e63422 100644 --- a/samples/js-menu/src/02/flows.ts +++ b/samples/js-menu/src/02/flows.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { defineFlow } from '@genkit-ai/flow'; +import { defineFlow } from '@genkit/flow'; import { AnswerOutputSchema, MenuQuestionInputSchema } from '../types'; import { s02_dataMenuPrompt } from './prompts'; diff --git a/samples/js-menu/src/02/prompts.ts b/samples/js-menu/src/02/prompts.ts index c9350bd901..ce849c90af 100644 --- a/samples/js-menu/src/02/prompts.ts +++ b/samples/js-menu/src/02/prompts.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { defineDotprompt } from '@genkit-ai/dotprompt'; -import { geminiPro } from '@genkit-ai/vertexai'; +import { defineDotprompt } from '@genkit/dotprompt'; +import { geminiPro } from '@genkit/vertexai'; import { MenuQuestionInputSchema } from '../types'; import { menuTool } from './tools'; diff --git a/samples/js-menu/src/02/tools.ts b/samples/js-menu/src/02/tools.ts index d9a60290da..819fafc4b5 100644 --- a/samples/js-menu/src/02/tools.ts +++ b/samples/js-menu/src/02/tools.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { defineTool } from '@genkit-ai/ai'; +import { defineTool } from '@genkit/ai'; import * as z from 'zod'; import { MenuItem, MenuItemSchema } from '../types'; diff --git a/samples/js-menu/src/03/chats.ts b/samples/js-menu/src/03/chats.ts index 2456d60079..deb19cfeca 100644 --- a/samples/js-menu/src/03/chats.ts +++ b/samples/js-menu/src/03/chats.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { MessageData, MessageSchema } from '@genkit-ai/ai/model'; +import { MessageData, MessageSchema } from '@genkit/ai/model'; import * as z from 'zod'; // Our flow will take a sessionId along with each question to track the chat history. diff --git a/samples/js-menu/src/03/flows.ts b/samples/js-menu/src/03/flows.ts index c9addc77d7..07a55285ac 100644 --- a/samples/js-menu/src/03/flows.ts +++ b/samples/js-menu/src/03/flows.ts @@ -14,10 +14,10 @@ * limitations under the License. */ -import { generate } from '@genkit-ai/ai'; -import { MessageData } from '@genkit-ai/ai/model'; -import { defineFlow, run } from '@genkit-ai/flow'; -import { geminiPro } from '@genkit-ai/vertexai'; +import { generate } from '@genkit/ai'; +import { MessageData } from '@genkit/ai/model'; +import { defineFlow, run } from '@genkit/flow'; +import { geminiPro } from '@genkit/vertexai'; import { MenuItem } from '../types'; import { diff --git a/samples/js-menu/src/03/prompts.ts b/samples/js-menu/src/03/prompts.ts index 18abc13bbe..d599e4d24e 100644 --- a/samples/js-menu/src/03/prompts.ts +++ b/samples/js-menu/src/03/prompts.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { defineDotprompt } from '@genkit-ai/dotprompt'; -import { geminiPro } from '@genkit-ai/vertexai'; +import { defineDotprompt } from '@genkit/dotprompt'; +import { geminiPro } from '@genkit/vertexai'; import { DataMenuQuestionInputSchema } from '../types'; // This prompt will generate two messages when rendered. diff --git a/samples/js-menu/src/04/flows.ts b/samples/js-menu/src/04/flows.ts index fbef53a0c3..2b24d7dd93 100644 --- a/samples/js-menu/src/04/flows.ts +++ b/samples/js-menu/src/04/flows.ts @@ -14,12 +14,12 @@ * limitations under the License. */ -import { Document, index, retrieve } from '@genkit-ai/ai/retriever'; +import { Document, index, retrieve } from '@genkit/ai/retriever'; import { devLocalIndexerRef, devLocalRetrieverRef, -} from '@genkit-ai/dev-local-vectorstore'; -import { defineFlow } from '@genkit-ai/flow'; +} from '@genkit/dev-local-vectorstore'; +import { defineFlow } from '@genkit/flow'; import * as z from 'zod'; import { diff --git a/samples/js-menu/src/04/prompts.ts b/samples/js-menu/src/04/prompts.ts index ddb5dc28a3..d067689744 100644 --- a/samples/js-menu/src/04/prompts.ts +++ b/samples/js-menu/src/04/prompts.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { defineDotprompt } from '@genkit-ai/dotprompt'; -import { geminiPro } from '@genkit-ai/vertexai'; +import { defineDotprompt } from '@genkit/dotprompt'; +import { geminiPro } from '@genkit/vertexai'; import { DataMenuQuestionInputSchema } from '../types'; export const s04_ragDataMenuPrompt = defineDotprompt( diff --git a/samples/js-menu/src/05/flows.ts b/samples/js-menu/src/05/flows.ts index 4caddfa6f1..5d2625ed28 100644 --- a/samples/js-menu/src/05/flows.ts +++ b/samples/js-menu/src/05/flows.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { defineFlow, runFlow } from '@genkit-ai/flow'; +import { defineFlow, runFlow } from '@genkit/flow'; import fs from 'fs'; import path from 'path'; diff --git a/samples/js-menu/src/05/prompts.ts b/samples/js-menu/src/05/prompts.ts index cfcf10669f..0b662495d4 100644 --- a/samples/js-menu/src/05/prompts.ts +++ b/samples/js-menu/src/05/prompts.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { defineDotprompt } from '@genkit-ai/dotprompt'; -import { geminiPro, geminiProVision } from '@genkit-ai/vertexai'; +import { defineDotprompt } from '@genkit/dotprompt'; +import { geminiPro, geminiProVision } from '@genkit/vertexai'; import * as z from 'zod'; import { TextMenuQuestionInputSchema } from '../types'; diff --git a/samples/js-menu/src/index.ts b/samples/js-menu/src/index.ts index 364737e2e5..dfad8ff122 100644 --- a/samples/js-menu/src/index.ts +++ b/samples/js-menu/src/index.ts @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { configureGenkit } from '@genkit-ai/core'; -import { devLocalVectorstore } from '@genkit-ai/dev-local-vectorstore'; -import { dotprompt } from '@genkit-ai/dotprompt'; -import { textEmbeddingGecko, vertexAI } from '@genkit-ai/vertexai'; +import { configureGenkit } from '@genkit/core'; +import { devLocalVectorstore } from '@genkit/dev-local-vectorstore'; +import { dotprompt } from '@genkit/dotprompt'; +import { textEmbeddingGecko, vertexAI } from '@genkit/vertexai'; // Initialize Genkit diff --git a/tests/test_js_app/src/index.ts b/tests/test_js_app/src/index.ts index 8053d29a32..8106479893 100644 --- a/tests/test_js_app/src/index.ts +++ b/tests/test_js_app/src/index.ts @@ -14,10 +14,10 @@ * limitations under the License. */ -import { generate } from '@genkit-ai/ai'; -import { defineModel } from '@genkit-ai/ai/model'; -import { configureGenkit } from '@genkit-ai/core'; -import { defineFlow } from '@genkit-ai/flow'; +import { generate } from '@genkit/ai'; +import { defineModel } from '@genkit/ai/model'; +import { configureGenkit } from '@genkit/core'; +import { defineFlow } from '@genkit/flow'; import * as z from 'zod'; defineModel( From 7ab13f0c78914d1faa1a3b172da54da7732373db Mon Sep 17 00:00:00 2001 From: Jacob Cable Date: Thu, 22 Aug 2024 12:50:59 +0100 Subject: [PATCH 2/2] refactor: rename genkit -> genkit-cli --- genkit-tools/cli/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/genkit-tools/cli/package.json b/genkit-tools/cli/package.json index 48c8f70c0a..8bd44a52f5 100644 --- a/genkit-tools/cli/package.json +++ b/genkit-tools/cli/package.json @@ -1,5 +1,5 @@ { - "name": "genkit", + "name": "genkit-cli", "version": "0.5.10", "description": "CLI for interacting with the Google GenKit AI framework", "license": "Apache-2.0",