mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-04-29 10:56:22 +02:00
add discovery_service_url for GoogleAPIWrapper
This commit is contained in:
parent
f9eb9cb7d2
commit
9b360265a9
2 changed files with 4 additions and 1 deletions
|
|
@ -26,6 +26,8 @@ class GoogleAPIWrapper(BaseModel):
|
|||
|
||||
api_key: str
|
||||
cse_id: str
|
||||
discovery_service_url: Optional[str] = None
|
||||
|
||||
loop: Optional[asyncio.AbstractEventLoop] = None
|
||||
executor: Optional[futures.Executor] = None
|
||||
proxy: Optional[str] = None
|
||||
|
|
@ -56,7 +58,7 @@ class GoogleAPIWrapper(BaseModel):
|
|||
|
||||
@property
|
||||
def google_api_client(self):
|
||||
build_kwargs = {"developerKey": self.api_key}
|
||||
build_kwargs = {"developerKey": self.api_key, "discoveryServiceUrl": self.discovery_service_url}
|
||||
if self.proxy:
|
||||
parse_result = urlparse(self.proxy)
|
||||
proxy_type = parse_result.scheme
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue