luigidemasi commented on code in PR #26684: URL: https://github.com/apache/camel/pull/26684#discussion_r4063945697
########## components/camel-ai/camel-jev/src/main/java/org/apache/camel/component/jev/JevConfiguration.java: ########## @@ -0,0 +1,138 @@ +/* + * 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.jev; + +import java.net.URI; + +import org.apache.camel.spi.Metadata; +import org.apache.camel.spi.UriParam; +import org.apache.camel.spi.UriParams; +import org.apache.camel.util.ObjectHelper; + +@UriParams +public class JevConfiguration implements Cloneable { + @UriParam(label = "security", security = "secret") + @Metadata(required = true) + private String apiKey; + @UriParam(label = "common", defaultValue = "https://api.typesafe.ai") + private String baseUrl = "https://api.typesafe.ai"; + @UriParam(label = "common", defaultValue = "jev-latest") + private String model = "jev-latest"; + @UriParam(label = "common", defaultValue = "30000") + private long requestTimeout = 30000; + + @UriParam(label = "common") + private String questions; + @UriParam(label = "common") + private String state = "${body}"; + @UriParam(label = "producer") + private String resultProperty; + + public String getQuestions() { + return questions; + } + + /** + * A JSON object mapping question names to Noul, Choice or Score question objects. When set, producers evaluate the + * selected message state; otherwise the body must contain a complete request map. + */ + public void setQuestions(String questions) { + this.questions = questions; + } + + public String getState() { + return state; + } + + /** The Simple expression selecting state for configured questions. If not set, the message body is used. */ + public void setState(String state) { + this.state = state; + } + + public String getResultProperty() { + return resultProperty; + } + + /** Store the producer response in this exchange property, preserving the original message body. */ + public void setResultProperty(String resultProperty) { + this.resultProperty = resultProperty; + } + + public String getApiKey() { + return apiKey; + } + + /** The API key used for Bearer authentication. */ + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getBaseUrl() { + return baseUrl; + } + + /** The API base URL. The client appends /v1/systemone. Redirects are not followed. */ + public void setBaseUrl(String baseUrl) { Review Comment: The documentation failure was already fixed in 41bc23c1de64b47803f445d12640b5ab42209115 by removing `@UriParam(defaultValue = "${body}")`, matching Claus's original suggestion. The field initializer remains to provide the runtime body fallback. I checked the generated component and endpoint option metadata: neither `state` entry contains a `defaultValue`, and the catalog mirrors match. The [PR doc validation run for that commit passed](https://github.com/apache/camel/actions/runs/35610372178/job/106367673607). The latest local rendering, including the new concurrency option, also produces zero warnings. The field initializer is therefore not being rendered into the option tables here, so removing it or changing null/blank-state behavior is unnecessary. _AI-generated by OpenAI Codex on behalf of @luigidemasi via /oss-address-review._ -- 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]
