-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 🚀 add non-named-votes-ai service
Signed-off-by: Manuel Ruck <[email protected]>
- Loading branch information
Manuel Ruck
committed
Aug 11, 2024
1 parent
675dca5
commit 989e59b
Showing
17 changed files
with
725 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import mongoose from 'mongoose'; | ||
import NonNamedVotesAiSchema, { INonNamedVotesAi } from './schema'; | ||
|
||
export const NonNamedVotesAiModel = mongoose.model<INonNamedVotesAi>('NonNamedVotesAi', NonNamedVotesAiSchema); | ||
export { NonNamedVotesAiSchema, INonNamedVotesAi }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Schema, SchemaTimestampsConfig, Document } from 'mongoose'; | ||
|
||
export interface INonNamedVotesAi extends Document, SchemaTimestampsConfig { | ||
pdfUrl: string; | ||
assistantId: string; | ||
vectorStoreId: string; | ||
threadId: string; | ||
fileId?: string; | ||
} | ||
|
||
const NonNamedVotesAiSchema = new Schema<INonNamedVotesAi>( | ||
{ | ||
pdfUrl: { type: String, unique: true, index: true, required: true }, | ||
assistantId: { type: String, required: true }, | ||
vectorStoreId: { type: String, required: true }, | ||
threadId: { type: String, required: true }, | ||
fileId: { type: String, required: true }, | ||
}, | ||
{ timestamps: true }, | ||
); | ||
|
||
export default NonNamedVotesAiSchema; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.