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

Makes setting scope fully optional in session managers #193

Merged
merged 11 commits into from
Jul 31, 2024

Conversation

justin-cechmanek
Copy link
Collaborator

This PR removes the requirement that user and session tags be specified on session manager initialization. Session tags can be added when storing messages and filter expressions can be used to retrieve specific chat histories. A default uuid is used when no session is provided.

@justin-cechmanek justin-cechmanek added the enhancement New feature or request label Jul 30, 2024
@tylerhutcherson tylerhutcherson force-pushed the feat/RAAE-191/scopeless-sessions branch from 92619dd to 0044981 Compare July 31, 2024 02:52
@justin-cechmanek
Copy link
Collaborator Author

inside search_cache() what if instead of:
id = hit[self.entry_id_field_name]
self._refresh_ttl(self._index.key(id))
we did:
id = hit['id']
self._refresh_ttl(self._index.key(id))

as_text: bool = False,
raw: bool = False,
tag_filter: Optional[FilterExpression] = None,
Copy link
Collaborator

Choose a reason for hiding this comment

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

my concern here is we blur the conceptual lines between a tag_filter and a session_tag. Also we "own" the schema. Users wouldn't know they are supposed to use this field for session filtering. Ideally we make it so it's super clear :)

We could make it clear and ask them to pass the session_tag: Optional[str] = None here and WE wrap it into a Tag filter since we own the schema and know how to apply it.

@tylerhutcherson tylerhutcherson merged commit 3844d57 into main Jul 31, 2024
20 checks passed
@tylerhutcherson tylerhutcherson deleted the feat/RAAE-191/scopeless-sessions branch July 31, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants