sdkserver

package
v0.9.5-rc5 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: Apache-2.0 Imports: 34 Imported by: 2

Documentation

Index

Constants

View Source
const (
	Creating runState = "creating"
	Running  runState = "running"
	Continue runState = "continue"
	Finished runState = "finished"
	Error    runState = "error"

	CallConfirm runner.EventType = "callConfirm"
	Prompt      runner.EventType = "prompt"
)

Variables

This section is empty.

Functions

func EmbeddedStart added in v0.9.3

func EmbeddedStart(ctx context.Context, options ...Options) (string, error)

EmbeddedStart allows running the server as an embedded process that may use Stdin for input. It returns the address the server is listening on.

func Run added in v0.9.3

func Run(ctx context.Context, opts Options) error

Run will start the server and block until the server is shut down.

Types

type Options

type Options struct {
	gptscript.Options

	ListenAddress             string
	Debug                     bool
	DisableServerErrorLogging bool
}

type Session added in v0.8.0

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

func (*Session) Event added in v0.8.0

func (s *Session) Event(e runner.Event)

func (*Session) Pause added in v0.8.0

func (s *Session) Pause() func()

func (*Session) Stop added in v0.8.0

func (s *Session) Stop(ctx context.Context, output string, err error)

type SessionFactory added in v0.8.0

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

func NewSessionFactory added in v0.8.0

func NewSessionFactory(events *broadcaster.Broadcaster[event]) *SessionFactory

func (SessionFactory) Pause added in v0.8.0

func (s SessionFactory) Pause() func()

func (SessionFactory) Start added in v0.8.0

func (s SessionFactory) Start(ctx context.Context, prg *types.Program, env []string, input string) (runner.Monitor, error)

Jump to

Keyboard shortcuts

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