Skip to content

fix: Add setter for Chat Message History messages #174

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

Merged
merged 2 commits into from
Apr 4, 2025

Conversation

averikitsch
Copy link
Collaborator

Fixes mypy error:
langchain_postgres/chat_message_histories.py:344: error: Cannot override writeable attribute with read-only property [override] Found 1 error in 1 file (checked 37 source files)

Fixes mypy error:
langchain_postgres/chat_message_histories.py:344: error: Cannot override writeable attribute with read-only property  [override]
Found 1 error in 1 file (checked 37 source files)
Copy link
Collaborator

@eyurtsev eyurtsev left a comment

Choose a reason for hiding this comment

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

Looks good! I think this is the original abstraction in langchain that's pretty odd.

OK w/ this change in the API, but let's not advertise in the doc.

There's database interaction involved so the operation is expensive and method calls are more appropriate than interaction via properties

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
@averikitsch averikitsch merged commit 2883be6 into main Apr 4, 2025
5 checks passed
@averikitsch averikitsch deleted the averikitsch-patch-1 branch April 4, 2025 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants