diff --git a/api/core/third_party/langchain/llms/openllm.py b/api/core/third_party/langchain/llms/openllm.py index a2a2857b1..6151fe3f1 100644 --- a/api/core/third_party/langchain/llms/openllm.py +++ b/api/core/third_party/langchain/llms/openllm.py @@ -66,6 +66,7 @@ class OpenLLM(LLM): json_response = response.json() completion = json_response["responses"][0] + completion = completion.lstrip(prompt) if stop is not None: completion = enforce_stop_tokens(completion, stop)