Skip to content

toolExecutor is null when using streaming chat with tools #1347

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

Open
maxandersen opened this issue Mar 7, 2025 · 3 comments
Open

toolExecutor is null when using streaming chat with tools #1347

maxandersen opened this issue Mar 7, 2025 · 3 comments
Labels
area/dev-ui bug Something isn't working

Comments

@maxandersen
Copy link
Member

getting NPE when using dev-ui chat with fileserver using attached producer and asking in chat: "what is in my project"

java.lang.NullPointerException: Cannot invoke "dev.langchain4j.service.tool.ToolExecutor.execute(dev.langchain4j.agent.tool.ToolExecutionRequest, Object)" because "toolExecutor" is null
        at io.quarkiverse.langchain4j.runtime.devui.ChatJsonRPCService$2.lambda$onComplete$0(ChatJsonRPCService.java:320)
        at io.quarkus.vertx.core.runtime.VertxCoreRecorder$15.runWith(VertxCoreRecorder.java:638)
        at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2675)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2654)
        at org.jboss.threads.EnhancedQueueExecutor.runThreadBody(EnhancedQueueExecutor.java:1627)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1594)
        at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:11)
        at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:11)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:1583)

reproducer mighty.zip

I would not expect streaming would make a difference and get npe for tool executor.
Assuming there is something missing then in devui it shouldn't get stuck forever as it currently does.

@geoand
Copy link
Collaborator

geoand commented Mar 10, 2025

cc @phillip-kruger @jmartisk

@geoand geoand added bug Something isn't working area/dev-ui labels Mar 10, 2025
@jmartisk
Copy link
Collaborator

Can't reproduce this, I just tried with my own app as well as your zip, and in both cases it worked with streaming enabled

@jmartisk
Copy link
Collaborator

output.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dev-ui bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants