|
@@ -7,9 +7,9 @@ import com.qmth.boot.core.exception.ReentrantException;
|
|
|
import com.qmth.boot.core.exception.StatusException;
|
|
|
import com.qmth.ops.biz.ai.client.ChatApiClient;
|
|
|
import com.qmth.ops.biz.ai.client.ChatApiConfig;
|
|
|
-import com.qmth.ops.biz.ai.client.Credentials;
|
|
|
import com.qmth.ops.biz.ai.client.aliyun.AliyunError;
|
|
|
import com.qmth.ops.biz.ai.exception.ChatRequestError;
|
|
|
+import okhttp3.Headers;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
@@ -24,8 +24,9 @@ public class AliyunChatClient extends ChatApiClient {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- protected Credentials gerCredentials() {
|
|
|
- return new Credentials(AUTH_HEADER_NAME, AUTH_HEADER_VALUE + getConfig().getSecret());
|
|
|
+ protected Headers buildHeader(Headers.Builder headerBuilder) {
|
|
|
+ return headerBuilder.add(AUTH_HEADER_NAME, AUTH_HEADER_VALUE + getConfig().getSecret())
|
|
|
+ .add("X-DashScope-DataInspection", "{\"input\":\"disable\", \"output\":\"disable\"}").build();
|
|
|
}
|
|
|
|
|
|
@Override
|