Package Methods (0.7.0)

Summary of entries of Methods for langchain-google-alloydb-pg.

langchain_google_alloydb_pg.engine._get_iam_principal_email

_get_iam_principal_email(credentials: google.auth.credentials.Credentials) -> str

Get email address associated with current authenticated IAM principal.

See more: langchain_google_alloydb_pg.engine._get_iam_principal_email

langchain_google_alloydb_pg.chat_message_history.AlloyDBChatMessageHistory

AlloyDBChatMessageHistory(
    key: object,
    engine: langchain_google_alloydb_pg.engine.AlloyDBEngine,
    history: langchain_google_alloydb_pg.async_chat_message_history.AsyncAlloyDBChatMessageHistory,
)

AlloyDBChatMessageHistory constructor.

See more: langchain_google_alloydb_pg.chat_message_history.AlloyDBChatMessageHistory

langchain_google_alloydb_pg.chat_message_history.AlloyDBChatMessageHistory.aadd_message

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

langchain_google_alloydb_pg.chat_message_history.AlloyDBChatMessageHistory.aadd_messages

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

Append a list of messages to the record in AlloyDB.

See more: langchain_google_alloydb_pg.chat_message_history.AlloyDBChatMessageHistory.aadd_messages

langchain_google_alloydb_pg.chat_message_history.AlloyDBChatMessageHistory.aclear

aclear() -> None

langchain_google_alloydb_pg.chat_message_history.AlloyDBChatMessageHistory.add_message

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

langchain_google_alloydb_pg.chat_message_history.AlloyDBChatMessageHistory.add_messages

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

Append a list of messages to the record in AlloyDB.

See more: langchain_google_alloydb_pg.chat_message_history.AlloyDBChatMessageHistory.add_messages

langchain_google_alloydb_pg.chat_message_history.AlloyDBChatMessageHistory.clear

clear() -> None

langchain_google_alloydb_pg.chat_message_history.AlloyDBChatMessageHistory.create

create(
    engine: langchain_google_alloydb_pg.engine.AlloyDBEngine,
    session_id: str,
    table_name: str,
    schema_name: str = "public",
) -> langchain_google_alloydb_pg.chat_message_history.AlloyDBChatMessageHistory

Create a new AlloyDBChatMessageHistory instance.

See more: langchain_google_alloydb_pg.chat_message_history.AlloyDBChatMessageHistory.create

langchain_google_alloydb_pg.chat_message_history.AlloyDBChatMessageHistory.create_sync

create_sync(
    engine: langchain_google_alloydb_pg.engine.AlloyDBEngine,
    session_id: str,
    table_name: str,
    schema_name: str = "public",
) -> langchain_google_alloydb_pg.chat_message_history.AlloyDBChatMessageHistory

Create a new AlloyDBChatMessageHistory instance.

See more: langchain_google_alloydb_pg.chat_message_history.AlloyDBChatMessageHistory.create_sync

langchain_google_alloydb_pg.engine.AlloyDBEngine

AlloyDBEngine(
    key: object,
    pool: sqlalchemy.ext.asyncio.engine.AsyncEngine,
    loop: typing.Optional[asyncio.events.AbstractEventLoop],
    thread: typing.Optional[threading.Thread],
)

AlloyDBEngine constructor.

See more: langchain_google_alloydb_pg.engine.AlloyDBEngine

langchain_google_alloydb_pg.engine.AlloyDBEngine._ainit_chat_history_table

_ainit_chat_history_table(table_name: str, schema_name: str = "public") -> None

Create an AlloyDB table to save chat history messages.

See more: langchain_google_alloydb_pg.engine.AlloyDBEngine._ainit_chat_history_table

langchain_google_alloydb_pg.engine.AlloyDBEngine._ainit_document_table

_ainit_document_table(
    table_name: str,
    schema_name: str = "public",
    content_column: str = "page_content",
    metadata_columns: typing.List[langchain_google_alloydb_pg.engine.Column] = [],
    metadata_json_column: str = "langchain_metadata",
    store_metadata: bool = True,
) -> None

Create a table for saving of langchain documents.

See more: langchain_google_alloydb_pg.engine.AlloyDBEngine._ainit_document_table

langchain_google_alloydb_pg.engine.AlloyDBEngine._ainit_vectorstore_table

_ainit_vectorstore_table(
    table_name: str,
    vector_size: int,
    schema_name: str = "public",
    content_column: str = "content",
    embedding_column: str = "embedding",
    metadata_columns: typing.List[langchain_google_alloydb_pg.engine.Column] = [],
    metadata_json_column: str = "langchain_metadata",
    id_column: typing.Union[
        str, langchain_google_alloydb_pg.engine.Column
    ] = "langchain_id",
    overwrite_existing: bool = False,
    store_metadata: bool = True,
) -> None

