cohere

package
v0.14.0-nightly.20250311 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const EmbedModelMetadata = "cohere.embed.model"

Variables

This section is empty.

Functions

func NewCommandProcessor

func NewCommandProcessor(l log.CtxLogger) sdk.Processor

func NewEmbedProcessor

func NewEmbedProcessor(l log.CtxLogger) sdk.Processor

func NewRerankProcessor

func NewRerankProcessor(l log.CtxLogger) sdk.Processor

Types

type ChatResponse

type ChatResponse struct {
	ID           string `json:"id"`
	FinishReason string `json:"finish_reason"`
	Message      struct {
		Role    string `json:"role"`
		Content []struct {
			Type string `json:"type"`
			Text string `json:"text"`
		} `json:"content"`
	} `json:"message"`
}

type RerankResponse

type RerankResponse struct {
	ID      string         `json:"id"`
	Results []RerankResult `json:"results"`
}

type RerankResult

type RerankResult struct {
	Document struct {
		Text string `json:"text"`
	} `json:"document"`
	Index          int     `json:"index"`
	RelevanceScore float64 `json:"relevance_score"`
}

func (RerankResult) String

func (r RerankResult) String() string

Jump to

Keyboard shortcuts

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