-
-
Save bramses/4fca6013df87884bb8128ad17dcea3d4 to your computer and use it in GitHub Desktop.
save vector
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
export async function writeObsidianDocumentToPostgres(prismaClient: PrismaClient, obsidianDocument: { | |
filename: string; | |
chunks: string[][]; | |
embeddingsResponse: { | |
embeddings: number[][]; | |
text: string[]; | |
}; | |
}) { | |
return prismaClient.obsidian.create({ | |
data: { | |
doc: obsidianDocument, | |
filename: obsidianDocument.filename, | |
} | |
}).then((result) => { | |
return result; | |
}) | |
.catch((error) => { | |
console.log(error); | |
return error; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment