fix: temerature cannot larger than 1

This commit is contained in:
ikechan8370 2023-03-20 00:40:47 +08:00
parent cd1a4a3e34
commit 8e1f1ba12a

View file

@ -31,7 +31,7 @@ export default class ChatGLMClient {
conversationId = uuidv4(), conversationId = uuidv4(),
messageId = uuidv4(), messageId = uuidv4(),
parentMessageId, parentMessageId,
temperature = Config.temperature temperature = Math.max(Config.temperature, 1)
} = opts } = opts
await this.initCache() await this.initCache()
let url = Config.chatglmBaseUrl + '/api/chat' let url = Config.chatglmBaseUrl + '/api/chat'