xiaochen-zhou commented on code in PR #8790:
URL: https://github.com/apache/seatunnel/pull/8790#discussion_r1966970410


##########
seatunnel-transforms-v2/src/main/java/org/apache/seatunnel/transform/nlpmodel/embedding/remote/AbstractModel.java:
##########
@@ -42,23 +42,23 @@ protected AbstractModel(Integer 
singleVectorizedInputNumber) {
     public List<ByteBuffer> vectorization(Object[] fields) throws IOException {
         List<ByteBuffer> result = new ArrayList<>();
 
-        List<List<Float>> vectors = batchProcess(fields, 
singleVectorizedInputNumber);
-        for (List<Float> vector : vectors) {
-            result.add(BufferUtils.toByteBuffer(vector.toArray(new Float[0])));
+        List<List<Double>> vectors = batchProcess(fields, 
singleVectorizedInputNumber);

Review Comment:
   > Overall LGTM. Only one question is why change this type?
   
   In some models, such as the official SDK provided by Zhipu, the type 
returned after embedding is Double. Therefore, I think our current use of Float 
may not meet the requirements
   
   
![image](https://github.com/user-attachments/assets/afc74922-1f0d-4e09-9951-d6b7a71ae8bb)
   



-- 
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: commits-unsubscr...@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to