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

java.lang.IllegalArgumentException: chatLanguageModel cannot be null #68

Closed
2 tasks done
ThiloteE opened this issue Jul 5, 2024 · 0 comments
Closed
2 tasks done
Labels
preferences This issue is related to AI preferences tab in settings Priority: low This issue is not very important (right now) UI UI related issue

Comments

@ThiloteE
Copy link
Collaborator

ThiloteE commented Jul 5, 2024

JabRef version

5.13 (latest release)

Operating system

Windows

Details on version and operating system

Windows 10

Checked with the latest development build (copy version output from About dialog)

  • I made a backup of my libraries before testing the latest development version.
  • I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

Compile https://github.com/JabRef/jabref/pull/11430/commits at commit 521866d

  1. Add entry
  2. Add file to entry via rightlick context menu
  3. Open Entry editor. Go to "AI chat" tab. Confirm Data privacy information.
  4. Have following preferences:
    image

Following exception is triggered:

java.lang.IllegalArgumentException: chatLanguageModel cannot be null
	at [email protected]/dev.langchain4j.internal.Exceptions.illegalArgument(Exceptions.java:19)
	at [email protected]/dev.langchain4j.internal.ValidationUtils.ensureNotNull(ValidationUtils.java:50)
	at [email protected]/dev.langchain4j.internal.ValidationUtils.ensureNotNull(ValidationUtils.java:37)
	at [email protected]/dev.langchain4j.chain.ConversationalRetrievalChain.<init>(ConversationalRetrievalChain.java:53)
	at [email protected]/dev.langchain4j.chain.ConversationalRetrievalChain$Builder.build(ConversationalRetrievalChain.java:175)
	at [email protected]/org.jabref.logic.ai.chat.AiChatLogic.rebuild(AiChatLogic.java:104)
	at [email protected]/org.jabref.logic.ai.chat.AiChatLogic.<init>(AiChatLogic.java:40)
	at [email protected]/org.jabref.gui.entryeditor.AiChatTab.createAiChat(AiChatTab.java:154)
	at [email protected]/org.jabref.gui.entryeditor.AiChatTab.bindToEntry(AiChatTab.java:108)
	at [email protected]/org.jabref.gui.entryeditor.EntryEditorTab.notifyAboutFocus(EntryEditorTab.java:42)
	at [email protected]/org.jabref.gui.entryeditor.EntryEditor.lambda$new$0(EntryEditor.java:143)
	at [email protected]/com.tobiasdiez.easybind.EasyBind.lambda$subscribe$1(EasyBind.java:493)
	at [email protected]/com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:372)
	at [email protected]/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:91)
	at [email protected]/javafx.beans.property.ReadOnlyObjectPropertyBase.fireValueChangedEvent(ReadOnlyObjectPropertyBase.java:80)
	at [email protected]/javafx.beans.property.ReadOnlyObjectWrapper.fireValueChangedEvent(ReadOnlyObjectWrapper.java:102)
	at [email protected]/javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:113)
	at [email protected]/javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:147)
	at [email protected]/javafx.scene.control.SelectionModel.setSelectedItem(SelectionModel.java:105)
	at [email protected]/javafx.scene.control.TabPane$TabPaneSelectionModel.select(TabPane.java:652)
	at [email protected]/javafx.scene.control.TabPane$TabPaneSelectionModel.select(TabPane.java:670)
	at [email protected]/javafx.scene.control.TabPane$TabPaneSelectionModel.select(TabPane.java:589)
	at [email protected]/com.sun.javafx.scene.control.behavior.TabPaneBehavior.selectTab(TabPaneBehavior.java:82)
	at [email protected]/javafx.scene.control.skin.TabPaneSkin$TabHeaderSkin$5.handle(TabPaneSkin.java:1529)
	at [email protected]/javafx.scene.control.skin.TabPaneSkin$TabHeaderSkin$5.handle(TabPaneSkin.java:1507)
	at [email protected]/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
	at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:232)
	at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:189)
	at [email protected]/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at [email protected]/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at [email protected]/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
	at [email protected]/javafx.event.Event.fireEvent(Event.java:198)
	at [email protected]/javafx.scene.Scene$MouseHandler.process(Scene.java:3985)
	at [email protected]/javafx.scene.Scene.processMouseEvent(Scene.java:1891)
	at [email protected]/javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2709)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:411)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:301)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:450)
	at [email protected]/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:430)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:449)
	at [email protected]/com.sun.glass.ui.View.handleMouseEvent(View.java:551)
	at [email protected]/com.sun.glass.ui.View.notifyMouse(View.java:937)
	at [email protected]/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at [email protected]/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
	at java.base/java.lang.Thread.run(Thread.java:1583)

Expected:

Craft meaningful message that is given to user as feedback.
Do not trigger an ugly exception.

Priority:

Low.

Can be done later to "beautify" things.

Appendix

No response

@ThiloteE ThiloteE added UI UI related issue Priority: low This issue is not very important (right now) preferences This issue is related to AI preferences tab in settings labels Jul 5, 2024
@InAnYan InAnYan closed this as completed Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preferences This issue is related to AI preferences tab in settings Priority: low This issue is not very important (right now) UI UI related issue
Projects
None yet
Development

No branches or pull requests

2 participants