application

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitNode

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

Types

type Application

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

func (*Application) Init

func (a *Application) Init(ctx context.Context, cli dynamic.Interface) (err error)

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

func (*Application) Run

func (a *Application) Run(ctx context.Context, cli dynamic.Interface, 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