Skip to content

Conversation

feiosme
Copy link

@feiosme feiosme commented May 29, 2025

  • Implement standardized search result schema (type/title/url/content) matching Tavily's output
  • Add multilingual documentation (en/zh/ru/pt/ja/es/de) for global developer accessibility

Result Format Standardization

  • Adopted Tavily-compatible JSON schema:
    {
      "type": "page",
      "title": "OpenAI GPT-4",
      "url": "https://openai.com",
      "content": "Latest AI model from OpenAI..."
    }
  • Added schema validation in CI pipeline

Compatibility Matrix

Feature SearxNG Tavily
Schema Format
Async Search
Multi-language
Self-hosted

@WillemJiang WillemJiang requested a review from Copilot June 27, 2025 01:23
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for the SearXNG search tool with a unified JSON results format while updating configuration, search tool integration, and documentation in multiple languages.

  • Introduces custom wrappers and result handlers for SearXNG.
  • Updates the search tool selector and configuration to include SearXNG.
  • Adds detailed documentation for SearXNG in various README files and updates the environment example.

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/tools/searxng_search/searxng_search_api_wrapper.py Implements custom synchronous and asynchronous wrappers for SearXNG with unified JSON formatting.
src/tools/search.py Integrates the new SearXNG search tool into the tool selector and adds a main test block.
src/graph/nodes.py Applies SearXNG as an option when the selected search engine is SearXNG.
src/config/tools.py Adds the SEARXNG entry to the search engine enum.
README_* files Updates multilingual documentation to include setup and usage instructions for SearXNG.
.env.example Adds an example environment variable for the SearXNG API URL.
Comments suppressed due to low confidence (1)

src/graph/nodes.py:73

  • [nitpick] Using 'format' as a parameter name can be confusing as it shadows a built-in function. Consider renaming it to something clearer like 'output_format'.
            format=json,

Comment on lines +82 to +85
print(json.dumps(results, indent=2, ensure_ascii=False))
results = LoggedDuckDuckGoSearch(
name="web_search", max_results=3, output_format="list"
)
Copy link
Preview

Copilot AI Jun 27, 2025

Choose a reason for hiding this comment

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

The variable 'results' is used in the print statement before it is assigned. Reorder the statements to assign 'results' before printing.

Suggested change
print(json.dumps(results, indent=2, ensure_ascii=False))
results = LoggedDuckDuckGoSearch(
name="web_search", max_results=3, output_format="list"
)
results = LoggedDuckDuckGoSearch(
name="web_search", max_results=3, output_format="list"
)
print(json.dumps(results, indent=2, ensure_ascii=False))

Copilot uses AI. Check for mistakes.

@mratsim
Copy link

mratsim commented Sep 29, 2025

#253 has been merged so it's likely that this PR is redundant.

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.

3 participants