FRIDAY icon indicating copy to clipboard operation
FRIDAY copied to clipboard

Failed to add my new tools.

Open RufengSama opened this issue 1 year ago • 5 comments

I followed your documentation(https://os-copilot.readthedocs.io/en/latest/tutorials/add_tool.html) and executed the command to add the tool(FRIDAY-Gizmos/Basic/create_folder.py). The specific command is "python oscopilot/tool_repository/manager/tool_manager.py --add --tool_name create_folder --tool_path FRIDAY-Gizmos/Basic/create_folder.py" and my file structure screenshot is follow: image The error is "Error: No description found", then the comman terminate. image By the way, I want to ask that how to check if a new tool is added successfully and which tools have I added? Thanks for your helping!

RufengSama avatar Jul 01 '24 11:07 RufengSama

Thank you very much for identifying this issue. I have investigated and found that it was caused by a problem with the regular expression, which resulted in the failure to extract the description. I have already submitted a new PR, and you can refer to it.

Additionally, when a tool is successfully saved, there will be a feedback in the terminal. The saved tools can be viewed in the following path: OS-Copilot/oscopilot/tool_repository/generated_tools/generated_tools.json.

heroding77 avatar Jul 02 '24 10:07 heroding77

Thanks for your attention! I updated the project and when I tried to add the created_folder tool, there is still an error. image

RufengSama avatar Jul 05 '24 12:07 RufengSama

The embedding_function should theoretically be initialized by line 68. I'm not sure if modifications you made to the code might have caused the initialization error. I've run it on my end using the latest code and encountered no issues.

image

heroding77 avatar Jul 06 '24 02:07 heroding77

It is regretful that I have not changed any code and cloned your project several times. Can you show me your .env file? I guess something changed by checking the code.

RufengSama avatar Jul 08 '24 14:07 RufengSama

It is regretful that I have not changed any code and cloned your project several times. Can you show me your .env file? I guess something changed by checking the code.

We have updated the code. You can check the latest code and try again.

image

heroding77 avatar Jul 09 '24 07:07 heroding77