appruntime

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindNodesHas

func FindNodesHas(app *arcadiav1alpha1.Application, group, kind string) (has bool, namespace, name string)

FindNodesHas group means ref.APIGroup files before `arcadia.kubeagi.k8s.com.cn`

func InitNode

func InitNode(ctx context.Context, appNamespace, name string, ref arcadiav1alpha1.TypedObjectReference) (n base.Node, err error)

Types

type Application

type Application struct {
	Namespace     string
	Name          string
	Spec          arcadiav1alpha1.ApplicationSpec
	Inited        bool
	Nodes         map[string]base.Node
	StartingNodes []base.Node
	EndingNode    base.Node
}

func NewAppOrGetFromCache

func NewAppOrGetFromCache(ctx context.Context, cli client.Client, app *arcadiav1alpha1.Application) (*Application, error)

func (*Application) Init

func (a *Application) Init(ctx context.Context, cli client.Client) (err error)

TODO: 防止无限循环,需要找一下是不是成环

func (*Application) Run

func (a *Application) Run(ctx context.Context, cli client.Client, respStream chan string, input Input) (output Output, err error)

type Input

type Input struct {
	Question string
	// overrideConfig
	NeedStream bool
	History    langchaingoschema.ChatMessageHistory
}

type Output

type Output struct {
	Answer     string
	References []retriever.Reference
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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