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

new tool #260

Open
hansipie opened this issue May 16, 2024 · 4 comments
Open

new tool #260

hansipie opened this issue May 16, 2024 · 4 comments
Assignees

Comments

@hansipie
Copy link

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 :)

@jacobweiss2305 jacobweiss2305 self-assigned this May 16, 2024
@jacobweiss2305
Copy link
Contributor

@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

@ysolanky
Copy link
Contributor

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.

@hansipie
Copy link
Author

hansipie commented May 16, 2024

@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]

@hansipie
Copy link
Author

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"

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

3 participants