public class MaasServiceImpl extends BaseServiceImpl implements MaasService
apiInfoList, credentials, ISigner, serviceInfo| 构造器和说明 |
|---|
MaasServiceImpl(String host,
String region) |
MaasServiceImpl(String host,
String region,
int connectionTimeout,
int socketTimeout) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
applyKey(String endpointId,
Integer ttl,
List<String> endpointIdList) |
ChatResp |
chat(String endpointId,
ChatReq req) |
ClassificationResp |
classification(String endpointId,
ClassificationReq req) |
CreateOrRefreshAPIKeyResp |
createOrRefreshAPIKey(CreateOrRefreshAPIKeyReq req) |
EmbeddingsResp |
embeddings(String endpointId,
EmbeddingsReq req) |
String |
getAPIKey() |
Integer |
getAPIKeyTtl() |
String |
getKey(String endpointId) |
protected RawResponse |
makeReq(String api,
SignableRequest request,
String apikey) |
void |
setApikey(String apikey) |
void |
setAPIKeyTtl(Integer apikeyTtl) |
Stream<ChatResp> |
streamChat(String endpointId,
ChatReq req) |
TokenizeResp |
tokenization(String endpointId,
TokenizeReq req) |
destroy, getAccessKey, getApiInfoList, getHttpClient, getISigner, getRegion, getSecretKey, getServiceInfo, getSessionToken, getSignUrl, json, makeRequest, post, postFileMultiPart, prepareRequest, proto, put, putData, putData, putDataWithResponse, putDataWithResponse, query, setAccessKey, setClientNoReuse, setConnectionTimeout, setHost, setHttpClient, setRegion, setScheme, setSecretKey, setServiceInfo, setSessionToken, setSocketTimeout, signSts2clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroy, getAccessKey, getRegion, getSecretKey, getSessionToken, getSignUrl, json, post, proto, put, putData, query, setAccessKey, setClientNoReuse, setConnectionTimeout, setHost, setHttpClient, setRegion, setScheme, setSecretKey, setServiceInfo, setSessionToken, setSocketTimeout, signSts2public String getAPIKey()
getAPIKey 在接口中 MaasServicepublic void setApikey(String apikey)
setApikey 在接口中 MaasServicepublic Integer getAPIKeyTtl()
getAPIKeyTtl 在接口中 MaasServicepublic void setAPIKeyTtl(Integer apikeyTtl)
setAPIKeyTtl 在接口中 MaasServicepublic ChatResp chat(String endpointId, ChatReq req) throws MaasException
chat 在接口中 MaasServiceMaasExceptionpublic TokenizeResp tokenization(String endpointId, TokenizeReq req) throws MaasException
tokenization 在接口中 MaasServiceMaasExceptionpublic ClassificationResp classification(String endpointId, ClassificationReq req) throws MaasException
classification 在接口中 MaasServiceMaasExceptionpublic EmbeddingsResp embeddings(String endpointId, EmbeddingsReq req) throws MaasException
embeddings 在接口中 MaasServiceMaasExceptionpublic CreateOrRefreshAPIKeyResp createOrRefreshAPIKey(CreateOrRefreshAPIKeyReq req) throws Exception
createOrRefreshAPIKey 在接口中 MaasServiceExceptionpublic Stream<ChatResp> streamChat(String endpointId, ChatReq req) throws MaasException
streamChat 在接口中 MaasServiceMaasExceptionprotected RawResponse makeReq(String api, SignableRequest request, String apikey)
Copyright © 2024. All rights reserved.