From 9f0026b9f748d12e0f902ccdebeffae67700f94a Mon Sep 17 00:00:00 2001 From: Chris Chestnut Date: Wed, 29 May 2024 17:18:03 +0000 Subject: [PATCH] Add array of toolNames to CreatePromptRequest --- genkit-tools/common/src/server/router.ts | 1 + genkit-tools/common/src/types/apis.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/genkit-tools/common/src/server/router.ts b/genkit-tools/common/src/server/router.ts index d38a0ff68..e57acad0a 100644 --- a/genkit-tools/common/src/server/router.ts +++ b/genkit-tools/common/src/server/router.ts @@ -140,6 +140,7 @@ export const TOOLS_SERVER_ROUTER = (runner: Runner) => const frontmatter: PromptFrontmatter = { model: input.model, config: input.config, + tools: input.toolNames, }; return fromMessages(frontmatter, input.messages); }), diff --git a/genkit-tools/common/src/types/apis.ts b/genkit-tools/common/src/types/apis.ts index 7b6ebfdcd..b5e8e8bc3 100644 --- a/genkit-tools/common/src/types/apis.ts +++ b/genkit-tools/common/src/types/apis.ts @@ -93,6 +93,7 @@ export const CreatePromptRequestSchema = z.object({ model: z.string(), messages: z.array(MessageSchema), config: GenerationCommonConfigSchema.passthrough().optional(), + toolNames: z.array(z.string()).optional(), }); export type CreatePromptRequest = z.infer;