Skip to content

Commit

Permalink
feat: support env var DEFAULT_INPUT_TEMPLATE to custom default templa…
Browse files Browse the repository at this point in the history
…te for preprocessing user inputs
  • Loading branch information
Dean-YZG committed May 13, 2024
1 parent 2d1f0c9 commit 9d7ce20
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/store/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@ export const useAppConfig = createPersistStore(
state.lastUpdate = Date.now();
}

if (version < 3.9) {
state.modelConfig.template =
state.modelConfig.template !== DEFAULT_INPUT_TEMPLATE
? state.modelConfig.template
: config?.template ?? DEFAULT_INPUT_TEMPLATE;
}

return state as any;
},
},
Expand Down

0 comments on commit 9d7ce20

Please sign in to comment.