-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
AI chatting functionality #11430
Merged
Merged
AI chatting functionality #11430
Changes from 4 commits
Commits
Show all changes
423 commits
Select commit
Hold shift + click to select a range
8ca536e
Fix the code from code review
InAnYan 1e7221a
Fix from code review and create new AiChatTabWorking
InAnYan 874e513
Improve chat history storage code
koppor a3b9dd9
More fix from code review
InAnYan 2d65495
Remove obsolete parameter
koppor 08c77ce
Add JavaDoc comment
koppor ab9ff18
Fix checkstyle
koppor eb00e30
Fix JavaDoc
koppor 3e6ffb1
Fix more checkstyle
koppor 154d621
More checkstyle fixes
koppor 7e70584
Fix code changes
InAnYan 27cb183
Merge remote-tracking branch 'origin/ai-pr-1' into ai-pr-1
InAnYan 3fb4cbb
Improve the PR
InAnYan 0d617b5
Merge remote-tracking branch 'origin/main' into ai-pr-1
koppor b3598f6
Rework ADR-0031 to enable to use another option
koppor ef8b16c
Add many LOGGEr.trace statements
koppor 1b377ee
Change "message window" to "context window"
InAnYan 6ba5cc3
Fix compiler errors
InAnYan 861da12
Fix issue list index issue of langchain4j
koppor 53f1b0f
Fix lint issue
koppor 0034f94
Update 0031-store-chats-alongside-database.md
koppor 81f0278
More tracing
koppor 8f6b252
Merge remote-tracking branch 'origin/main' into ai-pr-1
koppor e50ff5c
Refine logging
koppor ee4526c
Remove closing of AiChatLanguageModel (because it's not closable)
InAnYan ed748a4
Use external package for OpenAI API connection
InAnYan 94df8df
Provide a custom executor for RetrievalAugmentor
InAnYan e44e5cc
Merge branch 'refs/heads/ai-pr-1-default-retrieval' into ai-pr-1-jvm-…
InAnYan 92c071f
Fix shutdown issue (I hope)
InAnYan ca984a3
Refactor classes
InAnYan 9eae4ee
Change BibDatabaseChatHistoryFile
InAnYan 7edec3f
Revert BibDatabaseChatHistoryFile to old version because of langchain4j
InAnYan a931e44
Make round corners for chat messages
InAnYan 43db814
Refactor embeddings generation
InAnYan 76a6ffa
Refactor embeddings generation
InAnYan 58cbe6d
Refactor embeddings generation
InAnYan d4be288
Merge branch 'main' into ai-pr-1
koppor d55ba9f
Merge remote-tracking branch 'origin/ai-pr-1' into HEAD
koppor a86a728
Fix CHANGELOG.md
koppor 6802017
Remove jpro-mdfx
koppor 74e159f
Add comment
koppor 7f55bcd
Fix localizations
InAnYan d8d05d4
Merge branch 'refs/heads/upstream-main' into ai-pr-1
InAnYan b1482f2
Fix checkstyle and remove OpenAI from PRIVACY.md
InAnYan 4f432b7
Remove unnecessary comments
InAnYan dd70b89
Fix privacy notice UI
InAnYan 9ed8119
Introduce new ApiKeyMissingComponent
InAnYan bced287
Thanks Tobiaz Diez for writing such a good EntryEditorTab class
InAnYan 55bf2af
Fix InAnYan/jabref issues
InAnYan bdbb808
Merge remote-tracking branch 'ruslan/ai-pr-1' into ai-pr-1
koppor aebb0d1
Merge `build.gradle` and `settings.gradle` from main branch
koppor 4c823a7
Merge remote-tracking branch 'refs/remotes/upstream/main' into ai-pr-1
InAnYan aaebb67
Update ADRs
InAnYan e1d07ea
Implement rethought ADR for chat history
InAnYan 79c3383
Use OpenAI embedding model
InAnYan 2d95ac5
Use Deep Java embedding model
InAnYan 6a72d65
Remove old langchain4j embedding models
InAnYan 6cd8d2c
Fix checkstyle errors
InAnYan afeb158
Merge branch 'refs/heads/use-deepjava' into ai-pr-1
InAnYan 46bc6be
Fix checkstyle and remove old dependencies
InAnYan 6e2d60c
Fixes from code review
InAnYan 9e50ea2
Merge branch 'refs/heads/upstream-main' into ai-pr-1
InAnYan 9453f3a
Restructure
InAnYan b2dd89d
Fix checkstyle errors
InAnYan ce35270
Add API base URL parameter
InAnYan b3fa7f0
Fix localization
InAnYan f669a95
Merge branch 'refs/heads/upstream-main' into ai-pr-1
InAnYan efed0cc
Fix from code review + ADR
InAnYan cef4a76
Merge branch 'refs/heads/ai-pr-1' into ai-week2
InAnYan d145b5b
Something broken
InAnYan b53a02f
Now MistralAI and Hugging Face work
InAnYan 5c3cb69
Fix base URL for other LLM providers
InAnYan cf321ae
Fix base URL for other LLM providers
InAnYan 7a88206
Refactor MVStore usage
InAnYan eb36298
Load embedding model in background
InAnYan 04ab84f
Bump langchain4j version
InAnYan 0f588c2
Merge branch 'refs/heads/ai-pr-1' into ai-week2
InAnYan 39a0170
Fix bug
InAnYan 70f74ad
Merge branch 'refs/heads/upstream-main' into ai-pr-1
InAnYan 01bd201
Merge branch 'refs/heads/ai-pr-1' into ai-week2
InAnYan 362c7cd
Fix checkstyle and localization
InAnYan 9e3d9f1
Implement summarization
InAnYan 72e093c
Fix checkstyle and localization
InAnYan 1bd8987
Improve PrivacyNoticeComponent
InAnYan 11d33fa
Fix from code review
InAnYan c5acfc0
Merge branch 'refs/heads/add-summarization' into ai-pr-1
InAnYan 8d73e7f
Update localization
InAnYan 23ecad6
Wrap text
InAnYan 6a4096b
Add padding
InAnYan 385e58c
Fix markdown
InAnYan debfe15
Use stuff algorithm
InAnYan 52d2488
Add GPT-4o-mini
InAnYan edf752b
Make chat model editable
InAnYan f017208
Update context window size and summarization
InAnYan 608f22b
Merge branch 'refs/heads/upstream-main' into ai-pr-1
InAnYan 05b404f
Fix checkstyle
InAnYan eb8b1fc
Update PrivacyNoticeComponent.fxml
InAnYan 7560124
Update AI summary tab
InAnYan ede993c
Fix localization
InAnYan 0f76e46
Merge remote-tracking branch 'origin/main' into ai-pr-1
koppor 1a62197
Change order so that there is no diff
koppor 91eb6e4
Reorrder dependencies
koppor c38905c
Add missing CHANGELOG.md entry
koppor 653e82c
Refine ADR-0033
koppor b5a38c7
Refine ADR0034
koppor 5b3ec78
Fix typos
koppor b07cf61
Refine ADR-0036
koppor d2af1fc
Fix ADR-0037
koppor 6449697
Fix title case
koppor 36d10ff
Fix changes in module-info.java
koppor a8c42b4
Readd removed requires org.apache.httpcomponents.core5.httpcore5
koppor 4361c88
Revert change in JabRefGUI to avoid conflicts
koppor 1d7f7a9
Remove empty lines
koppor 9e50899
Reorder entries in JabRef_en.properties
koppor 219657a
Simplify SummariesStorage (and add test)
koppor 1cd8057
Use region/endregion
koppor 38be8bd
Fix position of comment
koppor 143fde0
Add comment why the event bus is needed
koppor 3b8bc26
Do not show exception to the user - just that an error is occurred (s…
koppor 5018f58
Use "URL %0" without colon (consistency)
koppor fae1bb2
Fix typos
koppor 4155b57
History has to be kept
koppor 8aaf0da
Remove empty lines
koppor 9a70e61
Fix language (hopefully)
koppor c4c8229
Compilefix
koppor 0a33b34
Simplify BibDatabaseChatHistoryManager
koppor 4307697
Fix from code review
InAnYan cb5afca
Merge branch 'refs/heads/upstream-main' into ai-pr-1
InAnYan 89d7f77
Fix issue #103
InAnYan 44e8bdf
Rework embeddings cache clearing
InAnYan c245e73
Fix #99 and partially #101
InAnYan adfff75
Partially fixing shutdown issues and UI progress monitor issue
InAnYan e1a895b
Merge branch 'main' into ai-pr-1
koppor 4c3623d
Add "requires scala.library" and add "region:" / "endregion"
koppor df7fcee
More grouping (move de.saxsys.mvvmfx.validation up)
koppor d38121e
Add alphabetical hint
koppor a581cdd
Merge remote-tracking branch 'origin/add-scala.library-as-requirement…
koppor e84b992
Fix https://github.com/InAnYan/jabref/issues/101 and https://github.c…
InAnYan 3a90caf
Merge remote-tracking branch 'upstream/ai-pr-1' into ai-pr-1
InAnYan 02c23b8
Merge remote-tracking branch 'upstream/ai-pr-1' into ai-pr-1
InAnYan 152b3a0
Discard changes to settings.gradle
koppor f545390
Fix https://github.com/InAnYan/jabref/issues/105
InAnYan 9d1869d
Merge remote-tracking branch 'upstream/ai-pr-1' into ai-pr-1
InAnYan 57617b2
Follow-up fix for https://github.com/InAnYan/jabref/issues/103
InAnYan 4a72830
Follow-up fix for https://github.com/InAnYan/jabref/issues/103
InAnYan f55d6f4
Remove obsolete class
koppor ea68114
Merge branch 'ai-pr-1' of github.com:JabRef/jabref into ai-pr-1
koppor 390f6da
Partially fix https://github.com/InAnYan/jabref/issues/98
InAnYan 637d14e
Merge remote-tracking branch 'upstream/ai-pr-1' into ai-pr-1
InAnYan e71994e
We do need dependencies to the AI providers, don't we?
koppor ed36c53
Merge branch 'ai-pr-1' of github.com:JabRef/jabref into ai-pr-1
koppor f0be2ed
Fix https://github.com/InAnYan/jabref/issues/93
InAnYan 12cfde8
Merge remote-tracking branch 'upstream/ai-pr-1' into ai-pr-1
InAnYan 99e713d
Simplify code
koppor 6e7c01a
Merge branch 'ai-pr-1' of github.com:JabRef/jabref into ai-pr-1
koppor e8b0e9c
Partially fix https://github.com/InAnYan/jabref/issues/92
InAnYan 39b5b5e
Merge remote-tracking branch 'upstream/ai-pr-1' into ai-pr-1
InAnYan 529b1f9
Fix checkstyle and localization
InAnYan 38169a8
Fix hyperlinks and text in ApiKeyMissingComponent
InAnYan 881f6a9
Fixes from code review
InAnYan 04c5840
Merge branch 'main' into ai-pr-1
koppor 7a618da
Merge remote-tracking branch 'origin/main' into ai-pr-1
koppor adb6194
Fix https://github.com/InAnYan/jabref/issues/120
InAnYan ec3fef9
Merge remote-tracking branch 'upstream/ai-pr-1' into ai-pr-1
InAnYan 549ac5a
Remove "X% work done" messages
InAnYan 9adf0bc
Fix https://github.com/InAnYan/jabref/issues/114
InAnYan b5a1843
Partially fix https://github.com/InAnYan/jabref/issues/113
InAnYan f4f23e9
Partially fix https://github.com/InAnYan/jabref/issues/110
InAnYan a82eb21
Fix https://github.com/InAnYan/jabref/issues/110
InAnYan b80c35a
Fix https://github.com/InAnYan/jabref/issues/111
InAnYan 7c1a27e
Improve embedding model downloading notifications
InAnYan f9d6dbf
Fix https://github.com/InAnYan/jabref/issues/124
InAnYan 123af11
Fix https://github.com/InAnYan/jabref/issues/122
InAnYan 8cca5fb
Fix wrong context window size when expert settings customization is t…
InAnYan f79f874
Attempt to fix https://github.com/InAnYan/jabref/issues/95
InAnYan 98a3640
Finally fix https://github.com/InAnYan/jabref/issues/105
InAnYan 182ab00
Fix https://github.com/InAnYan/jabref/issues/108
InAnYan 2468fec
Attempt to fix https://github.com/InAnYan/jabref/issues/98
InAnYan 1d4c383
Fix for https://github.com/InAnYan/jabref/issues/104
InAnYan 547da5d
Fix for https://github.com/InAnYan/jabref/issues/98
InAnYan 3b2887b
Fix for https://github.com/InAnYan/jabref/issues/95#issuecomment-2269…
InAnYan 49ce737
Fix for https://github.com/InAnYan/jabref/issues/98#issuecomment-2271…
InAnYan 43f1f7c
Fix for https://github.com/InAnYan/jabref/issues/126
InAnYan 32c4943
Fix for https://github.com/InAnYan/jabref/issues/115
InAnYan 1f3d20a
Fix for https://github.com/InAnYan/jabref/issues/113
InAnYan 2d64d01
Fix for https://github.com/InAnYan/jabref/issues/91
InAnYan ef94344
Fix for https://github.com/InAnYan/jabref/issues/121
InAnYan 9cfffe1
Merge branch 'main' into ai-pr-1
koppor 718a859
Fix for https://github.com/InAnYan/jabref/issues/112 and https://gith…
InAnYan 5ce5c2c
Merge remote-tracking branch 'upstream/ai-pr-1' into ai-pr-1
InAnYan 441308d
Fix for https://github.com/InAnYan/jabref/issues/125
InAnYan 58196dd
Fixes from commit comments
InAnYan 79acddf
Fix for https://github.com/InAnYan/jabref/issues/115
InAnYan 72e90ad
Fix for https://github.com/InAnYan/jabref/issues/120
InAnYan 8c93f0b
Fix for https://github.com/InAnYan/jabref/issues/132
InAnYan 041d91b
Fix for https://github.com/InAnYan/jabref/issues/132
InAnYan 8b7fff1
Fix for https://github.com/InAnYan/jabref/issues/104
InAnYan a38c439
Fix for https://github.com/InAnYan/jabref/issues/118
InAnYan b5aa552
Merge remote-tracking branch 'upstream/main' into ai-pr-1
koppor 27f941b
Fix for https://github.com/InAnYan/jabref/issues/114
InAnYan cd41ab5
Merge remote-tracking branch 'upstream/ai-pr-1' into ai-pr-1
InAnYan 99fd54f
Fix for https://github.com/InAnYan/jabref/issues/104
InAnYan 405798f
Store error messages in chat history
InAnYan 1e9f5f8
Make error be a ChatMessageComponent
InAnYan e161e5e
Implement delete messages https://github.com/InAnYan/jabref/issues/136
InAnYan 34fd37c
Fix for https://github.com/InAnYan/jabref/issues/118
InAnYan 4cfeef0
Fix for https://github.com/InAnYan/jabref/issues/92
InAnYan a5ef15f
Fix checkstyle and localization. And refactoring
InAnYan 80436e7
Fix for https://github.com/InAnYan/jabref/issues/92
InAnYan 098bb68
Fix for https://github.com/InAnYan/jabref/issues/139
InAnYan f4ca7a4
Show "Delete message" button only when necessary
InAnYan 72ff85d
Merge branch 'refs/heads/upstream-main' into ai-pr-1
InAnYan e8d5b47
Fix for https://github.com/InAnYan/jabref/issues/83
InAnYan 8519eb3
Update src/main/java/org/jabref/logic/ai/AiService.java
InAnYan 95cbc39
Update src/main/java/org/jabref/logic/ai/chathistory/BibDatabaseChatH…
InAnYan 6df1a02
Update src/main/java/org/jabref/logic/ai/AiService.java
InAnYan 0478348
Update src/main/java/org/jabref/gui/Base.css
InAnYan ef6fdab
Update src/main/java/org/jabref/gui/Base.css
InAnYan 23ae468
Fix from code review
InAnYan 8f28cc4
Partial fix for https://github.com/InAnYan/jabref/issues/125
InAnYan 8217c9e
Update colors for error message
InAnYan 93ea840
Fix for https://github.com/InAnYan/jabref/issues/145 and https://gith…
InAnYan f08eaea
Make progress for embedding model download
InAnYan 8d7a77d
Merge branch 'main' into ai-pr-1
koppor 1acadf3
Fix checkstyle and localization
InAnYan a633766
Merge remote-tracking branch 'upstream/ai-pr-1' into ai-pr-1
InAnYan f3ffc54
Merge branch 'main' into ai-pr-1
koppor 8ec3876
Add workaround to get FileHistoryMenuTest running again
koppor d6f9c3d
Merge branch 'main' into ai-pr-1
koppor 85382a1
Small fixes
InAnYan bb46869
Merge remote-tracking branch 'upstream/ai-pr-1' into ai-pr-1
InAnYan 9a15e6c
Merge branch 'main' into ai-pr-1
koppor 9ff69a7
Revert "Small fixes"
koppor 64f905e
Introduce AiApiKeyProvider
koppor 8146ff0
Fix IDE setup instructions
koppor 400d83e
Do not load API keys on startup
koppor 7241929
Rely on keystore encryption
koppor 2154a1e
Prevent mulitple rebuilds when muliple preferences are updated
koppor e18eda9
Fix localization to be more provider independent
koppor d3e8155
Fix method names
koppor 26e279a
Add poor man's solution to notify of API key changes
koppor d4a96d0
Reduce calls to key store (and fix key saving)
koppor 3c8cb68
Merge branch 'main' into ai-pr-1
koppor 5fa3bb5
Fix for https://github.com/InAnYan/jabref/issues/148 and partially ht…
InAnYan 58bdb8c
Revert "Fix for https://github.com/InAnYan/jabref/issues/148 and part…
InAnYan f794012
Fix for scrolling down when deleting a message
InAnYan 9730fe8
Sort EmbeddingModel enum variants
InAnYan d0e7170
Fix GenerateSummaryTask progress indication
InAnYan 8aa5fbb
Fix dark mode
InAnYan ddd979a
Add notice for embedding models size
InAnYan 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 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 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
plugins { | ||
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" | ||
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" | ||
} | ||
|
||
rootProject.name = "JabRef" |
This file contains 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 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
12 changes: 12 additions & 0 deletions
12
src/main/java/org/jabref/gui/ai/components/JabRefMarkdownView.java
This file contains 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,12 @@ | ||
package org.jabref.gui.entryeditor.aichattab.components; | ||
|
||
import one.jpro.platform.mdfx.MarkdownView; | ||
|
||
import java.util.List; | ||
|
||
public class JabRefMarkdownView extends MarkdownView { | ||
@Override | ||
protected List<String> getDefaultStylesheets() { | ||
return List.of("Base.css"); | ||
} | ||
} |
This file contains 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 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 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 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 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 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
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.
Do we really need this dependency?