From 866ee5da9189a9efdc66a4c2ca1c80718e4ee0e4 Mon Sep 17 00:00:00 2001 From: takatost Date: Tue, 22 Aug 2023 13:43:36 +0800 Subject: [PATCH] fix: openllm generate cutoff (#945) --- api/core/third_party/langchain/llms/openllm.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/api/core/third_party/langchain/llms/openllm.py b/api/core/third_party/langchain/llms/openllm.py index 95ed80daf4..a2a2857b15 100644 --- a/api/core/third_party/langchain/llms/openllm.py +++ b/api/core/third_party/langchain/llms/openllm.py @@ -67,9 +67,6 @@ class OpenLLM(LLM): json_response = response.json() completion = json_response["responses"][0] - if completion: - completion = completion[len(prompt):] - if stop is not None: completion = enforce_stop_tokens(completion, stop)