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 New POST Endpoint /memory/recall #976

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

dave90
Copy link
Contributor

@dave90 dave90 commented Nov 19, 2024

Description

This PR create a new POST endpoint /memory/recall that accept a json with this format:

{
    "text": "...",
    "k": 34,
    "metadata": {}
}

metadata is a simple flat dictionary to search in AND

Endpoint GET /memory/recall remain and log a warning that is going to be deprecated in the next major version.

Related to issue #899

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

@matteocacciola

This comment was marked as abuse.

@lucagobbi
Copy link
Collaborator

lucagobbi commented Nov 19, 2024

A POST request to get info from the vector database?🤔

How would you filter by metadata using a GET request? POST seems to be a pretty common practice: Qdrant, Pinecone

@pieroit
Copy link
Member

pieroit commented Nov 19, 2024

A POST request to get info from the vector database?🤔

How would you filter by metadata using a GET request? POST seems to be a pretty common practice: Qdrant, Pinecone

Can confirm, using POST for queries is ugly but pragmatically used everywhere

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

pieroit commented Nov 19, 2024

Thanks @dave90 !!
Didn't know there was a deprecated flag in fastAPI

@matteocacciola

This comment was marked as abuse.

@matteocacciola

This comment was marked as abuse.

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.

4 participants