From 6966384318e1f17c54fce78d99ab27ceccf021a1 Mon Sep 17 00:00:00 2001 From: Kevin Cheung Date: Fri, 19 Jul 2024 10:08:35 -0700 Subject: [PATCH] docs: make sure to use Gemini 1.5 Flash as the default --- docs/dotprompt.md | 22 +++++++++++----------- docs/index.md | 2 +- docs/models.md | 2 +- docs/prompts.md | 6 +++--- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/dotprompt.md b/docs/dotprompt.md index ff5c15bcd0..5b9a05a849 100644 --- a/docs/dotprompt.md +++ b/docs/dotprompt.md @@ -15,7 +15,7 @@ might call `greeting.prompt`: ```none --- -model: vertexai/gemini-1.0-pro +model: vertexai/gemini-1.5-flash config: temperature: 0.9 input: @@ -193,7 +193,7 @@ the file itself, you can also override these values on a per-call basis: ```ts const result = await greetingPrompt.generate({ - model: 'google-genai/gemini-pro', + model: 'vertexai/gemini-1.5-pro', config: { temperature: 1.0, }, @@ -210,7 +210,7 @@ You can set the format and output schema of a prompt to coerce into JSON: ```none --- -model: vertexai/gemini-1.0-pro +model: vertexai/gemini-1.5-flash input: schema: theme: string @@ -267,7 +267,7 @@ The `{{role}}` helper provides a simple way to construct multi-message prompts: ```none --- -model: vertexai/gemini-1.0-pro +model: vertexai/gemini-1.5-flash input: schema: userQuestion: string @@ -317,7 +317,7 @@ use the `{{media}}` helper: ```none --- -model: vertexai/gemini-1.0-pro-vision +model: vertexai/gemini-1.5-flash input: schema: photoUrl: string @@ -416,16 +416,16 @@ production environment side-by-side with existing versions. Dotprompt supports this through its **variants** feature. To create a variant, create a `[name].[variant].prompt` file. For instance, if -you were using Gemini 1.0 Pro in your prompt but wanted to see if Gemini 1.5 Pro -would perform better, you might create two files: +you were using Gemini 1.5 Flash in your prompt but wanted to see if Gemini 1.5 +Pro would perform better, you might create two files: - `my_prompt.prompt`: the "baseline" prompt -- `my_prompt.gemini15.prompt`: a variant named "gemini" +- `my_prompt.geminipro.prompt`: a variant named "geminipro" To use a prompt variant, specify the `variant` option when loading: ```ts -const myPrompt = await prompt('my_prompt', { variant: 'gemini15' }); +const myPrompt = await prompt('my_prompt', { variant: 'geminipro' }); ``` The name of the variant is included in the metadata of generation traces, so you @@ -447,7 +447,7 @@ Once a helper is defined you can use it in any prompt: ```none --- -model: vertexai/gemini-1.5-pro +model: vertexai/gemini-1.5-flash input: schema: name: string @@ -491,7 +491,7 @@ const myPrompt = await loadPromptUrl('https://example.com/my_prompt.prompt'); // Define a prompt in code const myPrompt = defineDotprompt( { - model: 'vertexai/gemini-1.0-pro', + model: 'vertexai/gemini-1.5-flash', input: { schema: z.object({ name: z.string(), diff --git a/docs/index.md b/docs/index.md index b5db975c16..f46e7bd4c1 100644 --- a/docs/index.md +++ b/docs/index.md @@ -186,7 +186,7 @@ into a single file for easier testing and organization. ```none --- -model: vertexai/gemini-1.0-pro +model: vertexai/gemini-1.5-flash config: temperature: 0.9 input: diff --git a/docs/models.md b/docs/models.md index 527cb44a70..ff7163eebd 100644 --- a/docs/models.md +++ b/docs/models.md @@ -31,7 +31,7 @@ authentication. For example, Vertex API uses the Google Auth Library so it can pull required credentials using Application Default Credentials. To use models provided by the plugin, you can either refer to them by name (e.g. -`'vertexai/gemini-1.0-pro'`) or some plugins export model ref objects which +`'vertexai/gemini-1.5-flash'`) or some plugins export model ref objects which provide additional type info about the model capabilities and options. ```js diff --git a/docs/prompts.md b/docs/prompts.md index 3abd2aab89..d457e6dc3d 100644 --- a/docs/prompts.md +++ b/docs/prompts.md @@ -23,7 +23,7 @@ call models this way for straight-forward use cases. import { generate } from '@genkit-ai/ai'; generate({ - model: 'googleai/gemini-pro', + model: 'googleai/gemini-1.5-flash-latest', prompt: 'You are a helpful AI assistant named Walt.', }); ``` @@ -37,7 +37,7 @@ function helloPrompt(name: string) { } generate({ - model: 'googleai/gemini-pro', + model: 'googleai/gemini-1.5-flash-latest', prompt: helloPrompt('Fred'), }); ``` @@ -85,7 +85,7 @@ generate( renderPrompt({ prompt: helloPrompt, input: { name: 'Fred' }, - model: 'googleai/gemini-pro', + model: 'googleai/gemini-1.5-flash-latest', }) ); ```