agents

package
v0.0.0-...-67c0019 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventTypeCallConfirm         runner.EventType = "callConfirm"
	EventTypeCallConfirmResponse runner.EventType = "callConfirmResponse"
)

Variables

This section is empty.

Functions

func MakeChatCompletionRequest

func MakeChatCompletionRequest(ctx context.Context, l *slog.Logger, client *http.Client, url, apiKey string, cc *db.CreateChatCompletionRequest) (*db.CreateChatCompletionResponse, error)

func PollForCancellation

func PollForCancellation(ctx context.Context, cancel func(), gdb *gorm.DB, obj Statuser, id string, pollingInterval time.Duration)

PollForCancellation will poll for the run step with the given id. If the run step has been canceled, then the corresponding context will be canceled.

func RunTool

func RunTool(ctx context.Context, l *slog.Logger, events *broadcaster.Subscription[server.Event], gdb *gorm.DB, opts *gptscript.Options, prg types.Program, envs []string, arguments, runID, runStepID string) (string, error)

func StreamChatCompletionRequest

func StreamChatCompletionRequest(ctx context.Context, l *slog.Logger, client *http.Client, url, apiKey string, cc *db.CreateChatCompletionRequest) (<-chan db.ChatCompletionResponseChunk, error)

Types

type Statuser

type Statuser interface {
	GetStatus() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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