-
Notifications
You must be signed in to change notification settings - Fork 16
feat: FirestoreRecordManager #90
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
base: main
Are you sure you want to change the base?
Conversation
🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use -- conventional-commit-lint bot |
d3ba6ed
to
90db9cd
Compare
90db9cd
to
91ed0b7
Compare
0065cd6
to
deb6f5f
Compare
Thank you for the PR. I will review within a couple days. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
pass | ||
|
||
def get_time(self) -> datetime.datetime: | ||
return datetime.datetime.now(datetime.timezone.utc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JU-2094 should this use the server timestamp, firestore.SERVER_TIMESTAMP
?
time_at_least: Optional[float] = None, | ||
) -> Dict[str, int]: | ||
logger.info("Calling synchronous update method") | ||
return self.update(keys, group_ids=group_ids, time_at_least=time_at_least) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the async client for all async methods
return result | ||
|
||
async def aexists(self, keys: Sequence[str]) -> List[bool]: | ||
logger.info("Calling synchronous exists method") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger.info("Calling synchronous exists method") | |
logger.info("Calling asynchronous exists method") |
from google.cloud import firestore | ||
from langchain_google_firestore import FirestoreRecordManager | ||
|
||
@pytest.fixture(scope="module") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the tests. Can you provide a few integration tests?
/gcbrun |
any updates on this implementation?? |
A record manager for Langchain Indexing based on the Langchain RecordManager Base Class as a Firestore alternative to the SQLRecordManager
Fixes #89 🦕