webui

package
v0.0.0-...-153fcf6 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKeyAuthConfig

func GetKeyAuthConfig(apiKeys []string) (*v2keyauth.Config, error)

func Reverse

func Reverse[T any](original []T) (reversed []T)

Types

type AgentRole

type AgentRole struct {
	Name         string `json:"name"`
	Description  string `json:"description"`
	SystemPrompt string `json:"system_prompt"`
}

type App

type App struct {
	*fiber.App
	// contains filtered or unexported fields
}

func NewApp

func NewApp(opts ...Option) *App

func (*App) Chat

func (a *App) Chat(pool *state.AgentPool) func(c *fiber.Ctx) error

Chat provides a JSON-based API for chat functionality This is designed to work better with the React UI

func (*App) Create

func (a *App) Create(pool *state.AgentPool) func(c *fiber.Ctx) error

func (*App) CreateGroup

func (a *App) CreateGroup(pool *state.AgentPool) func(c *fiber.Ctx) error

func (*App) Delete

func (a *App) Delete(pool *state.AgentPool) func(c *fiber.Ctx) error

func (*App) ExecuteAction

func (app *App) ExecuteAction(pool *state.AgentPool) func(c *fiber.Ctx) error

func (*App) ExportAgent

func (a *App) ExportAgent(pool *state.AgentPool) func(c *fiber.Ctx) error

func (*App) GenerateGroupProfiles

func (a *App) GenerateGroupProfiles(pool *state.AgentPool) func(c *fiber.Ctx) error

func (*App) GetActionDefinition

func (a *App) GetActionDefinition(pool *state.AgentPool) func(c *fiber.Ctx) error

func (*App) GetAgentConfig

func (a *App) GetAgentConfig(pool *state.AgentPool) func(c *fiber.Ctx) error

NEW FUNCTION: Get agent configuration

func (*App) GetAgentConfigMeta

func (a *App) GetAgentConfigMeta() func(c *fiber.Ctx) error

GetAgentConfigMeta returns the metadata for agent configuration fields

func (*App) ImportAgent

func (a *App) ImportAgent(pool *state.AgentPool) func(c *fiber.Ctx) error

func (*App) ListActions

func (a *App) ListActions() func(c *fiber.Ctx) error

func (*App) Notify

func (a *App) Notify(pool *state.AgentPool) func(c *fiber.Ctx) error

func (*App) OldChat

func (a *App) OldChat(pool *state.AgentPool) func(c *fiber.Ctx) error

func (*App) Pause

func (a *App) Pause(pool *state.AgentPool) func(c *fiber.Ctx) error

func (*App) Responses

func (a *App) Responses(pool *state.AgentPool, tracker *conversations.ConversationTracker[string]) func(c *fiber.Ctx) error

func (*App) Start

func (a *App) Start(pool *state.AgentPool) func(c *fiber.Ctx) error

func (*App) UpdateAgentConfig

func (a *App) UpdateAgentConfig(pool *state.AgentPool) func(c *fiber.Ctx) error

UpdateAgentConfig handles updating an agent's configuration

type Config

type Config struct {
	DefaultChunkSize          int
	Pool                      *state.AgentPool
	ApiKeys                   []string
	LLMAPIURL                 string
	LLMAPIKey                 string
	LLMModel                  string
	StateDir                  string
	ConversationStoreDuration time.Duration
}

func NewConfig

func NewConfig(opts ...Option) *Config

func (*Config) Apply

func (c *Config) Apply(opts ...Option)

type Option

type Option func(*Config)

func WithApiKeys

func WithApiKeys(keys ...string) Option

func WithConversationStoreduration

func WithConversationStoreduration(duration string) Option

func WithDefaultChunkSize

func WithDefaultChunkSize(size int) Option

func WithLLMAPIKey

func WithLLMAPIKey(key string) Option

func WithLLMAPIUrl

func WithLLMAPIUrl(url string) Option

func WithLLMModel

func WithLLMModel(model string) Option

func WithPool

func WithPool(pool *state.AgentPool) Option

func WithStateDir

func WithStateDir(dir string) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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