id
stringlengths
14
17
text
stringlengths
42
2.11k
4e9727215e95-1700
Next, make a note of the clientId and clientSecret, which you can get from the Application Keys section of the project.Index docs​import { VectorDocumentStore } from "@tigrisdata/vector";import { Document } from "langchain/document";import { OpenAIEmbeddings } from "langchain/embeddings/openai";import { TigrisVectorSt...
4e9727215e95-1701
from langchain/embeddings/openaiTigrisVectorStore from langchain/vectorstores/tigrisQuery docs​import { VectorDocumentStore } from "@tigrisdata/vector";import { OpenAIEmbeddings } from "langchain/embeddings/openai";import { TigrisVectorStore } from "langchain/vectorstores/tigris";const index = new VectorDocumentStore({...
4e9727215e95-1702
It is a fully managed cloud-native database that allows you store and index documents and vector embeddings for fast and scalable vector search.CompatibilityOnly available on Node.js.Setup​1. Install the Tigris SDK​Install the SDK as followsnpmYarnpnpmnpm install -S @tigrisdata/vectoryarn add @tigrisdata/vectorpnpm ad...
4e9727215e95-1703
Next, make a note of the clientId and clientSecret, which you can get from the Application Keys section of the project.Index docs​import { VectorDocumentStore } from "@tigrisdata/vector";import { Document } from "langchain/document";import { OpenAIEmbeddings } from "langchain/embeddings/openai";import { TigrisVectorSt...
4e9727215e95-1704
from langchain/embeddings/openaiTigrisVectorStore from langchain/vectorstores/tigrisQuery docs​import { VectorDocumentStore } from "@tigrisdata/vector";import { OpenAIEmbeddings } from "langchain/embeddings/openai";import { TigrisVectorStore } from "langchain/vectorstores/tigris";const index = new VectorDocumentStore({...
4e9727215e95-1705
It is a fully managed cloud-native database that allows you store and index documents and vector embeddings for fast and scalable vector search.CompatibilityOnly available on Node.js.Setup​1. Install the Tigris SDK​Install the SDK as followsnpmYarnpnpmnpm install -S @tigrisdata/vectoryarn add @tigrisdata/vectorpnpm ad...
4e9727215e95-1706
Next, make a note of the clientId and clientSecret, which you can get from the Application Keys section of the project.Index docs​import { VectorDocumentStore } from "@tigrisdata/vector";import { Document } from "langchain/document";import { OpenAIEmbeddings } from "langchain/embeddings/openai";import { TigrisVectorSt...
4e9727215e95-1707
langchain/documentOpenAIEmbeddings from langchain/embeddings/openaiTigrisVectorStore from langchain/vectorstores/tigrisQuery docs​import { VectorDocumentStore } from "@tigrisdata/vector";import { OpenAIEmbeddings } from "langchain/embeddings/openai";import { TigrisVectorStore } from "langchain/vectorstores/tigris";cons...
4e9727215e95-1708
npm install -S @tigrisdata/vectoryarn add @tigrisdata/vectorpnpm add @tigrisdata/vector npm install -S @tigrisdata/vector yarn add @tigrisdata/vector pnpm add @tigrisdata/vector You can sign up for a free Tigris account here. Once you have signed up for the Tigris account, create a new project called vectordemo. ...
4e9727215e95-1709
Application Keys section of the project. import { VectorDocumentStore } from "@tigrisdata/vector";import { Document } from "langchain/document";import { OpenAIEmbeddings } from "langchain/embeddings/openai";import { TigrisVectorStore } from "langchain/vectorstores/tigris";const index = new VectorDocumentStore({ conne...
4e9727215e95-1710
import { VectorDocumentStore } from "@tigrisdata/vector";import { OpenAIEmbeddings } from "langchain/embeddings/openai";import { TigrisVectorStore } from "langchain/vectorstores/tigris";const index = new VectorDocumentStore({ connection: { serverUrl: "api.preview.tigrisdata.cloud", projectName: process.env.TIGRI...
4e9727215e95-1711
Page Title: TypeORM | 🦜️🔗 Langchain Paragraphs: Skip to main content🦜️🔗 LangChainDocsUse casesAPILangSmithPython DocsCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/​OData connectionDocument loadersDocument transformersText embedding modelsVector storesIntegrationsMemoryAnalyticDBChromaElasticsea...
4e9727215e95-1712
Create a file below named docker-compose.yml:services: db: image: ankane/pgvector ports: - 5432:5432 volumes: - ./data:/var/lib/postgresql/data environment: - POSTGRES_PASSWORD=ChangeMe - POSTGRES_USER=myuser - POSTGRES_DB=apiAPI Reference:And then in the same directory, run docker...
4e9727215e95-1713
type: "postgres", host: "localhost", port: 5432, username: "myuser", password: "ChangeMe", database: "api", } as DataSourceOptions, }; const typeormVectorStore = await TypeORMVectorStore.fromDataSource( new OpenAIEmbeddings(), args ); await typeormVectorStore.ensureTableInDatabase(...
4e9727215e95-1714
Get startedIntroductionInstallationQuickstartModulesModel I/​OData connectionDocument loadersDocument transformersText embedding modelsVector storesIntegrationsMemoryAnalyticDBChromaElasticsearchFaissHNSWLibLanceDBMilvusMongoDB AtlasMyScaleOpenSearchPineconePrismaQdrantRedisSingleStoreSupabaseTigrisTypeORMTypesenseUSea...
4e9727215e95-1715
Create a file below named docker-compose.yml:services: db: image: ankane/pgvector ports: - 5432:5432 volumes: - ./data:/var/lib/postgresql/data environment: - POSTGRES_PASSWORD=ChangeMe - POSTGRES_USER=myuser - POSTGRES_DB=apiAPI Reference:And then in the same directory, run docker...
4e9727215e95-1716
const args = { postgresConnectionOptions: { type: "postgres", host: "localhost", port: 5432, username: "myuser", password: "ChangeMe", database: "api", } as DataSourceOptions, }; const typeormVectorStore = await TypeORMVectorStore.fromDataSource( new OpenAIEmbeddings(), args ...
4e9727215e95-1717
Create a file below named docker-compose.yml:services: db: image: ankane/pgvector ports: - 5432:5432 volumes: - ./data:/var/lib/postgresql/data environment: - POSTGRES_PASSWORD=ChangeMe - POSTGRES_USER=myuser - POSTGRES_DB=apiAPI Reference:And then in the same directory, run docker...
4e9727215e95-1718
const args = { postgresConnectionOptions: { type: "postgres", host: "localhost", port: 5432, username: "myuser", password: "ChangeMe", database: "api", } as DataSourceOptions, }; const typeormVectorStore = await TypeORMVectorStore.fromDataSource( new OpenAIEmbeddings(), args ...
4e9727215e95-1719
Create a file below named docker-compose.yml:services: db: image: ankane/pgvector ports: - 5432:5432 volumes: - ./data:/var/lib/postgresql/data environment: - POSTGRES_PASSWORD=ChangeMe - POSTGRES_USER=myuser - POSTGRES_DB=apiAPI Reference:And then in the same directory, run docker...
4e9727215e95-1720
TypeORMTo enable vector search in a generic PostgreSQL database, LangChainJS supports using TypeORM with the pgvector Postgres extension.Setup​To work with TypeORM, you need to install the typeorm and pg packages:npmYarnpnpmnpm install typeormyarn add typeormpnpm add typeormnpmYarnpnpmnpm install pgyarn add pgpnpm add ...
4e9727215e95-1721
const run = async () => { const args = { postgresConnectionOptions: { type: "postgres", host: "localhost", port: 5432, username: "myuser", password: "ChangeMe", database: "api", } as DataSourceOptions, }; const typeormVectorStore = await TypeORMVectorStore.fromDataSource( new O...
4e9727215e95-1722
And then in the same directory, run docker compose up to start the container. You can find more information on how to setup pgvector in the official repository. One complete example of using TypeORMVectorStore is the following: import { DataSourceOptions } from "typeorm";import { OpenAIEmbeddings } from "langchain/e...
4e9727215e95-1723
Page Title: Typesense | 🦜️🔗 Langchain Paragraphs: Skip to main content🦜️🔗 LangChainDocsUse casesAPILangSmithPython DocsCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/​OData connectionDocument loadersDocument transformersText embedding modelsVector storesIntegrationsMemoryAnalyticDBChromaElastics...
4e9727215e95-1724
for the vector column in Typesense but you can change it to whatever you want vector: "vec", // "text" is the default name for the text column in Typesense but you can change it to whatever you want pageContent: "text", // Names of the columns that you will save in your typesense schema and need to be retri...
4e9727215e95-1725
Will update documents if there is a document with the same id, at least with the default import function. * @param documents list of documents to create the vector store from * @returns Typesense vector store */const createVectorStoreWithTypesense = async (documents: Document[] = []) => Typesense.fromDocuments( doc...
4e9727215e95-1726
Add as many other fields as needed for the metadata.constructor(embeddings: Embeddings, config: TypesenseConfig): Constructs a new instance of the Typesense class.embeddings: An instance of the Embeddings class used for embedding documents.config: Configuration object for the Typesense vector store.typesenseClient: Typ...
4e9727215e95-1727
Documents are added to the vector store during construction.static async fromTexts(texts: string[], metadatas: object[], embeddings: Embeddings, config: TypesenseConfig): Promise<Typesense>: Creates a Typesense vector store from a list of texts and associated metadata. Texts are converted to documents and added to the ...
4e9727215e95-1728
Get startedIntroductionInstallationQuickstartModulesModel I/​OData connectionDocument loadersDocument transformersText embedding modelsVector storesIntegrationsMemoryAnalyticDBChromaElasticsearchFaissHNSWLibLanceDBMilvusMongoDB AtlasMyScaleOpenSearchPineconePrismaQdrantRedisSingleStoreSupabaseTigrisTypeORMTypesenseUSea...
4e9727215e95-1729
but you can change it to whatever you want vector: "vec", // "text" is the default name for the text column in Typesense but you can change it to whatever you want pageContent: "text", // Names of the columns that you will save in your typesense schema and need to be retrieved as metadata when searching ...
4e9727215e95-1730
Will update documents if there is a document with the same id, at least with the default import function. * @param documents list of documents to create the vector store from * @returns Typesense vector store */const createVectorStoreWithTypesense = async (documents: Document[] = []) => Typesense.fromDocuments( doc...
4e9727215e95-1731
Add as many other fields as needed for the metadata.constructor(embeddings: Embeddings, config: TypesenseConfig): Constructs a new instance of the Typesense class.embeddings: An instance of the Embeddings class used for embedding documents.config: Configuration object for the Typesense vector store.typesenseClient: Typ...
4e9727215e95-1732
ModulesData connectionVector storesIntegrationsTypesenseOn this pageTypesenseVector store that utilizes the Typesense search engine.Basic Usage​import { Typesense, TypesenseConfig } from "langchain/vectorstores/typesense";import { OpenAIEmbeddings } from "langchain/embeddings/openai";import { Client } from "typesense";...
4e9727215e95-1733
your typesense schema and need to be retrieved as metadata when searching metadataColumnNames: ["foo", "bar", "baz"], }, // Optional search parameters to be passed to Typesense when searching searchParams: { q: "*", filter_by: "foo:[fooo]", query_by: "", }, // You can override the default Typesense imp...
4e9727215e95-1734
@param documents list of documents to create the vector store from * @returns Typesense vector store */const createVectorStoreWithTypesense = async (documents: Document[] = []) => Typesense.fromDocuments( documents, new OpenAIEmbeddings(), typesenseVectorStoreConfig );/** * Returns a Typesense vector store f...
4e9727215e95-1735
Add as many other fields as needed for the metadata.constructor(embeddings: Embeddings, config: TypesenseConfig): Constructs a new instance of the Typesense class.embeddings: An instance of the Embeddings class used for embedding documents.config: Configuration object for the Typesense vector store.typesenseClient: Typ...
4e9727215e95-1736
ModulesData connectionVector storesIntegrationsTypesenseOn this pageTypesenseVector store that utilizes the Typesense search engine.Basic Usage​import { Typesense, TypesenseConfig } from "langchain/vectorstores/typesense";import { OpenAIEmbeddings } from "langchain/embeddings/openai";import { Client } from "typesense";...
4e9727215e95-1737
your typesense schema and need to be retrieved as metadata when searching metadataColumnNames: ["foo", "bar", "baz"], }, // Optional search parameters to be passed to Typesense when searching searchParams: { q: "*", filter_by: "foo:[fooo]", query_by: "", }, // You can override the default Typesense imp...
4e9727215e95-1738
@param documents list of documents to create the vector store from * @returns Typesense vector store */const createVectorStoreWithTypesense = async (documents: Document[] = []) => Typesense.fromDocuments( documents, new OpenAIEmbeddings(), typesenseVectorStoreConfig );/** * Returns a Typesense vector store f...
4e9727215e95-1739
Add as many other fields as needed for the metadata.constructor(embeddings: Embeddings, config: TypesenseConfig): Constructs a new instance of the Typesense class.embeddings: An instance of the Embeddings class used for embedding documents.config: Configuration object for the Typesense vector store.typesenseClient: Typ...
4e9727215e95-1740
TypesenseVector store that utilizes the Typesense search engine.Basic Usage​import { Typesense, TypesenseConfig } from "langchain/vectorstores/typesense";import { OpenAIEmbeddings } from "langchain/embeddings/openai";import { Client } from "typesense";import { Document } from "langchain/document";const vectorTypesenseC...
4e9727215e95-1741
be retrieved as metadata when searching metadataColumnNames: ["foo", "bar", "baz"], }, // Optional search parameters to be passed to Typesense when searching searchParams: { q: "*", filter_by: "foo:[fooo]", query_by: "", }, // You can override the default Typesense import function if you want to do som...
4e9727215e95-1742
@param documents list of documents to create the vector store from * @returns Typesense vector store */const createVectorStoreWithTypesense = async (documents: Document[] = []) => Typesense.fromDocuments( documents, new OpenAIEmbeddings(), typesenseVectorStoreConfig );/** * Returns a Typesense vector store f...
4e9727215e95-1743
Add as many other fields as needed for the metadata.constructor(embeddings: Embeddings, config: TypesenseConfig): Constructs a new instance of the Typesense class.embeddings: An instance of the Embeddings class used for embedding documents.config: Configuration object for the Typesense vector store.typesenseClient: Typ...
4e9727215e95-1744
import { Typesense, TypesenseConfig } from "langchain/vectorstores/typesense";import { OpenAIEmbeddings } from "langchain/embeddings/openai";import { Client } from "typesense";import { Document } from "langchain/document";const vectorTypesenseClient = new Client({ nodes: [ { // Ideally should come from your .e...
4e9727215e95-1745
metadataColumnNames: ["foo", "bar", "baz"], }, // Optional search parameters to be passed to Typesense when searching searchParams: { q: "*", filter_by: "foo:[fooo]", query_by: "", }, // You can override the default Typesense import function if you want to do something more complex // Default import func...
4e9727215e95-1746
@param documents list of documents to create the vector store from * @returns Typesense vector store */const createVectorStoreWithTypesense = async (documents: Document[] = []) => Typesense.fromDocuments( documents, new OpenAIEmbeddings(), typesenseVectorStoreConfig );/** * Returns a Typesense vector store f...
4e9727215e95-1747
Page Title: USearch | 🦜️🔗 Langchain Paragraphs: Skip to main content🦜️🔗 LangChainDocsUse casesAPILangSmithPython DocsCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/​OData connectionDocument loadersDocument transformersText embedding modelsVector storesIntegrationsMemoryAnalyticDBChromaElasticsea...
4e9727215e95-1748
}], new OpenAIEmbeddings());const resultOne = await vectorStore.similaritySearch("hello world", 1);console.log(resultOne);API Reference:USearch from langchain/vectorstores/usearchOpenAIEmbeddings from langchain/embeddings/openaiCreate a new index from a loader​import { USearch } from "langchain/vectorstores/usearch";i...
4e9727215e95-1749
Get startedIntroductionInstallationQuickstartModulesModel I/​OData connectionDocument loadersDocument transformersText embedding modelsVector storesIntegrationsMemoryAnalyticDBChromaElasticsearchFaissHNSWLibLanceDBMilvusMongoDB AtlasMyScaleOpenSearchPineconePrismaQdrantRedisSingleStoreSupabaseTigrisTypeORMTypesenseUSea...
4e9727215e95-1750
id: 3 }], new OpenAIEmbeddings());const resultOne = await vectorStore.similaritySearch("hello world", 1);console.log(resultOne);API Reference:USearch from langchain/vectorstores/usearchOpenAIEmbeddings from langchain/embeddings/openaiCreate a new index from a loader​import { USearch } from "langchain/vectorstores/usea...
4e9727215e95-1751
ModulesData connectionVector storesIntegrationsUSearchOn this pageUSearchCompatibilityOnly available on Node.js.USearch is a library for efficient similarity search and clustering of dense vectors.Setup​Install the usearch package, which is a Node.js binding for USearch.npmYarnpnpmnpm install -S usearchyarn add usearch...
4e9727215e95-1752
ModulesData connectionVector storesIntegrationsUSearchOn this pageUSearchCompatibilityOnly available on Node.js.USearch is a library for efficient similarity search and clustering of dense vectors.Setup​Install the usearch package, which is a Node.js binding for USearch.npmYarnpnpmnpm install -S usearchyarn add usearch...
4e9727215e95-1753
USearchCompatibilityOnly available on Node.js.USearch is a library for efficient similarity search and clustering of dense vectors.Setup​Install the usearch package, which is a Node.js binding for USearch.npmYarnpnpmnpm install -S usearchyarn add usearchpnpm add usearchUsage​Create a new index from texts​import { USear...
4e9727215e95-1754
Install the usearch package, which is a Node.js binding for USearch. npmYarnpnpmnpm install -S usearchyarn add usearchpnpm add usearch npm install -S usearchyarn add usearchpnpm add usearch npm install -S usearch yarn add usearch pnpm add usearch import { USearch } from "langchain/vectorstores/usearch";import { O...
4e9727215e95-1755
Page Title: Vectara | 🦜️🔗 Langchain Paragraphs: Skip to main content🦜️🔗 LangChainDocsUse casesAPILangSmithPython DocsCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/​OData connectionDocument loadersDocument transformersText embedding modelsVector storesIntegrationsMemoryAnalyticDBChromaElasticsea...
4e9727215e95-1756
new OpenAIEmbeddings(), args);Setup​You'll need to:Create a free Vectara account.Create a corpus to store your dataCreate an API key with QueryService and IndexService access so you can access this corpusConfigure your .env file or provide args to connect LangChain to your Vectara corpus:VECTARA_CUSTOMER_ID=your_custo...
4e9727215e95-1757
", 1, { lambda: 0.025, });// Print the results.console.log(JSON.stringify(resultsWithScore, null, 2));// [// [// {// "pageContent": "In the room the women come and go talking of Michelangelo",// "metadata": [// {// "name": "lang",// "value": "eng"// },// ...
4e9727215e95-1758
Get startedIntroductionInstallationQuickstartModulesModel I/​OData connectionDocument loadersDocument transformersText embedding modelsVector storesIntegrationsMemoryAnalyticDBChromaElasticsearchFaissHNSWLibLanceDBMilvusMongoDB AtlasMyScaleOpenSearchPineconePrismaQdrantRedisSingleStoreSupabaseTigrisTypeORMTypesenseUSea...
4e9727215e95-1759
new OpenAIEmbeddings(), args);Setup​You'll need to:Create a free Vectara account.Create a corpus to store your dataCreate an API key with QueryService and IndexService access so you can access this corpusConfigure your .env file or provide args to connect LangChain to your Vectara corpus:VECTARA_CUSTOMER_ID=your_custo...
4e9727215e95-1760
", 1, { lambda: 0.025, });// Print the results.console.log(JSON.stringify(resultsWithScore, null, 2));// [// [// {// "pageContent": "In the room the women come and go talking of Michelangelo",// "metadata": [// {// "name": "lang",// "value": "eng"// },// ...
4e9727215e95-1761
ModulesData connectionVector storesIntegrationsVectaraOn this pageVectaraVectara is a platform for building GenAI applications. It provides an easy-to-use API for document indexing and querying that is managed by Vectara and is optimized for performance and accuracy.You can use Vectara as a vector store with LangChain....
4e9727215e95-1762
new OpenAIEmbeddings(), args);Setup​You'll need to:Create a free Vectara account.Create a corpus to store your dataCreate an API key with QueryService and IndexService access so you can access this corpusConfigure your .env file or provide args to connect LangChain to your Vectara corpus:VECTARA_CUSTOMER_ID=your_custo...
4e9727215e95-1763
", 1, { lambda: 0.025, });// Print the results.console.log(JSON.stringify(resultsWithScore, null, 2));// [// [// {// "pageContent": "In the room the women come and go talking of Michelangelo",// "metadata": [// {// "name": "lang",// "value": "eng"// },// ...
4e9727215e95-1764
ModulesData connectionVector storesIntegrationsVectaraOn this pageVectaraVectara is a platform for building GenAI applications. It provides an easy-to-use API for document indexing and querying that is managed by Vectara and is optimized for performance and accuracy.You can use Vectara as a vector store with LangChain....
4e9727215e95-1765
new OpenAIEmbeddings(), args);Setup​You'll need to:Create a free Vectara account.Create a corpus to store your dataCreate an API key with QueryService and IndexService access so you can access this corpusConfigure your .env file or provide args to connect LangChain to your Vectara corpus:VECTARA_CUSTOMER_ID=your_custo...
4e9727215e95-1766
", 1, { lambda: 0.025, });// Print the results.console.log(JSON.stringify(resultsWithScore, null, 2));// [// [// {// "pageContent": "In the room the women come and go talking of Michelangelo",// "metadata": [// {// "name": "lang",// "value": "eng"// },// ...
4e9727215e95-1767
VectaraVectara is a platform for building GenAI applications. It provides an easy-to-use API for document indexing and querying that is managed by Vectara and is optimized for performance and accuracy.You can use Vectara as a vector store with LangChain.js.👉 Embeddings Included​Vectara uses its own embeddings under th...
4e9727215e95-1768
new OpenAIEmbeddings(), args);Setup​You'll need to:Create a free Vectara account.Create a corpus to store your dataCreate an API key with QueryService and IndexService access so you can access this corpusConfigure your .env file or provide args to connect LangChain to your Vectara corpus:VECTARA_CUSTOMER_ID=your_custo...
4e9727215e95-1769
", 1, { lambda: 0.025, });// Print the results.console.log(JSON.stringify(resultsWithScore, null, 2));// [// [// {// "pageContent": "In the room the women come and go talking of Michelangelo",// "metadata": [// {// "name": "lang",// "value": "eng"// },// ...
4e9727215e95-1770
You'll need to: Configure your .env file or provide args to connect LangChain to your Vectara corpus: VECTARA_CUSTOMER_ID=your_customer_idVECTARA_CORPUS_ID=your_corpus_idVECTARA_API_KEY=your-vectara-api-key
4e9727215e95-1771
import { VectaraStore } from "langchain/vectorstores/vectara";import { Document } from "langchain/document";// Create the Vectara store.const store = new VectaraStore({ customerId: Number(process.env.VECTARA_CUSTOMER_ID), corpusId: Number(process.env.VECTARA_CORPUS_ID), apiKey: String(process.env.VECTARA_API_KEY), ...
4e9727215e95-1772
API Reference:VectaraStore from langchain/vectorstores/vectaraDocument from langchain/document Note that lambda is a parameter related to Vectara's hybrid search capbility, providing a tradeoff between neural search and boolean/exact match as described here. We recommend the value of 0.025 as a default, while providin...
4e9727215e95-1773
LangChain connects to Weaviate via the weaviate-ts-client package, the official Typescript client for Weaviate.LangChain inserts vectors directly to Weaviate, and queries Weaviate for the nearest neighbors of a given vector, so that you can use all the LangChain Embeddings integrations with Weaviate.Setup​npmYarnpnpmnp...
4e9727215e95-1774
Reference:WeaviateStore from langchain/vectorstores/weaviateOpenAIEmbeddings from langchain/embeddings/openaiUsage, query documents​/* eslint-disable @typescript-eslint/no-explicit-any */import weaviate from "weaviate-ts-client";import { WeaviateStore } from "langchain/vectorstores/weaviate";import { OpenAIEmbeddings }...
4e9727215e95-1775
[ Document { pageContent: 'hi there', metadata: { foo: 'baz' } } ] */}API Reference:WeaviateStore from langchain/vectorstores/weaviateOpenAIEmbeddings from langchain/embeddings/openaiUsage delete documents​/* eslint-disable @typescript-eslint/no-explicit-any */import weaviate from "weaviate-ts-client";import { Weaviat...
4e9727215e95-1776
", 1); console.log(results2); /* [] */ const docs2 = [ { pageContent: "hello world", metadata: { foo: "bar" } }, { pageContent: "hi there", metadata: { foo: "baz" } }, { pageContent: "how are you", metadata: { foo: "qux" } }, { pageContent: "hello world", metadata: { foo: "bar" } }, { pageContent: "...
4e9727215e95-1777
Get startedIntroductionInstallationQuickstartModulesModel I/​OData connectionDocument loadersDocument transformersText embedding modelsVector storesIntegrationsMemoryAnalyticDBChromaElasticsearchFaissHNSWLibLanceDBMilvusMongoDB AtlasMyScaleOpenSearchPineconePrismaQdrantRedisSingleStoreSupabaseTigrisTypeORMTypesenseUSea...
4e9727215e95-1778
LangChain connects to Weaviate via the weaviate-ts-client package, the official Typescript client for Weaviate.LangChain inserts vectors directly to Weaviate, and queries Weaviate for the nearest neighbors of a given vector, so that you can use all the LangChain Embeddings integrations with Weaviate.Setup​npmYarnpnpmnp...
4e9727215e95-1779
Reference:WeaviateStore from langchain/vectorstores/weaviateOpenAIEmbeddings from langchain/embeddings/openaiUsage, query documents​/* eslint-disable @typescript-eslint/no-explicit-any */import weaviate from "weaviate-ts-client";import { WeaviateStore } from "langchain/vectorstores/weaviate";import { OpenAIEmbeddings }...
4e9727215e95-1780
[ Document { pageContent: 'hi there', metadata: { foo: 'baz' } } ] */}API Reference:WeaviateStore from langchain/vectorstores/weaviateOpenAIEmbeddings from langchain/embeddings/openaiUsage delete documents​/* eslint-disable @typescript-eslint/no-explicit-any */import weaviate from "weaviate-ts-client";import { Weaviat...
4e9727215e95-1781
", 1); console.log(results2); /* [] */ const docs2 = [ { pageContent: "hello world", metadata: { foo: "bar" } }, { pageContent: "hi there", metadata: { foo: "baz" } }, { pageContent: "how are you", metadata: { foo: "qux" } }, { pageContent: "hello world", metadata: { foo: "bar" } }, { pageContent: "...
4e9727215e95-1782
LangChain connects to Weaviate via the weaviate-ts-client package, the official Typescript client for Weaviate.LangChain inserts vectors directly to Weaviate, and queries Weaviate for the nearest neighbors of a given vector, so that you can use all the LangChain Embeddings integrations with Weaviate.Setup​npmYarnpnpmnp...
4e9727215e95-1783
Reference:WeaviateStore from langchain/vectorstores/weaviateOpenAIEmbeddings from langchain/embeddings/openaiUsage, query documents​/* eslint-disable @typescript-eslint/no-explicit-any */import weaviate from "weaviate-ts-client";import { WeaviateStore } from "langchain/vectorstores/weaviate";import { OpenAIEmbeddings }...
4e9727215e95-1784
[ Document { pageContent: 'hi there', metadata: { foo: 'baz' } } ] */}API Reference:WeaviateStore from langchain/vectorstores/weaviateOpenAIEmbeddings from langchain/embeddings/openaiUsage delete documents​/* eslint-disable @typescript-eslint/no-explicit-any */import weaviate from "weaviate-ts-client";import { Weaviat...
4e9727215e95-1785
", 1); console.log(results2); /* [] */ const docs2 = [ { pageContent: "hello world", metadata: { foo: "bar" } }, { pageContent: "hi there", metadata: { foo: "baz" } }, { pageContent: "how are you", metadata: { foo: "qux" } }, { pageContent: "hello world", metadata: { foo: "bar" } }, { pageContent: "...
4e9727215e95-1786
LangChain connects to Weaviate via the weaviate-ts-client package, the official Typescript client for Weaviate.LangChain inserts vectors directly to Weaviate, and queries Weaviate for the nearest neighbors of a given vector, so that you can use all the LangChain Embeddings integrations with Weaviate.Setup​npmYarnpnpmnp...
4e9727215e95-1787
Reference:WeaviateStore from langchain/vectorstores/weaviateOpenAIEmbeddings from langchain/embeddings/openaiUsage, query documents​/* eslint-disable @typescript-eslint/no-explicit-any */import weaviate from "weaviate-ts-client";import { WeaviateStore } from "langchain/vectorstores/weaviate";import { OpenAIEmbeddings }...
4e9727215e95-1788
[ Document { pageContent: 'hi there', metadata: { foo: 'baz' } } ] */}API Reference:WeaviateStore from langchain/vectorstores/weaviateOpenAIEmbeddings from langchain/embeddings/openaiUsage delete documents​/* eslint-disable @typescript-eslint/no-explicit-any */import weaviate from "weaviate-ts-client";import { Weaviat...
4e9727215e95-1789
", 1); console.log(results2); /* [] */ const docs2 = [ { pageContent: "hello world", metadata: { foo: "bar" } }, { pageContent: "hi there", metadata: { foo: "baz" } }, { pageContent: "how are you", metadata: { foo: "qux" } }, { pageContent: "hello world", metadata: { foo: "bar" } }, { pageContent: "...
4e9727215e95-1790
npm install weaviate-ts-client graphqlyarn add weaviate-ts-client graphqlpnpm add weaviate-ts-client graphql npm install weaviate-ts-client graphql yarn add weaviate-ts-client graphql pnpm add weaviate-ts-client graphql You'll need to run Weaviate either locally or on a server, see the Weaviate documentation for mo...
4e9727215e95-1791
/* eslint-disable @typescript-eslint/no-explicit-any */import weaviate from "weaviate-ts-client";import { WeaviateStore } from "langchain/vectorstores/weaviate";import { OpenAIEmbeddings } from "langchain/embeddings/openai";export async function run() { // Something wrong with the weaviate-ts-client types, so we need ...
4e9727215e95-1792
/* eslint-disable @typescript-eslint/no-explicit-any */import weaviate from "weaviate-ts-client";import { WeaviateStore } from "langchain/vectorstores/weaviate";import { OpenAIEmbeddings } from "langchain/embeddings/openai";export async function run() { // Something wrong with the weaviate-ts-client types, so we need ...
4e9727215e95-1793
", 1); console.log(results2); /* [] */ const docs2 = [ { pageContent: "hello world", metadata: { foo: "bar" } }, { pageContent: "hi there", metadata: { foo: "baz" } }, { pageContent: "how are you", metadata: { foo: "qux" } }, { pageContent: "hello world", metadata: { foo: "bar" } }, { pageContent: "...
4e9727215e95-1794
Page Title: Xata | 🦜️🔗 Langchain Paragraphs: Skip to main content🦜️🔗 LangChainDocsUse casesAPILangSmithPython DocsCTRLKGet startedIntroductionInstallationQuickstartModulesModel I/​OData connectionDocument loadersDocument transformersText embedding modelsVector storesIntegrationsMemoryAnalyticDBChromaElasticsearch...
4e9727215e95-1795
Create a table, again you can name it anything, but we will use vectors. Add the following columns via the UI:content of type "Long text". This is used to store the Document.pageContent values.embedding of type "Vector". Use the dimension used by the model you plan to use (1536 for OpenAI).any other columns you want to...
4e9727215e95-1796
See the Xata getting started docs for more details on using the Xata JavaScript/TypeScript SDK.Usage​Example: Q&A chatbot using OpenAI and Xata as vector store​This example uses the VectorDBQAChain to search the documents stored in Xata and then pass them as context to the OpenAI model, in order to answer the question ...
4e9727215e95-1797
not set"); } const xata = new BaseClient({ databaseURL: process.env.XATA_DB_URL, apiKey: process.env.XATA_API_KEY, branch: process.env.XATA_BRANCH || "main", }); return xata;};export async function run() { const client = getXataClient(); const table = "vectors"; const embeddings = new OpenAIEmbeddings()...
4e9727215e95-1798
Before running it, make sure to add an author column of type String to the vectors table in Xata.import { XataVectorSearch } from "langchain/vectorstores/xata";import { OpenAIEmbeddings } from "langchain/embeddings/openai";import { BaseClient } from "@xata.io/client";import { Document } from "langchain/document";// Fir...
4e9727215e95-1799
docs = [ new Document({ pageContent: "Xata works great with Langchain.js", metadata: { author: "Xata" }, }), new Document({ pageContent: "Xata works great with Langchain", metadata: { author: "Langchain" }, }), new Document({ pageContent: "Xata includes similarity search", m...