mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 16:48:30 +00:00
cutting new version
This commit is contained in:
@@ -9,7 +9,7 @@ from ..rag.rag_tool import RagTool
|
||||
|
||||
class FixedPDFSearchToolSchema(BaseModel):
|
||||
"""Input for PDFSearchTool."""
|
||||
search_query: str = Field(..., description="Mandatory search query you want to use to search the PDF's content")
|
||||
query: str = Field(..., description="Mandatory query you want to use to search the PDF's content")
|
||||
|
||||
class PDFSearchToolSchema(FixedPDFSearchToolSchema):
|
||||
"""Input for PDFSearchTool."""
|
||||
@@ -32,10 +32,10 @@ class PDFSearchTool(RagTool):
|
||||
|
||||
def _run(
|
||||
self,
|
||||
search_query: str,
|
||||
query: str,
|
||||
**kwargs: Any,
|
||||
) -> Any:
|
||||
pdf = kwargs.get('pdf', self.pdf)
|
||||
self.app = App()
|
||||
self.app.add(pdf, data_type=DataType.PDF_FILE)
|
||||
return super()._run(query=search_query)
|
||||
return super()._run(query=query)
|
||||
Reference in New Issue
Block a user