From 1e2124ff54e8e2fe87880f9feeed79914efd22cd Mon Sep 17 00:00:00 2001 From: glide-the <2533736852@qq.com> Date: Sun, 16 Jul 2023 01:31:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E6=95=B0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/fastchat_openai_llm.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/models/fastchat_openai_llm.py b/models/fastchat_openai_llm.py index 1787281..5cb617b 100644 --- a/models/fastchat_openai_llm.py +++ b/models/fastchat_openai_llm.py @@ -184,7 +184,7 @@ class FastChatOpenAILLMChain(RemoteRpcModel, Chain, ABC): history = inputs[self.history_key] streaming = inputs[self.streaming_key] prompt = inputs[self.prompt_key] - stop = inputs['stop'] + stop = inputs.get("stop", None) print(f"__call:{prompt}") try: @@ -243,7 +243,6 @@ if __name__ == "__main__": chain.call_model_name("gpt-3.5-turbo") answer_result_stream_result = chain({"streaming": False, - "stop": "", "prompt": "你好", "history": [] })