Add .rstrip(' ') to openai api
This commit is contained in:
parent
3f1bfba718
commit
c746a5bd00
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ def deduce_template():
|
||||||
.replace('<|user|>', instruct.get('user', ''))\
|
.replace('<|user|>', instruct.get('user', ''))\
|
||||||
.replace('<|bot|>', instruct.get('bot', ''))\
|
.replace('<|bot|>', instruct.get('bot', ''))\
|
||||||
.replace('<|user-message|>', '{instruction}\n{input}')
|
.replace('<|user-message|>', '{instruction}\n{input}')
|
||||||
return instruct.get('context', '') + template[:template.find('<|bot-message|>')]
|
return instruct.get('context', '') + template[:template.find('<|bot-message|>')].rstrip(' ')
|
||||||
except:
|
except:
|
||||||
return default_template
|
return default_template
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue