Spaces:
Running
on
Inf2
Running
on
Inf2
fix: populate script improvements
Browse files- scripts/populate.ts +5 -0
scripts/populate.ts
CHANGED
|
@@ -115,6 +115,8 @@ async function seed() {
|
|
| 115 |
await collections.assistants.deleteMany({});
|
| 116 |
await collections.conversations.deleteMany({});
|
| 117 |
await collections.tools.deleteMany({});
|
|
|
|
|
|
|
| 118 |
console.log("Reset done");
|
| 119 |
}
|
| 120 |
|
|
@@ -146,6 +148,7 @@ async function seed() {
|
|
| 146 |
activeModel: faker.helpers.arrayElement(modelIds),
|
| 147 |
createdAt: faker.date.recent({ days: 30 }),
|
| 148 |
updatedAt: faker.date.recent({ days: 30 }),
|
|
|
|
| 149 |
customPrompts: {},
|
| 150 |
assistants: [],
|
| 151 |
};
|
|
@@ -305,6 +308,8 @@ async function seed() {
|
|
| 305 |
updatedAt: faker.date.recent({ days: 30 }),
|
| 306 |
searchTokens: generateSearchTokens(displayName),
|
| 307 |
featured: faker.datatype.boolean(),
|
|
|
|
|
|
|
| 308 |
};
|
| 309 |
},
|
| 310 |
{ count: faker.number.int({ min: 10, max: 200 }) }
|
|
|
|
| 115 |
await collections.assistants.deleteMany({});
|
| 116 |
await collections.conversations.deleteMany({});
|
| 117 |
await collections.tools.deleteMany({});
|
| 118 |
+
await collections.migrationResults.deleteMany({});
|
| 119 |
+
await collections.semaphores.deleteMany({});
|
| 120 |
console.log("Reset done");
|
| 121 |
}
|
| 122 |
|
|
|
|
| 148 |
activeModel: faker.helpers.arrayElement(modelIds),
|
| 149 |
createdAt: faker.date.recent({ days: 30 }),
|
| 150 |
updatedAt: faker.date.recent({ days: 30 }),
|
| 151 |
+
disableStream: faker.datatype.boolean(0.25),
|
| 152 |
customPrompts: {},
|
| 153 |
assistants: [],
|
| 154 |
};
|
|
|
|
| 308 |
updatedAt: faker.date.recent({ days: 30 }),
|
| 309 |
searchTokens: generateSearchTokens(displayName),
|
| 310 |
featured: faker.datatype.boolean(),
|
| 311 |
+
outputComponent: null,
|
| 312 |
+
outputComponentIdx: null,
|
| 313 |
};
|
| 314 |
},
|
| 315 |
{ count: faker.number.int({ min: 10, max: 200 }) }
|