From 3bd346ea77d293f271cabaf818d00703d6b51942 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=99=88=E5=AD=90=E9=BB=98?= <925456043@qq.com>
Date: Sun, 14 Jun 2026 16:09:07 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=A2=9E=E5=8A=A0=20F?=
=?UTF-8?q?AQ=20=E6=8A=A5=E9=94=99=E7=9A=84=20bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../easy-agents-embedding-openai/pom.xml | 5 ++
.../openai/OpenAIEmbeddingModel.java | 70 ++++++++++++------
.../openai/OpenAIEmbeddingModelTest.java | 71 +++++++++++++++++++
3 files changed, 126 insertions(+), 20 deletions(-)
create mode 100644 easy-agents-embedding/easy-agents-embedding-openai/src/test/java/com/easyagents/embedding/openai/OpenAIEmbeddingModelTest.java
diff --git a/easy-agents-embedding/easy-agents-embedding-openai/pom.xml b/easy-agents-embedding/easy-agents-embedding-openai/pom.xml
index 78d5db0..9f79b2d 100644
--- a/easy-agents-embedding/easy-agents-embedding-openai/pom.xml
+++ b/easy-agents-embedding/easy-agents-embedding-openai/pom.xml
@@ -21,6 +21,11 @@
- * Licensed 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 com.easyagents.embedding.openai;
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
import com.easyagents.core.document.Document;
import com.easyagents.core.model.client.HttpClient;
import com.easyagents.core.model.embedding.BaseEmbeddingModel;
@@ -24,10 +11,9 @@ import com.easyagents.core.store.VectorData;
import com.easyagents.core.util.JSONUtil;
import com.easyagents.core.util.Maps;
import com.easyagents.core.util.StringUtil;
-import com.alibaba.fastjson2.JSON;
-import com.alibaba.fastjson2.JSONObject;
import java.util.HashMap;
+import java.util.Locale;
import java.util.Map;
public class OpenAIEmbeddingModel extends BaseEmbeddingModel