Package Methods (0.11.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_checkpoint_table

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

Create AlloyDB tables to save checkpoints.

See more: langchain_google_alloydb_pg.engine.AlloyDBEngine._ainit_checkpoint_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: 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: 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.alloydbconnector.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,
 engine_args: typing.Mapping = {},
) -> 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.alloydbconnector.enums.IPTypes
 ] = IPTypes.PUBLIC,
 iam_account_email: typing.Optional[str] = None,
 engine_args: typing.Mapping = {},
) -> 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_checkpoint_table

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

Create an AlloyDB table to save checkpoint messages.

See more: langchain_google_alloydb_pg.engine.AlloyDBEngine.ainit_checkpoint_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: 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: 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: 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.alloydbconnector.enums.IPTypes
 ] = IPTypes.PUBLIC,
 iam_account_email: typing.Optional[str] = None,
 engine_args: typing.Mapping = {},
) -> 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_checkpoint_table

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

Create Cloud SQL tables to store checkpoints.

See more: langchain_google_alloydb_pg.engine.AlloyDBEngine.init_checkpoint_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: 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: 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

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.