Class HalfDuplexParamBase
java.lang.Object
com.alibaba.dashscope.applications.agentstudio.base.HalfDuplexParamBase
- Direct Known Subclasses:
FlattenHalfDuplexParamBase,GeneralGetParam
The user input and parameter.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classHalfDuplexParamBase.HalfDuplexParamBaseBuilder<C extends HalfDuplexParamBase,B extends HalfDuplexParamBase.HalfDuplexParamBaseBuilder<C, B>> -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe apiKey.abstract ByteBufferGet the binary data, only websocket, if no binary data, return null.The custom http header.abstract com.google.gson.JsonObjectGet the batch request data.abstract ObjectgetInput()Get the request input data.abstract StringgetModel()The service parameters.abstract ObjectGet the request resourcesworkspaceinthashCode()booleanOpen security checkvoidThe apiKey.voidsetEnableEncrypt(Boolean enableEncrypt) voidsetHeaders(Map<String, Object> headers) The custom http header.voidsetParameters(Map<String, Object> parameters) The extra parameters.voidsetSecurityCheck(boolean securityCheck) Open security checkvoidsetWorkspace(String workspace) workspacebooleanWhether explicitly added JSON null values should be preserved when serializing the HTTP body.toString()abstract voidvalidate()Validate the input and parameters.
-
Field Details
-
parameters
The extra parameters. -
headers
The custom http header.
-
-
Constructor Details
-
HalfDuplexParamBase
-
-
Method Details
-
getModel
-
getParameters
The service parameters.- Returns:
- The parameters
-
getHeaders
The custom http header.- Returns:
- The headers.
-
getHttpBody
public abstract com.google.gson.JsonObject getHttpBody()Get the batch request data. Http body include {"model": "model_name", "input": "input data", "parameters": "The request parameters"}- Returns:
- The http request body
-
shouldSerializeExplicitNulls
public boolean shouldSerializeExplicitNulls()Whether explicitly added JSON null values should be preserved when serializing the HTTP body.- Returns:
trueto preserve explicit JSON null values
-
getInput
Get the request input data.- Returns:
- The input data object.
-
getResources
Get the request resources- Returns:
- The resource object
-
getBinaryData
Get the binary data, only websocket, if no binary data, return null.- Returns:
- The binary data
-
validate
Validate the input and parameters.- Throws:
InputRequiredException- Missing input fields.
-
getApiKey
The apiKey. -
isSecurityCheck
public boolean isSecurityCheck()Open security check -
getWorkspace
workspace -
getEnableEncrypt
-
setApiKey
The apiKey. -
setSecurityCheck
public void setSecurityCheck(boolean securityCheck) Open security check -
setWorkspace
workspace -
setEnableEncrypt
-
setParameters
The extra parameters. -
setHeaders
The custom http header. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-