Build a Document Loader for Minio Object Store
Learn how to extend langchaingo to build custom solutions.
We'll cover the following...
The API-based approach in langchaingo
allows for the extension of its functionality through components that expose their features via interfaces. This includes LLMs, embedding models, document loaders, and more. While langchaingo
offers various implementations of these components, it also enables the integration of custom solutions to build unique generative AI applications.
Document loaders extract data from a configured source and convert it into a slice of schema.Document
objects. langchaingo
supports various loader implementations, including HTML, text, PDF, CSV, Notion, and more, with the potential for additional loaders in the future. In this lesson, we will walk through a document loader implementation for Minio, which is an S3-compatible object store. The extension will let us store files in Minio buckets as a data source for langchaingo
applications.
Below is the high-level architecture of the solution:
The contents of a chapter from the novel 'War and Peace' are stored as a document in Minio.
When a user interacts with the application and asks a question related to the chapter, the application loads the document from Minio, retrieves relevant information, and sends that as the context (along with the user query and prompt) to the LLM.
It returns the LLM response to the user.
Minio overview
Minio provides a distributed storage system designed to handle ...