nvidia

package
v1.28.13 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2025 License: BSD-3-Clause Imports: 12 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 New

func New(apiKey string, timeout time.Duration, logger logrus.FieldLogger) *Client

func (*Client) GetApiKeyHash

func (c *Client) GetApiKeyHash(ctx context.Context, config moduletools.ClassConfig) [32]byte

func (*Client) GetVectorizerRateLimit

func (c *Client) GetVectorizerRateLimit(ctx context.Context, cfg moduletools.ClassConfig) *modulecomponents.RateLimits

func (*Client) HasTokenLimit

func (c *Client) HasTokenLimit() bool

func (*Client) ReturnsRateLimit

func (c *Client) ReturnsRateLimit() bool

func (*Client) Vectorize

func (c *Client) Vectorize(ctx context.Context,
	inputs []string, settings Settings,
) (*modulecomponents.VectorizationResult[[]float32], error)

type InputType

type InputType string
var (
	// inputType
	Query   InputType = "query"
	Passage InputType = "passage"
)

type Settings

type Settings struct {
	BaseURL   string
	Model     string
	InputType *InputType
	Truncate  *string
}

Jump to

Keyboard shortcuts

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