修复negativeprompt和maxtokens不能用的情况 (#829)

大意了,才发现没启用参数。
This commit is contained in:
Smzh 2024-06-19 08:07:47 +08:00 committed by GitHub
parent de7441719d
commit 6e660188c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -79,6 +79,8 @@ class TS(basetrans):
messages = self.make_messages(text, **kwargs)
payload = {
"messages": messages,
"max_tokens": self.config["max_tokens(单次生成上限)"],
"negative_prompt": self.config["negative_prompt(不懂可以不写)"],
"temperature": self.config["temperature"],
"stop": stop,
"stream": False,
@ -122,6 +124,8 @@ class TS(basetrans):
messages = self.make_messages(text, **kwargs)
payload = {
"messages": messages,
"max_tokens": self.config["max_tokens(单次生成上限)"],
"negative_prompt": self.config["negative_prompt(不懂可以不写)"],
"temperature": self.config["temperature"],
"stop": stop,
"stream": True,