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

AI chatting functionality #11430

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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/deployment-jdk-ea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, buildjet-4vcpu-ubuntu-2204-arm]
os: [ubuntu-latest, windows-latest, macos-latest, buildjet-8vcpu-ubuntu-2204-arm]
jdk: [22]
javafx: [23]
include:
Expand All @@ -45,7 +45,7 @@ jobs:
- os: windows-latest
displayName: windows
archivePortable: 7z a -r build/distribution/JabRef-portable_windows.zip ./build/distribution/JabRef && rm -R build/distribution/JabRef
- os: buildjet-4vcpu-ubuntu-2204-arm
- os: buildjet-8vcpu-ubuntu-2204-arm
displayName: "linux-arm"
archivePortable: "tar -c -C build/distribution JabRef | pigz --rsyncable > build/distribution/JabRef-portable_linux-arm64.tar.gz && rm -R build/distribution/JabRef"
- os: macos-latest
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
submodules: 'true'
show-progress: 'false'
- name: Install pigz and cache (linux)
if: (matrix.os == 'ubuntu-latest') || (matrix.os == 'buildjet-4vcpu-ubuntu-2204-arm')
if: (matrix.os == 'ubuntu-latest') || (matrix.os == 'buildjet-8vcpu-ubuntu-2204-arm')
uses: awalsh128/cache-apt-pkgs-action@master
with:
packages: pigz
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:

# JavaFX
- name: Download and extract JavaFX ${{ matrix.javafx }}
if: (matrix.os != 'buildjet-4vcpu-ubuntu-2204-arm')
if: (matrix.os != 'buildjet-8vcpu-ubuntu-2204-arm')
shell: bash
run: |
cd javafx
Expand All @@ -127,7 +127,7 @@ jobs:
EXTRACT="tar xzf *.tar.gz"
EXT="tar.gz"
;;
"buildjet-4vcpu-ubuntu-2204-arm")
"buildjet-8vcpu-ubuntu-2204-arm")
OS="linux"
EXTRACT="tar xzf *.tar.gz"
EXT="tar.gz"
Expand Down Expand Up @@ -163,19 +163,19 @@ jobs:
$EXTRACT
rm *.$EXT
- name: 'Set JavaFX ${{ matrix.javafx }} (linux, Windows)'
if: (matrix.os != 'macos-latest') && (matrix.os != 'buildjet-4vcpu-ubuntu-2204-arm')
if: (matrix.os != 'macos-latest') && (matrix.os != 'buildjet-8vcpu-ubuntu-2204-arm')
run: |
sed -i '/javafx {/{n;s#version = ".*"#sdk = "javafx/javafx-sdk-${{ matrix.javafx }}"#}' build.gradle
sed -i "s#jlink {#jlink { addExtraModulePath 'javafx/javafx-jmods-${{ matrix.javafx }}'#" build.gradle
cat build.gradle
- name: 'Set JavaFX ${{ matrix.javafx }} (macOS)'
if: (matrix.os == 'macos-latest') && (matrix.os != 'buildjet-4vcpu-ubuntu-2204-arm')
if: (matrix.os == 'macos-latest') && (matrix.os != 'buildjet-8vcpu-ubuntu-2204-arm')
run: |
sed -i '.bak' -e '/javafx {/{n' -e 's#version = ".*"#sdk = "javafx/javafx-sdk-${{ matrix.javafx }}"#;}' build.gradle
sed -i '.bak' -e "s#jlink {#jlink { addExtraModulePath 'javafx/javafx-jmods-${{ matrix.javafx }}'#" build.gradle
cat build.gradle
- name: 'Set JavaFX ${{ matrix.javafx }} (linux-arm)'
if: (matrix.os == 'buildjet-4vcpu-ubuntu-2204-arm')
if: (matrix.os == 'buildjet-8vcpu-ubuntu-2204-arm')
# No JavaFX EA build for ARM at https://jdk.java.net/javafx23/, therefore using Maven Central artifact
run: |
curl -s "https://search.maven.org/solrsearch/select?q=g:org.openjfx+AND+a:javafx&rows=10&core=gav" > /tmp/versions.json
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv

### Added

