Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
uebhh opened this issue May 15, 2024 · 4 comments

Comments

@uebhh
Copy link

uebhh commented May 15, 2024

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

@liqul
Copy link
Contributor

liqul commented May 17, 2024

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.

@uebhh
Copy link
Author

uebhh commented May 17, 2024

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

@liqul
Copy link
Contributor

liqul commented May 20, 2024

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.

@uebhh
Copy link
Author

uebhh commented May 20, 2024

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 uebhh closed this as completed May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants