Skip to content

feat: FirestoreRecordManager#90

Open
kurtismassey wants to merge 6 commits intogoogleapis:mainfrom
kurtismassey:feature/RecordManager
Open

feat: FirestoreRecordManager#90
kurtismassey wants to merge 6 commits intogoogleapis:mainfrom
kurtismassey:feature/RecordManager

Conversation

@kurtismassey
Copy link
Copy Markdown

A record manager for Langchain Indexing based on the Langchain RecordManager Base Class as a Firestore alternative to the SQLRecordManager

Fixes #89 🦕

@kurtismassey kurtismassey requested review from a team August 10, 2024 21:39
@conventional-commit-lint-gcf
Copy link
Copy Markdown

conventional-commit-lint-gcf Bot commented Aug 10, 2024

🤖 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 automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@product-auto-label product-auto-label Bot added the api: firestore Issues related to the googleapis/langchain-google-firestore-python API. label Aug 10, 2024
@kurtismassey kurtismassey force-pushed the feature/RecordManager branch from d3ba6ed to 90db9cd Compare August 10, 2024 21:43
@kurtismassey kurtismassey changed the title Initial FirestoreRecordManager for Langchain Indexing feat: FirestoreRecordManager Aug 10, 2024
@kurtismassey kurtismassey force-pushed the feature/RecordManager branch from 90db9cd to 91ed0b7 Compare August 10, 2024 21:50
@kurtismassey kurtismassey force-pushed the feature/RecordManager branch from 0065cd6 to deb6f5f Compare August 11, 2024 11:28
@averikitsch
Copy link
Copy Markdown
Collaborator

Thank you for the PR. I will review within a couple days.

Copy link
Copy Markdown
Member

@JU-2094 JU-2094 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread src/langchain_google_firestore/record_manager.py
pass

def get_time(self) -> datetime.datetime:
return datetime.datetime.now(datetime.timezone.utc)
Copy link
Copy Markdown
Collaborator

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)
Copy link
Copy Markdown
Collaborator

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")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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")
Copy link
Copy Markdown
Collaborator

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?

Comment thread src/langchain_google_firestore/record_manager.py
@averikitsch
Copy link
Copy Markdown
Collaborator

/gcbrun

@davlu93
Copy link
Copy Markdown

davlu93 commented Jan 6, 2025

any updates on this implementation??

@averikitsch averikitsch removed their assignment Jun 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: firestore Issues related to the googleapis/langchain-google-firestore-python API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Firestore Record Manager for Langchain Indexing

4 participants