mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-18 14:34:23 +01:00
unify annotations to future syntax
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"""Google search command for Autogpt."""
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
from typing import List, Union
|
||||
|
||||
from duckduckgo_search import ddg
|
||||
|
||||
@@ -33,7 +34,7 @@ def google_search(query: str, num_results: int = 8) -> str:
|
||||
return json.dumps(search_results, ensure_ascii=False, indent=4)
|
||||
|
||||
|
||||
def google_official_search(query: str, num_results: int = 8) -> Union[str, List[str]]:
|
||||
def google_official_search(query: str, num_results: int = 8) -> str | list[str]:
|
||||
"""Return the results of a google search using the official Google API
|
||||
|
||||
Args:
|
||||
|
||||
Reference in New Issue
Block a user