@@ -5,10 +5,10 @@ that can provide models, retrievers, indexers, trace stores, and more. You've al
55action just by using Genkit:
66
77``` ts
8- import { configureGenkit } from ' @ genkit-ai/core ' ;
8+ import { genkit } from ' genkit' ;
99import { vertexAI } from ' @genkit-ai/vertexai' ;
1010
11- configureGenkit ({
11+ const ai = genkit ({
1212 plugins: [vertexAI ({ projectId: ' my-project' })],
1313});
1414```
@@ -40,23 +40,20 @@ npx tsc --init
4040Then, define and export your plugin from your main entry point:
4141
4242``` ts
43- import { genkitPlugin } from ' @genkit-ai/core' ;
43+ import { Genkit , z } from ' genkit' ;
44+ import { GenkitPlugin , genkitPlugin } from ' genkit/plugin' ;
4445
4546interface MyPluginOptions {
4647 // add any plugin configuration here
4748}
4849
49- import { Genkit , z } from ' genkit' ;
50- import { GenkitPlugin , genkitPlugin } from ' genkit/plugin' ;
51-
5250export function myPlugin(options ? : MyPluginOptions ) {
5351 return genkitPlugin (' myPlugin' , async (ai : Genkit ) => {
5452 ai .defineModel (... );
5553 ai .defineEmbedder (... )
5654 // ....
5755 });
5856};
59-
6057```
6158
6259### Plugin options guidance
@@ -123,7 +120,8 @@ import { genkitPlugin, GenkitPlugin } from 'genkit/plugin';
123120import { GenkitError } from ' @genkit-ai/core' ;
124121import { GenerationCommonConfigSchema } from ' @genkit-ai/ai/model' ;
125122import { simulateSystemPrompt } from ' @genkit-ai/ai/model/middleware' ;
126- import { z } from ' zod' ;
123+ import { z } from ' genkit' ;
124+
127125
128126export function myPlugin(options ? : MyPluginOptions ) {
129127 return genkitPlugin (' my-plugin' , async (ai : Genkit ) => {
0 commit comments