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


##########
dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/OpenAIEndpointBuilderFactory.java:
##########
@@ -7061,6 +7065,70 @@ default OpenAIEndpointBuilder openai(String path) {
         default OpenAIEndpointBuilder openai(String componentName, String 
path) {
             return OpenAIEndpointBuilderFactory.endpointBuilder(componentName, 
path);
         }
+        /**
+         * LLM (camel-openai)
+         * LLM endpoint for chat completion, Responses API, embeddings, audio
+         * transcription, audio translation, and text-to-speech using
+         * OpenAI-compatible APIs. The openai scheme is a supported alias.
+         * 
+         * Category: ai
+         * Since: 4.17
+         * Maven coordinates: org.apache.camel:camel-openai
+         * 
+         * Syntax: <code>llm:operation</code>
+         * 
+         * Path parameter: operation (required)
+         * The operation to perform: 'chat-completion', 'responses',
+         * 'responses-retrieve', 'responses-cancel', 'batch', 'batch-retrieve',
+         * 'batch-cancel', 'batch-results', 'embeddings', 'tool-execution',
+         * 'audio-transcription', 'audio-translation', 'audio-speech',
+         * 'moderation', 'image-generation', 'image-edit', or 'webhook' (a
+         * consumer)
+         * There are 17 enums and the value can be one of: chat-completion,
+         * responses, responses-retrieve, responses-cancel, batch,
+         * batch-retrieve, batch-cancel, batch-results, embeddings,
+         * tool-execution, audio-transcription, audio-translation, 
audio-speech,
+         * moderation, image-generation, image-edit, webhook
+         * 
+         * @param path operation
+         * @return the dsl builder
+         */
+        default OpenAIEndpointBuilder llm(String path) {
+            return OpenAIEndpointBuilderFactory.endpointBuilder("llm", path);
+        }
+        /**
+         * LLM (camel-openai)
+         * LLM endpoint for chat completion, Responses API, embeddings, audio
+         * transcription, audio translation, and text-to-speech using
+         * OpenAI-compatible APIs. The openai scheme is a supported alias.
+         * 
+         * Category: ai
+         * Since: 4.17
+         * Maven coordinates: org.apache.camel:camel-openai
+         * 
+         * Syntax: <code>llm:operation</code>
+         * 
+         * Path parameter: operation (required)
+         * The operation to perform: 'chat-completion', 'responses',
+         * 'responses-retrieve', 'responses-cancel', 'batch', 'batch-retrieve',
+         * 'batch-cancel', 'batch-results', 'embeddings', 'tool-execution',
+         * 'audio-transcription', 'audio-translation', 'audio-speech',
+         * 'moderation', 'image-generation', 'image-edit', or 'webhook' (a
+         * consumer)
+         * There are 17 enums and the value can be one of: chat-completion,
+         * responses, responses-retrieve, responses-cancel, batch,
+         * batch-retrieve, batch-cancel, batch-results, embeddings,
+         * tool-execution, audio-transcription, audio-translation, 
audio-speech,
+         * moderation, image-generation, image-edit, webhook
+         * 
+         * @param componentName to use a custom component name for the endpoint
+         * instead of the default name
+         * @param path operation
+         * @return the dsl builder
+         */
+        default OpenAIEndpointBuilder llm(String componentName, String path) {

Review Comment:
   This method is in a generated file, but the generator will not produce it: 
the velocity templates only generate it for the *first* scheme of a component 
that has more than one. Compare `http,https`, `imap,imaps` and `coap,coaps` on 
main, which have no alias version of it. The next regeneration will delete it, 
and the CI uncommitted-changes check should fail. Please remove it and 
regenerate instead of adding it by hand.



##########
docs/components/modules/ROOT/examples/json/llm.json:
##########
@@ -0,0 +1,254 @@
+{

Review Comment:
   This should be a symlink (mode 120000) to the generated `llm.json` in 
camel-openai, like the rest of this directory, rather than a copy.



##########
dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java:
##########
@@ -11272,6 +11272,68 @@ public static 
LdifEndpointBuilderFactory.LdifEndpointBuilder ldif(String path) {
     public static LdifEndpointBuilderFactory.LdifEndpointBuilder ldif(String 
componentName, String path) {
         return LdifEndpointBuilderFactory.endpointBuilder(componentName, path);
     }
+    /**
+     * LLM (camel-openai)
+     * LLM endpoint for chat completion, Responses API, embeddings, audio
+     * transcription, audio translation, and text-to-speech using
+     * OpenAI-compatible APIs. The openai scheme is a supported alias.
+     * 
+     * Category: ai
+     * Since: 4.17
+     * Maven coordinates: org.apache.camel:camel-openai
+     * 
+     * Syntax: <code>llm:operation</code>
+     * 
+     * Path parameter: operation (required)
+     * The operation to perform: 'chat-completion', 'responses',
+     * 'responses-retrieve', 'responses-cancel', 'batch', 'batch-retrieve',
+     * 'batch-cancel', 'batch-results', 'embeddings', 'tool-execution',
+     * 'audio-transcription', 'audio-translation', 'audio-speech', 
'moderation',
+     * 'image-generation', 'image-edit', or 'webhook' (a consumer)
+     * There are 17 enums and the value can be one of: chat-completion,
+     * responses, responses-retrieve, responses-cancel, batch, batch-retrieve,
+     * batch-cancel, batch-results, embeddings, tool-execution,
+     * audio-transcription, audio-translation, audio-speech, moderation,
+     * image-generation, image-edit, webhook
+     * 
+     * @param path operation
+     * @return the dsl builder
+     */
+    public static OpenAIEndpointBuilderFactory.OpenAIEndpointBuilder 
llm(String path) {
+        return openai("llm", path);
+    }
+    /**
+     * LLM (camel-openai)
+     * LLM endpoint for chat completion, Responses API, embeddings, audio
+     * transcription, audio translation, and text-to-speech using
+     * OpenAI-compatible APIs. The openai scheme is a supported alias.
+     * 
+     * Category: ai
+     * Since: 4.17
+     * Maven coordinates: org.apache.camel:camel-openai
+     * 
+     * Syntax: <code>llm:operation</code>
+     * 
+     * Path parameter: operation (required)
+     * The operation to perform: 'chat-completion', 'responses',
+     * 'responses-retrieve', 'responses-cancel', 'batch', 'batch-retrieve',
+     * 'batch-cancel', 'batch-results', 'embeddings', 'tool-execution',
+     * 'audio-transcription', 'audio-translation', 'audio-speech', 
'moderation',
+     * 'image-generation', 'image-edit', or 'webhook' (a consumer)
+     * There are 17 enums and the value can be one of: chat-completion,
+     * responses, responses-retrieve, responses-cancel, batch, batch-retrieve,
+     * batch-cancel, batch-results, embeddings, tool-execution,
+     * audio-transcription, audio-translation, audio-speech, moderation,
+     * image-generation, image-edit, webhook
+     * 
+     * @param componentName to use a custom component name for the endpoint
+     * instead of the default name
+     * @param path operation
+     * @return the dsl builder
+     */
+    public static OpenAIEndpointBuilderFactory.OpenAIEndpointBuilder 
llm(String componentName, String path) {

Review Comment:
   This method is in a generated file, but the generator will not produce it: 
the velocity templates only generate it for the *first* scheme of a component 
that has more than one. Compare `http,https`, `imap,imaps` and `coap,coaps` on 
main, which have no alias version of it. The next regeneration will delete it, 
and the CI uncommitted-changes check should fail. Please remove it and 
regenerate instead of adding it by hand.



##########
dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java:
##########
@@ -3007,6 +3008,21 @@ public static 
OpaEndpointBuilderFactory.OpaHeaderNameBuilder opa() {
     public static OpenAIEndpointBuilderFactory.OpenAIHeaderNameBuilder 
openai() {
         return OpenAIEndpointBuilderFactory.OpenAIHeaderNameBuilder.INSTANCE;
     }
+    /**
+     * LLM (camel-openai)
+     * LLM endpoint for chat completion, Responses API, embeddings, audio
+     * transcription, audio translation, and text-to-speech using
+     * OpenAI-compatible APIs. The openai scheme is a supported alias.
+     * 
+     * Category: ai
+     * Since: 4.17
+     * Maven coordinates: org.apache.camel:camel-openai
+     * 
+     * @return the dsl builder for the headers' name.
+     */
+    public static OpenAIEndpointBuilderFactory.OpenAIHeaderNameBuilder llm() {

Review Comment:
   This method is in a generated file, but the generator will not produce it: 
the velocity templates only generate it for the *first* scheme of a component 
that has more than one. Compare `http,https`, `imap,imaps` and `coap,coaps` on 
main, which have no alias version of it. The next regeneration will delete it, 
and the CI uncommitted-changes check should fail. Please remove it and 
regenerate instead of adding it by hand.



-- 
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