-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix #620 #622
base: main
Are you sure you want to change the base?
Fix #620 #622
Conversation
a670ccd
to
2cbb88d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the original code replaces all double quotes inside the string with escaped double quotes, the updated code first removes any leading or trailing double quotes from the value string before applying the replacement. This ensures that any double quotes at the ends are not escaped unnecessarily. This can prevent double escaping in cases where the string might already be wrapped in double quotes.
I'm having the same issue and would love to see this merged. |
I am seeing something similar when using Ollama with various models llama3
mistral
would love to see it fixed. |
It fixes the issue for
|
By investigating I noticed using crewAI with ollama + ollama3 that in some cases the
agent
parameter below comes with leading or trailing quote likeagent = '"pilot'
. There is a code to reproduce the bug in the description of #620.crewAI/src/crewai/tools/agent_tools.py
Line 52 in 1e112fa
This causes the comparison below to be false raising the error "Co-worker mentioned not found...".
crewAI/src/crewai/tools/agent_tools.py
Line 58 in 1e112fa
I think this is the reason there was a
.strip(")
atcrewAI/src/crewai/tools/tool_usage.py
Line 354 in bcb57ce
So I've added back to fix #620.