Create a table for saving of vectors to be used with AlloyDBVectorStore.

See more: langchain_google_alloydb_pg.engine.AlloyDBEngine._ainit_vectorstore_table

langchain_google_alloydb_pg.engine.AlloyDBEngine._aload_table_schema

_aload_table_schema(
    table_name: str, schema_name: str = "public"
) -> sqlalchemy.sql.schema.Table

Load table schema from an existing table in a PgSQL database, potentially from a specific database schema.

See more: langchain_google_alloydb_pg.engine.AlloyDBEngine._aload_table_schema

langchain_google_alloydb_pg.engine.AlloyDBEngine._create

_create(
    project_id: str,
    region: str,
    cluster: str,
    instance: str,
    database: str,
    ip_type: typing.Union[str, google.cloud.alloydb.connector.enums.IPTypes],
    user: typing.Optional[str] = None,
    password: typing.Optional[str] = None,
    loop: typing.Optional[asyncio.events.AbstractEventLoop] = None,
    thread: typing.Optional[threading.Thread] = None,
    iam_account_email: typing.Optional[str] = None,
) -> langchain_google_alloydb_pg.engine.AlloyDBEngine

Create an AlloyDBEngine from an AlloyDB instance.

See more: langchain_google_alloydb_pg.engine.AlloyDBEngine._create

langchain_google_alloydb_pg.engine.AlloyDBEngine._run_as_async

_run_as_async(
    coro: typing.Awaitable[langchain_google_alloydb_pg.engine.T],
) -> langchain_google_alloydb_pg.engine.T

Run an async coroutine asynchronously.

See more: langchain_google_alloydb_pg.engine.AlloyDBEngine._run_as_async

langchain_google_alloydb_pg.engine.AlloyDBEngine._run_as_sync

_run_as_sync(
    coro: typing.Awaitable[langchain_google_alloydb_pg.engine.T],
) -> langchain_google_alloydb_pg.engine.T

Run an async coroutine synchronously.

See more: langchain_google_alloydb_pg.engine.AlloyDBEngine._run_as_sync

langchain_google_alloydb_pg.engine.AlloyDBEngine.afrom_instance

afrom_instance(
    project_id: str,
    region: str,
    cluster: str,
    instance: str,
    database: str,
    user: typing.Optional[str] = None,
    password: typing.Optional[str] = None,
    ip_type: typing.Union[
        str, google.cloud.alloydb.connector.enums.IPTypes
    ] = IPTypes.PUBLIC,
    iam_account_email: typing.Optional[str] = None,
) -> langchain_google_alloydb_pg.engine.AlloyDBEngine

Create an AlloyDBEngine from an AlloyDB instance.

See more: langchain_google_alloydb_pg.engine.AlloyDBEngine.afrom_instance

langchain_google_alloydb_pg.engine.AlloyDBEngine.ainit_chat_history_table

ainit_chat_history_table(table_name: str, schema_name: str = "public") -> None

Create an AlloyDB table to save chat history messages.

See more: langchain_google_alloydb_pg.engine.AlloyDBEngine.ainit_chat_history_table

langchain_google_alloydb_pg.engine.AlloyDBEngine.ainit_document_table

ainit_document_table(
    table_name: str,
    schema_name: str = "public",
    content_column: str = "page_content",
    metadata_columns: typing.List[langchain_google_alloydb_pg.engine.Column] = [],
    metadata_json_column: str = "langchain_metadata",
    store_metadata: bool = True,
) -> None

Create a table for saving of langchain documents.

See more: langchain_google_alloydb_pg.engine.AlloyDBEngine.ainit_document_table

langchain_google_alloydb_pg.engine.AlloyDBEngine.ainit_vectorstore_table

ainit_vectorstore_table(
    table_name: str,
    vector_size: int,
    schema_name: str = "public",
    content_column: str = "content",
    embedding_column: str = "embedding",
    metadata_columns: typing.List[langchain_google_alloydb_pg.engine.Column] = [],
    metadata_json_column: str = "langchain_metadata",
    id_column: typing.Union[
        str, langchain_google_alloydb_pg.engine.Column
    ] = "langchain_id",
    overwrite_existing: bool = False,
    store_metadata: bool = True,
) -> None

Create a table for saving of vectors to be used with AlloyDBVectorStore.

See more: langchain_google_alloydb_pg.engine.AlloyDBEngine.ainit_vectorstore_table

langchain_google_alloydb_pg.engine.AlloyDBEngine.close

close() -> None

Dispose of connection pool.

See more: langchain_google_alloydb_pg.engine.AlloyDBEngine.close

langchain_google_alloydb_pg.engine.AlloyDBEngine.from_engine

