refresh models
This commit is contained in:
@@ -361,6 +361,13 @@ piMonoRouter.put('/access-policy', async (ctx) => {
|
||||
return ctx.json({ ok: true });
|
||||
});
|
||||
|
||||
piMonoRouter.post('/local-providers/refresh', async (ctx) => {
|
||||
await syncLocalProvidersToPiConfig();
|
||||
syncAllUserPiConfigs().catch(() => {});
|
||||
invalidateModelCache();
|
||||
return ctx.json({ ok: true });
|
||||
});
|
||||
|
||||
piMonoRouter.get('/local-providers/health', async (ctx) => {
|
||||
const providers = await readLocalProviders();
|
||||
const results: Record<string, boolean> = {};
|
||||
|
||||
Reference in New Issue
Block a user