38 lines
959 B
Go
38 lines
959 B
Go
package config
|
|
|
|
import renderformat "gitea.maximumdirect.net/eric/scriptorium/internal/format"
|
|
|
|
const (
|
|
DefaultConfigPath = "/etc/scriptorium/config.yml"
|
|
DefaultConfigPathLocal = "/usr/local/etc/scriptorium/config.yml"
|
|
)
|
|
|
|
var defaultConfigSearchPaths = []string{
|
|
DefaultConfigPathLocal,
|
|
DefaultConfigPath,
|
|
}
|
|
|
|
// AppSettings holds the validated application values used by executable adapters.
|
|
type AppSettings struct {
|
|
PromptDir string
|
|
ProfileDir string
|
|
SchemaDir string
|
|
ServerAddr string
|
|
ArtifactRoot string
|
|
MaxRequestBytes int64
|
|
MaxArtifactBytes int64
|
|
MaxResponseBytes int64
|
|
DefaultRenderFormat renderformat.PreparedRunOutputFormat
|
|
Backends []BackendSettings
|
|
TransientRetries *int
|
|
}
|
|
|
|
type BackendSettings struct {
|
|
ID string
|
|
Endpoint string
|
|
APIKeyEnv string
|
|
ExtraParams map[string]any
|
|
ConcurrencyLimit int
|
|
QueueCapacity *int
|
|
}
|