from_engine(
    engine: sqlalchemy.ext.asyncio.engine.AsyncEngine,
    loop: typing.Optional[asyncio.events.AbstractEventLoop] = None,
) -> langchain_google_alloydb_pg.engine.AlloyDBEngine

Create an AlloyDBEngine instance from an AsyncEngine.

See more: langchain_google_alloydb_pg.engine.AlloyDBEngine.from_engine

langchain_google_alloydb_pg.engine.AlloyDBEngine.from_engine_args

from_engine_args(
    url: typing.Union[str, sqlalchemy.engine.url.URL], **kwargs: typing.Any
) -> langchain_google_alloydb_pg.engine.AlloyDBEngine

Create an AlloyDBEngine instance from arguments .

See more: langchain_google_alloydb_pg.engine.AlloyDBEngine.from_engine_args

langchain_google_alloydb_pg.engine.AlloyDBEngine.from_instance

from_instance(
    project_id: str,
    region: str,
    cluster: str,
    instance: str,
    database: str,
    user: typing.Optional[str] = None,
    password: typing.Optional[str] = None,
    ip_type: typing.Union[
        str, google.cloud.alloydb.connector.enums.IPTypes
    ] = IPTypes.PUBLIC,
    iam_account_email: typing.Optional[str] = None,
) -> langchain_google_alloydb_pg.engine.AlloyDBEngine

Create an AlloyDBEngine from an AlloyDB instance.

See more: langchain_google_alloydb_pg.engine.AlloyDBEngine.from_instance

langchain_google_alloydb_pg.engine.AlloyDBEngine.init_chat_history_table

init_chat_history_table(table_name: str, schema_name: str = "public") -> None

Create a Cloud SQL table to store chat history.

See more: langchain_google_alloydb_pg.engine.AlloyDBEngine.init_chat_history_table

langchain_google_alloydb_pg.engine.AlloyDBEngine.init_document_table

init_document_table(
    table_name: str,
    schema_name: str = "public",
    content_column: str = "page_content",
    metadata_columns: typing.List[langchain_google_alloydb_pg.engine.Column] = [],
    metadata_json_column: str = "langchain_metadata",
    store_metadata: bool = True,
) -> None

Create a table for saving of langchain documents.

See more: langchain_google_alloydb_pg.engine.AlloyDBEngine.init_document_table

langchain_google_alloydb_pg.engine.AlloyDBEngine.init_vectorstore_table

init_vectorstore_table(
    table_name: str,
    vector_size: int,
    schema_name: str = "public",
    content_column: str = "content",
    embedding_column: str = "embedding",
    metadata_columns: typing.List[langchain_google_alloydb_pg.engine.Column] = [],
    metadata_json_column: str = "langchain_metadata",
    id_column: typing.Union[
        str, langchain_google_alloydb_pg.engine.Column
    ] = "langchain_id",
    overwrite_existing: bool = False,
    store_metadata: bool = True,
) -> None

Create a table for saving of vectors to be used with AlloyDBVectorStore.

See more: langchain_google_alloydb_pg.engine.AlloyDBEngine.init_vectorstore_table

langchain_google_alloydb_pg.engine.Column.__post_init__

__post_init__() -> None

Check if initialization parameters are valid.

See more: langchain_google_alloydb_pg.engine.Column.post_init

langchain_google_alloydb_pg.indexes.BaseIndex.index_options

index_options() -> str

Set index query options for vector store initialization.

See more: langchain_google_alloydb_pg.indexes.BaseIndex.index_options

langchain_google_alloydb_pg.indexes.DistanceStrategy._generate_next_value_

_generate_next_value_(start, count, last_values)

Generate the next value when not given.

See more: langchain_google_alloydb_pg.indexes.DistanceStrategy.generate_next_value

langchain_google_alloydb_pg.indexes.HNSWIndex.index_options

index_options() -> str

Set index query options for vector store initialization.

See more: langchain_google_alloydb_pg.indexes.HNSWIndex.index_options

langchain_google_alloydb_pg.indexes.HNSWQueryOptions.to_string

to_string() -> str

Convert index attributes to string.

See more: langchain_google_alloydb_pg.indexes.HNSWQueryOptions.to_string

langchain_google_alloydb_pg.indexes.IVFFlatIndex.index_options

index_options() -> str

Set index query options for vector store initialization.

See more: langchain_google_alloydb_pg.indexes.IVFFlatIndex.index_options

langchain_google_alloydb_pg.indexes.IVFFlatQueryOptions.to_string

to_string() -> str

Convert index attributes to string.

See more: langchain_google_alloydb_pg.indexes.IVFFlatQueryOptions.to_string

langchain_google_alloydb_pg.indexes.IVFIndex.index_options

index_options() -> str

Set index query options for vector store initialization.

See more: langchain_google_alloydb_pg.indexes.IVFIndex.index_options

