InferenceResult A model used in x-related-resource for grouping actions with no returned body.
type InferenceResult struct { // The predict result returned by model Data []byte `mandatory:"true" json:"data"` }
func (m InferenceResult) String() string
func (m InferenceResult) ValidateEnumValue() (bool, error)
ValidateEnumValue returns an error when providing an unsupported enum value This function is being called during constructing API request process Not recommended for calling this function directly
ModelDeploymentClient a client for ModelDeployment
type ModelDeploymentClient struct { common.BaseClient // contains filtered or unexported fields }
func NewModelDeploymentClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client ModelDeploymentClient, err error)
NewModelDeploymentClientWithConfigurationProvider Creates a new default ModelDeployment client with the given configuration provider. the configuration provider will be used for the default signer as well as reading the region
func NewModelDeploymentClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client ModelDeploymentClient, err error)
NewModelDeploymentClientWithOboToken Creates a new default ModelDeployment client with the given configuration provider. The obotoken will be added to default headers and signed; the configuration provider will be used for the signer
as well as reading the region
func (client *ModelDeploymentClient) ConfigurationProvider() *common.ConfigurationProvider
ConfigurationProvider the ConfigurationProvider used in this client, or null if none set
func (client ModelDeploymentClient) Predict(ctx context.Context, request PredictRequest) (response PredictResponse, err error)
Predict Invoking a model deployment calls the predict endpoint of the model deployment URI. This endpoint takes sample data as input and is processed using the predict() function in score.py model artifact file
Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/modeldeployment/Predict.go.html to see an example of how to use Predict API. A default retry strategy applies to this operation Predict()
func (client ModelDeploymentClient) PredictWithResponseStream(ctx context.Context, request PredictWithResponseStreamRequest) (response PredictWithResponseStreamResponse, err error)
PredictWithResponseStream Invoking a model deployment calls the predictWithResponseStream endpoint of the model deployment URI to get the streaming result. This endpoint takes sample data as input and is processed using the predict() function in score.py model artifact file
Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/modeldeployment/PredictWithResponseStream.go.html to see an example of how to use PredictWithResponseStream API. A default retry strategy applies to this operation PredictWithResponseStream()
func (client *ModelDeploymentClient) SetCustomClientConfiguration(config common.CustomClientConfiguration)
SetCustomClientConfiguration sets client with retry and other custom configurations
func (client *ModelDeploymentClient) SetRegion(region string)
SetRegion overrides the region of this client.
PredictRequest wrapper for the Predict operation
Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/modeldeployment/Predict.go.html to see an example of how to use PredictRequest.
type PredictRequest struct { // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model deployment. ModelDeploymentId *string `mandatory:"true" contributesTo:"path" name:"modelDeploymentId"` // Input data details for making a prediction call RequestBody *string `mandatory:"true" contributesTo:"body"` // Unique Oracle identifier for request OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata }
func (request PredictRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool)
BinaryRequestBody implements the OCIRequest interface
func (request PredictRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error)
HTTPRequest implements the OCIRequest interface
func (request PredictRequest) RetryPolicy() *common.RetryPolicy
RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
func (request PredictRequest) String() string
func (request PredictRequest) ValidateEnumValue() (bool, error)
ValidateEnumValue returns an error when providing an unsupported enum value This function is being called during constructing API request process Not recommended for calling this function directly
PredictResponse wrapper for the Predict operation
type PredictResponse struct { // The underlying http response RawResponse *http.Response // The string instance Value *string `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact // Oracle about a particular request, please provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` }
func (response PredictResponse) HTTPResponse() *http.Response
HTTPResponse implements the OCIResponse interface
func (response PredictResponse) String() string
PredictWithResponseStreamRequest wrapper for the PredictWithResponseStream operation
Click https://docs.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/modeldeployment/PredictWithResponseStream.go.html to see an example of how to use PredictWithResponseStreamRequest.
type PredictWithResponseStreamRequest struct { // The OCID (https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model deployment. ModelDeploymentId *string `mandatory:"true" contributesTo:"path" name:"modelDeploymentId"` // Input data details for making a prediction call RequestBody *string `mandatory:"true" contributesTo:"body"` // Unique Oracle identifier for request OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata }
func (request PredictWithResponseStreamRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool)
BinaryRequestBody implements the OCIRequest interface
func (request PredictWithResponseStreamRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error)
HTTPRequest implements the OCIRequest interface
func (request PredictWithResponseStreamRequest) RetryPolicy() *common.RetryPolicy
RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
func (request PredictWithResponseStreamRequest) String() string
func (request PredictWithResponseStreamRequest) ValidateEnumValue() (bool, error)
ValidateEnumValue returns an error when providing an unsupported enum value This function is being called during constructing API request process Not recommended for calling this function directly
PredictWithResponseStreamResponse wrapper for the PredictWithResponseStream operation
type PredictWithResponseStreamResponse struct { // The underlying http response RawResponse *http.Response // The io.ReadCloser instance Content io.ReadCloser `presentIn:"body" encoding:"binary"` // Unique Oracle-assigned identifier for the request. If you need to contact // Oracle about a particular request, please provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` }
func (response PredictWithResponseStreamResponse) HTTPResponse() *http.Response
HTTPResponse implements the OCIResponse interface
func (response PredictWithResponseStreamResponse) String() string