corgy-w commented on code in PR #9673:
URL: https://github.com/apache/seatunnel/pull/9673#discussion_r2258701392
##########
docs/en/transform-v2/embedding.md:
##########
@@ -19,7 +19,7 @@ different API endpoints.
| secret_key | string | yes | - | The
secret key required for additional authentication with the embedding service.
|
| aws_region | string | no | | AWS
Region. Required for use Amazon Bedrock model.
|
| single_vectorized_input_number | int | no | 1 | The
number of inputs vectorized in one request. Default is 1.
|
-| vectorization_fields | map | yes | - | A
mapping between input fields and their corresponding output vector fields.
|
+| vectorization_fields | map | yes | - | A
mapping between input fields and their corresponding output vector fields.
Supports multimodal field specifications with format
`field_name:modality_type`. |
| model | string | yes | - | The
specific model to use for embedding (e.g: `text-embedding-3-small` for OPENAI).
|
| api_path | string | no | - | The API
endpoint for the embedding service. Typically provided by the model provider.
|
| dimension | int | no | - | TThe
vector dimension defaults to 2048. The Embedding-3 model supports custom vector
dimensions, and it is recommended to choose dimensions of 256, 512, 1024, or
2048. |
Review Comment:
Please help modify it. There's an extra "T" here
##########
seatunnel-transforms-v2/src/main/java/org/apache/seatunnel/transform/nlpmodel/embedding/multimodal/MultimodalField.java:
##########
@@ -0,0 +1,55 @@
+/*
+ * 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.seatunnel.transform.nlpmodel.embedding.multimodal;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.ToString;
+
+@Getter
+@AllArgsConstructor
+@ToString
+public class MultimodalField {
+
+ private String fieldName;
+ private ModalityType modalityType;
+
+ public MultimodalField(String fieldSpec) {
+ if (fieldSpec == null || fieldSpec.trim().isEmpty()) {
+ throw new IllegalArgumentException("Field specification cannot be
null or empty");
+ }
+
+ String trimmedSpec = fieldSpec.trim();
+ if (trimmedSpec.contains(":")) {
Review Comment:
When creating columns in the database, it is possible to add `:`, but is it
incompatible here
--
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]