I'm only porting DuckDuckGoSearchResults and not DuckDuckGoSearchRun. The main difference between them seems to be one returning JSON while other is returning string.
My tests with llama3 and mistral both seems to be able to extract information from JSON and return the correct response. Phi3 wasn't good at figuring it out. In the future we can easily add DuckDuckGoSearchRun if needed.
This introduces duck duck go search tool. Here is the langchain python equivalent. https://github.com/langchain-ai/langchain/blob/0214246dc69dd2d4e11fd567308f666c220cfb0d/libs/community/langchain_community/tools/ddg_search/tool.py#L43
I'm only porting DuckDuckGoSearchResults and not DuckDuckGoSearchRun. The main difference between them seems to be one returning JSON while other is returning string.
My tests with llama3 and mistral both seems to be able to extract information from JSON and return the correct response. Phi3 wasn't good at figuring it out. In the future we can easily add DuckDuckGoSearchRun if needed.