Documentation
¶
Index ¶
- type Client
- func (c *Client) Cancel(ctx context.Context, id string, opts ...option.RequestOption) error
- func (c *Client) Create(ctx context.Context, request *v2.CreateEmbedJobRequest, ...) (*v2.CreateEmbedJobResponse, error)
- func (c *Client) Get(ctx context.Context, id string, opts ...option.RequestOption) (*v2.EmbedJob, error)
- func (c *Client) List(ctx context.Context, opts ...option.RequestOption) (*v2.ListEmbedJobResponse, 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) Cancel ¶
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 ¶
func (c *Client) Create( ctx context.Context, request *v2.CreateEmbedJobRequest, opts ...option.RequestOption, ) (*v2.CreateEmbedJobResponse, error)
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.