Open felixgao opened 1 month ago
me too. the arch seems many bug, and it is diffcult to work along with mind.
same here. any luck?
Same here
bump. facing the same issue
I had the same issue as well, my guess is that it might be related to the interpolacion of the input variable. try renaming your input variable research_topic
to another name in a way that it does not resemble to any word within your task description or agent itself.
Hi there,
I am hitting the same issue. I am trying to run the instagram_post
example. After some modification, it now starts to run but fail at some point:
-----------------
Title: Amazon.com: Original Sensory Chew Toys for Autistic Children ...
Link: https://www.amazon.com/Original-Autistic-Children-Silicone-Stimulation/dp/B0C712V32L
Snippet: Original Sensory Chew Toys for Autistic Children, Silicone Chewing Sticks for Autistic Chewers, ADHD, SPD, Oral Motor Stimulation or Special Needs (2Packs) (A).
-----------------
Thought: Now that we know a bit more about Gabbo and its features, let's ask the Senior Photographer to review the photos from the photoshoot.
Action: Ask question to co-worker
Action Input: {
"question": "Can you please review the photos from the photoshoot of Gabbo?",
"context": "The product is Gabbo, a robot toy designed to help children disconnect from the digital world and connect with the real world. The photographs should be aligned with the product's goals of promoting human interaction and helping children with autism develop social skills."
}
I encountered an error while trying to use the tool. This was the error: 'NoneType' object has no attribute 'startswith'.
Tool Ask question to co-worker accepts these inputs: Ask a specific question to one of the following co-workers: [Senior Photographer]
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.
Thought: It seems like you're facing an issue with using the Ask question to co-worker tool. Can you please clarify what exactly is not working? I can help troubleshoot the issue and provide a solution if needed.
Action: Ask question to co-worker
Action Input: {
"question": "Can you please review the photos from the photoshoot of Gabbo?",
"context": "The product is Gabbo, a robot toy designed to help children disconnect from the digital world and connect with the real world. The photographs should be aligned with the product's goals of promoting human interaction and helping children with autism develop social skills."
}
I encountered an error while trying to use the tool. This was the error: 'NoneType' object has no attribute 'startswith'.
Tool Ask question to co-worker accepts these inputs: Ask a specific question to one of the following co-workers: [Senior Photographer]
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.
I'm seeing this issue as well. Looking at the code, it appears to be because the agent doing the delegation is not including the names (Roles) of the co-worker agents in the tool call. You can see in your debug statements that the agent is passing the question
and the context
which are required for this call, but it is not passing the name of the co-worker that it wishes to ask.
The bug is happening here in crewai/tools/agent_tools.py
:
def ask_question(self, question: str, context: str, coworker: Union[str, None] = None, **kwargs):
"""Useful to ask a question, opinion or take from a co-worker passing all necessary context and names."""
coworker = coworker or kwargs.get("co_worker") or kwargs.get("co-worker")
is_list = coworker.startswith("[") and coworker.endswith("]")
if is_list:
coworker = coworker[1:-1].split(",")[0]
return self._execute(coworker, question, context)
Note that the coworker
parameter is optional. Seems like this was done so that the agent could call the function, passing the coworker as any of coworker
, co_worker
, or co-worker
named parameters (the latter two options being handled via kwargs
). But there's nothing in the definition of this function that forces one of the 3 forms to be passed, so the agent LLM likely sees this as truly optional and is ignoring it.
I just ran a quick test in which I modified the ask_question tool to require the coworker
parameter, and that did not seem to fix the issue. For some reason, the documentation provided to the LLM regarding the tool signature is not working. The LLM is still not passing all the correct params.
I have a similar issue with the same _askquestion function. The argument "coworker" is passed as a dict, even though the type signature is Union[str, None] and so fails in coworker.startswith("[") and coworker.endswith("]")
. This would appear to backup what @greg80303 is saying, in my case the LLM is passing a the wrong parameter. This was with mistral 0.3 running under Ollama.
so what i did that works is i camelCased the agent names.
so instead of Strategy Agent its strategyAgent
this Was working great :D however, suddenly its not. digging more.
so what i did that works is i camelCased the agent names.
so instead of Strategy Agent its strategyAgent
this Was working great :D however, suddenly its not. digging more.
This solution is temporarily working for me, thanks.
I think we should return missing parameters error for LLM instead raise an error: May be: coworker = coworker or kwargs.get("co_worker") or kwargs.get("co-worker") if not coworker: return "You must generate 'co-worker' parameter".
Is it ok ?
I solved it by adding the following to the start of task2:
Using the insights provided from task1
I have seen other examples having the 2nd task starting with:
Take the input from task 1 and do something with it.
I tried to add a prompt in my tasks: "If you use the ask_question tool, ensure to contain question, coworker, and context in the tool input." This solves the problem perfectly.
For anyone else reading this, the recent PR #712 above, released in crewai==0.32.2
has made a big improvement for me after facing this problem. I recommend upgrading if you're still having issues.
I solved it by adding the following to the start of task2:
Using the insights provided from task1
I have seen other examples having the 2nd task starting with:
Take the input from task 1 and do something with it.
Using this suggestion worked also for me. But, I had to do that for every task:
task1 <- task2 <- task3 <- task4
That would make it difficult to reuse tasks in different agents then as the task input may change from a situation to another. wdyt ?
The crew is chugging along then it failed
Code
I also tired
llama3
orgemma
using Ollama also failed.