Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug in tool usage doc
Browse files Browse the repository at this point in the history
ssbushi authored May 17, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent d210fb9 commit f0a35b6
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -140,23 +140,25 @@ import { geminiPro } from "@genkit-ai/vertexai";
import { z } from "zod";

const createReminder = defineTool({
name: "createReminder",
description: "Use this to create reminders for things in the future",
inputSchema: z.object({
time: z.string().describe('ISO timestamp string, e.g. 2024-04-03T12:23:00Z'),
reminder: z.string().describe('the content of the reminder'),
}),
name: "createReminder",
description: "Use this to create reminders for things in the future",
inputSchema: z.object({
time: z.string().describe('ISO timestamp string, e.g. 2024-04-03T12:23:00Z'),
reminder: z.string().describe('the content of the reminder'),
})
},
outputSchema: z.number().describe('the ID of the created reminder'),
(reminder) => db.reminders.create(reminder)
});
);

const searchNotes = defineTool({
name: "searchNotes",
description: "Use this to search the user's notes for people or phrases",
inputSchema: z.string().describe('the search query'),
outputSchema: z.object({notes: z.array(NoteSchema)}),
name: "searchNotes",
description: "Use this to search the user's notes for people or phrases",
inputSchema: z.string().describe('the search query'),
outputSchema: z.object({notes: z.array(NoteSchema)}),
},
(query) => db.notes.search(query)
});
);

const result = await generate({
model: geminiPro,

0 comments on commit f0a35b6

Please sign in to comment.