mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-11 00:58:30 +00:00
fixing serply_api_tool
This commit is contained in:
@@ -7,7 +7,7 @@ from crewai_tools.tools.rag.rag_tool import RagTool
|
|||||||
|
|
||||||
|
|
||||||
class SerplyJobSearchToolSchema(BaseModel):
|
class SerplyJobSearchToolSchema(BaseModel):
|
||||||
"""Input for Serply Scholar Search."""
|
"""Input for Job Search."""
|
||||||
search_query: str = Field(..., description="Mandatory search query you want to use to fetch jobs postings.")
|
search_query: str = Field(..., description="Mandatory search query you want to use to fetch jobs postings.")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class SerplyScholarSearchToolSchema(BaseModel):
|
|||||||
|
|
||||||
class SerplyScholarSearchTool(BaseTool):
|
class SerplyScholarSearchTool(BaseTool):
|
||||||
name: str = "Scholar Search"
|
name: str = "Scholar Search"
|
||||||
description: str = "A tool to perform News article search with a search_query."
|
description: str = "A tool to perform scholarly literature search with a search_query."
|
||||||
args_schema: Type[BaseModel] = SerplyScholarSearchToolSchema
|
args_schema: Type[BaseModel] = SerplyScholarSearchToolSchema
|
||||||
search_url: str = "https://api.serply.io/v1/scholar/"
|
search_url: str = "https://api.serply.io/v1/scholar/"
|
||||||
hl: Optional[str] = "us"
|
hl: Optional[str] = "us"
|
||||||
@@ -29,7 +29,7 @@ class SerplyScholarSearchTool(BaseTool):
|
|||||||
"""
|
"""
|
||||||
param: hl (str): host Language code to display results in
|
param: hl (str): host Language code to display results in
|
||||||
(reference https://developers.google.com/custom-search/docs/xml_results?hl=en#wsInterfaceLanguages)
|
(reference https://developers.google.com/custom-search/docs/xml_results?hl=en#wsInterfaceLanguages)
|
||||||
proxy_location: (str): Where to get news, specifically for a specific country results.
|
proxy_location: (str): Specify the proxy location for the search, specifically for a specific country results.
|
||||||
['US', 'CA', 'IE', 'GB', 'FR', 'DE', 'SE', 'IN', 'JP', 'KR', 'SG', 'AU', 'BR'] (defaults to US)
|
['US', 'CA', 'IE', 'GB', 'FR', 'DE', 'SE', 'IN', 'JP', 'KR', 'SG', 'AU', 'BR'] (defaults to US)
|
||||||
"""
|
"""
|
||||||
super().__init__(**kwargs)
|
super().__init__(**kwargs)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ from crewai_tools.tools.rag.rag_tool import RagTool
|
|||||||
|
|
||||||
|
|
||||||
class SerplyWebpageToMarkdownToolSchema(BaseModel):
|
class SerplyWebpageToMarkdownToolSchema(BaseModel):
|
||||||
"""Input for Serply Scholar Search."""
|
"""Input for Serply Search."""
|
||||||
url: str = Field(..., description="Mandatory url you want to use to fetch and convert to markdown")
|
url: str = Field(..., description="Mandatory url you want to use to fetch and convert to markdown")
|
||||||
|
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ class SerplyWebpageToMarkdownTool(RagTool):
|
|||||||
**kwargs
|
**kwargs
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
proxy_location: (str): Where to get news, specifically for a specific country results.
|
proxy_location: (str): Where to perform the search, specifically for a specific country results.
|
||||||
['US', 'CA', 'IE', 'GB', 'FR', 'DE', 'SE', 'IN', 'JP', 'KR', 'SG', 'AU', 'BR'] (defaults to US)
|
['US', 'CA', 'IE', 'GB', 'FR', 'DE', 'SE', 'IN', 'JP', 'KR', 'SG', 'AU', 'BR'] (defaults to US)
|
||||||
"""
|
"""
|
||||||
super().__init__(**kwargs)
|
super().__init__(**kwargs)
|
||||||
|
|||||||
Reference in New Issue
Block a user