Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add google serper (search) tool #221

Merged
merged 4 commits into from
Oct 19, 2023

Conversation

danbev
Copy link
Contributor

@danbev danbev commented Oct 18, 2023

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.

Signed-off-by: Daniel Bevenius <[email protected]>
This commit attempts to fix the formatting issues that were found by
the format_check job.

Signed-off-by: Daniel Bevenius <[email protected]>
This commit contains the result of running `cargo update -p crate` for
all the warnings reported by cargo deny.

Signed-off-by: Daniel Bevenius <[email protected]>
Copy link
Contributor

@williamhogman williamhogman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM let me know if you intend to make anymore changes

@danbev
Copy link
Contributor Author

danbev commented Oct 19, 2023

LGTM let me know if you intend to make anymore changes

I don't intend to make anymore changes, thanks!

@williamhogman williamhogman merged commit c423f22 into sobelio:main Oct 19, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants