-
Notifications
You must be signed in to change notification settings - Fork 5.3k
vectordb api endpoints #10653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
vectordb api endpoints #10653
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
5a6561f
vectordb (in progress)
ArnabChatterjee20k 7ddecdd
Merge branch 'documents-db-api' into vector-db-api
ArnabChatterjee20k 3311bd2
Merge branch 'documents-db-api' into vector-db-api
ArnabChatterjee20k 60e9545
vector db endpoints
ArnabChatterjee20k f9be1dd
added vector embedding creation + update endpoint
ArnabChatterjee20k 4988881
updated method names and sdk namespaces for vectordb
ArnabChatterjee20k d2275c0
updated tests
ArnabChatterjee20k bd6f62d
updated realtime, create endpoint , resources, registers
ArnabChatterjee20k 86371e2
Merge branch 'documents-db-api' into vector-db-api
ArnabChatterjee20k b1dd377
Merge branch 'documents-db-api' into vector-db-api
ArnabChatterjee20k 857ec3b
reverted docker compose
ArnabChatterjee20k 04b169f
updated composer packages
ArnabChatterjee20k de59f53
reverted error tracing
ArnabChatterjee20k c3f221f
added timestamp mutation test
ArnabChatterjee20k 954011b
added transactions for vectordb
ArnabChatterjee20k ed84199
linting
ArnabChatterjee20k 75045ff
added constants for the vector dimension
ArnabChatterjee20k 93bd6b3
updated migrations + index finding issue in vectordb
ArnabChatterjee20k c66308e
Merge remote-tracking branch 'upstream/documents-db-api' into vector-…
ArnabChatterjee20k 70a1d5d
updated composer lock
ArnabChatterjee20k cc75986
Merge remote-tracking branch 'upstream/documents-db-api' into vector-…
ArnabChatterjee20k c3ad337
updated migrations for vectordb importing/exporting in csv endpoints
ArnabChatterjee20k fe753db
Merge remote-tracking branch 'upstream/documents-db-api' into vector-…
ArnabChatterjee20k c0ac528
Merge remote-tracking branch 'upstream/documents-db-api' into vector-…
ArnabChatterjee20k 918ebb8
Add VectorDB text embedding creation endpoint and update related tests
ArnabChatterjee20k 6eb17b8
updated composer
ArnabChatterjee20k fdf5ca0
updated tests condition
ArnabChatterjee20k abe1257
Merge remote-tracking branch 'upstream/documents-db-api' into vector-…
ArnabChatterjee20k d2c9ac0
Refactor VectorDB Embeddings API and Update Dimension Handling
ArnabChatterjee20k ca4c7b5
added stats usage for text embeddings
ArnabChatterjee20k def028e
Merge remote-tracking branch 'upstream/documents-db-api' into vector-…
ArnabChatterjee20k 069f231
updated composer lock
ArnabChatterjee20k 7af361f
* added logger in the create text embedding
ArnabChatterjee20k b15f2ee
Merge remote-tracking branch 'upstream/documents-db-api' into vector-…
ArnabChatterjee20k f149ba3
updated stats for vectordb
ArnabChatterjee20k fbaeff8
Merge remote-tracking branch 'upstream/documents-db-api' into vector-…
ArnabChatterjee20k 480757d
added usage test for the vectordb
ArnabChatterjee20k f3721f7
fixed missing project usage fields
ArnabChatterjee20k d22743a
Merge remote-tracking branch 'upstream/documents-db-api' into vector-…
ArnabChatterjee20k 991b2b1
updated delete worker for vectordb and updated tests
ArnabChatterjee20k File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,165 @@ | ||
| <?php | ||
|
|
||
| use Utopia\Database\Database; | ||
| use Utopia\Database\Helpers\ID; | ||
|
|
||
| return [ | ||
| 'collections' => [ | ||
| '$collection' => ID::custom('databases'), | ||
| '$id' => ID::custom('collections'), | ||
| 'name' => 'Collections', | ||
| 'attributes' => [ | ||
| [ | ||
| '$id' => ID::custom('databaseInternalId'), | ||
| 'type' => Database::VAR_STRING, | ||
| 'format' => '', | ||
| 'size' => Database::LENGTH_KEY, | ||
| 'signed' => true, | ||
| 'required' => true, | ||
| 'default' => null, | ||
| 'array' => false, | ||
| 'filters' => [], | ||
| ], | ||
| [ | ||
| '$id' => ID::custom('databaseId'), | ||
| 'type' => Database::VAR_STRING, | ||
| 'signed' => true, | ||
| 'size' => Database::LENGTH_KEY, | ||
| 'format' => '', | ||
| 'filters' => [], | ||
| 'required' => true, | ||
| 'default' => null, | ||
| 'array' => false, | ||
| ], | ||
| [ | ||
| '$id' => ID::custom('name'), | ||
| 'type' => Database::VAR_STRING, | ||
| 'size' => 256, | ||
| 'required' => true, | ||
| 'signed' => true, | ||
| 'array' => false, | ||
| 'filters' => [], | ||
| ], | ||
| [ | ||
| '$id' => ID::custom('dimension'), | ||
| 'type' => Database::VAR_INTEGER, | ||
| 'size' => 0, | ||
| 'required' => true, | ||
| 'signed' => false, | ||
| 'array' => false, | ||
| 'filters' => [], | ||
| ], | ||
| [ | ||
| '$id' => ID::custom('enabled'), | ||
| 'type' => Database::VAR_BOOLEAN, | ||
| 'signed' => true, | ||
| 'size' => 0, | ||
| 'format' => '', | ||
| 'filters' => [], | ||
| 'required' => true, | ||
| 'default' => null, | ||
| 'array' => false, | ||
| ], | ||
| [ | ||
| '$id' => ID::custom('documentSecurity'), | ||
| 'type' => Database::VAR_BOOLEAN, | ||
| 'signed' => true, | ||
| 'size' => 0, | ||
| 'format' => '', | ||
| 'filters' => [], | ||
| 'required' => true, | ||
| 'default' => null, | ||
| 'array' => false, | ||
| ], | ||
| [ | ||
| '$id' => ID::custom('attributes'), | ||
| 'type' => Database::VAR_STRING, | ||
| 'size' => 1000000, | ||
| 'required' => false, | ||
| 'signed' => true, | ||
| 'array' => false, | ||
| 'filters' => ['subQueryAttributes'], | ||
| ], | ||
| [ | ||
| '$id' => ID::custom('indexes'), | ||
| 'type' => Database::VAR_STRING, | ||
| 'size' => 1000000, | ||
| 'required' => false, | ||
| 'signed' => true, | ||
| 'array' => false, | ||
| 'filters' => ['subQueryIndexes'], | ||
| ], | ||
| [ | ||
| '$id' => ID::custom('search'), | ||
| 'type' => Database::VAR_STRING, | ||
| 'format' => '', | ||
| 'size' => 16384, | ||
| 'signed' => true, | ||
| 'required' => false, | ||
| 'default' => null, | ||
| 'array' => false, | ||
| 'filters' => [], | ||
| ], | ||
| ], | ||
| 'defaultAttributes' => [ | ||
| [ | ||
| '$id' => ID::custom('embeddings'), | ||
| 'type' => Database::VAR_VECTOR, | ||
| 'required' => true, | ||
| 'signed' => false, | ||
| 'array' => false, | ||
| 'filters' => [], | ||
| ], | ||
| [ | ||
| '$id' => ID::custom('metadata'), | ||
| 'type' => Database::VAR_OBJECT, | ||
| 'default' => [], | ||
| 'required' => false, | ||
| 'size' => 0, | ||
| 'signed' => false, | ||
| 'array' => false, | ||
| 'filters' => [], | ||
|
abnegate marked this conversation as resolved.
|
||
| ], | ||
| ], | ||
| 'indexes' => [ | ||
| [ | ||
| '$id' => ID::custom('_fulltext_search'), | ||
| 'type' => Database::INDEX_FULLTEXT, | ||
| 'attributes' => ['search'], | ||
| 'lengths' => [], | ||
| 'orders' => [], | ||
| ], | ||
| [ | ||
| '$id' => ID::custom('_key_name'), | ||
| 'type' => Database::INDEX_KEY, | ||
| 'attributes' => ['name'], | ||
| 'lengths' => [256], | ||
| 'orders' => [Database::ORDER_ASC], | ||
| ], | ||
| [ | ||
| '$id' => ID::custom('_key_enabled'), | ||
| 'type' => Database::INDEX_KEY, | ||
| 'attributes' => ['enabled'], | ||
| 'lengths' => [], | ||
| 'orders' => [Database::ORDER_ASC], | ||
| ], | ||
| [ | ||
| '$id' => ID::custom('_key_documentSecurity'), | ||
| 'type' => Database::INDEX_KEY, | ||
| 'attributes' => ['documentSecurity'], | ||
| 'lengths' => [], | ||
| 'orders' => [Database::ORDER_ASC], | ||
| ], | ||
| ], | ||
| 'defaultIndexes' => [ | ||
| // not creating default indexes on the embeddings as it depends on the type of query users using the most | ||
| [ | ||
| '$id' => ID::custom('_key_metadata'), | ||
| 'type' => Database::INDEX_OBJECT, | ||
| 'attributes' => ['metadata'], | ||
| 'lengths' => [], | ||
| 'orders' => [], | ||
| ], | ||
| ] | ||
| ] | ||
| ]; | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.