Documentation ¶
Index ¶
- type Choice
- type CreateModelRequest
- type CreateModelResponse
- type DeleteModelRequest
- type DeleteModelResponse
- type Feature
- type GetStateRequest
- type ListModelsRequest
- type ListModelsResponse
- type Model
- type ModelOptions
- type PredictRequest
- type PredictResponse
- type PredictedChoice
- type PutStateRequest
- type PutStateResponse
- type RewardRequest
- type RewardResponse
- type SuggestionboxClient
- func (c *SuggestionboxClient) CreateModel(ctx context.Context, request *CreateModelRequest) (*CreateModelResponse, error)
- func (c *SuggestionboxClient) CreateModelMulti(ctx context.Context, requests []*CreateModelRequest) ([]*CreateModelResponse, error)
- func (c *SuggestionboxClient) DeleteModel(ctx context.Context, request *DeleteModelRequest) (*DeleteModelResponse, error)
- func (c *SuggestionboxClient) DeleteModelMulti(ctx context.Context, requests []*DeleteModelRequest) ([]*DeleteModelResponse, error)
- func (c *SuggestionboxClient) GetState(ctx context.Context, request *GetStateRequest) (io.ReadCloser, error)
- func (c *SuggestionboxClient) ListModels(ctx context.Context, request *ListModelsRequest) (*ListModelsResponse, error)
- func (c *SuggestionboxClient) ListModelsMulti(ctx context.Context, requests []*ListModelsRequest) ([]*ListModelsResponse, error)
- func (c *SuggestionboxClient) Predict(ctx context.Context, request *PredictRequest) (*PredictResponse, error)
- func (c *SuggestionboxClient) PredictMulti(ctx context.Context, requests []*PredictRequest) ([]*PredictResponse, error)
- func (c *SuggestionboxClient) PutState(ctx context.Context, request *PutStateRequest) (*PutStateResponse, error)
- func (c *SuggestionboxClient) PutStateMulti(ctx context.Context, requests []*PutStateRequest) ([]*PutStateResponse, error)
- func (c *SuggestionboxClient) Reward(ctx context.Context, request *RewardRequest) (*RewardResponse, error)
- func (c *SuggestionboxClient) RewardMulti(ctx context.Context, requests []*RewardRequest) ([]*RewardResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateModelRequest ¶
type CreateModelRequest struct {
Model Model `json:"model"`
}
type CreateModelResponse ¶
type CreateModelResponse struct { // Error is an error message if one occurred. Error string `json:"error"` }
type DeleteModelRequest ¶
type DeleteModelRequest struct {
ModelID string `json:"model_id"`
}
type DeleteModelResponse ¶
type DeleteModelResponse struct { // Error is an error message if one occurred. Error string `json:"error"` }
type Feature ¶
type Feature struct { Key string `json:"key"` Type string `json:"type"` Value string `json:"value"` File remototypes.File `json:"file"` }
type GetStateRequest ¶
type GetStateRequest struct { }
type ListModelsRequest ¶
type ListModelsRequest struct { }
type ListModelsResponse ¶
type Model ¶
type Model struct { ID string `json:"id"` Name string `json:"name"` Options ModelOptions `json:"options"` Choices []Choice `json:"choices"` }
type ModelOptions ¶
type PredictRequest ¶
type PredictResponse ¶
type PredictResponse struct { Choices []PredictedChoice `json:"choices"` // Error is an error message if one occurred. Error string `json:"error"` }
type PredictedChoice ¶
type PutStateRequest ¶
type PutStateRequest struct {
StateFile remototypes.File `json:"state_file"`
}
func (*PutStateRequest) SetStateFile ¶
func (s *PutStateRequest) SetStateFile(ctx context.Context, filename string, r io.Reader) context.Context
SetStateFile sets the file for the StateFile field.
type PutStateResponse ¶
type PutStateResponse struct { // Error is an error message if one occurred. Error string `json:"error"` }
type RewardRequest ¶
type RewardResponse ¶
type RewardResponse struct { // Error is an error message if one occurred. Error string `json:"error"` }
type SuggestionboxClient ¶
type SuggestionboxClient struct {
// contains filtered or unexported fields
}
SuggestionboxClient accesses remote Suggestionbox services.
func NewSuggestionboxClient ¶
func NewSuggestionboxClient(endpoint string, client *http.Client) *SuggestionboxClient
NewSuggestionboxClient makes a new SuggestionboxClient that will use the specified http.Client to make requests.
func (*SuggestionboxClient) CreateModel ¶
func (c *SuggestionboxClient) CreateModel(ctx context.Context, request *CreateModelRequest) (*CreateModelResponse, error)
func (*SuggestionboxClient) CreateModelMulti ¶
func (c *SuggestionboxClient) CreateModelMulti(ctx context.Context, requests []*CreateModelRequest) ([]*CreateModelResponse, error)
func (*SuggestionboxClient) DeleteModel ¶
func (c *SuggestionboxClient) DeleteModel(ctx context.Context, request *DeleteModelRequest) (*DeleteModelResponse, error)
func (*SuggestionboxClient) DeleteModelMulti ¶
func (c *SuggestionboxClient) DeleteModelMulti(ctx context.Context, requests []*DeleteModelRequest) ([]*DeleteModelResponse, error)
func (*SuggestionboxClient) GetState ¶
func (c *SuggestionboxClient) GetState(ctx context.Context, request *GetStateRequest) (io.ReadCloser, error)
func (*SuggestionboxClient) ListModels ¶
func (c *SuggestionboxClient) ListModels(ctx context.Context, request *ListModelsRequest) (*ListModelsResponse, error)
func (*SuggestionboxClient) ListModelsMulti ¶
func (c *SuggestionboxClient) ListModelsMulti(ctx context.Context, requests []*ListModelsRequest) ([]*ListModelsResponse, error)
func (*SuggestionboxClient) Predict ¶
func (c *SuggestionboxClient) Predict(ctx context.Context, request *PredictRequest) (*PredictResponse, error)
func (*SuggestionboxClient) PredictMulti ¶
func (c *SuggestionboxClient) PredictMulti(ctx context.Context, requests []*PredictRequest) ([]*PredictResponse, error)
func (*SuggestionboxClient) PutState ¶
func (c *SuggestionboxClient) PutState(ctx context.Context, request *PutStateRequest) (*PutStateResponse, error)
func (*SuggestionboxClient) PutStateMulti ¶
func (c *SuggestionboxClient) PutStateMulti(ctx context.Context, requests []*PutStateRequest) ([]*PutStateResponse, error)
func (*SuggestionboxClient) Reward ¶
func (c *SuggestionboxClient) Reward(ctx context.Context, request *RewardRequest) (*RewardResponse, error)
func (*SuggestionboxClient) RewardMulti ¶
func (c *SuggestionboxClient) RewardMulti(ctx context.Context, requests []*RewardRequest) ([]*RewardResponse, error)
Click to show internal directories.
Click to hide internal directories.