clients

package
v1.35.21 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

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

Types

type RankInput

type RankInput struct {
	Query       string   `json:"query"`
	Documents   []string `json:"documents"`
	Model       string   `json:"model"`
	TopN        *int     `json:"top_n,omitempty"`
	Instruction *string  `json:"instruction,omitempty"`
	Metadata    []string `json:"metadata,omitempty"`
}

type RankResponse

type RankResponse struct {
	Results []RerankedResult `json:"results"`
}

type RerankedResult

type RerankedResult struct {
	Index          int     `json:"index"`
	RelevanceScore float64 `json:"relevance_score"`
}

Jump to

Keyboard shortcuts

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