-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: Use collection names in the API (#89)
* Use a string-typed ID for collections, and eliminate the "name" field Working with collections is difficult. Most API endpoints currently expect an integer identifier, which the user must find by making an API query. The point of collections is to provide logical separation between documents, so it's more natural use use descriptive names to identify the collection, ie "cooking-docs" or "prod-env". This change makes the ID string-typed and user-provided, and drops the "name" field which is now redundant. This is a breaking change - the SQL schema is affected as well as the API types. In theory the "name" field could be promoted to be a new idnetifier through a SQL migration (since it has a unique constraint), but this seems like overkill at this stage. * change queries to join for collection name * update client and tests * ruff * comments * add tests for documents, collections, chunks * ruff * ruff --------- Co-authored-by: Ryan Michael <kerinin@gmail.com>
- Loading branch information
1 parent
d130875
commit 0c99005
Showing
22 changed files
with
543 additions
and
351 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
Oops, something went wrong.