Skip to content

Commit 63e8af3

Browse files
committed
Merge 'llmshield/dev-online-1.7.1' into 'master'
fix: javadoc检验错误 See merge request: !792
2 parents cc2de34 + 1b44c3e commit 63e8af3

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

volcengine-java-sdk-llmshield/src/main/java/com/volcengine/llmshield/ApiClient.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,19 @@ public static ApiClient New(String url, String ak, String sk, String region, lon
8888
* @param ak 访问密钥
8989
* @param sk 密钥
9090
* @param region 区域
91-
* @param proxy 代理地址
91+
* @param proxy 代理地址(如 http://127.0.0.1:8080,无代理则传 null)
92+
* @param connMax 最大连接数
9293
* @param timeout 连接超时时间(毫秒)
9394
* @return 客户端实例
95+
* @throws MalformedURLException 如果 URL 格式不正确
9496
*/
9597
public static ApiClient New(String url, String ak, String sk, String region, long timeout, String proxy, int connMax) throws MalformedURLException {
9698
return new ApiClient(url, ak, sk, region, timeout, proxy, connMax);
9799
}
98100

99101
/**
100102
* 关闭客户端
101-
*
102-
* @return 无
103+
* @throws IOException 如果关闭时发生 IO 异常
103104
*/
104105
public void Close() throws IOException {
105106
try {
@@ -112,12 +113,15 @@ public void Close() throws IOException {
112113
/**
113114
* 设置环境
114115
* @param IsDev 是否为dev环境
115-
* @return 无
116116
*/
117117
public void SetServiceDev(boolean IsDev) {
118118
Sign.setServiceDev(IsDev);
119119
}
120120

121+
/**
122+
* 设置环境
123+
* @return 返回运行环境信息
124+
*/
121125
public String GetServiceCode() {
122126
return Sign.getServiceCode();
123127
}

volcengine-java-sdk-llmshield/src/main/java/com/volcengine/llmshield/Sign.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,13 @@ public static String getServiceCode() {
8787
*
8888
* @param httpPost 待加签的 HttpPost 请求(需提前设置请求体,若有)
8989
* @param uri 请求的 URI(包含 host、path、query 参数,如 https://iam.volcengineapi.com/?Limit=1)
90+
* @param action 请求方法
9091
* @param ak 访问密钥 AK
9192
* @param sk 密钥 SK
9293
* @param region 地域(如 cn-beijing,需与 API 所属地域一致)
9394
* @throws Exception 加签过程中异常(如加密算法异常、请求体读取异常)
9495
*/
95-
public void DoSignRequest(HttpPost httpPost, URI uri,String action, String ak, String sk,
96+
public void DoSignRequest(HttpPost httpPost, URI uri, String action, String ak, String sk,
9697
String region) throws Exception{
9798
String method = httpPost.getMethod();
9899
String path = uri.getPath();

0 commit comments

Comments
 (0)