[Bug]: Agent flow requires two completions of the conversation after creating a session if there are input parameters.
Is there an existing issue for the same bug?
- [x] I have checked the existing issues.
RAGFlow workspace code commit ID
409310aa
RAGFlow image version
v0.16.0-139-g58a8f1f1 full
Other environment information
Actual behavior
Repeated messages
Expected behavior
After “Create session with agent”, call “Converse with agent” and get an answer immediately.
Steps to reproduce
01. Create session with agent(the Begin component in your agent takes required file parameters)
02. Converse with agent (Need to ask questions twice.)
03. List agent sessions (There are 2 duplicate messages.)
Additional information
-
Create session
-
Converse with agent
-
Converse with agent again
-
View message history
Agent always talks firstly.
Agent always talks firstly.
However, it takes two rounds of dialogue requests to get a response, and the message records are also repeated for two rounds.
it takes two rounds of dialogue requests to get a response, and the message records are also repeated for two rounds. I have also encountered the same problem.
The first round is to get the session ID which will be applied for the successive conversations.
After obtaining the session ID through the use of the interface/api/v1/agents/{agent_id}/sessions, the first question-answer interaction is conducted using the interface/api/v1/agents/{agent_id}/completions, and the result is normal. When using the previous session ID to ask the second question, at this time, the following data will be returned: { "code": 0, "data": true }, and it will only respond normally after you make another request.
Does the session ID have an expiration time?
It may be related to your entire flow. Is it normal via UI?
The UI is also not functioning properly.
Thank you! If I want to output the SQL statements generated by LLM into the dialog box, how can I do it? Or is there an interface to access the running results of the nodes?
ExecSQL will adjust the SQL if fail. So, the real SQL can't be obtained.
In the future plan, is there a feature that enables LLM to generate SQL statements, and then ExecSQL can execute these SQL statements and output the results to the dialog box?
No plan yet.
Agent always talks firstly.
I mean that in the second step 2. Converse with agent, an answer should be given immediately. If the begin component is not set with input parameters, it is normal.
Here is my flowchart. For each session_id, the first question can only elicit the opening remarks as the response. May I ask how to draw this flowchart properly?
Hello, I ran into the same problem, see my PR #6659 above for a possible fix.