File size: 553 Bytes
bd25707 0a4f5e4 bd25707 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import mongoose from "mongoose";
const apiKeySchema = new mongoose.Schema({
key: { type: String, required: true, unique: true },
owner: { type: Number, required: true, unique: true },
email: { type: String },
createdAt: { type: Date, default: Date.now },
expiresAt: { type: Date, required: true, index: { expires: 0 } }
});
const ApiKey = mongoose.model("ApiKey", apiKeySchema);
const GptModelOld = (prompt) => ({
model: "gpt-4o",
prompt: prompt,
top_p: 1,
logprobs: null,
stop: null
});
export { GptModelOld, ApiKey }; |