mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-01 23:32:39 +00:00
cutting new version
This commit is contained in:
@@ -9,7 +9,7 @@ from ..rag.rag_tool import RagTool
|
|||||||
|
|
||||||
class FixedPDFSearchToolSchema(BaseModel):
|
class FixedPDFSearchToolSchema(BaseModel):
|
||||||
"""Input for PDFSearchTool."""
|
"""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):
|
class PDFSearchToolSchema(FixedPDFSearchToolSchema):
|
||||||
"""Input for PDFSearchTool."""
|
"""Input for PDFSearchTool."""
|
||||||
@@ -32,10 +32,10 @@ class PDFSearchTool(RagTool):
|
|||||||
|
|
||||||
def _run(
|
def _run(
|
||||||
self,
|
self,
|
||||||
search_query: str,
|
query: str,
|
||||||
**kwargs: Any,
|
**kwargs: Any,
|
||||||
) -> Any:
|
) -> Any:
|
||||||
pdf = kwargs.get('pdf', self.pdf)
|
pdf = kwargs.get('pdf', self.pdf)
|
||||||
self.app = App()
|
self.app = App()
|
||||||
self.app.add(pdf, data_type=DataType.PDF_FILE)
|
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