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

Fix #620 #622

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Fix #620 #622

wants to merge 1 commit into from

Conversation

italovieira
Copy link
Contributor

@italovieira italovieira commented May 15, 2024

By investigating I noticed using crewAI with ollama + ollama3 that in some cases the agent parameter below comes with leading or trailing quote like agent = '"pilot'. There is a code to reproduce the bug in the description of #620.

def _execute(self, agent, task, context):

This causes the comparison below to be false raising the error "Co-worker mentioned not found...".

if available_agent.role.casefold().strip() == agent.casefold().strip()

I think this is the reason there was a .strip(") at

formatted_value = '"' + value.strip('"').replace('"', '\\"') + '"'

So I've added back to fix #620.

@italovieira italovieira changed the title Fix #602 Fix #620 May 15, 2024
Copy link

@ronenfilho ronenfilho left a 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.

@rundeks
Copy link

rundeks commented May 19, 2024

I'm having the same issue and would love to see this merged.

@felixgao
Copy link

I am seeing something similar when using Ollama with various models

llama3

Error executing tool. Co-worker mentioned not found, it must to be one of the following options:
- editor
- newsfetcher
- newsanalyzer
- newslettercompiler

mistral

Action 'Delegate work to newsfetcher' don't exist, these are the only available Actions:
 Delegate work to co-worker: Delegate work to co-worker(task: str, context: str, coworker: Optional[str] = None, **kwargs) - Delegate a specific task to one of the following co-workers: [editor, newsfetcher, newsanalyzer, newslettercompiler]
The input to this tool should be the co-worker, the task you want them to do, and ALL necessary context to execute the task, they know nothing about the task, so share absolute everything you know, don't reference things but instead explain them.
Ask question to co-worker: Ask question to co-worker(question: str, context: str, coworker: Optional[str] = None, **kwargs) - Ask a specific question to one of the following co-workers: [editor, newsfetcher, newsanalyzer, newslettercompiler]
The input to this tool should be the co-worker, the question you have for them, and ALL necessary context to ask the question properly, they know nothing about the question, so share absolute everything you know, don't reference things but instead explain them.

would love to see it fixed.

@SYip
Copy link

SYip commented May 24, 2024

It fixes the issue for llama3, however, llama3:8b-instruct-q8_0 seems to have similar issue but it comes with a leading '.

Action: Ask question to co-worker
Action Input: {"question": "Can you explore the market size and growth prospects for AI-powered clinical documentation tools? What are some key players in this space, and what are their competitive strengths and weaknesses?", context: "As I was reading about the potential benefits of generative-AI technology in healthcare, I came across an article mentioning that the global clinical documentation software market is expected to grow significantly over the next few years. I'd like you to dig deeper into this topic and provide more insights on the market size, growth prospects, key players, and their competitive landscape.", coworker: 'Writer 


Error executing tool. Co-worker mentioned not found, it must to be one of the following options:
- writer

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

Successfully merging this pull request may close these issues.

Error "Co-worker mentioned not found..." when using with local llama3
5 participants