mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
llm node using OpenAI-API-compatible/Vllm model plugin return text "" #176
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rainvstar on GitHub (Apr 7, 2025).
Self Checks
Dify version
1.1.3
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
I deploy llm model locally and provide openai format interface. the interface is /v1/chat/completions . I use vllm node in my workflow, and send promopt like '你是谁' to the llm node。In my llm service, I accept the request and response. but in dify, the llm out put is {"text":""},I can't see the request and response logs to the llm service. How to find the problem.
✔️ Expected Behavior
fix bug or tell me how to find out the problem.
❌ Actual Behavior
No response
@dosubot[bot] commented on GitHub (Apr 7, 2025):
I found some similar threads that might help you troubleshoot the issue:
0.0.0.0instead oflocalhostor127.0.0.1. Also, verify that the Dify configuration uses the correct IP address and settings for your LLM service.These threads might offer some guidance on resolving the issue with the LLM node returning an empty text.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
@rainvstar commented on GitHub (Apr 7, 2025):
#17589
I am not using streaming, where to find the response structure matches what Dify expects. I can't find my mock result problem, it is opanai standard. can you show me an example just like this?
@dosu @crazywoola
@rainvstar commented on GitHub (Apr 7, 2025):
I find out the problem, the workflow request llm node and using stream = true. how to forbidden llm reusing stream=true ? @dosu @crazywoola @dosubot
@dosubot[bot] commented on GitHub (Aug 20, 2025):
Hi, @rainvstar. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.
Issue Summary:
stream=truewith the LLM node.Next Steps:
Thanks for your understanding and contribution!
@ninechi143 commented on GitHub (Aug 27, 2025):
@rainvstar
@wenHK
Hello, though it was an old issue you reported on April, and now it has already been 4 months passed,
I still see no answer/response on the community to address this problem.
I am not sure whether you have already solved this issue, no matter what, I still want to share my solution even if it's too late or useless.
First of all, here is the version I am using (I use docker to deploy dify on WSL):

From another "same" issue your reported at langgenius/dify#17589,
I see that you develop a web api in Python by using uvicorn, and register it as a standard openai-api-compatible,
and then you construct a workflow of ChatFlow/ChatApp on dify framework, with the block form of START->LLM->ANSWER.
Actually, it's exactly the same as what I am doing, and here is how I solve this "blank text" issue, I will directly provide the python code I am using:
Here, please ignore
from API_Llama3_chat_ChatHuggingFace import chatbot_get_response, you need to replace it with any other function you're developing to inference the local LLM (btw, I use Huggingface and Langchain to deploy local LLM).From the part of
print(request), we will notice that there is a key-value pair: stream-True in the request, and it's just the key point, as you said.The following figure is the corresponding workflow on dify:
Note: we need to put {x}sys.query of START block in the USER column of LLM block, such that we can get the user input from chatapp web page, and feed it into the LLM block (i.e., your "openai-api-compatible").
With all these modifications, I am able to show the response on the chatapp web page.
Hope this helps.