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

fix: exclude messages field from Datastore index to avoid 1500 bytes limit #37

Conversation

cymarechal-devoteam
Copy link
Contributor

Hi,

While playing around with DatastoreChatMessageHistory, I noticed that I quickly ran into Datastore's 1,500 bytes limit for indexed string property's UTF-8 encoding (source: https://cloud.google.com/datastore/docs/concepts/limits).

This PR creates a simple test case to demonstrate the issue and solves it by using Datastore's exclude_from_indexes parameter.

Feedback appreciated!

@cymarechal-devoteam cymarechal-devoteam requested a review from a team as a code owner March 25, 2024 13:57
@product-auto-label product-auto-label bot added the api: datastore Issues related to the googleapis/langchain-google-datastore-python API. label Mar 25, 2024
@averikitsch
Copy link
Collaborator

/gcbrun

@cymarechal-devoteam
Copy link
Contributor Author

Hi @averikitsch,
Thank you for interacting!
I see some integration tests have failed. Is there any way I can help on those?

@averikitsch
Copy link
Collaborator

/gcbrun

@averikitsch
Copy link
Collaborator

@JU-2094 is currently out of office and will review next week. Thanks!

@averikitsch
Copy link
Collaborator

/gcbrun

Copy link
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.

Awesome, lgtm!

@averikitsch
Copy link
Collaborator

@cymarechal-devoteam can you resolve the merge conflicts?

@cymarechal-devoteam
Copy link
Contributor Author

@cymarechal-devoteam can you resolve the merge conflicts?

That should be it! Please let me know if there is anything else.

@averikitsch
Copy link
Collaborator

/gcbrun

@averikitsch averikitsch merged commit dc8567b into googleapis:main Apr 5, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the googleapis/langchain-google-datastore-python API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants