Documentation
¶
Index ¶
- Variables
- func ConvertCommandsToMCPFile(commandItems *[]CommandItem) (*mcpserver.MCPServer, error)
- func DetectSubCommand(cliCommand string) (bool, error)
- func ExtractCLICommandInfo(cliCommand string, commandItems *[]CommandItem) (bool, error)
- func ExtractSubCommands(cliCommand string) ([]string, error)
- func GenerateSchema[T any]() interface{}
- func NewOpenAIClient() (openai.Client, error)
- func RunInference(system_prompt string, user_prompt string) (string, error)
- type Argument
- type Command
- type CommandItem
- type CommandRunner
- type IsSubCommand
- type Option
- type SubCommands
Constants ¶
This section is empty.
Variables ¶
View Source
var CommandResponseSchema = GenerateSchema[Command]()
View Source
var ExtractCommandPrompt = `` /* 580-byte string literal not displayed */
View Source
var ExtractSubCommandsPrompt = `` /* 329-byte string literal not displayed */
View Source
var IsSubCommandPrompt = `` /* 2261-byte string literal not displayed */
View Source
var IsSubCommandResponseSchema = GenerateSchema[IsSubCommand]()
View Source
var RunCommand = DefaultCommandRunner
RunCommand is the public interface that uses the current CommandRunner
View Source
var SubCommandsResponseSchema = GenerateSchema[SubCommands]()
Functions ¶
func ConvertCommandsToMCPFile ¶
func ConvertCommandsToMCPFile(commandItems *[]CommandItem) (*mcpserver.MCPServer, error)
func DetectSubCommand ¶
func ExtractCLICommandInfo ¶
func ExtractCLICommandInfo(cliCommand string, commandItems *[]CommandItem) (bool, error)
func ExtractSubCommands ¶
func GenerateSchema ¶
func GenerateSchema[T any]() interface{}
func NewOpenAIClient ¶
Types ¶
type CommandItem ¶
func ExtractCommand ¶
func ExtractCommand(cliCommand string) (CommandItem, error)
type CommandRunner ¶
CommandRunner is a function type for running commands
var DefaultCommandRunner CommandRunner = runCommandImpl
DefaultCommandRunner is the default implementation that actually executes commands
type IsSubCommand ¶
type IsSubCommand struct {
Bool_Value bool `json:"bool_value"`
}
type SubCommands ¶
type SubCommands struct {
Commands []string `json:"commands"`
}
Click to show internal directories.
Click to hide internal directories.