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

add web search #273

Closed
wants to merge 31 commits into from
Closed

add web search #273

wants to merge 31 commits into from

Conversation

zhiyu-01
Copy link
Contributor

@zhiyu-01 zhiyu-01 commented Sep 3, 2023

Description

Search web for information.
When agent ask a question, google search can provide a list of urls which relative with the question, then using requests to get
each url and extract text. Split the text to small chunks and feed to chatgpt to get answer.

Notice: these functions require google api key you can find here https://developers.google.com/custom-search/v1/overview,
and search engine id you can find here https://cse.google.com/cse/all.

So, can anyone add these two key into the github actions, my pr need them to pass the test, thanks!
They look like this:

GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY")
SEARCH_ENGINE_ID = os.getenv("SEARCH_ENGINE_ID")

Motivation and Context

Why is this change required? What problem does it solve?
Give the agent ability to search internet.

  • I have raised an issue to propose this change (required for new features and bug fixes)

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds core functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (update in the documentation)
  • Example (update in the folder of example)

Implemented Tasks

  • Subtask 1
  • Subtask 2
  • Subtask 3

Checklist

Go over all the following points, and put an x in all the boxes that apply.
If you are unsure about any of these, don't hesitate to ask. We are here to help!

  • I have read the CONTRIBUTION guide. (required)
  • My change requires a change to the documentation.
  • I have updated the tests accordingly. (required for a bug fix or a new feature)
  • I have updated the documentation accordingly.

@zhiyu-01 zhiyu-01 closed this Sep 3, 2023
@Benjamin-eecs
Copy link
Member

I think this pr is awesome! Any reason why you close this?

@HalberdOfPineapple
Copy link
Member

I have just noticed this new PR but before reviewing I think it would be better for you to do local cheks first before committing and pushing. It sends quite a lot of emails into my inboxes... And may I ask why you close this?

@zhiyu-01
Copy link
Contributor Author

zhiyu-01 commented Sep 3, 2023

I think this pr is awesome! Any reason why you close this?

This pr is submmit from my fork, it can't use sercet api key, so I opened another pr #274 from a branch.

@zhiyu-01
Copy link
Contributor Author

zhiyu-01 commented Sep 3, 2023

I have just noticed this new PR but before reviewing I think it would be better for you to do local cheks first before committing and pushing. It sends quite a lot of emails into my inboxes... And may I ask why you close this?

sorry about that, i met a wierd error. Everything goes well in my laptap, but get wrong in github, it said i give a 'function' type, but expect 'Callable' type, i dont know why, so i try to delete some functions.

@zhiyu-01
Copy link
Contributor Author

zhiyu-01 commented Sep 3, 2023

I have just noticed this new PR but before reviewing I think it would be better for you to do local cheks first before committing and pushing. It sends quite a lot of emails into my inboxes... And may I ask why you close this?

This pr is submmit from my fork, it can't use sercet api key, so I opened another pr #274 from a branch.

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.

None yet

3 participants