Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRG] add lancedb as memory #262

Merged
merged 4 commits into from
Nov 15, 2024
Merged

Conversation

leeeizhang
Copy link
Collaborator

@leeeizhang leeeizhang commented Nov 11, 2024

related to: #259

$ cd /path/to/mle/project
$ python3
>>> from mle.utils import LanceDBMemory
>>> memory = LanceDBMemory("./")
>>> memory.add("hello world", metadata={"path": "/path/to/file"})
['deff1675-41ac-4190-b3b6-7ca9fde85c59']
>>> memory.query("hi")
[["vector": [...], 'text': 'hello world', 'id': 'deff1675-41ac-4190-b3b6-7ca9fde85c59', 'metadata': {'path': '/path/to/file'}, '_distance': 0.25669366121292114}]]
>>> memory.delete("deff1675-41ac-4190-b3b6-7ca9fde85c59")
>>> memory.count()
0
>>> memory.drop()

Before submitting this PR, please make sure you have:

  • confirmed all checks still pass OR confirm CI build passes.
  • verified that any code or assets from external sources are properly credited in comments and/or in
    the credit file.

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Nov 11, 2024
@huangyz0918 huangyz0918 mentioned this pull request Nov 12, 2024
17 tasks
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Nov 12, 2024
@leeeizhang leeeizhang changed the title [WIP] add lancedb as memory [MRG] add lancedb as memory Nov 12, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 15, 2024
@huangyz0918 huangyz0918 merged commit ce39ddf into MLSysOps:main Nov 15, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants