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

🔍 Added Bing Search Plugin #2298

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

itzraiss
Copy link
Contributor

@itzraiss itzraiss commented Apr 3, 2024

Summary

Added the Bing Search plugin, now enabling users to utilize both Bing and Google for conducting internet searches on both the Plugins and Assistants endpoints. Additionally, instructions have been added to the documentation for obtaining the responsible API.

Change Type

Please delete any irrelevant options.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update
  • Documentation update

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have made pertinent documentation changes
  • I have written tests demonstrating that my changes are effective or that my feature works
  • New documents have been locally validated with mkdocs

Plugin:

recording-2024-04-03-10-20-29.mp4

Asssitants:
image

Plugin:
image

@itzraiss itzraiss marked this pull request as draft April 3, 2024 15:20
@itzraiss
Copy link
Contributor Author

itzraiss commented Apr 3, 2024

I still lack experience in programming; much of the code I've used as a basis is derived from existing sources (GoogleSearch). If the pull request is deemed relevant and useful for implementation in LibreChat, I'd appreciate assistance in rectifying these errors. 😅

@kneelesh48
Copy link
Contributor

This is good keep going

rankingResponse,
};

return JSON.stringify(results);
Copy link

Choose a reason for hiding this comment

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

The webPages object is a list of search hits with "snippets", really short extracts of the found pages [1].

It looks to me like this code will only pass back these snippets to the OpenAI Assistants API, and not the full page contents, or did I misunderstand?

Usually with the previous API, you would have to scrape each of the pages and extract important contents with readability.js before passing that back as the response.

[1] https://learn.microsoft.com/en-us/bing/search-apis/bing-web-search/search-responses#webpages-answer

@cpbotha
Copy link

cpbotha commented Apr 8, 2024

This tool would be really great. Bing Web Search has a free tier which would work well for many users.

I am not the reviewer, just an external interested party, and have left a single comment (so far).

I have also briefly looked into your failing unit test, but can't see why it's failing with toolFunctions[testPluginKey] not being a function. Looks like it should be there, plus it's analogous to the GoogleSearch tool test.

I hope @danny-avila can take a look?

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