invoke

package
v0.22.0-alpha5 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrToolResult

type ErrToolResult struct {
	Message string
}

func (ErrToolResult) Error

func (e ErrToolResult) Error() string

type Invoker

type Invoker struct {
	// contains filtered or unexported fields
}

func NewInvoker

func NewInvoker(c kclient.WithWatch, gatewayClient *client.Client, serverURL string, serverPort int, tokenService *persistent.TokenService) *Invoker

func (*Invoker) Resume

func (i *Invoker) Resume(ctx context.Context, gptClient *gptscript.GPTScript, c kclient.WithWatch, thread *v1.Thread, run *v1.Run) (err error)

func (*Invoker) SystemTask

func (i *Invoker) SystemTask(ctx context.Context, gptClient *gptscript.GPTScript, thread *v1.Thread, tool, input any, opts ...SystemTaskOptions) (*Response, error)

type Options

type Options struct {
	Synchronous          bool
	EphemeralThread      bool
	Thread               *v1.Thread
	ThreadName           string
	PreviousRunName      string
	ForceNoResume        bool
	CreateThread         bool
	CredentialContextIDs []string
	UserUID              string
	GenerateName         string
	ExtraEnv             []string
}

type Response

type Response struct {
	Run     *v1.Run
	Thread  *v1.Thread
	Message string
	// contains filtered or unexported fields
}

func (*Response) Close

func (r *Response) Close()

func (*Response) Result

func (r *Response) Result(ctx context.Context) (TaskResult, error)

type SystemTaskOptions

type SystemTaskOptions struct {
	CredentialContextIDs []string
	Env                  []string
	Timeout              time.Duration
}

type TaskResult

type TaskResult struct {
	// Task output
	Output string
}

Jump to

Keyboard shortcuts

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