diff --git a/docs/components/vector-databases/astradb.mdx b/docs/components/vector-databases/astradb.mdx index 00cb4f2..28341b8 100644 --- a/docs/components/vector-databases/astradb.mdx +++ b/docs/components/vector-databases/astradb.mdx @@ -40,7 +40,7 @@ const app = await new RAGApplicationBuilder() //add data source and start query in -await app.add("https://www.forbes.com/profile/elon-musk"); +await app.addLoader(new WebLoader({ urlOrContent: 'https://www.forbes.com/profile/elon-musk' })); await app.query('Tell me about Elon Musk'); ``` diff --git a/docs/components/vector-databases/hnswlib.mdx b/docs/components/vector-databases/hnswlib.mdx index ddb0183..8a6d8ae 100644 --- a/docs/components/vector-databases/hnswlib.mdx +++ b/docs/components/vector-databases/hnswlib.mdx @@ -28,7 +28,7 @@ const app = await new RAGApplicationBuilder() .build(); //add data source and start query in -await app.add("https://www.forbes.com/profile/elon-musk"); +await app.addLoader(new WebLoader({ urlOrContent: 'https://www.forbes.com/profile/elon-musk' })); await app.query('Tell me about Elon Musk'); ``` diff --git a/docs/components/vector-databases/lancedb.mdx b/docs/components/vector-databases/lancedb.mdx index 78f89ed..0673fee 100644 --- a/docs/components/vector-databases/lancedb.mdx +++ b/docs/components/vector-databases/lancedb.mdx @@ -34,7 +34,7 @@ const app = await new RAGApplicationBuilder() //add data source and start query in -await app.add("https://www.forbes.com/profile/elon-musk"); +await app.addLoader(new WebLoader({ urlOrContent: 'https://www.forbes.com/profile/elon-musk' })); await app.query('Tell me about Elon Musk'); ``` diff --git a/docs/components/vector-databases/mongodb.mdx b/docs/components/vector-databases/mongodb.mdx index 9f6f6f0..7b5a6c7 100644 --- a/docs/components/vector-databases/mongodb.mdx +++ b/docs/components/vector-databases/mongodb.mdx @@ -45,7 +45,7 @@ new MongoDb({ .build(); //add data source and start query in -await app.add("https://www.forbes.com/profile/elon-musk"); +await app.addLoader(new WebLoader({ urlOrContent: 'https://www.forbes.com/profile/elon-musk' })); await app.query('Tell me about Elon Musk'); ``` diff --git a/docs/components/vector-databases/pinecone.mdx b/docs/components/vector-databases/pinecone.mdx index a8f5cee..0d0ae40 100644 --- a/docs/components/vector-databases/pinecone.mdx +++ b/docs/components/vector-databases/pinecone.mdx @@ -22,7 +22,7 @@ npm install @llm-tools/embedjs-pinecone ```ts Example import { RAGApplicationBuilder } from '@llm-tools/embedjs'; import { OpenAiEmbeddings } from '@llm-tools/embedjs-openai'; -import { LanceDb } from '@llm-tools/embedjs-pinecone'; +import { PineconeDb } from '@llm-tools/embedjs-pinecone'; // set OPENAI_API_KEY in your env process.env.OPENAI_API_KEY = "sk-xxx"; @@ -44,7 +44,7 @@ const app = await new RAGApplicationBuilder() //add data source and start query in -await app.add("https://www.forbes.com/profile/elon-musk"); +await app.addLoader(new WebLoader({ urlOrContent: 'https://www.forbes.com/profile/elon-musk' })); await app.query('Tell me about Elon Musk'); ``` diff --git a/docs/components/vector-databases/qdrant.mdx b/docs/components/vector-databases/qdrant.mdx index 946ceb6..bb56fa2 100644 --- a/docs/components/vector-databases/qdrant.mdx +++ b/docs/components/vector-databases/qdrant.mdx @@ -28,7 +28,7 @@ const app = await new RAGApplicationBuilder() //add data source and start query in -await app.add("https://www.forbes.com/profile/elon-musk"); +await app.addLoader(new WebLoader({ urlOrContent: 'https://www.forbes.com/profile/elon-musk' })); await app.query('Tell me about Elon Musk'); ``` diff --git a/docs/components/vector-databases/weaviate.mdx b/docs/components/vector-databases/weaviate.mdx index 7d40de4..0bdcbe1 100644 --- a/docs/components/vector-databases/weaviate.mdx +++ b/docs/components/vector-databases/weaviate.mdx @@ -28,7 +28,7 @@ const app = await new RAGApplicationBuilder() //add data source and start query in -await app.add("https://www.forbes.com/profile/elon-musk"); +await app.addLoader(new WebLoader({ urlOrContent: 'https://www.forbes.com/profile/elon-musk' })); await app.query('Tell me about Elon Musk'); ``` diff --git a/docs/get-started/quickstart.mdx b/docs/get-started/quickstart.mdx index b98fe43..b03677b 100644 --- a/docs/get-started/quickstart.mdx +++ b/docs/get-started/quickstart.mdx @@ -77,8 +77,8 @@ const ragApplication = await new RAGApplicationBuilder() .setVectorDb(new HNSWDb()) .build(); -ragApplication.addLoader({ urlOrContent: 'https://www.forbes.com/profile/elon-musk' }) -ragApplication.addLoader({ urlOrContent: 'https://en.wikipedia.org/wiki/Elon_Musk' }) +ragApplication.addLoader(new WebLoader({ urlOrContent: 'https://www.forbes.com/profile/elon-musk' })); +ragApplication.addLoader(new WebLoader({ urlOrContent: 'https://en.wikipedia.org/wiki/Elon_Musk' })); await ragApplication.query('What is the net worth of Elon Musk today?') //Answer: The net worth of Elon Musk today is $258.7 billion.