Add prerequisites for websearch extension

This commit is contained in:
Cohee
2023-12-12 01:08:47 +02:00
parent 1b11ddc26a
commit 299749a4e7
5 changed files with 69 additions and 15 deletions

View File

@@ -879,7 +879,7 @@ async function runGenerationInterceptors(chat, contextSize) {
exitImmediately = immediately;
};
for (const manifest of Object.values(manifests)) {
for (const manifest of Object.values(manifests).sort((a, b) => a.loading_order - b.loading_order)) {
const interceptorKey = manifest.generate_interceptor;
if (typeof window[interceptorKey] === 'function') {
try {