From 1cc58844e960360cdeb0cca650db5435ad07afdb Mon Sep 17 00:00:00 2001 From: pelikhan Date: Tue, 17 Dec 2024 12:21:17 -0800 Subject: [PATCH] =?UTF-8?q?feat:=20add=20reasoning=20model=20support=20?= =?UTF-8?q?=F0=9F=A4=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/types/prompt_template.d.ts | 6 +++++- packages/sample/genaisrc/samples/gai.genai.mts | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/core/src/types/prompt_template.d.ts b/packages/core/src/types/prompt_template.d.ts index fbc4b4a8b1..4db3e38f0a 100644 --- a/packages/core/src/types/prompt_template.d.ts +++ b/packages/core/src/types/prompt_template.d.ts @@ -122,6 +122,8 @@ type ModelType = OptionsOrString< | "large" | "small" | "vision" + | "reasoning" + | "reasoning_small" | "openai:gpt-4o" | "openai:gpt-4o-mini" | "openai:gpt-3.5-turbo" @@ -219,7 +221,9 @@ interface ModelOptions extends ModelConnectionOptions, ModelTemplateOptions { /** * A list of keywords that should be found in the output. */ - choices?: ElementOrArray + choices?: ElementOrArray< + string | { token: string | number; weight?: number } + > /** * Returns the log probabilities of the each tokens. Not supported in all models. diff --git a/packages/sample/genaisrc/samples/gai.genai.mts b/packages/sample/genaisrc/samples/gai.genai.mts index 10e4b21edd..7260a74807 100644 --- a/packages/sample/genaisrc/samples/gai.genai.mts +++ b/packages/sample/genaisrc/samples/gai.genai.mts @@ -3,6 +3,7 @@ // Script for analyzing GitHub Action runs to determine the cause of a failure. script({ title: "GitHub Action Investigator", + model: "reasoning", description: "Analyze GitHub Action runs to find the root cause of a failure", parameters: {