This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new b1584fbc046 CAMEL-21153: deprecate chat with tools feature in 
camel-langchain4j-chat
b1584fbc046 is described below

commit b1584fbc04680bf99974fbf2fb8bf4cc2656f86c
Author: Otavio Rodolfo Piske <angusyo...@gmail.com>
AuthorDate: Tue Sep 3 09:23:53 2024 +0000

    CAMEL-21153: deprecate chat with tools feature in camel-langchain4j-chat
---
 .../src/main/docs/langchain4j-chat-component.adoc                      | 3 +++
 .../component/langchain4j/chat/tool/CamelSimpleToolParameter.java      | 1 +
 .../camel/component/langchain4j/chat/tool/CamelToolExecutorCache.java  | 1 +
 .../camel/component/langchain4j/chat/tool/CamelToolSpecification.java  | 1 +
 .../camel/component/langchain4j/chat/tool/NamedJsonSchemaProperty.java | 1 +
 5 files changed, 7 insertions(+)

diff --git 
a/components/camel-ai/camel-langchain4j-chat/src/main/docs/langchain4j-chat-component.adoc
 
b/components/camel-ai/camel-langchain4j-chat/src/main/docs/langchain4j-chat-component.adoc
index eaa6351410e..c530275e5b2 100644
--- 
a/components/camel-ai/camel-langchain4j-chat/src/main/docs/langchain4j-chat-component.adoc
+++ 
b/components/camel-ai/camel-langchain4j-chat/src/main/docs/langchain4j-chat-component.adoc
@@ -159,6 +159,9 @@ String response = 
template.requestBody("direct:send-multiple", messages, String.
 ----
 
 === Chat with Tool
+
+IMPORTANT: as of Camel 4.8.0 this feature is deprecated. Users should use the 
xref:langchain4j-tool-component.adoc[LangChain4j Tool component].
+
 Camel langchain4j-chat component as a consumer can be used to implement a 
LangChain tool.
 Right now tools are supported only via the OpenAiChatModel backed by OpenAI 
APIs.
 
diff --git 
a/components/camel-ai/camel-langchain4j-chat/src/main/java/org/apache/camel/component/langchain4j/chat/tool/CamelSimpleToolParameter.java
 
b/components/camel-ai/camel-langchain4j-chat/src/main/java/org/apache/camel/component/langchain4j/chat/tool/CamelSimpleToolParameter.java
index 0751c15240d..9d83d1d1fa6 100644
--- 
a/components/camel-ai/camel-langchain4j-chat/src/main/java/org/apache/camel/component/langchain4j/chat/tool/CamelSimpleToolParameter.java
+++ 
b/components/camel-ai/camel-langchain4j-chat/src/main/java/org/apache/camel/component/langchain4j/chat/tool/CamelSimpleToolParameter.java
@@ -22,6 +22,7 @@ import java.util.List;
  * langchain4j Simple Tool parameter implementation, this class can be used to 
provide multiple properties/input
  * parameters to the tool itself, the NamedJsonSchemaProperty can be then 
found as headers into the consumer route
  */
+@Deprecated(since = "4.8.0")
 public class CamelSimpleToolParameter {
 
     private final String description;
diff --git 
a/components/camel-ai/camel-langchain4j-chat/src/main/java/org/apache/camel/component/langchain4j/chat/tool/CamelToolExecutorCache.java
 
b/components/camel-ai/camel-langchain4j-chat/src/main/java/org/apache/camel/component/langchain4j/chat/tool/CamelToolExecutorCache.java
index 0107b4fc08a..17dcb918ad1 100644
--- 
a/components/camel-ai/camel-langchain4j-chat/src/main/java/org/apache/camel/component/langchain4j/chat/tool/CamelToolExecutorCache.java
+++ 
b/components/camel-ai/camel-langchain4j-chat/src/main/java/org/apache/camel/component/langchain4j/chat/tool/CamelToolExecutorCache.java
@@ -25,6 +25,7 @@ import java.util.concurrent.ConcurrentHashMap;
  * Caches Tools Specification and Consumer route reference by the chatId, so 
that different chats can have different
  * Tool implementation
  */
+@Deprecated(since = "4.8.0")
 public final class CamelToolExecutorCache {
 
     private Map<String, Set<CamelToolSpecification>> tools;
diff --git 
a/components/camel-ai/camel-langchain4j-chat/src/main/java/org/apache/camel/component/langchain4j/chat/tool/CamelToolSpecification.java
 
b/components/camel-ai/camel-langchain4j-chat/src/main/java/org/apache/camel/component/langchain4j/chat/tool/CamelToolSpecification.java
index 17409077998..5a5ff039e2f 100644
--- 
a/components/camel-ai/camel-langchain4j-chat/src/main/java/org/apache/camel/component/langchain4j/chat/tool/CamelToolSpecification.java
+++ 
b/components/camel-ai/camel-langchain4j-chat/src/main/java/org/apache/camel/component/langchain4j/chat/tool/CamelToolSpecification.java
@@ -25,6 +25,7 @@ import 
org.apache.camel.component.langchain4j.chat.LangChain4jChatConsumer;
  * Holds ToolSpecification needed by langchain4j and the associated Camel 
Consumer. In this way, a specific route can be
  * invoked by a specific Tool
  */
+@Deprecated(since = "4.8.0")
 public class CamelToolSpecification {
 
     private ToolSpecification toolSpecification;
diff --git 
a/components/camel-ai/camel-langchain4j-chat/src/main/java/org/apache/camel/component/langchain4j/chat/tool/NamedJsonSchemaProperty.java
 
b/components/camel-ai/camel-langchain4j-chat/src/main/java/org/apache/camel/component/langchain4j/chat/tool/NamedJsonSchemaProperty.java
index d187c780696..050d2553f0a 100644
--- 
a/components/camel-ai/camel-langchain4j-chat/src/main/java/org/apache/camel/component/langchain4j/chat/tool/NamedJsonSchemaProperty.java
+++ 
b/components/camel-ai/camel-langchain4j-chat/src/main/java/org/apache/camel/component/langchain4j/chat/tool/NamedJsonSchemaProperty.java
@@ -20,6 +20,7 @@ import java.util.List;
 
 import dev.langchain4j.agent.tool.JsonSchemaProperty;
 
+@Deprecated(since = "4.8.0")
 public class NamedJsonSchemaProperty {
 
     private final String name;

Reply via email to