langchain_google_alloydb_pg.indexes.IVFQueryOptions.to_string

to_string() -> str

Convert index attributes to string.

See more: langchain_google_alloydb_pg.indexes.IVFQueryOptions.to_string

langchain_google_alloydb_pg.indexes.QueryOptions.to_string

to_string() -> str

Convert index attributes to string.

See more: langchain_google_alloydb_pg.indexes.QueryOptions.to_string

langchain_google_alloydb_pg.indexes.ScaNNIndex.index_options

index_options() -> str

Set index query options for vector store initialization.

See more: langchain_google_alloydb_pg.indexes.ScaNNIndex.index_options

langchain_google_alloydb_pg.indexes.ScaNNQueryOptions.to_string

to_string() -> str

Convert index attributes to string.

See more: langchain_google_alloydb_pg.indexes.ScaNNQueryOptions.to_string

langchain_google_alloydb_pg.loader.AlloyDBDocumentSaver

AlloyDBDocumentSaver(
    key: object,
    engine: langchain_google_alloydb_pg.engine.AlloyDBEngine,
    saver: langchain_google_alloydb_pg.async_loader.AsyncAlloyDBDocumentSaver,
)

AlloyDBDocumentSaver constructor.

See more: langchain_google_alloydb_pg.loader.AlloyDBDocumentSaver

langchain_google_alloydb_pg.loader.AlloyDBDocumentSaver.aadd_documents

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

Save documents in the DocumentSaver table.

See more: langchain_google_alloydb_pg.loader.AlloyDBDocumentSaver.aadd_documents

langchain_google_alloydb_pg.loader.AlloyDBDocumentSaver.add_documents

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

Save documents in the DocumentSaver table.

See more: langchain_google_alloydb_pg.loader.AlloyDBDocumentSaver.add_documents

langchain_google_alloydb_pg.loader.AlloyDBDocumentSaver.adelete

