diff --git a/runner/codegen/genkit/genkit-runner.ts b/runner/codegen/genkit/genkit-runner.ts index 1e5983d..001f658 100644 --- a/runner/codegen/genkit/genkit-runner.ts +++ b/runner/codegen/genkit/genkit-runner.ts @@ -68,7 +68,8 @@ export class GenkitRunner implements LlmRunner { ): Promise { const requestOptions: LocalLlmConstrainedOutputGenerateRequestOptions = { ...options, - prompt: options.context.combinedPrompt, + prompt: options.context.executablePrompt, + systemPrompt: options.context.systemInstructions, schema: z.object({ outputFiles: z.array( z.object({ @@ -145,6 +146,7 @@ export class GenkitRunner implements LlmRunner { const response = await this.genkitInstance.generate({ prompt: options.prompt, + system: options.systemPrompt, model, output: schema ? { diff --git a/runner/codegen/llm-runner.ts b/runner/codegen/llm-runner.ts index 75baca0..ba1cd83 100644 --- a/runner/codegen/llm-runner.ts +++ b/runner/codegen/llm-runner.ts @@ -96,6 +96,8 @@ interface BaseLlmRequestOptions { export interface LocalLlmGenerateTextRequestOptions extends BaseLlmRequestOptions { /** Prompt to send. */ prompt: string; + /** System prompt. */ + systemPrompt?: string; } /** Context needed for an file generation context. */ @@ -123,6 +125,8 @@ export interface LocalLlmConstrainedOutputGenerateRequestOptions< > extends BaseLlmRequestOptions { /** Prompt to send. */ prompt: string; + /** System prompt. */ + systemPrompt?: string; /** Schema that the response should conform to. */ schema: T; }