-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Expand file tree
/
Copy pathconfig.js
More file actions
123 lines (111 loc) · 4.99 KB
/
Copy pathconfig.js
File metadata and controls
123 lines (111 loc) · 4.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
export const API_CONFIG = {
endpoints: {
// Operations
operations: '/api/operations',
cancelOperation: (jobID) => `/api/operations/${jobID}/cancel`,
dismissOperation: (jobID) => `/api/operations/${jobID}/dismiss`,
// Models gallery
models: '/api/models',
installModel: (id) => `/api/models/install/${id}`,
deleteModel: (id) => `/api/models/delete/${id}`,
modelConfig: (id) => `/api/models/config/${id}`,
modelConfigJson: (name) => `/api/models/config-json/${name}`,
configMetadata: '/api/models/config-metadata',
configAutocomplete: (provider) => `/api/models/config-metadata/autocomplete/${encodeURIComponent(provider)}`,
configPatch: (name) => `/api/models/config-json/${encodeURIComponent(name)}`,
modelJob: (uid) => `/api/models/job/${uid}`,
// Backends gallery
backends: '/api/backends',
installBackend: (id) => `/api/backends/install/${id}`,
deleteBackend: (id) => `/api/backends/delete/${id}`,
installExternalBackend: '/api/backends/install-external',
backendJob: (uid) => `/api/backends/job/${uid}`,
deleteInstalledBackend: (name) => `/api/backends/system/delete/${name}`,
// Resources
resources: '/api/resources',
// Settings
settings: '/api/settings',
// Traces
traces: '/api/traces',
clearTraces: '/api/traces/clear',
backendTraces: '/api/backend-traces',
clearBackendTraces: '/api/backend-traces/clear',
// Backend Logs
backendLogs: '/api/backend-logs',
backendLogsModel: (modelId) => `/api/backend-logs/${encodeURIComponent(modelId)}`,
clearBackendLogs: (modelId) => `/api/backend-logs/${encodeURIComponent(modelId)}/clear`,
// P2P
p2pWorkers: '/api/p2p/workers',
p2pFederation: '/api/p2p/federation',
p2pStats: '/api/p2p/stats',
p2pToken: '/api/p2p/token',
// Agent jobs
agentTasks: '/api/agent/tasks',
agentTask: (id) => `/api/agent/tasks/${id}`,
executeAgentTask: (name) => `/api/agent/tasks/${name}/execute`,
agentJobs: '/api/agent/jobs',
agentJob: (id) => `/api/agent/jobs/${id}`,
cancelAgentJob: (id) => `/api/agent/jobs/${id}/cancel`,
executeAgentJob: '/api/agent/jobs/execute',
// OpenAI-compatible endpoints
chatCompletions: '/v1/chat/completions',
mcpChatCompletions: '/v1/mcp/chat/completions',
mcpServers: (model) => `/v1/mcp/servers/${model}`,
mcpPrompts: (model) => `/v1/mcp/prompts/${model}`,
mcpGetPrompt: (model, prompt) => `/v1/mcp/prompts/${model}/${encodeURIComponent(prompt)}`,
mcpResources: (model) => `/v1/mcp/resources/${model}`,
mcpReadResource: (model) => `/v1/mcp/resources/${model}/read`,
completions: '/v1/completions',
imageGenerations: '/v1/images/generations',
audioSpeech: '/v1/audio/speech',
audioTranscriptions: '/v1/audio/transcriptions',
soundGeneration: '/v1/sound-generation',
embeddings: '/v1/embeddings',
modelsList: '/v1/models',
modelsCapabilities: '/api/models/capabilities',
// Realtime / WebRTC
realtimeCalls: '/v1/realtime/calls',
pipelineModels: '/api/pipeline-models',
// LocalAI-specific
tts: '/tts',
video: '/video',
backendMonitor: '/backend/monitor',
backendShutdown: '/backend/shutdown',
modelsApply: '/models/apply',
modelsDelete: (name) => `/models/delete/${name}`,
modelsAvailable: '/models/available',
modelsGalleries: '/models/galleries',
modelsReload: '/models/reload',
modelsImportUri: '/models/import-uri',
modelsImport: '/models/import',
vramEstimate: '/api/models/vram-estimate',
modelsJobStatus: (uid) => `/models/jobs/${uid}`,
modelEditGet: (name) => `/api/models/edit/${name}`,
modelEdit: (name) => `/models/edit/${name}`,
modelToggleState: (name, action) => `/models/toggle-state/${name}/${action}`,
modelTogglePinned: (name, action) => `/models/toggle-pinned/${name}/${action}`,
backendsAvailable: '/backends/available',
backendsInstalled: '/backends',
version: '/version',
system: '/system',
corsProxy: '/api/cors-proxy',
// Nodes (distributed)
nodes: '/api/nodes',
node: (id) => `/api/nodes/${id}`,
nodeModels: (id) => `/api/nodes/${id}/models`,
nodeDrain: (id) => `/api/nodes/${id}/drain`,
nodeResume: (id) => `/api/nodes/${id}/resume`,
nodeApprove: (id) => `/api/nodes/${id}/approve`,
nodeHeartbeat: (id) => `/api/nodes/${id}/heartbeat`,
nodeBackends: (id) => `/api/nodes/${id}/backends`,
nodeBackendsInstall: (id) => `/api/nodes/${id}/backends/install`,
nodeBackendsDelete: (id) => `/api/nodes/${id}/backends/delete`,
nodeBackendLogs: (id) => `/api/nodes/${id}/backend-logs`,
nodeBackendLogsModel: (id, modelId) => `/api/nodes/${id}/backend-logs/${encodeURIComponent(modelId)}`,
nodeModelsUnload: (id) => `/api/nodes/${id}/models/unload`,
nodeLabels: (id) => `/api/nodes/${id}/labels`,
nodeLabelKey: (id, key) => `/api/nodes/${id}/labels/${key}`,
nodesScheduling: '/api/nodes/scheduling',
nodesSchedulingModel: (model) => `/api/nodes/scheduling/${encodeURIComponent(model)}`,
},
}