phidata
phidata copied to clipboard
new tool
Hello (again)
I've created a new tool in phi/tools/, but I wasn't able to launch LLMOs unless I create a symbolic link to the phi directory inside the LLMOs directory. Is there a cleaner way to proceed? I didn't get a better result with "use 'create_env' ... will(...) Install the phidata package in editable mode" (I'm not sure of what does this mean)
Thank you :)
@hansipie i'd say the simplest way to get an assistant running custom code is to wrap it in a python function like so: https://docs.phidata.com/examples/assistants/hackernews
If you share the tool I can help review and add it to our toolkits.
Feel free to join the discord channel, which we are actively on: https://discord.com/invite/4MtYHHrgA8
Hey @hansipie, I’ve shared some documentation about editable Python project installs: Editable Installs Documentation.
When you set up a virtual environment and install phidata in editable mode, any local modifications you make to the phidata codebase will be immediately reflected in your scripts that utilize phidata. The issue with your custom tool in phi/tools/
not being accessible by your script occurred because phidata was not installed in editable mode. As a result, your environment was not using your local changes.
@jacobweiss2305 Hello its as pretty simple tool that does web requests (GET and POST for now)... simple but powerfull. I get amazing results in llm_os on requests like "give me pikachu's stats using pokeapi". The tool is in my fork, on my main branch for instance (phi/tools/webrequests.py).
@ysolanky Thats strange, i've followed the steps from CONTRIBUTING.md, but i still have the same issue. Could it be a issue with llm_os ? i'm thinking about and issue with pip install -r of llm_os overwriting stuffs.
On discord i'm [NBT]
Hello
@ysolanky! I guess I was right: if you launch pip install -r cookbook/llm_os/requirements.txt
after running script/create_env
, you "lose" the phidata in editable mode.
If fixed it by adding llm_os to the [project.optional-dependencies]
section of the pyproject.toml. Are you interested in this? I can make a new PR.
Bonus: I've translated upgrade.sh to upgrade.bat, and it's included in my PR #305"