Tried to both perform Action and give a Final Answer at the same time, I must do one or the other

@Yash There can be two reasons:

  • Such an error can happen because of the LLM you’re using (source). Unfortunately, smaller LLMs sometimes struggle to work with CrewAI. Try to switch the LLM to a more capable one.
  • Such an error can happen because the task configuration is too long or strong (source), which changes some internal CrewAI keywords like action, thought, etc. Try to rephrase the task configuration.