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 you.com integration #514

Merged
merged 13 commits into from
Oct 26, 2023
Merged

Conversation

sam-h-bean
Copy link
Contributor

@sam-h-bean sam-h-bean commented Oct 16, 2023

Add you.com as a search engine option

Before this PR, only Google was used as a search engine. With this PR, the search functionality gets generlized making it possible to choose between Google & You.com

Screenshot 2023-10-18 at 11 21 18

How to make You.com the selected search engine for chat-ui

  1. Get your you API key YDC_API_KEY (docs.you.com)
  2. Put it in your .env.local file of chat-ui

Screenshot of you.com being used as search engine for chat-ui
image

mrbean and others added 3 commits October 16, 2023 17:15
* feat: add types

* feat: specify search provider
* feat: add types

* feat: specify search provider

* add values for ui
@julien-c
Copy link
Member

[internal] some context in our internal Slack

@nsarrazin nsarrazin self-requested a review October 17, 2023 07:49
Copy link
Collaborator

@gary149 gary149 left a comment

Choose a reason for hiding this comment

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

Leaved a few comments but LGTM 👍

package.json Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
@mishig25
Copy link
Collaborator

@sam-h-bean created a PR against your branch sam-h-bean#4 on your fork

mrbean and others added 4 commits October 17, 2023 13:32
This reverts commit fbfe012.
* `npm run format`

* enable search when `YDC_API_KEY` is available

* typing nit

* enum WebSearchProvider

* eslint-disable-next-line no-shadow
@sam-h-bean
Copy link
Contributor Author

@sam-h-bean created a PR against your branch sam-h-bean#4 on your fork

merged

@davidli3100
Copy link
Contributor

Think this would still need some work to bypass the web scraping since we automatically provide the text snippets.
Maybe those snippets just need to be chunked?

@mishig25
Copy link
Collaborator

* Order desc you.com results by text length

* You.com already provides texts from webpages
Copy link
Collaborator

@mishig25 mishig25 left a comment

Choose a reason for hiding this comment

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

lgtm!

@mishig25
Copy link
Collaborator

@nsarrazin could you check the CI error?

@sam-h-bean
Copy link
Contributor Author

@nsarrazin could you check the CI error?

taken care of!

@julien-c
Copy link
Member

this is quite cool, we might switch the provider on our main instance hf.co/chat to you! 😁

We should coordinate on some comms if we do make this switch, WDYT?

.env Outdated Show resolved Hide resolved
Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>
@sam-h-bean
Copy link
Contributor Author

We should coordinate on some comms if we do make this switch, WDYT

Love this! ❤️

@sam-h-bean sam-h-bean requested a review from gary149 October 18, 2023 19:54
@mishig25
Copy link
Collaborator

mishig25 commented Oct 20, 2023

Evaluation of google vs you.com: Google Sheet

Copy link
Collaborator

@nsarrazin nsarrazin left a comment

Choose a reason for hiding this comment

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

PR looks good to me! Thanks for the contribution we'll be merging this now.

@nsarrazin nsarrazin merged commit 4606755 into huggingface:main Oct 26, 2023
2 checks passed
ice91 pushed a commit to ice91/chat-ui that referenced this pull request Oct 30, 2024
* add you.com integration

* [Feat] Add types  (huggingface#1)

* feat: add types

* feat: specify search provider

* [Feat] add return values (huggingface#3)

* feat: add types

* feat: specify search provider

* add values for ui

* add idea to gitignore

* lint and downgrade

* Revert "lint and downgrade"

This reverts commit fbfe012.

* Updates to you.com integration (huggingface#4)

* `npm run format`

* enable search when `YDC_API_KEY` is available

* typing nit

* enum WebSearchProvider

* eslint-disable-next-line no-shadow

* downgrade

* You.com already provides text snippets (huggingface#5)

* Order desc you.com results by text length

* You.com already provides texts from webpages

* add to env

* Update .env

Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>

* Update src/lib/server/websearch/searchWeb.ts

---------

Co-authored-by: David Li <david.li3100@gmail.com>
Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>
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.

6 participants