TaskWeaver icon indicating copy to clipboard operation
TaskWeaver copied to clipboard

After executing the sql_pull_data plugin, the final error displayed is “No such file or directory”.

Open uebhh opened this issue 1 year ago • 2 comments
trafficstars

Describe the bug:

The sql_pull_data plugin can be executed normally and displays the data read, and it also shows the message, “For the complete result, please refer to the attached file: data.csv.” However, after that, an error message is displayed: “[Errno 2] No such file or directory: ‘D:\TaskWeaver0515\project\workspace\sessions\20240515-153546-5375e850\cwd\path_to_data_csv’.”

taskweaverErr

Environment Information (please complete the following information):

OS: Windows Python Version 3.11 LLM that you're using: GLM4

uebhh avatar May 15 '24 15:05 uebhh

What is your query? It seems that the agent saved an artifact to the cwd. But the sql_pull_data plugin should not do that.

liqul avatar May 17 '24 03:05 liqul

What is your query? It seems that the agent saved an artifact to the cwd. But the sql_pull_data plugin should not do that.

The plugin does not have a process for saving artifacts to the current working directory (cwd). I originally thought that Teakweaver had a process for saving the plugin’s return results to a file, but an exception occurred in which process.

The attachment is the sql_ file, which has been modified for use with ChatGLM. sql_pull_data.py.txt

uebhh avatar May 17 '24 14:05 uebhh

What is your query? It seems that the agent saved an artifact to the cwd. But the sql_pull_data plugin should not do that.

The plugin does not have a process for saving artifacts to the current working directory (cwd). I originally thought that Teakweaver had a process for saving the plugin’s return results to a file, but an exception occurred in which process.

The attachment is the sql_ file, which has been modified for use with ChatGLM. sql_pull_data.py.txt

Thanks for giving more details. I checked the code again and found that this error is raised by our implementation of the logic in ChainLit, i.e., the UI frontend. When the frontend receives a message from the agent, it will search the pattern of file path in the message. And when a pattern is matched, the frontend will try to display the file in a special style.

In your case, the plugin actually didn't save any artifacts to files. However, from the message, there is a file named data.csv, which I believe is due to haullucination of the LLM model. So, the frontend was trying to assemble a full path out of this name. The strange part is that I don't know where this path_to_data_csv came from. But I think this was indeed triggered by the huallucinated output.

The reason behind this haullucination is complicated, which could be the model itself or miss-guided by any examples in the prompt.

liqul avatar May 20 '24 06:05 liqul

What is your query? It seems that the agent saved an artifact to the cwd. But the sql_pull_data plugin should not do that.

The plugin does not have a process for saving artifacts to the current working directory (cwd). I originally thought that Teakweaver had a process for saving the plugin’s return results to a file, but an exception occurred in which process. The attachment is the sql_ file, which has been modified for use with ChatGLM. sql_pull_data.py.txt

Thanks for giving more details. I checked the code again and found that this error is raised by our implementation of the logic in ChainLit, i.e., the UI frontend. When the frontend receives a message from the agent, it will search the pattern of file path in the message. And when a pattern is matched, the frontend will try to display the file in a special style.

In your case, the plugin actually didn't save any artifacts to files. However, from the message, there is a file named data.csv, which I believe is due to haullucination of the LLM model. So, the frontend was trying to assemble a full path out of this name. The strange part is that I don't know where this path_to_data_csv came from. But I think this was indeed triggered by the huallucinated output.

The reason behind this haullucination is complicated, which could be the model itself or miss-guided by any examples in the prompt.

Thank you for your response. There is no such exception through using TaskWeaver as a library, and it does not currently affect usage.

uebhh avatar May 20 '24 09:05 uebhh