Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: openllm generate cutoff (#945)

takatost866ee5da9189
diff --git a/api/core/third_party/langchain/llms/openllm.py b/api/core/third_party/langchain/llms/openllm.py
index 95ed80daf44..a2a2857b158 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)