feat: add playground notebook for the vector store#191
feat: add playground notebook for the vector store#191mic-k3y merged 95 commits intogoogleapis:mainfrom
Conversation
…context Added the engine class that manages the client and execution context which handles the async and sync conversion via a background event loop. Added a test file for the engine class.
…tion Removes the option to pre-instantiate and pass a BigtableDataClientAsync to the BigtableEngine. The engine now creates its own client instance, making it more self-contained.
Adjusted test cases and assertions to align with the recent modifications in the BigtableEngine class API and behavior.
This change introduces BigtableEngine.async_initialize for non-blocking asynchronous initialization.
…n LangChain's key-value store. This commit introduces the `AsyncBigtableByteStore` class. This class is designed to handle setting, getting, deleting, and yielding keys asynchronously. It will be used by the main public-facing `BigtableByteStore` for all the data operations on the table. It also includes a test suite.
The `shutdown_default_loop` method was not closing the asyncio event loop, only that class level variables were reassigned. This commit adds a line that closes the loop when the thread is successfully terminated.
# Conflicts: # src/langchain_google_bigtable/engine.py # tests/test_engine.py
The `shutdown_default_loop` method was not closing the asyncio event loop, only that class level variables were reassigned. This commit adds a line that closes the loop when the thread is successfully terminated.
…context (googleapis#163) * feat: add BigtableEngine Class for managing the client and execution context Added the engine class that manages the client and execution context which handles the async and sync conversion via a background event loop. Added a test file for the engine class. * fix(engine): update BigtableEngine setup by internalizing client creation Removes the option to pre-instantiate and pass a BigtableDataClientAsync to the BigtableEngine. The engine now creates its own client instance, making it more self-contained. * test(engine): update tests to match BigtableEngine class changes Adjusted test cases and assertions to align with the recent modifications in the BigtableEngine class API and behavior. * style(engine): update test_engine.py and engine.py format * test(engine): add tests for async_initialize workflow * feat(engine): add async_initialize factory and shared loop management This change introduces BigtableEngine.async_initialize for non-blocking asynchronous initialization. * style(engine): update test_engine.py
# Conflicts: # src/langchain_google_bigtable/async_key_value_store.py
…lementation. This class will be used for interacting with LangChain's key-value store for Bigtable. It contains methods that add, delete, get, and yield key-value pairs from the store. It's an implementation of LangChain's BaseStore(ByteStore) abstract interface. This commit also contains comprehensive test suites. It also contains a change for the table creation fixture for the engine test, simplifying it from previous approach.
… raises error. address error handling test compatibility for Python 3.9
feat: add BigtableVectorStore Playground notebook. fix: make sure the typing_extensions is supported across all python versions supported by this library feat: change documentation for the library fix: update vector_store.ipynb fix: update vector_store.ipynb fix: update vector_store.ipynb feat: add BigtableVectorStore Playground notebook. fix: update vector_store.ipynb
feat: update documentation for the library
feat: update documentation for the library feat: update documentation for the library
# Conflicts: # README.rst
| @@ -0,0 +1,769 @@ | |||
| { | |||
There was a problem hiding this comment.
Nit: the title is Google Bigtable, does it need to be more descriptive?
There was a problem hiding this comment.
The other integrations only had their name, so I kept it for consistency.
docs/vector_store.ipynb
Outdated
| { | ||
| "cell_type": "markdown", | ||
| "source": [ | ||
| "## Embedding Service Setup" |
There was a problem hiding this comment.
Nit: Maybe a short blurb explaining embedding service
georgecma
left a comment
There was a problem hiding this comment.
2 nit comments but otherwise it covers vector store use cases well.
docs/vector_store.ipynb
Outdated
| " search_type=\"mmr\",\n", | ||
| " search_kwargs={\n", | ||
| " \"k\": 2,\n", | ||
| " \"lambda_mult\": 0.8, # prioritizes similarity over diversity\n", |
There was a problem hiding this comment.
mmr would be diversity over priority no?
There was a problem hiding this comment.
I left the comment to explain what the 0.8 value would represent. I think that might be misleading actually. I just changed it to 0.2 and wrote prioritizes diversity over similarity.
docs/vector_store.ipynb
Outdated
| "`BigtableVectorStore` supports three main categories of filters to refine your search:\n", | ||
| "\n", | ||
| "* **Row Key (Document ID) Filters**:\n", | ||
| " * `RowKeyFilter`: Narrows the search to document IDs with a specific prefix.\n", |
There was a problem hiding this comment.
can we mention that document ID filter is always applied? Maybe something like "Narrows the search to document IDs and a specific row prefix. The document ID filter is always applied by default."
…lementation (googleapis#176) This class will be used for interacting with LangChain's key-value store for Bigtable. It contains methods that add, delete, get, and yield key-value pairs from the store. It's an implementation of LangChain's BaseStore(ByteStore) abstract interface. This commit also contains comprehensive test suites. It also contains a change for the table creation fixture for the engine test, simplifying it from previous approach. chore(main): release 0.5.0 (googleapis#167) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> feat: add playground notebook for key-value store (googleapis#179) * feat: add playground notebook for key-value store This commit adds a notebook for how to use key-value stores. * fix: update embedding model used in key_value_store notebook This commit also updates the embedding model used for playground notebook. * fix: update readme.rst file * fix: address PR comments for the notebook chore(main): release 0.6.0 (googleapis#182) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> initial get_table and execute_query implementation feat: add `AsyncBigtableVectorStore` Class for the async-only vector value store implementation (googleapis#186) * feat: add AsyncBigtableVectorStore Class for the async-only vector value store implementation This commit adds the async-only vector store class that handles the underlying data operations for the main vector store class along with its test files. * fix: include comments on the key-value store usage cells Included comments explaining how the embedding cache key-value store works. * fix: include comments on the key-value store usage cells Included comments explaining how the embedding cache key-value store works. * fix: header date for async_vector_store.py fix: include comments on the key-value store usage cells Included comments explaining how the embedding cache key-value store works. * fix: typing for tests and async vector store class fix: add os environment function for the tests * fix: isort for imports for test files * fix: revert removed test_async_key_value_store.py file. * fix: address PR comments * fix: address PR comments * fix: address PR comments * fix: address PR comments * fix: address PR comments * fix: address PR comments * fix: address PR comments * fix: add check to make sure each document has an ID. feat: add `BigtableVectorStore` Class for LangChain Vector Store integration (googleapis#189) * feat: add `BigtableVectorStore` class for Bigtable <> LangChain Vector Store integration. * feat: add `BigtableVectorStore` class for Bigtable <> LangChain Vector Store integration. * fix: isort imports for test file. * fix: fixture return types. * chore: add more test cases * fix: remove await from sync store test suite * fix: reformat test_vector_store.py * fix: address PR comments. chore(main): release 0.7.0 (googleapis#187) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> feat: add playground notebook for the vector store (googleapis#191) * feat: add BigtableVectorStore Playground notebook. * feat: add BigtableVectorStore Playground notebook. fix: update vector_store.ipynb * fix: update vector_store.ipynb * fix: update vector_store.ipynb * fix: update vector_store.ipynb * feat: change documentation for the library feat: add BigtableVectorStore Playground notebook. fix: make sure the typing_extensions is supported across all python versions supported by this library feat: change documentation for the library fix: update vector_store.ipynb fix: update vector_store.ipynb fix: update vector_store.ipynb feat: add BigtableVectorStore Playground notebook. fix: update vector_store.ipynb * feat: update documentation for the library feat: update documentation for the library * feat: update documentation for the library feat: update documentation for the library feat: update documentation for the library * feat: update documentation for the library * fix: reformat vector_store.ipynb * fix: address PR comments * fix: address PR comments. * fix: address PR comments. chore(main): release 0.8.0 (googleapis#192) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> resolve merge conflict with upstream
This PR adds the playground notebook for
BigtableVectorStoreUsage.It also updates the library documentation.
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #190 🦕