Debug LLM Application

Hi,

I was trying to connect the LLM Application to our LLM server which should be openai compatible. I can call that LLM from my PC and I can start the Wiki locally and install the LLM Application but trying to connect to the LLM it always gets an ERROR as response:

“An error occured: [{‘type’: ‘missing’, ‘loc’: (‘body’,), ‘msg’: ‘Field required’, ‘input’: None}]”

Unfortunately there is no debug logging I could activate so I tried downloading the source code and adding some debug messages so I can see what the application is really calling. Problem there is I had to make some changes to even get the code to build. Some XML files do not comply to the validator. Managed that but then when trying to install it from my local maven repo I got “Can’t find descriptor for the component with type [interface org.xwiki.extension.handler.ExtensionHandler] and hint [xip]”

Is there a way I could debug the application?

You shouldn’t install the XIP but whatever module you changed. You can search for the corresponding JAR(s) in the extension repository in your local XWiki installation and just replace them with your rebuilt versions (apart from the webjar module, which is more tricky, but you shouldn’t need to put debug statements there).

Apart from that, I can highly recommend enabling remote debug in your XWiki’s JVM and just attaching your IDE directly to the JVM so you get a proper debugger (which can usually do much more than printing some logs).