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: support json output for bing-search #10904

Merged
merged 4 commits into from
Nov 21, 2024
Merged

Conversation

xu-song
Copy link
Contributor

@xu-song xu-song commented Nov 20, 2024

Summary

Support json output for bing-search

Example

option:
Screenshot 2024-11-21 at 09 38 02

result:

{
  "text": "",
  "files": [],
  "json": [
    {
      "organic": [
        {
          "title": "Nikola Tesla | Biography, Facts, & Inventions | Britannica",
          "snippet": "Nikola Tesla (born July 9/10, 1856, Smiljan, Austrian Empire [now in Croatia]—died January 7, 1943, New York, New York, U.S.) was a Serbian American inventor and engineer who discovered and patented the rotating magnetic field, the basis of most alternating-current machinery. He also developed the three-phase system of electric power transmission.",
          "url": "https://www.britannica.com/biography/Nikola-Tesla",
          "siteName": "Britannica"
        },
        {
          "title": "Nikola Tesla ‑ Inventions, Facts & Death - HISTORY",
          "snippet": "Nikola Tesla was a Serbian-American engineer and physicist who invented the AC motor and developed AC power technology. He had a rivalry with Thomas Edison, a partnership with George Westinghouse and a mysterious death in 1943.",
          "url": "https://www.history.com/topics/inventions/nikola-tesla",
          "siteName": "History"
        },
        {
          "title": "Tesla, Inc. | History, Cars, Elon Musk, & Facts | Britannica Money",
          "snippet": "Tesla, Inc. is an American manufacturer of electric vehicles, solar panels, and automobile batteries. It was founded in 2003 by American entrepreneurs Martin Eberhard and Marc Tarpenning and was named after Serbian American inventor Nikola Tesla. Elon Musk, an early investor in the company, became CEO in 2008.",
          "url": "https://www.britannica.com/money/Tesla-Motors",
          "siteName": "Britannica"
        },
        {
          "title": "Nikola Tesla: Biography, Inventor, Scientist, Engineer",
          "snippet": "Nikola Tesla invented the Tesla coil and alternating-current (AC) electricity. Read about his inventions, relationship with Thomas Edison, death ray, and death.",
          "url": "https://www.biography.com/inventors/nikola-tesla",
          "siteName": "Biography"
        },
        {
          "title": "Nikola Tesla – The Genius Who Lit the World and Saw the Future",
          "snippet": "Nikola Tesla was one of the most forward-thinking inventors and engineers in history whose pioneering work with electricity literally lit up the modern world. Though underappreciated in his own time, Tesla created hundreds of groundbreaking innovations that fundamentally advanced technology and changed the course of history.",
          "url": "https://www.historytools.org/people/nikola-tesla-complete-biography",
          "siteName": ""
        }
      ]
    }
  ]
}

Checklist

Important

Please review the checklist below before submitting your pull request.

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. 🔨 feat:tools Tools for agent, function call related stuff. labels Nov 20, 2024
@crazywoola
Copy link
Member

Please fix the lint errors.

@xu-song
Copy link
Contributor Author

xu-song commented Nov 20, 2024

lint errors have been fixed

@xu-song xu-song changed the title Support json output for bing-search Feat: support json output for bing-search Nov 21, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 21, 2024
@crazywoola crazywoola merged commit 8c2f62f into langgenius:main Nov 21, 2024
6 checks passed
aconeshana pushed a commit to aconeshana/dify that referenced this pull request Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 feat:tools Tools for agent, function call related stuff. lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants