This repository has been archived by the owner on Oct 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
95e0ca6
commit e7b8cd3
Showing
16 changed files
with
150 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: Index & Vector Databases | ||
--- | ||
|
||
# Index & Vector Databases | ||
|
||
## Index Database | ||
|
||
The index database is an additional (relational) metadata database which keeps track of all datasets and ingested files and their relationships. | ||
It enables some extra convenience features but does not store the actual data (content & embeddings). | ||
The current implementation uses **SQLite** by default, which is fully embedded and does not require any additional setup. | ||
|
||
You can configure it by setting a database connection string via the `KNOW_INDEX_DSN` environment variable. | ||
The following options are available: | ||
|
||
- [SQLite](https://www.sqlite.org/) (default): `KNOW_INDEX_DSN="sqlite:///home/me/mysqlite.db"` | ||
- [Postgres](https://www.postgresql.org/): `KNOW_INDEX_DSN="postgres://knowledge:knowledge@localhost:5432/knowledge?sslmode=disable"` | ||
|
||
|
||
## Vector Database | ||
|
||
The vector database is the main storage for the content and embeddings of the ingested documents along with some metadata (e.g. source file information). | ||
The current implementation uses [**chromem-go**](https://github.com/philippgille/chromem-go) by default, which is fully embedded and does not require any additional setup. | ||
|
||
You can configure it by setting a database connection string via the `KNOW_VECTOR_DSN` environment variable. | ||
The following options are available: | ||
|
||
- [Chromem-Go](https://github.com/philippgille/chromem-go) (default): `KNOW_VECTOR_DSN="chromem:///path/to/directory"` (Note: we're using a customized fork of chromem-go, so some details may differ from the original project) | ||
- [PGVector](https://github.com/pgvector/pgvector): `KNOW_VECTOR_DSN="pgvector://knowledge:knowledge@localhost:5432/knowledge?sslmode=disable"` | ||
- [SQLite-Vec](https://github.com/asg017/sqlite-vec): `KNOW_VECTOR_DSN="sqlite-vec:///home/me/mysqlite.db"` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
title: "knowledge delete-file" | ||
--- | ||
## knowledge delete-file | ||
|
||
Delete a file from a dataset | ||
|
||
``` | ||
knowledge delete-file <file-id|file-abs-path> [flags] | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
--auto-migrate string Auto migrate database ($KNOW_DB_AUTO_MIGRATE) (default "true") | ||
-c, --config-file string Path to the configuration file ($KNOW_CONFIG_FILE) | ||
-d, --dataset string Target Dataset ID ($KNOWLEDGE_CLIENT_DELETE_FILE_DATASET) (default "default") | ||
--embedding-model-provider string Embedding model provider ($KNOW_EMBEDDING_MODEL_PROVIDER) (default "openai") | ||
-h, --help help for delete-file | ||
--index-dsn string Index Database Connection string (relational DB) (default "sqlite://$XDG_DATA_HOME/gptscript/knowledge/knowledge.db") ($KNOW_INDEX_DSN) | ||
--server string URL of the Knowledge API Server ($KNOW_SERVER_URL) | ||
--vector-dsn string DSN to the vector database (default "chromem:$XDG_DATA_HOME/gptscript/knowledge/vector.db") ($KNOW_VECTOR_DSN) | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [knowledge](knowledge.md) - | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
title: "knowledge get-file" | ||
--- | ||
## knowledge get-file | ||
|
||
Get a file from a dataset | ||
|
||
``` | ||
knowledge get-file <file-id|file-abs-path> [flags] | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
--auto-migrate string Auto migrate database ($KNOW_DB_AUTO_MIGRATE) (default "true") | ||
-c, --config-file string Path to the configuration file ($KNOW_CONFIG_FILE) | ||
-d, --dataset string Target Dataset ID ($KNOWLEDGE_CLIENT_GET_FILE_DATASET) (default "default") | ||
--embedding-model-provider string Embedding model provider ($KNOW_EMBEDDING_MODEL_PROVIDER) (default "openai") | ||
-h, --help help for get-file | ||
--index-dsn string Index Database Connection string (relational DB) (default "sqlite://$XDG_DATA_HOME/gptscript/knowledge/knowledge.db") ($KNOW_INDEX_DSN) | ||
--server string URL of the Knowledge API Server ($KNOW_SERVER_URL) | ||
--vector-dsn string DSN to the vector database (default "chromem:$XDG_DATA_HOME/gptscript/knowledge/vector.db") ($KNOW_VECTOR_DSN) | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [knowledge](knowledge.md) - | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.