[ 
https://issues.apache.org/jira/browse/CAMEL-21594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17922614#comment-17922614
 ] 

Otavio Rodolfo Piske commented on CAMEL-21594:
----------------------------------------------

This is a duplicate of CAMEL-21595

> Camel Langchain4j Tools bug where no need to execute a tool
> -----------------------------------------------------------
>
>                 Key: CAMEL-21594
>                 URL: https://issues.apache.org/jira/browse/CAMEL-21594
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-langchain4j-tools
>    Affects Versions: 4.8.2, 4.9.0
>            Reporter: Zineb Bendhiba
>            Priority: Major
>             Fix For: 4.8.4, 4.10.0
>
>
> There's a bug in Camel Langchain4j Tools.
> If the LLM doesn't require using one of the tools provided in the prompt, 
> there's an error.
> {code:java}
> : java.lang.NullPointerException: Cannot invoke 
> "dev.langchain4j.model.output.Response.content()" because "response" is null
>         at 
> org.apache.camel.component.langchain4j.tools.LangChain4jToolsProducer.chatWithLLMForToolCalling(LangChain4jToolsProducer.java:110)
>         at 
> org.apache.camel.component.langchain4j.tools.LangChain4jToolsProducer.toolsChat(LangChain4jToolsProducer.java:105)
>         at 
> org.apache.camel.component.langchain4j.tools.LangChain4jToolsProducer.processMultipleMessages(LangChain4jToolsProducer.java:62)
>         at 
> org.apache.camel.component.langchain4j.tools.LangChain4jToolsProducer.process(LangChain4jToolsProducer.java:55)
>         at 
> org.apache.camel.support.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:65)
>         at 
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:208)
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to