mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2025-12-06 07:12:10 +01:00
Begin fixing 'Continue' with GPT-OSS
This commit is contained in:
parent
e5b8d4d072
commit
80f6abb07e
|
|
@ -165,6 +165,7 @@ class LinearTemplateHandler(TemplateHandler):
|
|||
suffix = self.get_generation_prefix_suffix(renderer, impersonate)[1]
|
||||
if len(suffix) > 0:
|
||||
return prompt[:-len(suffix)]
|
||||
|
||||
return prompt
|
||||
|
||||
|
||||
|
|
@ -199,7 +200,10 @@ class ChannelTemplateHandler(TemplateHandler):
|
|||
]
|
||||
|
||||
def modify_for_continue(self, prompt, renderer, impersonate=False):
|
||||
# Channels don't need suffix stripping for the continue logic to work.
|
||||
suffix = '<|return|>'
|
||||
if prompt.endswith(suffix):
|
||||
return prompt[:-len(suffix)]
|
||||
|
||||
return prompt
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue