func()

in binding-go/client.go [156:168]


func (c *Client) SampleAction(id InstanceID) (interface{}, error) {
	var resp struct {
		Action interface{} `json:"action"`
	}
	if err := c.get(id.path()+"/action_space/sample", &resp); err != nil {
		return nil, fmt.Errorf("sample action: %s", err)
	}
	if obs, err := normalizeSpaceElem(resp.Action); err != nil {
		return nil, fmt.Errorf("sample action: %s", err)
	} else {
		return obs, nil
	}
}