Skip to content

Commit

Permalink
fix: unable to generate locally
Browse files Browse the repository at this point in the history
  • Loading branch information
Vali-98 committed Nov 30, 2024
1 parent 184ace7 commit a20934e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion constants/Inference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const generateResponse = async (swipeId: number) => {
const APIType = getString(Global.APIType)
const legacy = mmkv.getBoolean(AppSettings.UseLegacyAPI)
const apiState = appMode === AppMode.LOCAL ? APIState[API.LOCAL] : APIState?.[APIType as API]
if (legacy) {
if (legacy ?? appMode === AppMode.LOCAL) {
if (apiState) await BackgroundService.start(apiState.inference, completionTaskOptions)
else {
Logger.log('An invalid API was somehow chosen, this is bad!', true)
Expand Down

0 comments on commit a20934e

Please sign in to comment.