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.key_value_store.init_key_value_store_table
init_key_value_store_table
(
instance_id
:
str
,
table_id
:
str
,
project_id
:
typing
.
Optional
[
str
]
=
None
,
client
:
typing
.
Optional
[
google
.
cloud
.
bigtable
.
client
.
Client
]
=
None
,
column_families
:
typing
.
List
[
str
]
=
[
"kv"
],
)
-
> None
Create a table for saving of LangChain Key-value pairs.
See more: langchain_google_bigtable.key_value_store.init_key_value_store_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
Write a message to the table.
See more: langchain_google_bigtable.chat_message_history.BigtableChatMessageHistory.add_message
langchain_google_bigtable.chat_message_history.BigtableChatMessageHistory.add_messages
add_messages
(
messages
:
typing
.
Sequence
[
langchain_core
.
messages
.
base
.
BaseMessage
],
)
-
> None
Write messages to the table.
See more: langchain_google_bigtable.chat_message_history.BigtableChatMessageHistory.add_messages
langchain_google_bigtable.chat_message_history.BigtableChatMessageHistory.clear
clear
()
-
> None
Clear session memory from DB.
See more: langchain_google_bigtable.chat_message_history.BigtableChatMessageHistory.clear
langchain_google_bigtable.engine.BigtableEngine
BigtableEngine
(
key
:
object
,
client
:
typing
.
Optional
[
google
.
cloud
.
bigtable
.
data
.
_async
.
client
.
BigtableDataClientAsync
],
loop
:
typing
.
Optional
[
asyncio
.
events
.
AbstractEventLoop
],
thread
:
typing
.
Optional
[
threading
.
Thread
],
)
Initializes the engine with a running event loop and a client.
langchain_google_bigtable.engine.BigtableEngine.__start_background_loop
__start_background_loop
(
project_id
:
typing
.
Optional
[
str
],
credentials
:
typing
.
Optional
[
google
.
auth
.
credentials
.
Credentials
]
=
None
,
client_options
:
typing
.
Optional
[
typing
.
Any
]
=
None
,
**
kwargs
:
typing
.
Any
)
-
> concurrent
.
futures
.
_base
.
Future
Creates and starts the default background loop and thread.
See more: langchain_google_bigtable.engine.BigtableEngine.__start_background_loop
langchain_google_bigtable.engine.BigtableEngine._create
_create
(
project_id
:
typing
.
Optional
[
str
]
=
None
,
loop
:
typing
.
Optional
[
asyncio
.
events
.
AbstractEventLoop
]
=
None
,
thread
:
typing
.
Optional
[
threading
.
Thread
]
=
None
,
client
:
typing
.
Optional
[
google
.
cloud
.
bigtable
.
data
.
_async
.
client
.
BigtableDataClientAsync
]
=
None
,
credentials
:
typing
.
Optional
[
google
.
auth
.
credentials
.
Credentials
]
=
None
,
client_options
:
typing
.
Optional
[
typing
.
Any
]
=
None
,
**
kwargs
:
typing
.
Any
)
-
> langchain_google_bigtable
.
engine
.
BigtableEngine
Asynchronously instantiates the BigtableEngine Object.
See more: langchain_google_bigtable.engine.BigtableEngine._create
langchain_google_bigtable.engine.BigtableEngine._run_as_async
_run_as_async
(
coro
:
typing
.
Any
)
-
> typing
.
Any
Runs a coroutine on the background loop without blocking the main loop.
See more: langchain_google_bigtable.engine.BigtableEngine._run_as_async
langchain_google_bigtable.engine.BigtableEngine._run_as_sync
_run_as_sync
(
coro
:
typing
.
Any
)
-
> typing
.
Any
Runs a coroutine on the background loop and waits for the result.
See more: langchain_google_bigtable.engine.BigtableEngine._run_as_sync
langchain_google_bigtable.engine.BigtableEngine.async_initialize
async_initialize
(
project_id
:
typing
.
Optional
[
str
]
=
None
,
credentials
:
typing
.
Optional
[
google
.
auth
.
credentials
.
Credentials
]
=
None
,
client_options
:
typing
.
Optional
[
typing
.
Any
]
=
None
,
**
kwargs
:
typing
.
Any
)
-
> langchain_google_bigtable
.
engine
.
BigtableEngine
Creates a BigtableEngine instance with a background event loop and a new data client asynchronously .
See more: langchain_google_bigtable.engine.BigtableEngine.async_initialize
langchain_google_bigtable.engine.BigtableEngine.close
close
()
-
> None
Closes the underlying client for this specific engine instance.
See more: langchain_google_bigtable.engine.BigtableEngine.close
langchain_google_bigtable.engine.BigtableEngine.get_async_table
get_async_table
(
instance_id
:
str
,
table_id
:
str
,
app_profile_id
:
typing
.
Optional
[
str
]
=
None
,
**
kwargs
:
typing
.
Any
)
-
> google
.
cloud
.
bigtable
.
data
.
_async
.
client
.
TableAsync
Returns the table using this class's client.
See more: langchain_google_bigtable.engine.BigtableEngine.get_async_table
langchain_google_bigtable.engine.BigtableEngine.initialize
initialize
(
project_id
:
typing
.
Optional
[
str
]
=
None
,
credentials
:
typing
.
Optional
[
google
.
auth
.
credentials
.
Credentials
]
=
None
,
client_options
:
typing
.
Optional
[
typing
.
Any
]
=
None
,
**
kwargs
:
typing
.
Any
)
-
> langchain_google_bigtable
.
engine
.
BigtableEngine
Creates a BigtableEngine instance with a background event loop and a new data client synchronously.
See more: langchain_google_bigtable.engine.BigtableEngine.initialize
langchain_google_bigtable.engine.BigtableEngine.shutdown_default_loop
shutdown_default_loop
()
-
> None
Closes the default class-level shared loop and terminates the thread associated with it.
See more: langchain_google_bigtable.engine.BigtableEngine.shutdown_default_loop
langchain_google_bigtable.key_value_store.BigtableByteStore._get_async_store
_get_async_store
(
**
kwargs
:
typing
.
Any
,
)
-
> langchain_google_bigtable
.
async_key_value_store
.
AsyncBigtableByteStore
Returns a AsyncBigtableByteStore object to be used for data operations.
See more: langchain_google_bigtable.key_value_store.BigtableByteStore._get_async_store
langchain_google_bigtable.key_value_store.BigtableByteStore.amdelete
amdelete
(
keys
:
typing
.
Sequence
[
str
])
-
> None
Asynchronously deletes key-value pairs from the Bigtable.
See more: langchain_google_bigtable.key_value_store.BigtableByteStore.amdelete
langchain_google_bigtable.key_value_store.BigtableByteStore.amget
amget
(
keys
:
typing
.
Sequence
[
str
])
-
> typing
.
List
[
typing
.
Optional
[
bytes
]]
Asynchronously retrieves values for a sequence of keys.
See more: langchain_google_bigtable.key_value_store.BigtableByteStore.amget
langchain_google_bigtable.key_value_store.BigtableByteStore.amset
amset
(
key_value_pairs
:
typing
.
Sequence
[
typing
.
Tuple
[
str
,
bytes
]])
-
> None
Asynchronously stores key-value pairs in the Bigtable.
See more: langchain_google_bigtable.key_value_store.BigtableByteStore.amset
langchain_google_bigtable.key_value_store.BigtableByteStore.ayield_keys
ayield_keys
(
*
,
prefix
:
typing
.
Optional
[
str
]
=
None
)
-
> typing
.
AsyncIterator
[
str
]
Asynchronously yields keys matching a given prefix.
See more: langchain_google_bigtable.key_value_store.BigtableByteStore.ayield_keys
langchain_google_bigtable.key_value_store.BigtableByteStore.create
create
(
instance_id
:
str
,
table_id
:
str
,
*
,
engine
:
typing
.
Optional
[
langchain_google_bigtable
.
engine
.
BigtableEngine
]
=
None
,
project_id
:
typing
.
Optional
[
str
]
=
None
,
app_profile_id
:
typing
.
Optional
[
str
]
=
None
,
column_family
:
str
=
"kv"
,
column_qualifier
:
typing
.
Union
[
str
,
bytes
]
=
b
"val"
,
credentials
:
typing
.
Optional
[
google
.
auth
.
credentials
.
Credentials
]
=
None
,
client_options
:
typing
.
Optional
[
typing
.
Dict
[
str
,
typing
.
Any
]]
=
None
,
**
kwargs
:
typing
.
Any
)
-
> langchain_google_bigtable
.
key_value_store
.
BigtableByteStore
Creates an async-initialized instance of the BigtableByteStore.
See more: langchain_google_bigtable.key_value_store.BigtableByteStore.create
langchain_google_bigtable.key_value_store.BigtableByteStore.create_sync
create_sync
(
instance_id
:
str
,
table_id
:
str
,
*
,
engine
:
typing
.
Optional
[
langchain_google_bigtable
.
engine
.
BigtableEngine
]
=
None
,
project_id
:
typing
.
Optional
[
str
]
=
None
,
app_profile_id
:
typing
.
Optional
[
str
]
=
None
,
column_family
:
str
=
"kv"
,
column_qualifier
:
typing
.
Union
[
str
,
bytes
]
=
b
"val"
,
credentials
:
typing
.
Optional
[
google
.
auth
.
credentials
.
Credentials
]
=
None
,
client_options
:
typing
.
Optional
[
typing
.
Dict
[
str
,
typing
.
Any
]]
=
None
,
**
kwargs
:
typing
.
Any
)
-
> langchain_google_bigtable
.
key_value_store
.
BigtableByteStore
Creates a sync-initialized instance of the BigtableByteStore.
See more: langchain_google_bigtable.key_value_store.BigtableByteStore.create_sync
langchain_google_bigtable.key_value_store.BigtableByteStore.get_engine
get_engine
()
-
> langchain_google_bigtable
.
engine
.
BigtableEngine
Returns the BigtableEngine being used for this object.
See more: langchain_google_bigtable.key_value_store.BigtableByteStore.get_engine
langchain_google_bigtable.key_value_store.BigtableByteStore.mdelete
mdelete
(
keys
:
typing
.
Sequence
[
str
])
-
> None
Synchronously deletes key-value pairs from the Bigtable.
See more: langchain_google_bigtable.key_value_store.BigtableByteStore.mdelete
langchain_google_bigtable.key_value_store.BigtableByteStore.mget
mget
(
keys
:
typing
.
Sequence
[
str
])
-
> typing
.
List
[
typing
.
Optional
[
bytes
]]
Synchronously retrieves values for a sequence of keys.
See more: langchain_google_bigtable.key_value_store.BigtableByteStore.mget
langchain_google_bigtable.key_value_store.BigtableByteStore.mset
mset
(
key_value_pairs
:
typing
.
Sequence
[
typing
.
Tuple
[
str
,
bytes
]])
-
> None
Synchronously stores key-value pairs in the Bigtable.
See more: langchain_google_bigtable.key_value_store.BigtableByteStore.mset
langchain_google_bigtable.key_value_store.BigtableByteStore.yield_keys
yield_keys
(
*
,
prefix
:
typing
.
Optional
[
str
]
=
None
)
-
> typing
.
Iterator
[
str
]
Synchronously yields keys matching a given prefix.
See more: langchain_google_bigtable.key_value_store.BigtableByteStore.yield_keys
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.
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.
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