mirror of
https://github.com/lordmathis/llamactl.git
synced 2025-12-24 10:04:26 +00:00
Implement ConfigContext for instance defaults
This commit is contained in:
70
webui/src/types/config.ts
Normal file
70
webui/src/types/config.ts
Normal file
@@ -0,0 +1,70 @@
|
||||
export interface BackendSettings {
|
||||
command: string
|
||||
args: string[]
|
||||
environment?: Record<string, string>
|
||||
docker?: DockerSettings
|
||||
response_headers?: Record<string, string>
|
||||
}
|
||||
|
||||
export interface DockerSettings {
|
||||
enabled: boolean
|
||||
image: string
|
||||
args: string[]
|
||||
environment?: Record<string, string>
|
||||
}
|
||||
|
||||
export interface BackendConfig {
|
||||
'llama-cpp': BackendSettings
|
||||
vllm: BackendSettings
|
||||
mlx: BackendSettings
|
||||
}
|
||||
|
||||
export interface ServerConfig {
|
||||
host: string
|
||||
port: number
|
||||
allowed_origins: string[]
|
||||
allowed_headers: string[]
|
||||
enable_swagger: boolean
|
||||
response_headers?: Record<string, string>
|
||||
}
|
||||
|
||||
export interface InstancesConfig {
|
||||
port_range: [number, number]
|
||||
data_dir: string
|
||||
configs_dir: string
|
||||
logs_dir: string
|
||||
auto_create_dirs: boolean
|
||||
max_instances: number
|
||||
max_running_instances: number
|
||||
enable_lru_eviction: boolean
|
||||
default_auto_restart: boolean
|
||||
default_max_restarts: number
|
||||
default_restart_delay: number
|
||||
default_on_demand_start: boolean
|
||||
on_demand_start_timeout: number
|
||||
timeout_check_interval: number
|
||||
}
|
||||
|
||||
export interface AuthConfig {
|
||||
require_inference_auth: boolean
|
||||
inference_keys: string[] // Will be empty in sanitized response
|
||||
require_management_auth: boolean
|
||||
management_keys: string[] // Will be empty in sanitized response
|
||||
}
|
||||
|
||||
export interface NodeConfig {
|
||||
address: string
|
||||
api_key: string // Will be empty in sanitized response
|
||||
}
|
||||
|
||||
export interface AppConfig {
|
||||
server: ServerConfig
|
||||
backends: BackendConfig
|
||||
instances: InstancesConfig
|
||||
auth: AuthConfig
|
||||
local_node: string
|
||||
nodes: Record<string, NodeConfig>
|
||||
version?: string
|
||||
commit_hash?: string
|
||||
build_time?: string
|
||||
}
|
||||
Reference in New Issue
Block a user