adelete(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_alloydb_pg.loader.AlloyDBDocumentSaver.adelete

langchain_google_alloydb_pg.loader.AlloyDBDocumentSaver.create

create(
    engine: langchain_google_alloydb_pg.engine.AlloyDBEngine,
    table_name: str,
    schema_name: str = "public",
    content_column: str = "page_content",
    metadata_columns: typing.List[str] = [],
    metadata_json_column: typing.Optional[str] = "langchain_metadata",
) -> langchain_google_alloydb_pg.loader.AlloyDBDocumentSaver

Create an AlloyDBDocumentSaver instance.

See more: langchain_google_alloydb_pg.loader.AlloyDBDocumentSaver.create

langchain_google_alloydb_pg.loader.AlloyDBDocumentSaver.create_sync

create_sync(
    engine: langchain_google_alloydb_pg.engine.AlloyDBEngine,
    table_name: str,
    schema_name: str = "public",
    content_column: str = "page_content",
    metadata_columns: typing.List[str] = [],
    metadata_json_column: str = "langchain_metadata",
) -> langchain_google_alloydb_pg.loader.AlloyDBDocumentSaver

Create an AlloyDBDocumentSaver instance.

See more: langchain_google_alloydb_pg.loader.AlloyDBDocumentSaver.create_sync

langchain_google_alloydb_pg.loader.AlloyDBDocumentSaver.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_alloydb_pg.loader.AlloyDBDocumentSaver.delete

langchain_google_alloydb_pg.loader.AlloyDBLoader

AlloyDBLoader(
    key: object,
    engine: langchain_google_alloydb_pg.engine.AlloyDBEngine,
    loader: langchain_google_alloydb_pg.async_loader.AsyncAlloyDBLoader,
)

AlloyDBLoader constructor.

See more: langchain_google_alloydb_pg.loader.AlloyDBLoader

langchain_google_alloydb_pg.loader.AlloyDBLoader.alazy_load

alazy_load() -> typing.AsyncIterator[langchain_core.documents.base.Document]

Load PostgreSQL data into Document objects lazily.

See more: langchain_google_alloydb_pg.loader.AlloyDBLoader.alazy_load

langchain_google_alloydb_pg.loader.AlloyDBLoader.aload

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

Load PostgreSQL data into Document objects.

See more: langchain_google_alloydb_pg.loader.AlloyDBLoader.aload

langchain_google_alloydb_pg.loader.AlloyDBLoader.create

create(
    engine: langchain_google_alloydb_pg.engine.AlloyDBEngine,
    query: typing.Optional[str] = None,
    table_name: typing.Optional[str] = None,
    schema_name: str = "public",
    content_columns: typing.Optional[typing.List[str]] = None,
    metadata_columns: typing.Optional[typing.List[str]] = None,
    metadata_json_column: typing.Optional[str] = None,
    format: typing.Optional[str] = None,
    formatter: typing.Optional[typing.Callable] = None,
) -> langchain_google_alloydb_pg.loader.AlloyDBLoader

Create a new AlloyDBLoader instance.

See more: langchain_google_alloydb_pg.loader.AlloyDBLoader.create

langchain_google_alloydb_pg.loader.AlloyDBLoader.create_sync

create_sync(
    engine: langchain_google_alloydb_pg.engine.AlloyDBEngine,
    query: typing.Optional[str] = None,
    table_name: typing.Optional[str] = None,
    schema_name: str = "public",
    content_columns: typing.Optional[typing.List[str]] = None,
    metadata_columns: typing.Optional[typing.List[str]] = None,
    metadata_json_column: typing.Optional[str] = None,
    format: typing.Optional[str] = None,
    formatter: typing.Optional[typing.Callable] = None,
) -> langchain_google_alloydb_pg.loader.AlloyDBLoader

Create a new AlloyDBLoader instance.

See more: langchain_google_alloydb_pg.loader.AlloyDBLoader.create_sync

langchain_google_alloydb_pg.loader.AlloyDBLoader.lazy_load

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

Load PostgreSQL data into Document objects lazily.

See more: langchain_google_alloydb_pg.loader.AlloyDBLoader.lazy_load

langchain_google_alloydb_pg.loader.AlloyDBLoader.load

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

Load PostgreSQL data into Document objects.

See more: langchain_google_alloydb_pg.loader.AlloyDBLoader.load

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore

AlloyDBVectorStore(
    key: object,
    engine: langchain_google_alloydb_pg.engine.AlloyDBEngine,
    vs: langchain_google_alloydb_pg.async_vectorstore.AsyncAlloyDBVectorStore,
)

AlloyDBVectorStore constructor.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore._select_relevance_score_fn

_select_relevance_score_fn() -> typing.Callable[[float], float]

Select a relevance function based on distance strategy.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore._select_relevance_score_fn

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.aadd_documents

aadd_documents(
    documents: typing.List[langchain_core.documents.base.Document],
    ids: typing.Optional[typing.List] = None,
    **kwargs: typing.Any
) -> typing.List[str]

Embed documents and add to the table.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.aadd_documents

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.aadd_embeddings

aadd_embeddings(
    texts: typing.Iterable[str],
    embeddings: typing.List[typing.List[float]],
    metadatas: typing.Optional[typing.List[dict]] = None,
    ids: typing.Optional[typing.List[str]] = None,
    **kwargs: typing.Any
) -> typing.List[str]

Add data along with embeddings to the table.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.aadd_embeddings

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.aadd_images

aadd_images(
    uris: typing.List[str],
    metadatas: typing.Optional[typing.List[dict]] = None,
    ids: typing.Optional[typing.List[str]] = None,
    **kwargs: typing.Any
) -> typing.List[str]

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.aadd_texts

aadd_texts(
    texts: typing.Iterable[str],
    metadatas: typing.Optional[typing.List[dict]] = None,
    ids: typing.Optional[typing.List] = None,
    **kwargs: typing.Any
) -> typing.List[str]

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.aapply_vector_index

aapply_vector_index(
    index: langchain_google_alloydb_pg.indexes.BaseIndex,
    name: typing.Optional[str] = None,
    concurrently: bool = False,
) -> None

Create an index on the vector store table.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.aapply_vector_index

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.add_documents

add_documents(
    documents: typing.List[langchain_core.documents.base.Document],
    ids: typing.Optional[typing.List] = None,
    **kwargs: typing.Any
) -> typing.List[str]

Embed documents and add to the table.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.add_documents

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.add_embeddings

add_embeddings(
    texts: typing.Iterable[str],
    embeddings: typing.List[typing.List[float]],
    metadatas: typing.Optional[typing.List[dict]] = None,
    ids: typing.Optional[typing.List[str]] = None,
    **kwargs: typing.Any
) -> typing.List[str]

Add data along with embeddings to the table.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.add_embeddings

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.add_images

add_images(
    uris: typing.List[str],
    metadatas: typing.Optional[typing.List[dict]] = None,
    ids: typing.Optional[typing.List[str]] = None,
    **kwargs: typing.Any
) -> typing.List[str]

Embed images and add to the table.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.add_images

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.add_texts

add_texts(
    texts: typing.Iterable[str],
    metadatas: typing.Optional[typing.List[dict]] = None,
    ids: typing.Optional[typing.List] = None,
    **kwargs: typing.Any
) -> typing.List[str]

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.adelete

adelete(
    ids: typing.Optional[typing.List] = None, **kwargs: typing.Any
) -> typing.Optional[bool]

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.adrop_vector_index

adrop_vector_index(index_name: typing.Optional[str] = None) -> None

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.afrom_documents

afrom_documents(
    documents: typing.List[langchain_core.documents.base.Document],
    embedding: langchain_core.embeddings.embeddings.Embeddings,
    engine: langchain_google_alloydb_pg.engine.AlloyDBEngine,
    table_name: str,
    schema_name: str = "public",
    ids: typing.Optional[typing.List] = None,
    content_column: str = "content",
    embedding_column: str = "embedding",
    metadata_columns: typing.List[str] = [],
    ignore_metadata_columns: typing.Optional[typing.List[str]] = None,
    id_column: str = "langchain_id",
    metadata_json_column: str = "langchain_metadata",
    distance_strategy: langchain_google_alloydb_pg.indexes.DistanceStrategy = DistanceStrategy.COSINE_DISTANCE,
    k: int = 4,
    fetch_k: int = 20,
    lambda_mult: float = 0.5,
    index_query_options: typing.Optional[
        langchain_google_alloydb_pg.indexes.QueryOptions
    ] = None,
    **kwargs: typing.Any
) -> langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore

Create an AlloyDBVectorStore instance from documents.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.afrom_documents

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.afrom_texts

afrom_texts(
    texts: typing.List[str],
    embedding: langchain_core.embeddings.embeddings.Embeddings,
    engine: langchain_google_alloydb_pg.engine.AlloyDBEngine,
    table_name: str,
    schema_name: str = "public",
    metadatas: typing.Optional[typing.List[dict]] = None,
    ids: typing.Optional[typing.List] = None,
    content_column: str = "content",
    embedding_column: str = "embedding",
    metadata_columns: typing.List[str] = [],
    ignore_metadata_columns: typing.Optional[typing.List[str]] = None,
    id_column: str = "langchain_id",
    metadata_json_column: str = "langchain_metadata",
    distance_strategy: langchain_google_alloydb_pg.indexes.DistanceStrategy = DistanceStrategy.COSINE_DISTANCE,
    k: int = 4,
    fetch_k: int = 20,
    lambda_mult: float = 0.5,
    index_query_options: typing.Optional[
        langchain_google_alloydb_pg.indexes.QueryOptions
    ] = None,
    **kwargs: typing.Any
) -> langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore

Create an AlloyDBVectorStore instance from texts.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.afrom_texts

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.ais_valid_index

ais_valid_index(index_name: typing.Optional[str] = None) -> bool

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.amax_marginal_relevance_search

amax_marginal_relevance_search(
    query: str,
    k: typing.Optional[int] = None,
    fetch_k: typing.Optional[int] = None,
    lambda_mult: typing.Optional[float] = None,
    filter: typing.Optional[str] = None,
    **kwargs: typing.Any
) -> typing.List[langchain_core.documents.base.Document]

Return docs selected using the maximal marginal relevance.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.amax_marginal_relevance_search

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.amax_marginal_relevance_search_by_vector

amax_marginal_relevance_search_by_vector(
    embedding: typing.List[float],
    k: typing.Optional[int] = None,
    fetch_k: typing.Optional[int] = None,
    lambda_mult: typing.Optional[float] = None,
    filter: typing.Optional[str] = None,
    **kwargs: typing.Any
) -> typing.List[langchain_core.documents.base.Document]

Return docs selected using the maximal marginal relevance.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.amax_marginal_relevance_search_by_vector

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.amax_marginal_relevance_search_with_score_by_vector

amax_marginal_relevance_search_with_score_by_vector(
    embedding: typing.List[float],
    k: typing.Optional[int] = None,
    fetch_k: typing.Optional[int] = None,
    lambda_mult: typing.Optional[float] = None,
    filter: typing.Optional[str] = None,
    **kwargs: typing.Any
) -> typing.List[typing.Tuple[langchain_core.documents.base.Document, float]]

Return docs and distance scores selected using the maximal marginal relevance.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.amax_marginal_relevance_search_with_score_by_vector

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.apply_vector_index

apply_vector_index(
    index: langchain_google_alloydb_pg.indexes.BaseIndex,
    name: typing.Optional[str] = None,
    concurrently: bool = False,
) -> None

Create an index on the vector store table.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.apply_vector_index

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.areindex

areindex(index_name: typing.Optional[str] = None) -> None

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.aset_maintenance_work_mem

aset_maintenance_work_mem(num_leaves: int, vector_size: int) -> None

Set database maintenance work memory (for ScaNN index creation).

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.aset_maintenance_work_mem

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.asimilarity_search

asimilarity_search(
    query: str,
    k: typing.Optional[int] = None,
    filter: typing.Optional[str] = None,
    **kwargs: typing.Any
) -> typing.List[langchain_core.documents.base.Document]

Return docs selected by similarity search on query.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.asimilarity_search

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.asimilarity_search_by_vector

asimilarity_search_by_vector(
    embedding: typing.List[float],
    k: typing.Optional[int] = None,
    filter: typing.Optional[str] = None,
    **kwargs: typing.Any
) -> typing.List[langchain_core.documents.base.Document]

Return docs selected by vector similarity search.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.asimilarity_search_by_vector

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.asimilarity_search_image

asimilarity_search_image(
    image_uri: str,
    k: typing.Optional[int] = None,
    filter: typing.Optional[str] = None,
    **kwargs: typing.Any
) -> typing.List[langchain_core.documents.base.Document]

Return docs selected by similarity search on query.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.asimilarity_search_image

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.asimilarity_search_with_score

asimilarity_search_with_score(
    query: str,
    k: typing.Optional[int] = None,
    filter: typing.Optional[str] = None,
    **kwargs: typing.Any
) -> typing.List[typing.Tuple[langchain_core.documents.base.Document, float]]

Return docs and distance scores selected by similarity search on query.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.asimilarity_search_with_score

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.asimilarity_search_with_score_by_vector

asimilarity_search_with_score_by_vector(
    embedding: typing.List[float],
    k: typing.Optional[int] = None,
    filter: typing.Optional[str] = None,
    **kwargs: typing.Any
) -> typing.List[typing.Tuple[langchain_core.documents.base.Document, float]]

Return docs and distance scores selected by vector similarity search.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.asimilarity_search_with_score_by_vector

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.create

create(
    engine: langchain_google_alloydb_pg.engine.AlloyDBEngine,
    embedding_service: langchain_core.embeddings.embeddings.Embeddings,
    table_name: str,
    schema_name: str = "public",
    content_column: str = "content",
    embedding_column: str = "embedding",
    metadata_columns: typing.List[str] = [],
    ignore_metadata_columns: typing.Optional[typing.List[str]] = None,
    id_column: str = "langchain_id",
    metadata_json_column: typing.Optional[str] = "langchain_metadata",
    distance_strategy: langchain_google_alloydb_pg.indexes.DistanceStrategy = DistanceStrategy.COSINE_DISTANCE,
    k: int = 4,
    fetch_k: int = 20,
    lambda_mult: float = 0.5,
    index_query_options: typing.Optional[
        langchain_google_alloydb_pg.indexes.QueryOptions
    ] = None,
) -> langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore

Create an AlloyDBVectorStore instance.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.create

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.create_sync

create_sync(
    engine: langchain_google_alloydb_pg.engine.AlloyDBEngine,
    embedding_service: langchain_core.embeddings.embeddings.Embeddings,
    table_name: str,
    schema_name: str = "public",
    content_column: str = "content",
    embedding_column: str = "embedding",
    metadata_columns: typing.List[str] = [],
    ignore_metadata_columns: typing.Optional[typing.List[str]] = None,
    id_column: str = "langchain_id",
    metadata_json_column: str = "langchain_metadata",
    distance_strategy: langchain_google_alloydb_pg.indexes.DistanceStrategy = DistanceStrategy.COSINE_DISTANCE,
    k: int = 4,
    fetch_k: int = 20,
    lambda_mult: float = 0.5,
    index_query_options: typing.Optional[
        langchain_google_alloydb_pg.indexes.QueryOptions
    ] = None,
) -> langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore

Create an AlloyDBVectorStore instance.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.create_sync

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.delete

delete(
    ids: typing.Optional[typing.List] = None, **kwargs: typing.Any
) -> typing.Optional[bool]

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.drop_vector_index

drop_vector_index(index_name: typing.Optional[str] = None) -> None

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.from_documents

from_documents(
    documents: typing.List[langchain_core.documents.base.Document],
    embedding: langchain_core.embeddings.embeddings.Embeddings,
    engine: langchain_google_alloydb_pg.engine.AlloyDBEngine,
    table_name: str,
    schema_name: str = "public",
    ids: typing.Optional[typing.List] = None,
    content_column: str = "content",
    embedding_column: str = "embedding",
    metadata_columns: typing.List[str] = [],
    ignore_metadata_columns: typing.Optional[typing.List[str]] = None,
    id_column: str = "langchain_id",
    metadata_json_column: str = "langchain_metadata",
    distance_strategy: langchain_google_alloydb_pg.indexes.DistanceStrategy = DistanceStrategy.COSINE_DISTANCE,
    k: int = 4,
    fetch_k: int = 20,
    lambda_mult: float = 0.5,
    index_query_options: typing.Optional[
        langchain_google_alloydb_pg.indexes.QueryOptions
    ] = None,
    **kwargs: typing.Any
) -> langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore

Create an AlloyDBVectorStore instance from documents.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.from_documents

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.from_texts

from_texts(
    texts: typing.List[str],
    embedding: langchain_core.embeddings.embeddings.Embeddings,
    engine: langchain_google_alloydb_pg.engine.AlloyDBEngine,
    table_name: str,
    schema_name: str = "public",
    metadatas: typing.Optional[typing.List[dict]] = None,
    ids: typing.Optional[typing.List] = None,
    content_column: str = "content",
    embedding_column: str = "embedding",
    metadata_columns: typing.List[str] = [],
    ignore_metadata_columns: typing.Optional[typing.List[str]] = None,
    id_column: str = "langchain_id",
    metadata_json_column: str = "langchain_metadata",
    distance_strategy: langchain_google_alloydb_pg.indexes.DistanceStrategy = DistanceStrategy.COSINE_DISTANCE,
    k: int = 4,
    fetch_k: int = 20,
    lambda_mult: float = 0.5,
    index_query_options: typing.Optional[
        langchain_google_alloydb_pg.indexes.QueryOptions
    ] = None,
    **kwargs: typing.Any
) -> langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore

Create an AlloyDBVectorStore instance from texts.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.from_texts

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.is_valid_index

is_valid_index(index_name: typing.Optional[str] = None) -> bool

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.max_marginal_relevance_search

max_marginal_relevance_search(
    query: str,
    k: typing.Optional[int] = None,
    fetch_k: typing.Optional[int] = None,
    lambda_mult: typing.Optional[float] = None,
    filter: typing.Optional[str] = None,
    **kwargs: typing.Any
) -> typing.List[langchain_core.documents.base.Document]

Return docs selected using the maximal marginal relevance.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.max_marginal_relevance_search

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.max_marginal_relevance_search_by_vector

max_marginal_relevance_search_by_vector(
    embedding: typing.List[float],
    k: typing.Optional[int] = None,
    fetch_k: typing.Optional[int] = None,
    lambda_mult: typing.Optional[float] = None,
    filter: typing.Optional[str] = None,
    **kwargs: typing.Any
) -> typing.List[langchain_core.documents.base.Document]

Return docs selected using the maximal marginal relevance.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.max_marginal_relevance_search_by_vector

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.max_marginal_relevance_search_with_score_by_vector

max_marginal_relevance_search_with_score_by_vector(
    embedding: typing.List[float],
    k: typing.Optional[int] = None,
    fetch_k: typing.Optional[int] = None,
    lambda_mult: typing.Optional[float] = None,
    filter: typing.Optional[str] = None,
    **kwargs: typing.Any
) -> typing.List[typing.Tuple[langchain_core.documents.base.Document, float]]

Return docs and distance scores selected using the maximal marginal relevance.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.max_marginal_relevance_search_with_score_by_vector

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.reindex

reindex(index_name: typing.Optional[str] = None) -> None

Re-index the vector store table.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.reindex

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.set_maintenance_work_mem

set_maintenance_work_mem(num_leaves: int, vector_size: int) -> None

Set database maintenance work memory (for ScaNN index creation).

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.set_maintenance_work_mem

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.similarity_search

similarity_search(
    query: str,
    k: typing.Optional[int] = None,
    filter: typing.Optional[str] = None,
    **kwargs: typing.Any
) -> typing.List[langchain_core.documents.base.Document]

Return docs selected by similarity search on query.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.similarity_search

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.similarity_search_by_vector

similarity_search_by_vector(
    embedding: typing.List[float],
    k: typing.Optional[int] = None,
    filter: typing.Optional[str] = None,
    **kwargs: typing.Any
) -> typing.List[langchain_core.documents.base.Document]

Return docs selected by vector similarity search.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.similarity_search_by_vector

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.similarity_search_image

similarity_search_image(
    image_uri: str,
    k: typing.Optional[int] = None,
    filter: typing.Optional[str] = None,
    **kwargs: typing.Any
) -> typing.List[langchain_core.documents.base.Document]

Return docs selected by similarity search on image.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.similarity_search_image

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.similarity_search_with_score

similarity_search_with_score(
    query: str,
    k: typing.Optional[int] = None,
    filter: typing.Optional[str] = None,
    **kwargs: typing.Any
) -> typing.List[typing.Tuple[langchain_core.documents.base.Document, float]]

Return docs and distance scores selected by similarity search on query.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.similarity_search_with_score

langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.similarity_search_with_score_by_vector

similarity_search_with_score_by_vector(
    embedding: typing.List[float],
    k: typing.Optional[int] = None,
    filter: typing.Optional[str] = None,
    **kwargs: typing.Any
) -> typing.List[typing.Tuple[langchain_core.documents.base.Document, float]]

Return docs and distance scores selected by similarity search on vector.

See more: langchain_google_alloydb_pg.vectorstore.AlloyDBVectorStore.similarity_search_with_score_by_vector