mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
Clarify tool support for both local and remote URLs (#447)
This commit updates tool prompts to explicitly highlight that some tools can accept both local file paths and remote URLs. The improved prompts ensure LLMs understand they may pass remote resources.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import Any, Optional, Type
|
||||
from typing import Optional, Type
|
||||
|
||||
from embedchain.models.data_type import DataType
|
||||
from pydantic import BaseModel, Field
|
||||
@@ -18,7 +18,7 @@ class FixedCSVSearchToolSchema(BaseModel):
|
||||
class CSVSearchToolSchema(FixedCSVSearchToolSchema):
|
||||
"""Input for CSVSearchTool."""
|
||||
|
||||
csv: str = Field(..., description="Mandatory csv path you want to search")
|
||||
csv: str = Field(..., description="File path or URL of a CSV file to be searched")
|
||||
|
||||
|
||||
class CSVSearchTool(RagTool):
|
||||
|
||||
@@ -10,7 +10,7 @@ class FixedDOCXSearchToolSchema(BaseModel):
|
||||
"""Input for DOCXSearchTool."""
|
||||
|
||||
docx: Optional[str] = Field(
|
||||
..., description="Mandatory docx path you want to search"
|
||||
..., description="File path or URL of a DOCX file to be searched"
|
||||
)
|
||||
search_query: str = Field(
|
||||
...,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from typing import Any, Optional, Type
|
||||
from typing import Optional, Type
|
||||
|
||||
from embedchain.models.data_type import DataType
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from ..rag.rag_tool import RagTool
|
||||
@@ -18,7 +17,9 @@ class FixedJSONSearchToolSchema(BaseModel):
|
||||
class JSONSearchToolSchema(FixedJSONSearchToolSchema):
|
||||
"""Input for JSONSearchTool."""
|
||||
|
||||
json_path: str = Field(..., description="Mandatory json path you want to search")
|
||||
json_path: str = Field(
|
||||
..., description="File path or URL of a JSON file to be searched"
|
||||
)
|
||||
|
||||
|
||||
class JSONSearchTool(RagTool):
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Any, Optional, Type
|
||||
from typing import Optional, Type
|
||||
|
||||
from embedchain.models.data_type import DataType
|
||||
from pydantic import BaseModel, Field
|
||||
@@ -18,7 +18,7 @@ class FixedMDXSearchToolSchema(BaseModel):
|
||||
class MDXSearchToolSchema(FixedMDXSearchToolSchema):
|
||||
"""Input for MDXSearchTool."""
|
||||
|
||||
mdx: str = Field(..., description="Mandatory mdx path you want to search")
|
||||
mdx: str = Field(..., description="File path or URL of a MDX file to be searched")
|
||||
|
||||
|
||||
class MDXSearchTool(RagTool):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from typing import Any, Optional, Type
|
||||
from typing import Optional, Type
|
||||
|
||||
from embedchain.models.data_type import DataType
|
||||
from pydantic import BaseModel, Field, model_validator
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from ..rag.rag_tool import RagTool
|
||||
|
||||
@@ -17,7 +17,7 @@ class FixedPDFSearchToolSchema(BaseModel):
|
||||
class PDFSearchToolSchema(FixedPDFSearchToolSchema):
|
||||
"""Input for PDFSearchTool."""
|
||||
|
||||
pdf: str = Field(..., description="Mandatory pdf path you want to search")
|
||||
pdf: str = Field(..., description="File path or URL of a PDF file to be searched")
|
||||
|
||||
|
||||
class PDFSearchTool(RagTool):
|
||||
|
||||
@@ -17,7 +17,7 @@ class FixedTXTSearchToolSchema(BaseModel):
|
||||
class TXTSearchToolSchema(FixedTXTSearchToolSchema):
|
||||
"""Input for TXTSearchTool."""
|
||||
|
||||
txt: str = Field(..., description="Mandatory txt path you want to search")
|
||||
txt: str = Field(..., description="File path or URL of a TXT file to be searched")
|
||||
|
||||
|
||||
class TXTSearchTool(RagTool):
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from typing import Any, Optional, Type
|
||||
from typing import Optional, Type
|
||||
|
||||
from embedchain.models.data_type import DataType
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from ..rag.rag_tool import RagTool
|
||||
@@ -18,7 +17,7 @@ class FixedXMLSearchToolSchema(BaseModel):
|
||||
class XMLSearchToolSchema(FixedXMLSearchToolSchema):
|
||||
"""Input for XMLSearchTool."""
|
||||
|
||||
xml: str = Field(..., description="Mandatory xml path you want to search")
|
||||
xml: str = Field(..., description="File path or URL of a XML file to be searched")
|
||||
|
||||
|
||||
class XMLSearchTool(RagTool):
|
||||
|
||||
Reference in New Issue
Block a user