Skip to content

Commit

Permalink
fix: instruct suffixes never being added
Browse files Browse the repository at this point in the history
  • Loading branch information
Vali-98 committed Aug 4, 2024
1 parent 062ccd3 commit 350b52e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/constants/APIState/BaseAPI.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { AppSettings, Global } from '@constants/GlobalValues'
import { Characters } from 'app/constants/Characters'
import { Chats, useInference } from 'app/constants/Chat'
import { AppSettings, Global } from '@constants/GlobalValues'
import { InstructType, Instructs } from 'app/constants/Instructs'
import { Logger } from 'app/constants/Logger'
import { mmkv } from 'app/constants/MMKV'
import { SamplerPreset } from 'app/constants/Presets'
import { replaceMacros } from 'app/constants/Utils'
import { mmkv } from 'app/constants/MMKV'
import EventSource from 'react-native-sse'

import { SamplerID, Samplers } from '../Samplers'
Expand Down Expand Up @@ -122,8 +122,9 @@ export abstract class APIBase implements IAPIBase {

if (!is_last) {
message_shard += `${message.is_user ? currentInstruct.input_suffix : currentInstruct.output_suffix}`
is_last = false
}
// ensure no more is_last checks after this
is_last = false

if (currentInstruct.wrap) {
message_shard += `\n`
Expand Down

0 comments on commit 350b52e

Please sign in to comment.