davsclaus commented on code in PR #15396:
URL: https://github.com/apache/camel/pull/15396#discussion_r1741857763


##########
components/camel-ai/camel-langchain4j-tools/src/main/java/org/apache/camel/component/langchain4j/tools/LangChain4jToolsEndpoint.java:
##########
@@ -0,0 +1,198 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.langchain4j.tools;
+
+import java.util.Map;
+
+import dev.langchain4j.agent.tool.JsonSchemaProperty;
+import dev.langchain4j.agent.tool.ToolSpecification;
+import org.apache.camel.Category;
+import org.apache.camel.Consumer;
+import org.apache.camel.Processor;
+import org.apache.camel.Producer;
+import 
org.apache.camel.component.langchain4j.tools.spec.CamelSimpleToolParameter;
+import 
org.apache.camel.component.langchain4j.tools.spec.CamelToolExecutorCache;
+import 
org.apache.camel.component.langchain4j.tools.spec.CamelToolSpecification;
+import 
org.apache.camel.component.langchain4j.tools.spec.NamedJsonSchemaProperty;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriPath;
+import org.apache.camel.support.DefaultEndpoint;
+import org.apache.camel.util.StringHelper;
+
+import static 
org.apache.camel.component.langchain4j.tools.LangChain4jTools.SCHEME;
+
+@UriEndpoint(firstVersion = "4.8.0", scheme = SCHEME,
+             title = "LangChain4j Tools",
+             syntax = "langchain4j-tools:toolId",
+             category = { Category.AI })
+public class LangChain4jToolsEndpoint extends DefaultEndpoint {
+
+    @Metadata(required = true)
+    @UriPath(description = "The tool name")
+    private final String toolId;
+
+    @Metadata(required = true)
+    @UriParam(description = "The tags for the tools")
+    private String tags;
+
+    @UriParam
+    private LangChain4jToolsConfiguration configuration;
+
+    @Metadata(label = "consumer")
+    @UriParam(description = "Tool description")
+    private String description;
+
+    @Metadata(label = "consumer")
+    @UriParam(description = "List of Tool parameters in the form of 
parameter.<name>=<type>", prefix = "parameter.",
+              multiValue = true, enums = 
"string,integer,number,object,array,boolean,null")

Review Comment:
   No changes needed. Just that the UI folks should be aware for multi value = 
true, and enum, then the enum is for the values.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to