feat: remove search rerank
This commit is contained in:
@@ -22,21 +22,16 @@ export default defineEventHandler(async (event) => {
|
||||
rename: {
|
||||
enabled: false,
|
||||
modelId: null,
|
||||
},
|
||||
rerank: {
|
||||
enabled: false,
|
||||
modelId: null,
|
||||
}
|
||||
};
|
||||
|
||||
if (existing) {
|
||||
const missingSystemAssistants = Object.keys(defaultSystemAssistants).filter(key => !(key in existing!.systemAssistants));
|
||||
if (missingSystemAssistants.length > 0) {
|
||||
if (!("rename" in existing.systemAssistants) || "rerank" in existing.systemAssistants) {
|
||||
const [updated] = await db.update(settings)
|
||||
.set({
|
||||
systemAssistants: {
|
||||
...defaultSystemAssistants,
|
||||
...existing.systemAssistants,
|
||||
rename: existing.systemAssistants.rename ?? defaultSystemAssistants.rename,
|
||||
},
|
||||
})
|
||||
.where(eq(settings.id, existing.id)).returning();
|
||||
|
||||
Reference in New Issue
Block a user