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

Add alias to GriptapeCloudConversationMemoryDriver #1237

Merged
merged 5 commits into from
Oct 8, 2024
Merged

Conversation

vachillo
Copy link
Member

@vachillo vachillo commented Oct 8, 2024

Describe your changes

adding parameter alias to GriptapeCloudConversationMemoryDriver so a thread can be fetched by the provided alias

Issue ticket number and link


📚 Documentation preview 📚: https://griptape--1237.org.readthedocs.build//1237/

Copy link

codecov bot commented Oct 8, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ation/griptape_cloud_conversation_memory_driver.py 88.88% 0 Missing and 4 partials ⚠️

📢 Thoughts on this report? Let us know!

@api_key.validator # pyright: ignore[reportAttributeAccessIssue]
def validate_api_key(self, _: Attribute, value: Optional[str]) -> str:
if value is None:
raise ValueError(f"{self.__class__.__name__} requires an API key")
return value

@property
Copy link
Member

Choose a reason for hiding this comment

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

Should we make this a @cached_property since it's so expensive?

Copy link
Member Author

Choose a reason for hiding this comment

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

my concern was that the store method would invalidate the cached value, but i guess i can update the method to invalidate self._thread

Copy link
Member

Choose a reason for hiding this comment

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

Yeah just call del self.thread to invalidate.

@collindutter collindutter merged commit 8cfd992 into dev Oct 8, 2024
13 checks passed
@collindutter collindutter deleted the thread_alias branch October 8, 2024 21:07
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