A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://python.langchain.com/docs/integrations/document_loaders/singlestore/ below:

SingleStoreLoader | 🦜️🔗 LangChain

SingleStoreLoader

The SingleStoreLoader allows you to load documents directly from a SingleStore database table. It is part of the langchain-singlestore integration package.

Overview Integration Details Class Package JS Support SingleStoreLoader langchain_singlestore ❌ Features Setup

To use the SingleStoreLoader, you need to install the langchain-singlestore package. Follow the installation instructions below.

Installation

Install langchain_singlestore.

%pip install -qU langchain_singlestore
Initialization

To initialize SingleStoreLoader, you need to provide connection parameters for the SingleStore database and specify the table and fields to load documents from.

Required Parameters: Optional Parameters: Connection Pool Parameters: Additional Options:
from langchain_singlestore.document_loaders import SingleStoreLoader

loader = SingleStoreLoader(
host="127.0.0.1:3306/db",
table_name="documents",
content_field="content",
metadata_field="metadata",
id_field="id",
)
Load
docs = loader.load()
docs[0]
Lazy Load
page = []
for doc in loader.lazy_load():
page.append(doc)
if len(page) >= 10:



page = []
API reference

For detailed documentation of all SingleStore Document Loader features and configurations head to the github page: https://github.com/singlestore-labs/langchain-singlestore/


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4