cohere

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConfig

type ClientConfig struct {
	HTTPClient *http.Client
}

ClientConfig controls Cohere client construction.

type EmbeddingClient

type EmbeddingClient struct {
	// contains filtered or unexported fields
}

EmbeddingClient implements ai.EmbeddingAPIClient for the Cohere Embed API. It is stateless — base URL and API key come from ProviderEndpoint per-call.

func NewEmbeddingClient

func NewEmbeddingClient(cfg ClientConfig) *EmbeddingClient

NewEmbeddingClient constructs a Cohere embedding client.

func RegisterEmbeddingClient

func RegisterEmbeddingClient(cfg ClientConfig) *EmbeddingClient

RegisterEmbeddingClient creates and registers the Cohere embedding API client.

func (*EmbeddingClient) ClientType

func (c *EmbeddingClient) ClientType() string

ClientType returns the embedding API client type identifier.

func (*EmbeddingClient) Embed

Embed dispatches embedding requests with shared batch-splitting behavior. If endpoint.APIKey is empty, resolves from provider config env vars.

Jump to

Keyboard shortcuts

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