Explorar el Código

fix Header "x-dashscope-datainspection" authentication failed.

deason hace 2 meses
padre
commit
2e8d37b29f

+ 3 - 3
src/main/java/com/qmth/ops/biz/ai/client/aliyun/llm/AliyunChatClient.java

@@ -28,9 +28,9 @@ public class AliyunChatClient extends ChatApiClient {
     @Override
     protected Headers buildHeader(Headers.Builder headerBuilder, LlmAppType appType) {
         headerBuilder.add(AUTH_HEADER_NAME, AUTH_HEADER_VALUE + getConfig().getSecret());
-        if (appType == LlmAppType.AUTO_SCORE) {
-            headerBuilder.add("X-DashScope-DataInspection", "{\"input\":\"disable\", \"output\":\"disable\"}");
-        }
+        // if (appType == LlmAppType.AUTO_SCORE) {
+        //     headerBuilder.add("X-DashScope-DataInspection", "{\"input\":\"disable\", \"output\":\"disable\"}");
+        // }
         return headerBuilder.build();
     }