base

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InputQuestionKeyInArg                 = "question"
	InputIsNeedStreamKeyInArg             = "_need_stream"
	LangchaingoChatMessageHistoryKeyInArg = "_history"
	OutputAnswerKeyInArg                  = "_answer"
	AgentOutputInArg                      = "_agent_answer"
	MapReduceDocumentOutputInArg          = "_mapreduce_document_answer"
	OutputAnswerStreamChanKeyInArg        = "_answer_stream"
	RuntimeRetrieverReferencesKeyInArg    = "_references"
	LangchaingoRetrieverKeyInArg          = "retriever"
	LangchaingoLLMKeyInArg                = "llm"
	LangchaingoPromptKeyInArg             = "prompt"
	APPDocNullReturn                      = "_app_doc_null_return"
	ConversationKnowledgeBaseInArg        = "_conversation_knowledgebase" // the conversation Knowledgebase cr in args, status has ready
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseNode

type BaseNode struct {
	Ref arcadiav1alpha1.TypedObjectReference
	// contains filtered or unexported fields
}

func NewBaseNode

func NewBaseNode(namespace, nodeName string, ref arcadiav1alpha1.TypedObjectReference) BaseNode

func (*BaseNode) Cleanup

func (c *BaseNode) Cleanup()

func (*BaseNode) GetNextNode

func (c *BaseNode) GetNextNode() []Node

func (*BaseNode) GetPrevNode

func (c *BaseNode) GetPrevNode() []Node

func (*BaseNode) Group

func (c *BaseNode) Group() string

func (*BaseNode) Init

func (c *BaseNode) Init(_ context.Context, _ client.Client, _ map[string]any) error

func (*BaseNode) Kind

func (c *BaseNode) Kind() string

func (*BaseNode) Name

func (c *BaseNode) Name() string

func (*BaseNode) Namespace

func (c *BaseNode) Namespace() string

func (*BaseNode) Ready

func (c *BaseNode) Ready() (bool, string)

func (*BaseNode) RefName

func (c *BaseNode) RefName() string

func (*BaseNode) RefNamespace

func (c *BaseNode) RefNamespace() string

func (*BaseNode) Run

func (c *BaseNode) Run(_ context.Context, _ client.Client, _ map[string]any) (map[string]any, error)

func (*BaseNode) SetNextNode

func (c *BaseNode) SetNextNode(nodes ...Node)

func (*BaseNode) SetPrevNode

func (c *BaseNode) SetPrevNode(nodes ...Node)

type Input

type Input struct {
	BaseNode
}

func NewInput

func NewInput(baseNode BaseNode) *Input

func (*Input) Run

func (c *Input) Run(ctx context.Context, _ client.Client, args map[string]any) (map[string]any, error)

type Node

type Node interface {
	Name() string
	Namespace() string
	Group() string
	Kind() string
	RefName() string
	RefNamespace() string
	Init(ctx context.Context, cli client.Client, args map[string]any) error
	Run(ctx context.Context, cli client.Client, args map[string]any) (map[string]any, error)
	SetPrevNode(nodes ...Node)
	SetNextNode(nodes ...Node)
	GetPrevNode() []Node
	GetNextNode() []Node
	Ready() (bool, string)
	Cleanup()
}

type Output

type Output struct {
	BaseNode
}

func NewOutput

func NewOutput(baseNode BaseNode) *Output

func (*Output) Run

func (c *Output) Run(_ context.Context, _ client.Client, args map[string]any) (map[string]any, error)

type RetrieverGetNullDocError added in v0.2.1

type RetrieverGetNullDocError struct {
	Msg string
}

func (*RetrieverGetNullDocError) Error added in v0.2.1

func (e *RetrieverGetNullDocError) Error() string

Jump to

Keyboard shortcuts

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