Skip to content

Commit

Permalink
fix(assistant): make model selection consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkolenz committed Sep 13, 2024
1 parent e0247e9 commit 7d2a508
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
14 changes: 8 additions & 6 deletions src/components/inspector/GraphFields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -429,11 +435,7 @@ export const GraphFields: React.FC<Props> = () => {
/>
<Autocomplete
freeSolo
options={[
"gpt-4o-2024-08-06",
"gpt-4o-mini-2024-07-18",
"chatgpt-4o-latest",
]}
options={assistantModels}
renderInput={(params) => (
<TextField {...params} label="Model" />
)}
Expand Down
8 changes: 7 additions & 1 deletion src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 7d2a508

Please sign in to comment.