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 - MVP - v1 #1

Closed
wants to merge 31 commits into from
Closed

AI - MVP - v1 #1

wants to merge 31 commits into from

Conversation

InAnYan
Copy link
Owner

@InAnYan InAnYan commented May 8, 2024

Mandatory checks

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

@InAnYan InAnYan changed the title Ai 1 AI - MVP - v1 May 8, 2024
Copy link
Collaborator

@koppor koppor left a comment

Choose a reason for hiding this comment

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

Some minor things, then it should be ready to be reviewed by others.

build.gradle Outdated Show resolved Hide resolved

private AiConnection aiConnection = null;
private AiChat aiChat = null;

Copy link
Collaborator

Choose a reason for hiding this comment

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

Style: Either always empty lines between variable declarations or never. Sometimes, I catch myself to mix too. However, then mostly there are JavaDoc comments the separted variables.

Copy link
Owner Author

Choose a reason for hiding this comment

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

This applies for every-every field?
What if I have these fields in a class:

  • Logger
  • Data fields
  • Constants

I can't group them with new lines? And what will be the right order for this fields?

Copy link
Collaborator

Choose a reason for hiding this comment

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

checkstyle will tell about the order. Grouping is OK, add comments then. However, this could make the code more unreadable. Just keep one empty line between each "thing".

If reasonable, you could create a nested record class for more clearer grouping. However, in your case, this doesn't seem to be necessary.

src/main/java/org/jabref/gui/entryeditor/AiChatTab.java Outdated Show resolved Hide resolved
rebuildAiChat();
} else {
aiConnection = null;
// QUESTION: If user chose AI but then unchooses, what should we do with the AI chat?
Copy link
Collaborator

Choose a reason for hiding this comment

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

In case a user can "accidentally" disable the chat, we need to think. However, I think, it is an "informed" decision. Thus, we can just drop the chat. --> Just remove the comment line.

If we don't want to drop it, we should try to keep it: I don't know about the relation between aiConnection and aiChat.


@Override
public boolean shouldShow(BibEntry entry) {
return aiPreferences.isUseAi();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Next iteration: Do it similar to the "recommendation" tab. The tab is shown as default, but asks for an OK

grafik


The checkmark "modern AI technologies" is too general. Think of the GDPR which asks software vendors to be very specific what happens with their data.

Thus, move from the following tab the setting to the "Entry editor" tab, next to the "recommendations". "Show AI Tab", and ask for the OpenAI token.

grafik

In case there will be more preferences, we first add them there. If they are too much, we might move the detail AI prrefernces to the separate tab "AI".

src/main/resources/tinylog.properties Outdated Show resolved Hide resolved
src/main/resources/tinylog.properties Outdated Show resolved Hide resolved
@InAnYan InAnYan closed this May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants