-
Notifications
You must be signed in to change notification settings - Fork 27
feat: Implement memories #422
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
Open
marcelklehr
wants to merge
23
commits into
main
Choose a base branch
from
feat/memories
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 17 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
ebcf1f3
feat: Implement the backend for memories
marcelklehr 75f95dc
fix: run cs:fix
marcelklehr 3ed329b
fix: Fix psalm errors
marcelklehr 9e58fea
fix: Fix psalm errors pre 32
marcelklehr 40a9419
fix: Fix REUSE compatibility
marcelklehr 83531e0
fix: Update openapi.json
marcelklehr daa1acd
fix: Fix copy-pasta
marcelklehr 1f26762
Fix: Address review comments
marcelklehr 2611c47
feat: Implement RESTful session endpoints
marcelklehr 7980915
fix: Inject at most 10 summaries into one LLM call
marcelklehr 04a4d7a
feat: adjust updateChatSession, only update what's necessary, fix Ope…
julien-nc 24e3c22
fix: typo in SessionSummaryService
julien-nc 86b68e5
feat: add remember button in Chat UI
janepie 5b45cdf
fix(ChattyLLMInputForm): Make spelling of is_remembered consistent
marcelklehr 35421d9
fix(ChattyLLMController): Actually store updated values in db
marcelklehr c0b8879
fix: Fix psalm issues
marcelklehr ff12e78
chore: Update openapi spec
marcelklehr 1ef3c0f
fix: replace custom getters/setters with magic methods for session's …
julien-nc 2c57729
Revert "fix: replace custom getters/setters with magic methods for se…
marcelklehr b652986
fix: Try to fix boolean entity field issues
marcelklehr 56377f6
feat(ui): list of summaries in personal settings
janepie 0705128
feat(ui): change button icon and make text reactive
janepie 32203d3
feat(ui): change button to toggle
janepie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| /** | ||
| * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors | ||
| * SPDX-License-Identifier: AGPL-3.0-or-later | ||
| */ | ||
|
|
||
| namespace OCA\Assistant\BackgroundJob; | ||
|
|
||
| use OCA\Assistant\Service\SessionSummaryService; | ||
| use OCP\AppFramework\Utility\ITimeFactory; | ||
| use OCP\BackgroundJob\TimedJob; | ||
|
|
||
| class GenerateNewChatSummaries extends TimedJob { | ||
| public function __construct( | ||
| ITimeFactory $timeFactory, | ||
| private SessionSummaryService $sessionSummaryService, | ||
| ) { | ||
| parent::__construct($timeFactory); | ||
| $this->setInterval(60 * 10); // 10min | ||
| } | ||
| public function run($argument) { | ||
| $userId = $argument['userId']; | ||
| $this->sessionSummaryService->generateSummariesForNewSessions($userId); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| /** | ||
| * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors | ||
| * SPDX-License-Identifier: AGPL-3.0-or-later | ||
| */ | ||
|
|
||
| namespace OCA\Assistant\BackgroundJob; | ||
|
|
||
| use OCA\Assistant\Service\SessionSummaryService; | ||
| use OCP\AppFramework\Utility\ITimeFactory; | ||
| use OCP\BackgroundJob\TimedJob; | ||
|
|
||
| class RegenerateOutdatedChatSummariesJob extends TimedJob { | ||
|
|
||
| public function __construct( | ||
| ITimeFactory $timeFactory, | ||
| private SessionSummaryService $sessionSummaryService, | ||
| ) { | ||
| parent::__construct($timeFactory); | ||
| $this->setInterval(60 * 60 * 24); // 24h | ||
| } | ||
| public function run($argument) { | ||
| $userId = $argument['userId']; | ||
| $this->sessionSummaryService->regenerateSummariesForOutdatedSessions($userId); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe it would be nicer to indicate the metadata part
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think with the available params, it's kinda self explanatory, no?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah but does require a little more effort to parse since updaing a session could also refer to message addition/deletion in that session.