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 Brave Search document_loader #6989

Merged
merged 3 commits into from Jul 3, 2023
Merged

added Brave Search document_loader #6989

merged 3 commits into from Jul 3, 2023

Conversation

leo-gan
Copy link
Collaborator

@leo-gan leo-gan commented Jun 30, 2023

  • Added Brave Search document loader.
  • Refactored BraveSearch wrapper
  • Added a Jupyter Notebook example
  • Added Ecosystem/Integrations BraveSearch page

Please review:

@vercel
Copy link

vercel bot commented Jun 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Jul 2, 2023 11:17pm

@dosubot dosubot bot added 🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder 🤖:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features 🤖:improvement Medium size change to existing code to handle new use-cases labels Jun 30, 2023
@leo-gan leo-gan marked this pull request as ready for review June 30, 2023 18:31
Copy link
Collaborator

@rlancemartin rlancemartin left a comment

Choose a reason for hiding this comment

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

Thanks for adding. Nit:

Please update your current load method to lazy_load -

def lazy_load(self) -> Iterator[Document]:

And then simply add a new load method that calls lazy_load -

def load(self) -> List[Document]:
        """Loads a query result from Brave Search engine into a list of Documents."""
        return list(self.lazy_load())

@leo-gan
Copy link
Collaborator Author

leo-gan commented Jul 2, 2023

@rlancemartin Not sure, I got it. download_documents() returns a list not an iterable.
I can do lazy_load from it. But converting the list to iterable and then back to the list?

@rlancemartin
Copy link
Collaborator

rlancemartin commented Jul 2, 2023

@rlancemartin Not sure, I got it. download_documents() returns a list not an iterable.

I can do lazy_load from it. But converting the list to iterable and then back to the list?

Right. All of the new loaders have lazy_load method (useful in the case of loading a larger volume of docs since it returns a generator). But we keep load method for ease of use, which just calls lazy_load. You can see other examples such as this. It's a minor change.

@rlancemartin rlancemartin merged commit 200be43 into langchain-ai:master Jul 3, 2023
14 checks passed
@leo-gan leo-gan deleted the brave_document_loader branch July 3, 2023 02:11
bdonkey added a commit to bdonkey/langchain that referenced this pull request Jul 3, 2023
* master: (212 commits)
  Add SpacyEmbeddings class (langchain-ai#6967)
  docs: commented out `editUrl` option (langchain-ai#6440)
  Remove duplicate mongodb integration doc (langchain-ai#7006)
  Update get_started.mdx (langchain-ai#7005)
  openapi chain nit (langchain-ai#7012)
  Fix sample in FAISS section (langchain-ai#7050)
  Fix typo in google_places_api.py (langchain-ai#7055)
  move base prompt to schema (langchain-ai#6995)
  added `Brave Search` document_loader (langchain-ai#6989)
  Add JSON Lines support to JSONLoader (langchain-ai#6913)
  Vectara upd2 (langchain-ai#6506)
  docstrings `document_loaders` 2 (langchain-ai#6890)
  docstrings `document_loaders` 1 (langchain-ai#6847)
  Added filter and delete all option to delete function in Pinecone integration, updated base VectorStore's delete function (langchain-ai#6876)
  bump 221 (langchain-ai#7047)
  Rm retriever kwargs (langchain-ai#7013)
  Polish reference docs (langchain-ai#7045)
  Support params on GoogleSearchApiWrapper (langchain-ai#6810) (langchain-ai#7014)
  Fix typo (langchain-ai#7023)
  Fix openai multi functions agent docs (langchain-ai#7028)
  ...
vowelparrot pushed a commit that referenced this pull request Jul 4, 2023
- Added `Brave Search` document loader.
- Refactored BraveSearch wrapper
- Added a Jupyter Notebook example
- Added `Ecosystem/Integrations` BraveSearch page 

Please review:
  - DataLoaders / VectorStores / Retrievers: @rlancemartin, @eyurtsev
aerrober pushed a commit to aerrober/langchain-fork that referenced this pull request Jul 24, 2023
- Added `Brave Search` document loader.
- Refactored BraveSearch wrapper
- Added a Jupyter Notebook example
- Added `Ecosystem/Integrations` BraveSearch page 

Please review:
  - DataLoaders / VectorStores / Retrievers: @rlancemartin, @eyurtsev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder 🤖:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features 🤖:improvement Medium size change to existing code to handle new use-cases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants