Package Methods (0.4.0)

Summary of entries of Methods for langchain-google-bigtable.

langchain_google_bigtable.chat_message_history.init_chat_history_table

init_chat_history_table(
    instance_id: str,
    table_id: str,
    client: typing.Optional[google.cloud.bigtable.client.Client] = None,
) -> None

Create a table to store chat history.

See more: langchain_google_bigtable.chat_message_history.init_chat_history_table

langchain_google_bigtable.loader.init_document_table

init_document_table(
    instance_id: str,
    table_id: str,
    client: typing.Optional[google.cloud.bigtable.client.Client] = None,
    content_column_family: str = "langchain",
    metadata_mappings: typing.List[
        langchain_google_bigtable.loader.MetadataMapping
    ] = [],
    metadata_as_json_column_family: typing.Optional[str] = None,
) -> None

Create a table for saving of langchain documents.

See more: langchain_google_bigtable.loader.init_document_table

langchain_google_bigtable.chat_message_history.BigtableChatMessageHistory.add_message

add_message(message: langchain_core.messages.base.BaseMessage) -> None

langchain_google_bigtable.chat_message_history.BigtableChatMessageHistory.add_messages

add_messages(
    messages: typing.Sequence[langchain_core.messages.base.BaseMessage],
) -> None

langchain_google_bigtable.chat_message_history.BigtableChatMessageHistory.clear

clear() -> None

langchain_google_bigtable.loader.BigtableLoader

BigtableLoader(
    instance_id: str,
    table_id: str,
    row_set: typing.Optional[google.cloud.bigtable.row_set.RowSet] = None,
    filter: typing.Optional[google.cloud.bigtable.row_filters.RowFilter] = None,
    client: typing.Optional[google.cloud.bigtable.client.Client] = None,
    content_encoding: langchain_google_bigtable.loader.Encoding = Encoding.UTF8,
    content_column_family: str = "langchain",
    content_column_name: str = "content",
    metadata_mappings: typing.List[
        langchain_google_bigtable.loader.MetadataMapping
    ] = [],
    metadata_as_json_column_family: typing.Optional[str] = None,
    metadata_as_json_column_name: typing.Optional[str] = None,
    metadata_as_json_encoding: langchain_google_bigtable.loader.Encoding = Encoding.UTF8,
)

Initialize Bigtable document loader.

See more: langchain_google_bigtable.loader.BigtableLoader

langchain_google_bigtable.loader.BigtableLoader.lazy_load

lazy_load() -> typing.Iterator[langchain_core.documents.base.Document]

A lazy loader for Documents.

See more: langchain_google_bigtable.loader.BigtableLoader.lazy_load

langchain_google_bigtable.loader.BigtableLoader.load

load() -> typing.List[langchain_core.documents.base.Document]

Load data into Document objects.

See more: langchain_google_bigtable.loader.BigtableLoader.load

langchain_google_bigtable.loader.BigtableSaver

BigtableSaver(
    instance_id: str,
    table_id: str,
    client: typing.Optional[google.cloud.bigtable.client.Client] = None,
    content_encoding: langchain_google_bigtable.loader.Encoding = Encoding.UTF8,
    content_column_family: str = "langchain",
    content_column_name: str = "content",
    metadata_mappings: typing.List[
        langchain_google_bigtable.loader.MetadataMapping
    ] = [],
    metadata_as_json_column_family: typing.Optional[str] = None,
    metadata_as_json_column_name: typing.Optional[str] = None,
    metadata_as_json_encoding: langchain_google_bigtable.loader.Encoding = Encoding.UTF8,
)

Initialize Bigtable document saver.

See more: langchain_google_bigtable.loader.BigtableSaver

langchain_google_bigtable.loader.BigtableSaver.add_documents

add_documents(docs: typing.List[langchain_core.documents.base.Document]) -> None

Save documents in the DocumentSaver table.

See more: langchain_google_bigtable.loader.BigtableSaver.add_documents

langchain_google_bigtable.loader.BigtableSaver.delete

delete(docs: typing.List[langchain_core.documents.base.Document]) -> None

Delete all instances of a document from the DocumentSaver table by matching the entire Document object.

See more: langchain_google_bigtable.loader.BigtableSaver.delete