TimescaleVector(
self,
service_url: str,
embedding: Embeddings,
collection_name: str | Name | Type | Description |
|---|---|---|
service_url* | str | Service url on timescale cloud. |
embedding* | Embeddings | Any embedding function implementing
|
collection_name | str | Default: _LANGCHAIN_DEFAULT_COLLECTION_NAMEThe name of the collection to use. (default: langchain_store) This will become the table name used for the collection. |
distance_strategy | DistanceStrategy | Default: DEFAULT_DISTANCE_STRATEGY |
pre_delete_collection | bool | Default: False |
Timescale Postgres vector store
To use, you should have the timescale_vector python package installed.
Example:
.. code-block:: python
from langchain_community.vectorstores import TimescaleVector from langchain_community.embeddings.openai import OpenAIEmbeddings
SERVICE_URL = "postgres://tsdbadmin:
The distance strategy to use. (default: COSINE)
If True, will delete the collection if it exists. (default: False). Useful for testing.