Skip to content

Instantly share code, notes, and snippets.

Created Jan 4, 2022
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) => {
return error;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment