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

Add PUT Endpoint for Updating Single Point by ID #971

Merged
merged 3 commits into from
Nov 13, 2024

Conversation

dave90
Copy link
Contributor

@dave90 dave90 commented Nov 10, 2024

Description

This PR adds a new PUT endpoint to update a single memory point in a collection using the Qdrant point ID.

With existing GET and DELETE endpoints for single points, this completes the CRUD operations.

Example of usage:

content = "MIAO!"
metadata = {"custom_key": "new_custom_value"}
req_json = {
    "content": content,
    "metadata": metadata,
}

# edit the point
res = requests.put(
    f"http://localhost:1865/memory/collections/{collection}/points/{point_id}", json=req_json
)
json = res.json()
print(json)

Related to issue #897

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

@pieroit pieroit merged commit f427795 into cheshire-cat-ai:develop Nov 13, 2024
2 checks passed
@pieroit
Copy link
Member

pieroit commented Nov 13, 2024

Absolutely perfect, thanks @dave90

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.

2 participants