diff --git a/scripts/ingest-data.ts b/scripts/ingest-data.ts index 28edf47d6..17f7fb8c1 100644 --- a/scripts/ingest-data.ts +++ b/scripts/ingest-data.ts @@ -5,6 +5,7 @@ import { pinecone } from '@/utils/pinecone-client'; import { PDFLoader } from 'langchain/document_loaders/fs/pdf'; import { PINECONE_INDEX_NAME, PINECONE_NAME_SPACE } from '@/config/pinecone'; import { DirectoryLoader } from 'langchain/document_loaders/fs/directory'; +import { inspect } from "util"; /* Name of directory to retrieve your files from Make sure to add your PDF files inside the 'docs' folder @@ -42,7 +43,7 @@ export const run = async () => { textKey: 'text', }); } catch (error) { - console.log('error', error); + console.log('error', inspect(error, false, 9, true)); throw new Error('Failed to ingest your data'); } };