Skip to content

Commit dcacadc

Browse files
authored
fix: dotprompt docs (#1833)
1 parent 4f09d78 commit dcacadc

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

docs/dotprompt.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Before reading this page, you should be familiar with the content covered on the
4444
[Generating content with AI models](models) page.
4545

4646
If you want to run the code examples on this page, first complete the steps in
47-
the [Getting started](get-started) guide. All of the examples assume that you
47+
the [Get started](get-started) guide. All of the examples assume that you
4848
have already installed Genkit as a dependency in your project.
4949

5050
## Creating prompt files
@@ -364,7 +364,7 @@ your prompt's input schema.
364364
You already saw this in action in the section on input and output schemas:
365365

366366
```handlebars
367-
{% includecode github_path="firebase/genkit/js/doc-snippets/src/dotprompt/prompts/ex03.prompt" %}
367+
{% includecode github_path="firebase/genkit/js/doc-snippets/src/dotprompt/prompts/ex04.prompt" %}
368368
```
369369

370370
In this example, the Handlebars expression, `{{theme}}`,

js/doc-snippets/src/dotprompt/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ async function fn04() {
9292
// [START outSchema]
9393
// [START inSchema]
9494
const menuPrompt = ai.prompt('menu');
95-
const { data } = await menuPrompt({ theme: 'medieval' });
95+
const { output } = await menuPrompt({ theme: 'medieval' });
9696
// [END inSchema]
9797

98-
const dishName = data['dishname'];
99-
const description = data['description'];
98+
const dishName = output['dishname'];
99+
const description = output['description'];
100100
// [END outSchema]
101101
}
102102

@@ -107,11 +107,11 @@ async function fn05() {
107107
typeof MenuItemSchema, // Output schema
108108
z.ZodTypeAny // Custom options schema
109109
>('menu');
110-
const { data } = await menuPrompt({ theme: 'medieval' });
110+
const { output } = await menuPrompt({ theme: 'medieval' });
111111

112112
// Now data is strongly typed as MenuItemSchema:
113-
const dishName = data?.dishname;
114-
const description = data?.description;
113+
const dishName = output?.dishname;
114+
const description = output?.description;
115115
// [END outSchema2]
116116
}
117117

0 commit comments

Comments
 (0)