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:
Vini Brasil
2025-09-10 09:38:14 -03:00
committed by GitHub
parent cb8a1da730
commit 6f2301c945
7 changed files with 15 additions and 15 deletions

View File

@@ -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):

View File

@@ -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(
...,

View File

@@ -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):

View File

@@ -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):

View File

@@ -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):

View File

@@ -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):

View File

@@ -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):