Removed hyphen in co-workers#712
Conversation
|
Thank you for fixing it @madmag77 ! I ran your fork and it worked. Hope this gets merged because the entire crewai collaboration framework for Ollama local models don't work at all. |
I made another PR in my fork that made working with LM Studio and Ollama with Llama models same stable as with Mistral 0.3 at least on my examples. PR is super simple - I just noticed that Observation stop word didn't work, so I removed |
|
Nice! great PR looking into it! |
Thanks @joaomdmoura! looking forward to having it merged. Have another PR ready afterwards. Really like the framework! thanks for working on it... |
|
im working with llama3 running locally and im really waiting for this... |
|
Agreed, crewai is non functional without this fix. |
|
@madmag77 , how do i test and use your fork? i am having these issues too and need crews to work via ollama and until this gets merged to main, i need to have it work. |
|
It has been merged |
|
It has @greg80303 ? I see this release as still open and last release was 0.30.11 and nothing else since. Have you got it working not through an official release? |
|
@rasterize-art Yes, the PR was merged to main, but there hasn't been a release yet. I have a fork of the CrewAI repo that I just update to the latest |
@incidentallyalthoughcoolly : |
|
Sorry i am learning to code now. so i have a venv set up, I do |
|
The fix by @madmag77 has been merged to main in the CrewAI repo. You can install a python libaray from a local clone of its repo using
This will uninstall any releases version of CrewAI from your virtual environment and "link" your local CrewAI repository code to your virtual environment. You can make changes to CrewAI source files if you want and the change will be immediately reflected in the execution of your application. But for your purposes, a fresh checkout of the CrewAI repo will contain the fixes you're looking for. |
|
thank you very much @greg80303 !! So in the second bullet above, i cd into the clone repo or my project's repo? |
|
You cd into the crewAI repo. |
* removed hyphen in co-workers * Fix issue with AgentTool agent selection. The LLM included double quotes in the agent name which messed up the string comparison. Added additional types. Cleaned up error messaging. * Remove duplicate import * Improve explanation * Revert poetry.lock changes * Fix missing line in poetry.lock --------- Co-authored-by: madmag77 <goncharov.artemv@gmail.com>
|
yay! thanks folks @bhancockio fixed the conflicts on #786 and I merged it, so this is fixed in master and will be in the new version we cut :D |
* removed hyphen in co-workers * Fix issue with AgentTool agent selection. The LLM included double quotes in the agent name which messed up the string comparison. Added additional types. Cleaned up error messaging. * Remove duplicate import * Improve explanation * Revert poetry.lock changes * Fix missing line in poetry.lock --------- Co-authored-by: madmag77 <goncharov.artemv@gmail.com>
This PR intended to fix the problem with open sourced LLM that tries to use name
co-workerinstead ofcoworkerin Actions because all over the prompts co-workers spelling contain hyphen. It prevents using delegation with open sourced models - I tried Mistral 0.3 and Phi Medium and they both try to use coworker with hyphen. Same problem mentioned here.There was a attempt to fix it using kwargs parsing here, however Langchain StructuredTool, which is being used under the hood, uses this function where only fields from schema are being passed further and since
co-workeris not a part of the schema it's being ignored. And we can't include it in schema as we can't have fields with hyphens inside.Attaching the log with error got on the default example about writing article with two agents (error is a bit misleading as it complains about agent name however the problem is with key):
After removing hyphen open sourced LLMs started using proper input/key name
coworkerand everything works fine.