Skip to content

Commit

Permalink
feat(gui-sidebar): add type checking to model selector function
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed May 25, 2024
1 parent d0968b5 commit f9278ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gui-sidebar/src/redux/selectors/modelSelectors.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { DEFAULT_MAX_TOKENS } from "../../shims/llm-constants";
import { RootState } from "../store";
import { ModelDescription } from "../../shims/typings";

export const defaultModelSelector = (state: RootState) => {
const title = state.state.defaultModelTitle ?? "";
return state.state.config.models.find((model) => model.title === title);
return state.state.config.models.find((model: ModelDescription) => model.title === title)
};

export const contextLengthSelector = (state: RootState) => {
Expand Down

0 comments on commit f9278ed

Please sign in to comment.