PGVectorDBName | Description |
---|---|
conn | Type: ForwardRef(‘psycopg.Connection’) | None Default: None |
connection_string | Type: str | None Default: None |
host | Type: str | None Default: None |
port | Type: int | str | None Default: None |
dbname | Type: str | None Default: None |
username | Type: str | None Default: None |
password | Type: str | None Default: None |
connect_timeout | Type: int | None Default: 10 |
embedding_function | Type: Callable Default: None |
metadata | Type: dict[str, typing.Any] | None Default: None |
Name | Description | |
---|---|---|
collection_name | str | The name of the collection. Type: str |
overwrite | bool | Whether to overwrite the collection if it exists. Default is False. Type: bool Default: False |
get_or_create | bool | Whether to get the collection if it exists. Default is True. Type: bool Default: True |
Type | Description |
---|---|
Collection | Collection | The collection object. |
Name | Description | |
---|---|---|
collection_name | str | The name of the collection. Type: str |
Type | Description |
---|---|
None | None |
Name | Description | |
---|---|---|
ids | List[ItemID] | A list of document ids. Each id is a typed ItemID .Type: list[str | int] |
collection_name | str | The name of the collection. Default is None. Type: str Default: None |
Type | Description |
---|---|
None | None |
Name | Description |
---|---|
conn | An existing psycopg connection object. If provided, this connection will be used. Type: ForwardRef(‘psycopg.Connection’) | None Default: None |
connection_string | A string containing the connection information. If provided, a new connection will be established using this string. Type: str | None Default: None |
host | The hostname of the PostgreSQL server. Used if connection_string is not provided. Type: str | None Default: None |
port | The port number to connect to at the server host. Used if connection_string is not provided. Type: int | str | None Default: None |
dbname | The database name. Used if connection_string is not provided. Type: str | None Default: None |
username | The username to connect as. Used if connection_string is not provided. Type: str | None Default: None |
password | The user’s password. Used if connection_string is not provided. Type: str | None Default: None |
connect_timeout | Maximum wait for connection, in seconds. The default is 10 seconds. Type: int | None Default: 10 |
Type | Description |
---|---|
psycopg.Connection | A psycopg.Connection object representing the established connection. |
Name | Description | |
---|---|---|
collection_name | str | The name of the collection. Default is None. If None, return the current active collection. Type: str Default: None |
Type | Description |
---|---|
Collection | Collection | The collection object. |
Name | Description | |
---|---|---|
ids | List[ItemID] | A list of document ids. If None, will return all the documents. Default is None. Type: list[str | int] Default: None |
collection_name | str | The name of the collection. Default is None. Type: str Default: None |
include=None | ||
**kwargs |
Type | Description |
---|---|
list[Document] | List[Document] | The results. |
Name | Description | |
---|---|---|
docs | List[Document] | A list of documents. Each document is a TypedDict Document .Type: list[Document] |
collection_name | str | The name of the collection. Default is None. Type: str Default: None |
upsert | bool | Whether to update the document if it exists. Default is False. Type: bool Default: False |
Type | Description |
---|---|
None | None |
Name | Description | |
---|---|---|
queries | List[str] | A list of queries. Each query is a string. Type: list[str] |
collection_name | str | The name of the collection. Default is None. Type: str Default: None |
n_results | int | The number of relevant documents to return. Default is 10. Type: int Default: 10 |
distance_threshold | float | The threshold for the distance score, only distance smaller than it will be returned. Don’t filter with it if 0 .Default is -1. Type: float Default: -1 |
Type | Description |
---|---|
list[list[tuple[Document, float]]] | QueryResults | The query results. Each query result is a list of list of tuples containing the document and the distance. |
Name | Description | |
---|---|---|
docs | List[Document] | A list of documents. Type: list[Document] |
collection_name | str | The name of the collection. Default is None. Type: str Default: None |
Type | Description |
---|---|
None | None |