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(tools): searXNG web search tool #286

Merged
merged 10 commits into from
Jan 22, 2025
Merged

feat(tools): searXNG web search tool #286

merged 10 commits into from
Jan 22, 2025

Conversation

michael-desmond
Copy link
Contributor

Which issue(s) does this pull-request address?

Introduces a searXNG web search tool. This provides a convenient option for locally deployed agents that require access to web search. No API key is required and the quality of the results are good.

https://github.com/searxng/searxng

Typical use case is that you spin up a searxng local docker container which provides an api endpoint. Agent can then make web searches using this tool to access the searxng api.

I didn't provide an associated test case because it would require a running searxng instance.

Checklist

  • I have read the contributor guide
  • I have signed off on my commit
  • Linting passes: yarn lint or yarn lint:fix
  • Formatting is applied: yarn format or yarn format:fix
  • Unit tests pass: yarn test:unit
  • E2E tests pass: yarn test:e2e
  • Tests are included
  • Documentation is changed or added
  • Commit messages and PR title follow conventional commits

Signed-off-by: MICHAEL DESMOND <mdesmond@us.ibm.com>
@michael-desmond michael-desmond requested a review from a team as a code owner January 17, 2025 17:21
Signed-off-by: MICHAEL DESMOND <mdesmond@us.ibm.com>
Signed-off-by: MICHAEL DESMOND <mdesmond@us.ibm.com>
@michael-desmond
Copy link
Contributor Author

@Tomas2D I believe I addressed your feedback. Thanks! I have some docs to go with this tool, see slack message.

Signed-off-by: MICHAEL DESMOND <mdesmond@us.ibm.com>
Signed-off-by: MICHAEL DESMOND <mdesmond@us.ibm.com>
@michael-desmond
Copy link
Contributor Author

Docs added.

Comment on lines +45 to +53
createSnapshot() {
return {
results: this.results,
};
}

loadSnapshot(snapshot: ReturnType<typeof this.createSnapshot>) {
Object.assign(this, snapshot);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

It can be removed SearchToolOutput does this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you elaborate on this one? As far as I can tell these methods are abstract and need to be implemented by subclass.

@Tomas2D Tomas2D merged commit 99334ff into main Jan 22, 2025
4 checks passed
@Tomas2D Tomas2D deleted the searxng branch January 22, 2025 22:09
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