Skip to content

Instantly share code, notes, and snippets.

@bramses
Created Jan 4, 2022
Embed
What would you like to do?
save vector
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