time-series data in a single database.Benefits from rock-solid PostgreSQL foundation with enterprise-grade feature liked streaming backups and replication, high-availability and row-level security.Enables a worry-free experience with enterprise-grade security and compliance.How to access Timescale Vector‚ÄãTimescale Vector is available on Timescale, the cloud PostgreSQL platform. (There is no self-hosted version at this time.)LangChain users get a 90-day free trial for Timescale Vector.To get started, signup to Timescale, create a new database and follow this notebook!See the Timescale Vector explainer blog for more details and performance benchmarks.See the installation instructions for more details on using Timescale Vector in python.Setup‚ÄãFollow these steps to get ready to follow this tutorial.# Pip install necessary packagespip install timescale-vectorpip install openaipip install tiktokenIn this example, we'll use OpenAIEmbeddings, so let's load your OpenAI API key.import os# Run export OPENAI_API_KEY=sk-YOUR_OPENAI_API_KEY...# Get openAI api key by reading local .env filefrom dotenv import load_dotenv, find_dotenv_ = load_dotenv(find_dotenv())OPENAI_API_KEY  = os.environ['OPENAI_API_KEY']# Get the API key and save it as an environment variable#import os#import getpass#os.environ["OPENAI_API_KEY"] = getpass.getpass("OpenAI API Key:")from typing import List, TupleNext we'll import the needed Python libraries and libraries from LangChain. Note that we import the timescale-vector library as well as the TimescaleVector LangChain vectorstore.import timescale_vectorfrom datetime import datetime, timedeltafrom langchain.embeddings.openai import OpenAIEmbeddingsfrom langchain.text_splitter import CharacterTextSplitterfrom langchain.document_loaders import TextLoaderfrom langchain.document_loaders.json_loader import JSONLoaderfrom langchain.docstore.document import Documentfrom langchain.vectorstores.timescalevector import TimescaleVector1. Similarity Search with
This notebook shows how to use the Postgres vector database Timescale Vector. You'll learn how to use TimescaleVector for (1) semantic search, (2) time-based vector search, (3) self-querying, and (4) how to create indexes to speed up queries.
This notebook shows how to use the Postgres vector database Timescale Vector. You'll learn how to use TimescaleVector for (1) semantic search, (2) time-based vector search, (3) self-querying, and (4) how to create indexes to speed up queries. ->: time-series data in a single database.Benefits from rock-solid PostgreSQL foundation with enterprise-grade feature liked streaming backups and replication, high-availability and row-level security.Enables a worry-free experience with enterprise-grade security and compliance.How to access Timescale Vector‚ÄãTimescale Vector is available on Timescale, the cloud PostgreSQL platform. (There is no self-hosted version at this time.)LangChain users get a 90-day free trial for Timescale Vector.To get started, signup to Timescale, create a new database and follow this notebook!See the Timescale Vector explainer blog for more details and performance benchmarks.See the installation instructions for more details on using Timescale Vector in python.Setup‚ÄãFollow these steps to get ready to follow this tutorial.# Pip install necessary packagespip install timescale-vectorpip install openaipip install tiktokenIn this example, we'll use OpenAIEmbeddings, so let's load your OpenAI API key.import os# Run export OPENAI_API_KEY=sk-YOUR_OPENAI_API_KEY...# Get openAI api key by reading local .env filefrom dotenv import load_dotenv, find_dotenv_ = load_dotenv(find_dotenv())OPENAI_API_KEY  = os.environ['OPENAI_API_KEY']# Get the API key and save it as an environment variable#import os#import getpass#os.environ["OPENAI_API_KEY"] = getpass.getpass("OpenAI API Key:")from typing import List, TupleNext we'll import the needed Python libraries and libraries from LangChain. Note that we import the timescale-vector library as well as the TimescaleVector LangChain vectorstore.import timescale_vectorfrom datetime import datetime, timedeltafrom langchain.embeddings.openai import OpenAIEmbeddingsfrom langchain.text_splitter import CharacterTextSplitterfrom langchain.document_loaders import TextLoaderfrom langchain.document_loaders.json_loader import JSONLoaderfrom langchain.docstore.document import Documentfrom langchain.vectorstores.timescalevector import TimescaleVector1. Similarity Search with