Module loader (0.11.0)

API documentation for loader module.

Classes

PostgresDocumentSaver

PostgresDocumentSaver(
    key: object,
    engine: langchain_google_cloud_sql_pg.engine.PostgresEngine,
    saver: langchain_google_cloud_sql_pg.async_loader.AsyncPostgresDocumentSaver,
)

A class for saving langchain documents into a PostgreSQL database table.

PostgresLoader

PostgresLoader(
    key: object,
    engine: langchain_google_cloud_sql_pg.engine.PostgresEngine,
    loader: langchain_google_cloud_sql_pg.async_loader.AsyncPostgresLoader,
)

Load documents from PostgreSQL`.

Each document represents one row of the result. The content_columns are written into the content_columnsof the document. The metadata_columns are written into the metadata_columns of the document. By default, first columns is written into the page_content and everything else into the metadata.