From 7d2a508cf1676efc6ab2cbde17ec7786fa8dbd27 Mon Sep 17 00:00:00 2001 From: Mirko Lenz Date: Fri, 13 Sep 2024 09:41:05 +0200 Subject: [PATCH] fix(assistant): make model selection consistent --- src/components/inspector/GraphFields.tsx | 14 ++++++++------ src/store.ts | 8 +++++++- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/components/inspector/GraphFields.tsx b/src/components/inspector/GraphFields.tsx index 8348c3a..c845719 100644 --- a/src/components/inspector/GraphFields.tsx +++ b/src/components/inspector/GraphFields.tsx @@ -50,7 +50,13 @@ import * as model from "../../model.js"; import * as convert from "../../services/convert.js"; import { generateDemo } from "../../services/demo.js"; import { useSessionStorage } from "../../storage.js"; -import { State, resetState, setState, useStore } from "../../store.js"; +import { + State, + assistantModels, + resetState, + setState, + useStore, +} from "../../store.js"; const Input = styled("input")({ display: "none", @@ -429,11 +435,7 @@ export const GraphFields: React.FC = () => { /> ( )} diff --git a/src/store.ts b/src/store.ts index 3719d1c..d995598 100644 --- a/src/store.ts +++ b/src/store.ts @@ -14,6 +14,12 @@ import { createWithEqualityFn } from "zustand/traditional"; import * as model from "./model.js"; import * as convert from "./services/convert.js"; +export const assistantModels = [ + "gpt-4o-2024-08-06", + "gpt-4o-mini-2024-07-18", + "chatgpt-4o-latest", +]; + export interface AssistantConfig { model: string; baseURL: string; @@ -204,7 +210,7 @@ const initialState: State = { sidebarWidth: 400, headerHeight: 64, assistantConfig: { - model: "gpt-4o", + model: assistantModels[0], baseURL: "https://api.openai.com/v1", temperature: 1.0, topP: 1.0,