Help us shape the future of Go! Take the 2026 Go Developer Survey

usecase

package
v2.14.3 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: AGPL-3.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterModelsByType added in v2.9.2

func FilterModelsByType(models []domain.ModelListItem, req *domain.ModelListReq) []domain.ModelListItem

Types

type ModelKit added in v2.2.0

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

func NewModelKit added in v2.2.0

func NewModelKit(logger *slog.Logger) *ModelKit

NewModelKit 创建一个新的ModelKit实例

func (*ModelKit) CheckModel added in v2.2.0

func (m *ModelKit) CheckModel(ctx context.Context, req *domain.CheckModelReq) (*domain.CheckModelResp, error)

func (*ModelKit) GetChatModel added in v2.2.0

func (m *ModelKit) GetChatModel(ctx context.Context, md *domain.ModelMetadata) (model.BaseChatModel, error)

func (*ModelKit) GetEmbedder added in v2.9.0

func (m *ModelKit) GetEmbedder(ctx context.Context, model *domain.ModelMetadata) (embedding.Embedder, error)

func (*ModelKit) GetReranker added in v2.9.0

func (m *ModelKit) GetReranker(ctx context.Context, model *domain.ModelMetadata) (domain.Reranker, error)

func (*ModelKit) ModelList added in v2.2.0

func (m *ModelKit) ModelList(ctx context.Context, req *domain.ModelListReq) (*domain.ModelListResp, error)

func (*ModelKit) UseEmbedder added in v2.9.0

func (m *ModelKit) UseEmbedder(ctx context.Context, e embedding.Embedder, texts []string) (*domain.EmbeddingsResponse, error)

type OpenAI

type OpenAI struct{}

func (*OpenAI) ListModel

func (o *OpenAI) ListModel(subType string, provider string) ([]domain.ModelMetadata, error)

Jump to

Keyboard shortcuts

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