embedjobs

package
v2.8.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 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) Cancel

func (c *Client) Cancel(
	ctx context.Context,

	id string,
	opts ...option.RequestOption,
) error

This API allows users to cancel an active embed job. Once invoked, the embedding process will be terminated, and users will be charged for the embeddings processed up to the cancellation point. It's important to note that partial results will not be available to users after cancellation.

func (*Client) Create

This API launches an async Embed job for a [Dataset](https://docs.cohere.com/docs/datasets) of type `embed-input`. The result of a completed embed job is new Dataset of type `embed-output`, which contains the original text entries and the corresponding embeddings.

func (*Client) Get

func (c *Client) Get(
	ctx context.Context,

	id string,
	opts ...option.RequestOption,
) (*v2.EmbedJob, error)

This API retrieves the details about an embed job started by the same user.

func (*Client) List

func (c *Client) List(
	ctx context.Context,
	opts ...option.RequestOption,
) (*v2.ListEmbedJobResponse, error)

The list embed job endpoint allows users to view all embed jobs history for that specific user.

Jump to

Keyboard shortcuts

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