components

package
v0.3.15 Latest Latest
Warning

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

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

Documentation

Overview

components are the basic components supported by eino.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetType

func GetType(component any) (string, bool)

func IsCallbacksEnabled

func IsCallbacksEnabled(i any) bool

Types

type Checker

type Checker interface {
	IsCallbacksEnabled() bool
}

Checker tells callback aspect status of component's implementation When the Checker interface is implemented and returns true, the framework will not start the default aspect. Instead, the component will decide the callback execution location and the information to be injected.

type Component

type Component string

Component the name of different kinds of components

const (
	ComponentOfPrompt      Component = "ChatTemplate"
	ComponentOfChatModel   Component = "ChatModel"
	ComponentOfEmbedding   Component = "Embedding"
	ComponentOfIndexer     Component = "Indexer"
	ComponentOfRetriever   Component = "Retriever"
	ComponentOfLoader      Component = "Loader"
	ComponentOfTransformer Component = "DocumentTransformer"
	ComponentOfTool        Component = "Tool"
)

type Typer

type Typer interface {
	GetType() string
}

Typer get the type name of one component's implementation if Typer exists, the full name of the component instance will be {Typer}{Component} by default recommend using Camel Case Naming Style for Typer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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