Documentation ¶
Index ¶
- type Client
- func (c *Client) Create(ctx context.Context, data io.Reader, evalData io.Reader, ...) (*v2.DatasetsCreateResponse, error)
- func (c *Client) Delete(ctx context.Context, id string, opts ...option.RequestOption) (map[string]interface{}, error)
- func (c *Client) Get(ctx context.Context, id string, opts ...option.RequestOption) (*v2.DatasetsGetResponse, error)
- func (c *Client) GetUsage(ctx context.Context, opts ...option.RequestOption) (*v2.DatasetsGetUsageResponse, error)
- func (c *Client) List(ctx context.Context, request *v2.DatasetsListRequest, ...) (*v2.DatasetsListResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(opts ...option.RequestOption) *Client
func (*Client) Create ¶ added in v2.5.0
func (c *Client) Create( ctx context.Context, data io.Reader, evalData io.Reader, request *v2.DatasetsCreateRequest, opts ...option.RequestOption, ) (*v2.DatasetsCreateResponse, error)
Create a dataset by uploading a file. See ['Dataset Creation'](https://docs.cohere.com/docs/datasets#dataset-creation) for more information.
func (*Client) Delete ¶
func (c *Client) Delete( ctx context.Context, id string, opts ...option.RequestOption, ) (map[string]interface{}, error)
Delete a dataset by ID. Datasets are automatically deleted after 30 days, but they can also be deleted manually.
func (*Client) Get ¶
func (c *Client) Get( ctx context.Context, id string, opts ...option.RequestOption, ) (*v2.DatasetsGetResponse, error)
Retrieve a dataset by ID. See ['Datasets'](https://docs.cohere.com/docs/datasets) for more information.
func (*Client) GetUsage ¶
func (c *Client) GetUsage( ctx context.Context, opts ...option.RequestOption, ) (*v2.DatasetsGetUsageResponse, error)
View the dataset storage usage for your Organization. Each Organization can have up to 10GB of storage across all their users.
func (*Client) List ¶
func (c *Client) List( ctx context.Context, request *v2.DatasetsListRequest, opts ...option.RequestOption, ) (*v2.DatasetsListResponse, error)
List datasets that have been created.
Click to show internal directories.
Click to hide internal directories.