mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-01 04:29:09 +00:00
Add args_schema to google_places tool (#5680)
Tiny change to actually add the args_schema to the tool. @vowelparrot
This commit is contained in:
parent
8fea0529c1
commit
647210a4b9
@ -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…
Reference in New Issue
Block a user