- We added an AI-based chat for entries with linked PDF files. [#11430](https://github.com/JabRef/jabref/pull/11430)
- We added an AI-based summarization possibility for entries with linked PDF files. [#11430](https://github.com/JabRef/jabref/pull/11430)
- We added support for selecting and using CSL Styles in JabRef's OpenOffice/LibreOffice integration for inserting bibliographic and in-text citations into a document. [#2146](https://github.com/JabRef/jabref/issues/2146), [#8893](https://github.com/JabRef/jabref/issues/8893)
- We added Tools > New library based on references in PDF file... to create a new library based on the references section in a PDF file. [#11522](https://github.com/JabRef/jabref/pull/11522)
- When converting the references section of a paper (PDF file), more than the last page is treated. [#11522](https://github.com/JabRef/jabref/pull/11522)
Expand Down
31 changes: 29 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ version = project.findProperty('projVersion') ?: '100.0.0'
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21

// Workaround needed for Eclipse, probably because of https://github.com/gradle/gradle/issues/16922
// Should be removed as soon as Gradle 7.0.1 is released ( https://github.com/gradle/gradle/issues/16922#issuecomment-828217060 )
modularity.inferModulePath.set(false)
Expand Down Expand Up @@ -125,6 +126,8 @@ repositories {
maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' }
maven { url 'https://jitpack.io' }
maven { url 'https://oss.sonatype.org/content/groups/public' }

// Required for one.jpro.jproutils:tree-showing
maven { url 'https://sandec.jfrog.io/artifactory/repo' }
}

Expand Down Expand Up @@ -238,12 +241,17 @@ dependencies {
exclude module: 'commons-lang3'
exclude group: 'org.apache.commons.validator'
exclude group: 'org.apache.commons.commons-logging'
exclude module: 'kotlin-stdlib-jdk8'
exclude group: 'com.squareup.retrofit2'
exclude group: 'org.openjfx'
exclude group: 'org.apache.logging.log4j'
exclude group: 'tech.units'
}
// Required by gemsfx
implementation 'tech.units:indriya:2.2'
implementation ('com.squareup.retrofit2:retrofit:2.11.0') {
exclude group: 'com.squareup.okhttp3'
}

implementation 'org.controlsfx:controlsfx:11.2.1'

Expand Down Expand Up @@ -315,6 +323,25 @@ dependencies {
// YAML formatting
implementation 'org.yaml:snakeyaml:2.2'

// AI
implementation 'dev.langchain4j:langchain4j:0.33.0'
// Even though we use jvm-openai for LLM connection, we still need this package for tokenization.
implementation('dev.langchain4j:langchain4j-open-ai:0.33.0') {
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk8'
}
implementation('dev.langchain4j:langchain4j-mistral-ai:0.33.0')
implementation('dev.langchain4j:langchain4j-hugging-face:0.33.0')
implementation 'ai.djl:api:0.29.0'
implementation 'ai.djl.pytorch:pytorch-model-zoo:0.29.0'
implementation 'ai.djl.huggingface:tokenizers:0.29.0'
implementation 'io.github.stefanbratanov:jvm-openai:0.9.3'
// openai depends on okhttp, which needs kotlin - see https://github.com/square/okhttp/issues/5299 for details
implementation ('com.squareup.okhttp3:okhttp:4.12.0') {
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk8'
}
// GemxFX also (transitively) depends on kotlin
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.24'

implementation 'commons-io:commons-io:2.16.1'

testImplementation 'io.github.classgraph:classgraph:4.8.174'
Expand Down Expand Up @@ -455,8 +482,8 @@ compileJava {
options.generatedSourceOutputDirectory.set(file("src-gen/main/java"))

moduleOptions {
// TODO: Remove access to internal api
addExports = [
// TODO: Remove access to internal api
'javafx.controls/com.sun.javafx.scene.control' : 'org.jabref',
'org.controlsfx.controls/impl.org.controlsfx.skin' : 'org.jabref'
]
Expand All @@ -470,10 +497,10 @@ run {
application.applicationDefaultJvmArgs = []
}

// TODO: Remove access to internal api
moduleOptions {
// On a change here, also adapt "application > applicationDefaultJvmArgs"
addExports = [
// TODO: Remove access to internal api
'javafx.base/com.sun.javafx.event' : 'org.jabref.merged.module',
'javafx.controls/com.sun.javafx.scene.control' : 'org.jabref',

Expand Down
66 changes: 66 additions & 0 deletions docs/decisions/0032-store-chats-in-local-user-folder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
nav_order: 0032
parent: Decision Records
---
# Store Chats Alongside Database

## Context and Problem Statement

Chats with AI should be stored somewhere. But where and how?

## Considered Options

* Inside `.bib` file
* In local user folder
* Alongside `.bib` file

## Decision Drivers

* Should work when shared with OneDrive, Dropbox or similar asynchronous services
* Should work on network drives
* Should be "easy" for users to follow
* Should be the same in a shared and non-shared setting (e.g., if Dropbox is used or not should make a difference)

## Decision Outcome

Chosen option: "In local user folder", because
it's very hard to work with a shared library, if two users will work
simultaneously on one library, then AI chats file will be absolutely arbitrary
and unmergable.

## Pros and Cons of the Options

### Inside `.bib` file

* Good, because we already have a machinery for managing the fields and other information of BIB entries
* Good, because chats are stored inside one file, and if the `.bib` file is moved, the chat history is preserved
* Bad, because there may be lots of chats and messages and `.bib` file become too cluttered and too big which slows down the processing of `.bib` file
* Bad, because if user shares a `.bib` file, they will also share chat messages, but chats are not ideal, so user may not
want to share them

### In local user folder

One can use `%APPDATA%`, where JabRef stores the Lucene index and other information.
See `org.jabref.gui.desktop.os.NativeDesktop#getFulltextIndexBaseDirectory` for use in JabRef and
<https://github.com/harawata/appdirs> for general information.

Concrete example for backup folder: `C:\Users\${username}\AppData\Local\org.jabref\jabref\backups`.
Example filename: `4a070cf3--Chocolate.bib--2024-03-25--14.20.12.bak`.

* Good, because `.bib` file is kept clean
* Good, because chat messages are saved locally
* Neutral, because may be a little harder to implement
* Bad, because chat messages cannot be easily shared
* Bad, because when path of a `.bib` file is changed, the chats are lost

### Alongside `.bib` file

* Good, because simple implementation
* Good, because, the user can send the chats file alongside the `.bib` file if they want to share the chats. If users do not want
to share the messages, then they can omit the chats file
* Good, because `.bib` files is kept clean
* Bad, because user may not expect that a new file will be created alongside their `.bib` (or other LaTeX-related) files
* Bad, because, it may be not convenient to share both files (`.bib` file and chats file) in order to share chat history.
* Bad, because if `.bib` files are edited externally (meaning, not inside the JabRef), then chats file will not be updated correspondingly
* Bad, because if user moves `.bib` file, they should move the chats file too
* Bad, because if two persons work in parallel using a OneDrive share, the file is overwritten or a conflict file is generated. ([Dropbox "conflicted copy"](https://help.dropbox.com/en-en/organize/conflicted-copy))
53 changes: 53 additions & 0 deletions docs/decisions/0033-store-chats-in-mvstore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
nav_order: 0033
parent: Decision Records
---

# Store Chats in MVStore

## Context and Problem Statement

This is a follow-up to [ADR-031](0032-store-chats-in-local-user-folder).

The chats with AI should be saved on exit from JabRef and retrieved on launch. We need to decide the format of
the serialized messages.

## Decision Drivers

* Easy to implement and maintain
* Memory-efficient (because JabRef is said to consume much memory)

## Considered Options

* JSON
* MVStore
* Custom format

## Decision Outcome

Chosen option: "MVStore", because it is simple and memory-efficient.

## Pros and Cons of the Options

### JSON

* Good, because allows for easy storing and loading of chats
* Good, because cross-platform
* Good, because widely used and accepted, so there are lots of libraries for JSON format
* Good, because it is even possible to reuse the chats file for other purposes
koppor marked this conversation as resolved.
Show resolved Hide resolved
* Good, because has potential for being mergeable by external tooling
* Bad, because too verbose (meaning the file size could be much smaller)

### MVStore

* Good, because automatic loading and saving to disk
* Good, because memory-efficient
* Bad, because does not support mutable values in maps.
* Bad, because the order of messages need to be "hand-crafted" (e.g., by mapping from an Integer to the concrete message), since [MVStore does not support storing list which update](https://github.com/koppor/mvstore-mwe/pull/1).
* Bad, because it stores data as key-values, but not as a custom data type (like tables in RDBMS)

### Custom format

* Good, because we have the full control
* Bad, because involves writing our own language and parser
* Bad, because we need to implement optimizations found in databases on our own (storing some data in RAM, other on disk)
69 changes: 69 additions & 0 deletions docs/decisions/0034-use-citation-key-for-grouping-chat-messages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
nav_order: 0034
parent: Decision Records
---

# Use Citation Key for Grouping Chat Messages

## Context and Problem Statement

Because we store chat messages not inside a BIB entry in `.bib` filecc, the chats file is represented as a map to
BIB entry and a list of messages. We need to specify the key of this map. Turns out, it is not that easy.

## Decision Drivers

* The key should exist for every BIB entry
* The key should be unique along other BIB entries in one library file
* The key should not change at run-time, between launches of JabRef, and should be cross-platform (most important)

## Considered Options

* `BibEntry` Java object
* `BibEntry`'s `id`
* `BibEntry`'s Citation key
* `BibEntry`'s `ShareId`

## Decision Outcome

Chosen option: "`BibEntry`'s Citation key", because this is the only choice that complains to the third point in Decision Drivers.

### Positive Consequences

* Easy to implement
* Cross-platform

### Negative Consequences

* If the citation key is changed externally, then the chats file becomes out-of-sync
* Additional user interaction in order to make the citation key complain the first and second points of Decision Drivers

## Pros and Cons of the Options

### `BibEntry` Java object

Very bad, because it works only at run-time and is not stable.

### `BibEntry`'s `id`

JabRef stores a unique identifier for each `BibEntry`.
This identifier is created on each load of a library (and not stored permanently).

Very bad, for the same reasons as `BibEntry` Java object.

### `BibEntry`'s Citation key

* Good, because it is cross-platform, stable (meaning stays the same across launches of JabRef)
* Bad, because it is not guaranteed that citation key exists on `BibEntry`, and that it is unique across other
`BibEntriy`'s' in the library

### `BibEntry`'s `ShareId`

[ADR-0027](0027-synchronization.md) describes the procedure of synchronization of a Bib(La)TeX library with a server.
Thereby, also local and remote entries need to be kept consistent.
The solution chosen there is that the **server** creates a UUID for each entry.

This approach cannot be used here, because there is no server running which we can ask for an UUID of an entry.

## More Information

Refer to [issue #160](https://github.com/JabRef/jabref/issues/160) in JabRef main repository
Loading
Loading