Skip to content
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

Create a new embedding by PUT #8

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

prantlf
Copy link

@prantlf prantlf commented Dec 27, 2023

Based on #7.

Follow the unusual pattern from PUT /collections/:collection_name:
objects are created by PUT /place/<name>.

Instead of POST /collections/:collection_name/insert,
use PUT /collections/:collection_name/embeddings/:embedding_id.

Copy link

sweep-ai bot commented Dec 27, 2023

Apply Sweep Rules to your PR?

  • Apply: All new business logic should have corresponding unit tests.
  • Apply: Refactor large functions to be more modular.
  • Apply: Add docstrings to all functions and file headers.

Add a simple metadata filter based on equality of key-value pairs.

* An undefined filter or an empty array matches all embeddings.
* An empty object in the array matches any embedding.
* If an object in the array is not empty, it will match an embedding,
  if all its key-value pairs are found in the embedding's metadata.
* If there are more than one objects in the array, the whole filter
  will match an ambedding, if at least one object matches the
  embedding's metadata.
* GET /collections - list collection names
* GET `/collections/:collection_name/embeddings` - get embedding identifiers
* POST /collections/:collection_name/embeddings - filter embeddings with metadata
* DELETE /collections/:collection_name/embeddings - delete embeddings by metadata
* GET /collections/:collection_name/embeddings/:embedding_id - get an embedding
* DELETE /collections/:collection_name/embeddings/:embedding_id - delete an embedding
Follow the unusual patter from PUT /collections/:collection_name:
objects are created by PUT /place/<name>

Instead of POST /collections/:collection_name/insert,
use PUT /collections/:collection_name/embeddings/:embedding_id.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant