Documentation
¶
Index ¶
- Constants
- func CreateTroubleshootingAgentPrompt(tools []tools.Tool) prompts.PromptTemplate
- func ParseScript(response string) (filename, content string, err error)
- func SaveScript(filename, content string) (string, error)
- type ScriptCodeParser
- type ScriptExecutor
- type TroubleshootingAgent
- func (tbs *TroubleshootingAgent) GetInputKeys() []string
- func (tbs *TroubleshootingAgent) GetOutputKeys() []string
- func (tbs *TroubleshootingAgent) GetTools() []tools.Tool
- func (tbs *TroubleshootingAgent) Plan(ctx context.Context, intermediateSteps []schema.AgentStep, ...) ([]schema.AgentAction, *schema.AgentFinish, error)
Constants ¶
View Source
const ( Catchdir = ".nuwa-terminal" ScriptsDir = "scripts" )
Variables ¶
This section is empty.
Functions ¶
func CreateTroubleshootingAgentPrompt ¶
func CreateTroubleshootingAgentPrompt(tools []tools.Tool) prompts.PromptTemplate
func ParseScript ¶
func SaveScript ¶
Types ¶
type ScriptCodeParser ¶
type ScriptCodeParser struct { }
func (*ScriptCodeParser) Description ¶
func (e *ScriptCodeParser) Description() string
Description returns a string describing the ScriptCodeParser tool.
func (*ScriptCodeParser) Name ¶
func (e *ScriptCodeParser) Name() string
Name returns the name of the tool.
func (*ScriptCodeParser) ParseScriptAndSave ¶
func (e *ScriptCodeParser) ParseScriptAndSave(input string) (string, error)
type ScriptExecutor ¶
type ScriptExecutor struct { }
func (*ScriptExecutor) Description ¶
func (e *ScriptExecutor) Description() string
Description returns a string describing the ScriptExecutor tool.
func (*ScriptExecutor) Name ¶
func (e *ScriptExecutor) Name() string
Name returns the name of the tool.
type TroubleshootingAgent ¶
type TroubleshootingAgent struct { // Chain is the chain used to call with the values. The chain should have an // input called "agent_scratchpad" for the agent to put its thoughts in. Chain chains.Chain // Tools is a list of the tools the agent can use. Tools []tools.Tool // Output key is the key where the final output is placed. OutputKey string // CallbacksHandler is the handler for callbacks. CallbacksHandler callbacks.Handler }
ToubleshootingAgent will implement langchaingo agent interface and will be used to troubleshoot the linux system problems form system logs or runtime logs.
func NewTroubleshootingAgent ¶
func (*TroubleshootingAgent) GetInputKeys ¶
func (tbs *TroubleshootingAgent) GetInputKeys() []string
func (*TroubleshootingAgent) GetOutputKeys ¶
func (tbs *TroubleshootingAgent) GetOutputKeys() []string
func (*TroubleshootingAgent) GetTools ¶
func (tbs *TroubleshootingAgent) GetTools() []tools.Tool
func (*TroubleshootingAgent) Plan ¶
func (tbs *TroubleshootingAgent) Plan( ctx context.Context, intermediateSteps []schema.AgentStep, inputs map[string]string, ) ([]schema.AgentAction, *schema.AgentFinish, error)
Plan decides what action to take or returns the final result of the input.
Click to show internal directories.
Click to hide internal directories.