-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
base: main
Are you sure you want to change the base?
AI chatting functionality #11430
Conversation
|
||
@Override | ||
public String add(Embedding embedding) { | ||
String id = String.valueOf(UUID.randomUUID()); |
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.
Even though the parent class seems to demand some identifies for the embeddings, it should be explained somewhere in this class how this works. Maybe, at the maps above - or as general @implNote
at the JavaDoc of the whole class.
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've added a comment there, but those id
thing - is a detail of implementation
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 am reviewing the implementation, thus I want to understand the thing.
We in JabRef aim for code that is maintainable by more than one person. A Software Engineering principle is that the code belongs to the product, not to the code owner. The aim should be that the product improves and can improved in the future. (Side store: Therefore, I dislike the term "code owners" used by GitHub - or the IDE feature showing who authored the code. In utopia, one cannot "see" who authored the code, because there is the same style used in a proejct).
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.
Added the comment in the new commit.
Id is used to identify embeddings as a key to Map<String, ...>
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.
By detail of implementation I meant: the programmers that use this class don't have to look or manipulate with ID's
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.
By detail of implementation I meant: the programmers that use this class don't have to look or manipulate with ID's
Oh, I did not mention "maintenance", but only described it like "code that is maintainable".
With maintenance, I mean that a class itself (!) could be updated. Meaning: Updates on MVStoreEmbeddingStore
. Maybe migrating to a new version, updating to a more modern Java style (who knows what will be there in 2030 in Java).
Thus, it IS important to understand the inner workings of a class.
/** | ||
* A custom implementation of langchain4j's {@link EmbeddingStore} that uses a {@link MVStore} as an embedded database. | ||
*/ | ||
public class MVStoreEmbeddingStore implements EmbeddingStore<TextSegment> { |
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.
The whole class could be contributed back to langchain4j? Maybe at the end of GSoC (where whopefully a new release of langchain4j is made)
@koppor, you mean JabRef can detect if new files are added from the filesystem and then link it? |
Link doesn't work in mobile... 🙈 Maybe cite the text? Use But I didn't mean that. One can trigger it from the menu. Lookup "Search for unlinked files". |
Text on the issue:
@InAnYan Yes. Please check for yourself. 😅 Field in the entry editor: Update There is even documentation for that: https://docs.jabref.org/finding-sorting-and-cleaning-entries/filelinks#auto-linking-files |
I'm asking because I'm impressed of that feature :) |
# Conflicts: # src/main/java/org/jabref/gui/entryeditor/DeprecatedFieldsTab.java # src/main/java/org/jabref/gui/entryeditor/EntryEditor.java # src/main/java/org/jabref/gui/entryeditor/RequiredFieldsTab.java # src/main/java/org/jabref/gui/entryeditor/UserDefinedFieldsTab.java
src/main/java/org/jabref/logic/ai/embeddings/EmbeddingsGenerationTask.java
Outdated
Show resolved
Hide resolved
Wrong message parameters can lead to IOB exceptions at LangChain4J - see langchain4j/langchain4j#1436 and my quick fix |
The build of this PR is available at https://builds.jabref.org/pull/11430/merge. |
Screenshots of the UI changes
TODOs
(Update by koppor)
Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)