Documentation
¶
Index ¶
- Constants
- Variables
- func Run(ctx context.Context, tool string, opts ...RunOptions) error
- type Answer
- type Confirm
- func (c *Confirm) HandleConfirm(ctx context.Context, event gptscript.Frame, ...) (bool, error)
- func (c *Confirm) HandlePrompt(ctx context.Context, event gptscript.Frame, ...) (bool, error)
- func (c *Confirm) IsConfirmEvent(event gptscript.Frame) bool
- func (c *Confirm) IsPromptEvent(event gptscript.Frame) bool
- func (c *Confirm) IsTrusted(event gptscript.Frame) (ConfirmPrompt, bool, error)
- func (c *Confirm) SetTrusted(prompt ConfirmPrompt, answer Answer)
- type ConfirmPrompt
- type RunOptions
- type Trusted
Constants ¶
View Source
const ( Yes = Answer("Yes") No = Answer("No") Always = Answer("Always") )
View Source
const ToolCallHeader = "<tool call>"
Variables ¶
View Source
var ( MarkdownRender *glamour.TermRenderer BoxStyle = lipgloss.NewStyle(). BorderStyle(lipgloss.NormalBorder()). PaddingLeft(1). PaddingRight(1). MarginLeft(4). MarginBottom(1). MaxWidth(pterm.GetTerminalWidth() - 4) )
Functions ¶
Types ¶
type Confirm ¶
type Confirm struct {
// contains filtered or unexported fields
}
func NewConfirm ¶
func (*Confirm) HandleConfirm ¶
func (*Confirm) HandlePrompt ¶
func (*Confirm) SetTrusted ¶
func (c *Confirm) SetTrusted(prompt ConfirmPrompt, answer Answer)
type ConfirmPrompt ¶
type RunOptions ¶
type RunOptions struct {
AppName string
Eval []gptscript.ToolDef
TrustedRepoPrefixes []string
DisableCache bool
CredentialOverrides []string
Input string
SubTool string
ChatState string
SaveChatStateFile string
Workspace string
UserStartConversation *bool
Location string
EventLog string
LoadMessage string
ForceSequential bool
Client *gptscript.GPTScript
ClientOpts *gptscript.GlobalOptions
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.