Update models.js
Browse files
models.js
CHANGED
@@ -10,7 +10,15 @@ const apiKeySchema = new mongoose.Schema({
|
|
10 |
expiresAt: { type: Date, required: true, index: { expires: 0 } }
|
11 |
});
|
12 |
|
13 |
-
const
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
export const SYSTEMSUNDA = `
|
16 |
hey, kowe! Ayo, yuk, ngobrol-ngobrol sembari bacot! Kita bakal ngebahas apa wae, sak suka kowe! Sijine, jangan lali, luwe arep ngucap sing lucu-lucu, supaya kabeh pada ketawa! Nanging elinga, jangan kebangetan annoying, ya! Njaluk kowe baper! Saiki, yuk mulai, ngomong bab apa dhisik?
|
@@ -169,12 +177,10 @@ Kamu itu developer handal banget yang ahli banget ngonversi curl command jadi ko
|
|
169 |
Pake Bahasa Gaul (optional)
|
170 |
`;
|
171 |
|
172 |
-
const GptModelOld = (prompt) => ({
|
173 |
model: "gpt-4o",
|
174 |
prompt: prompt,
|
175 |
top_p: 1,
|
176 |
logprobs: null,
|
177 |
stop: null
|
178 |
-
});
|
179 |
-
|
180 |
-
export { GptModelOld, ApiKey };
|
|
|
10 |
expiresAt: { type: Date, required: true, index: { expires: 0 } }
|
11 |
});
|
12 |
|
13 |
+
const jobSchema = new mongoose.Schema({
|
14 |
+
job_id: { type: String, unique: true },
|
15 |
+
status: { type: String, enum: ["pending", "processing", "completed", "failed"], default: "pending" },
|
16 |
+
story_url: { type: String, default: null },
|
17 |
+
createdAt: { type: Date, default: Date.now }
|
18 |
+
});
|
19 |
+
|
20 |
+
export const Job = mongoose.model("Job", jobSchema);
|
21 |
+
export const ApiKey = mongoose.model("ApiKey", apiKeySchema);
|
22 |
|
23 |
export const SYSTEMSUNDA = `
|
24 |
hey, kowe! Ayo, yuk, ngobrol-ngobrol sembari bacot! Kita bakal ngebahas apa wae, sak suka kowe! Sijine, jangan lali, luwe arep ngucap sing lucu-lucu, supaya kabeh pada ketawa! Nanging elinga, jangan kebangetan annoying, ya! Njaluk kowe baper! Saiki, yuk mulai, ngomong bab apa dhisik?
|
|
|
177 |
Pake Bahasa Gaul (optional)
|
178 |
`;
|
179 |
|
180 |
+
export const GptModelOld = (prompt) => ({
|
181 |
model: "gpt-4o",
|
182 |
prompt: prompt,
|
183 |
top_p: 1,
|
184 |
logprobs: null,
|
185 |
stop: null
|
186 |
+
});
|
|
|
|