Archived
1
0
Fork 0
This repository has been archived on 2024-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
akari-bot/modules/ask/tools/search.py
2023-04-21 20:08:50 +08:00

13 lines
587 B
Python

from langchain.utilities.duckduckgo_search import DuckDuckGoSearchAPIWrapper
from config import Config
from .utils import to_async_func, AkariTool
search = DuckDuckGoSearchAPIWrapper()
search_tool = AkariTool(
name = 'Search',
func=to_async_func(search.run),
description='A wrapper around DuckDuckGo Search. Useful for when you need to answer questions about current events. You should ask targeted questions and ask as few questions as possible. You can perform up to 3 queries, so do not search with the same keyword. Input should be a search query in any language.'
)