From 14c34516ba9f5e1c6ba1616b39b4d2eaa7006ed4 Mon Sep 17 00:00:00 2001 From: imClumsyPanda Date: Wed, 7 Jun 2023 21:26:31 +0800 Subject: [PATCH] Dev (#572) * feat(webui): update port number in Vite config file from 1002 to 8090 * update chatglm_llm.py --------- Co-authored-by: NieLamu Co-authored-by: fxjhello <127916299+fxjhello@users.noreply.github.com> --- models/chatglm_llm.py | 2 +- views/vite.config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/models/chatglm_llm.py b/models/chatglm_llm.py index 6e84234..903d488 100644 --- a/models/chatglm_llm.py +++ b/models/chatglm_llm.py @@ -52,7 +52,7 @@ class ChatGLM(BaseAnswer, LLM, ABC): for inum, (stream_resp, _) in enumerate(self.checkPoint.model.stream_chat( self.checkPoint.tokenizer, prompt, - history=history[-self.history_len:] if self.history_len > 0 else [], + history=history[-self.history_len:-1] if self.history_len > 1 else [], max_length=self.max_token, temperature=self.temperature )): diff --git a/views/vite.config.ts b/views/vite.config.ts index 796872f..3687c58 100644 --- a/views/vite.config.ts +++ b/views/vite.config.ts @@ -33,7 +33,7 @@ export default defineConfig((env) => { plugins: setupPlugins(viteEnv), server: { host: '0.0.0.0', - port: 1002, + port: 8090, open: false, proxy: { '/api': {