Add args_schema to google_places tool (#5680)

Tiny change to actually add the args_schema to the tool.

@vowelparrot
searx_updates
George Roberts 12 months ago committed by GitHub
parent 8fea0529c1
commit 647210a4b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,6 +1,6 @@
"""Tool for the Google search API."""
from typing import Optional
from typing import Optional, Type
from pydantic import BaseModel, Field
@ -13,7 +13,7 @@ from langchain.utilities.google_places_api import GooglePlacesAPIWrapper
class GooglePlacesSchema(BaseModel):
query: str = Field(..., description="Query for goole maps")
query: str = Field(..., description="Query for google maps")
class GooglePlacesTool(BaseTool):
@ -27,6 +27,7 @@ class GooglePlacesTool(BaseTool):
"Input should be a search query."
)
api_wrapper: GooglePlacesAPIWrapper = Field(default_factory=GooglePlacesAPIWrapper)
args_schema: Type[BaseModel] = GooglePlacesSchema
def _run(
self,

Loading…
Cancel
Save