config

package
v1.33.71 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleConfig

func HandleConfig(w http.ResponseWriter, r *http.Request)

HandleConfig handles GET and POST requests for agent configuration

func HandleProviders

func HandleProviders(w http.ResponseWriter, r *http.Request)

HandleProviders handles GET requests for available providers and models

func SetDatabase

func SetDatabase(db *sql.DB)

SetDatabase sets the global database for scheduler operations

func SetDiscoveryCallback

func SetDiscoveryCallback(callback func(enabled bool, group string) error)

SetDiscoveryCallback sets the callback function for discovery service updates

func SetDiscoveryRunningCallback added in v1.33.63

func SetDiscoveryRunningCallback(callback func() bool)

SetDiscoveryRunningCallback sets the callback function to check if discovery is running

func SetFilesystemCallback

func SetFilesystemCallback(callback func(enabled bool) error)

SetFilesystemCallback sets the callback function for filesystem updates

func SetMemoryCallback

func SetMemoryCallback(callback func(enabled bool) error)

SetMemoryCallback sets the callback function for memory manager updates

func SetTelemetryCallback

func SetTelemetryCallback(callback func(enabled bool) error)

SetTelemetryCallback sets the callback function for telemetry updates

Types

type EmbeddingProviderInfo added in v1.33.41

type EmbeddingProviderInfo struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	DefaultModel string `json:"default_model"`
	Dimensions   int    `json:"dimensions"`
	HasAPIKey    bool   `json:"has_api_key"`
	EnvVar       string `json:"env_var"`
}

EmbeddingProviderInfo represents an embedding provider and its configuration

func GetEmbeddingProviders added in v1.33.41

func GetEmbeddingProviders() []EmbeddingProviderInfo

GetEmbeddingProviders returns the list of supported embedding providers

type ProviderInfo

type ProviderInfo struct {
	ID     string          `json:"id"`
	Name   string          `json:"name"`
	Models []ProviderModel `json:"models"`
}

ProviderInfo represents a provider and its available models

func GetProviders

func GetProviders() []ProviderInfo

GetProviders returns the list of supported providers and their models

type ProviderModel

type ProviderModel struct {
	Value       string `json:"value"`
	Label       string `json:"label"`
	Recommended bool   `json:"recommended,omitempty"`
}

ProviderModel represents a model available for a provider

type ProvidersResponse added in v1.33.41

type ProvidersResponse struct {
	LLM       []ProviderInfo          `json:"llm"`
	Embedding []EmbeddingProviderInfo `json:"embedding"`
}

ProvidersResponse is the response format for the /providers endpoint

Jump to

Keyboard shortcuts

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