This commit adds a new tool that can be used to search the internet for information similar to BingSearch. The tool uses the Google Serper API to perform the search.
Example output from crates/llm-chain-openai/examples/self_ask_with_google_search.rs:
$ cargo r --example self_ask_with_google_search
Compiling llm-chain-openai v0.12.3 (/home/danielbevenius/work/ai/llm-chain/crates/llm-chain-openai)
Finished dev [unoptimized + debuginfo] target(s) in 5.04s
Running `target/debug/examples/self_ask_with_google_search`
Are followup questions needed here: Yes.
Follow up: Where was Levy Mwanawasa born?
Intermediate answer: Levy Mwanawasa was a member of the Lenje tribe and was educated at Chiwala Secondary School in Ndola. He read law at the University of Zambia in Lusaka from ...
Follow up: What is the capital of Zambia?
Intermediate answer: And viewed from the villages, Lusaka is the glittering capital which still persuades rural Zambians to migrate to the city in search of jobs and dreams. Most ...
Agent final answer: Lusaka.
I've not been able to get a Bing API key as there seems to be some issue with their phone verification at the moment, so I've not been able to compare this output to the Bing example.
This commit adds a new tool that can be used to search the internet for information similar to BingSearch. The tool uses the Google Serper API to perform the search.
Example output from
crates/llm-chain-openai/examples/self_ask_with_google_search.rs
:I've not been able to get a Bing API key as there seems to be some issue with their phone verification at the moment, so I've not been able to compare this output to the Bing example.