crewAI icon indicating copy to clipboard operation
crewAI copied to clipboard

Error using crew_tools.tools with GPT-3.5-turbo: Missing required argument in method invocation.

Open stephenismay opened this issue 1 year ago • 1 comments

Description

In vanilla clone of https://github.com/joaomdmoura/crewAI-examples/commit/17c2f43a2c67b9f51696c3a9315e07ff90587020

When targeting the OpenAI model GPT-4, invoking methods from crew_tools.tools operates as expected without any issues.

However, switching the target to model GPT-3.5-turbo results in an error that prevents the tool's usage. As an example, when invoking WebsiteSearchTool._run() the error message suggests a missing required positional argument in WebsiteSearchTool._run() method.

Message is as follows: It seems we encountered an unexpected error while trying to use the tool. This was the error: WebsiteSearchTool._run() missing 1 required positional argument: 'search_query'

This issue is also replicated in methods SeperDevTool, and FileReadTool with error messages of the same format.

Environment

  • crewai 0.16.0
  • crewai-tools 0.0.12
  • GPT-3.5-turbo (currently targeting GPT-3.5-turbo-0125)).
  • Python 3.11
  • Windows 11 Pro 23H2

Steps to Reproduce

  1. Use environment variable OPENAI_MODEL_NAME to configure the target model.
  2. Configure the project to target OpenAI model GPT-4 (OPENAI_MODEL_NAME=gpt-4) and observe that crew_tools.tools work correctly.
  3. Switch the target model to GPT-3.5-turbo (OPENAI_MODEL_NAME=gpt-3.5-turbo).
  4. Attempt to use crew_tools.tools invoking either WebsiteSearchTool, or SeperDevTool, or FileReadTool
  5. As an example, when invoking WebsiteSearchTool The following error message is displayed: It seems we encountered an unexpected error while trying to use the tool. This was the error: WebsiteSearchTool._run() missing 1 required positional argument: 'search_query'.

Expected Behavior

crew_tools.tools should function correctly with both GPT-4 and GPT-3.5-turbo models without resulting in argument-related errors.

Actual Behavior

When targeting the GPT-3.5-turbo model, crew_tools.tools fails with an error indicating missing positional argument/s in the invoked methods WebsiteSearchTool, and SeperDevTool, and FileReadTool

stephenismay avatar Feb 28 '24 13:02 stephenismay

Seem like the problem have been resolved in v.0.19.0 , after rename from "SeperDevTool" to "SerperDevTool" ? it works for me under gpt 3.5 turbo.

Adamchanadam avatar Mar 09 '24 08:03 Adamchanadam

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Aug 20 '24 10:08 github-actions[bot]