Documentation
¶
Index ¶
- func FilterModelsByType(models []domain.ModelListItem, req *domain.ModelListReq) []domain.ModelListItem
- func NewOpenAI() domain.IModelProvider[domain.ModelMetadata]
- type ModelKit
- func (m *ModelKit) CheckModel(ctx context.Context, req *domain.CheckModelReq) (*domain.CheckModelResp, error)
- func (m *ModelKit) GetChatModel(ctx context.Context, md *domain.ModelMetadata) (model.BaseChatModel, error)
- func (m *ModelKit) GetEmbedder(ctx context.Context, model *domain.ModelMetadata) (embedding.Embedder, error)
- func (m *ModelKit) GetReranker(ctx context.Context, model *domain.ModelMetadata) (domain.Reranker, error)
- func (m *ModelKit) ModelList(ctx context.Context, req *domain.ModelListReq) (*domain.ModelListResp, error)
- func (m *ModelKit) UseEmbedder(ctx context.Context, e embedding.Embedder, texts []string) (*domain.EmbeddingsResponse, error)
- type OpenAI
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
func NewOpenAI ¶
func NewOpenAI() domain.IModelProvider[domain.ModelMetadata]
Types ¶
type ModelKit ¶ added in v2.2.0
type ModelKit struct {
// contains filtered or unexported fields
}
func NewModelKit ¶ added in v2.2.0
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 (*ModelKit) GetReranker ¶ added in v2.9.0
func (*ModelKit) ModelList ¶ added in v2.2.0
func (m *ModelKit) ModelList(ctx context.Context, req *domain.ModelListReq) (*domain.ModelListResp, error)
Click to show internal directories.
Click to hide internal directories.