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 completion start with prompt, remove it (#1303)

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