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

[BUG] Unsupported data type when using PDFSearchTool #1448

Open
sorin-costea opened this issue Oct 15, 2024 · 0 comments
Open

[BUG] Unsupported data type when using PDFSearchTool #1448

sorin-costea opened this issue Oct 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@sorin-costea
Copy link

sorin-costea commented Oct 15, 2024

Description

I get this error:

I encountered an error while trying to use the tool. This was the error: Unsupported data type.
 Tool Search a PDF's content accepts these inputs: Search a PDF's content(query: 'string') - A tool that can be used to semantic search a query the my.pdf PDF's content. query: 'Mandatory query you want to use to search the PDF's content'
# Agent: Researcher...
## Thought: In order to ...
## Using tool: Search a PDF's content
## Tool Input:
"{\"query\": \"key skills and qualifications\"}"

Steps to Reproduce

The code I use is (fluff removed for clarity):

from crewai_tools import PDFSearchTool
my_file_tool = PDFSearchTool(config=azure_config, pdf='my.pdf')
my_researcher = Agent(
    role="Researcher...",
    goal="Make sure to...",
    backstory=("As a..."),
    tools=[job_file_tool],
    ...
)
my_task = Task(
    description=("Analyze..."),
    agent=my_researcher,
    tools=[my_file_tool],
    ...
)
crew_test = Crew(
    agents=[my_researcher],
    tasks=[my_task],
    process=Process.sequential,
    full_output=True,
    verbose=True
)

Expected behavior

As I cannot influence the format of what the agent sends to the tools, I'd expect the agent would send properly query=string. Could it be the config=... is messing up things?

Screenshots/Code snippets

The error is in the description above

Operating System

Windows 11

Python Version

3.12

crewAI Version

0.67.1

crewAI Tools Version

0.12.1

Virtual Environment

Poetry

Evidence

The error is in the description above

Possible Solution

None

Additional context

Same behaviour when I use the DOCXSearchTool, so there's either something I completely misunderstand, or worse.

@sorin-costea sorin-costea added the bug Something isn't working label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant