datasets

package
v2.12.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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

List datasets that have been created.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL