jinaai

package
v1.26.12 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: BSD-3-Clause Imports: 14 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(jinaAIApiKey string, timeout time.Duration, defaultRPM, defaultTPM int, 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) Vectorize

func (*Client) VectorizeMultiModal added in v1.25.26

func (c *Client) VectorizeMultiModal(ctx context.Context, texts, images []string,
	settings Settings,
) (*modulecomponents.VectorizationCLIPResult, error)

type MultiModalInput added in v1.25.26

type MultiModalInput struct {
	Text  string `json:"text,omitempty"`
	Image string `json:"image,omitempty"`
}

type Settings

type Settings struct {
	Task       Task
	Model      string
	BaseURL    string
	Dimensions *int64
	Normalized bool
}

type Task

type Task string
const (
	// taskType
	RetrievalQuery   Task = "retrieval.query"
	RetrievalPassage Task = "retrieval.passage"
)

Jump to

Keyboard shortcuts

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