Microsoft.KernelMemory.ServiceAssembly

Upload a new document to the knowledge base

Changed on

Upload a document consisting of one or more files to extract memories from. The extraction process happens asynchronously. If a document with the same ID already exists, it will be overwritten and the memories previously extracted will be updated.

post/upload

Request

  • The document declares no server URL.
  • Auth
    API key in header Authorization

Request body multipart/form-data

indexstring

Name of the index where to store memories generated by the files.

documentIdstring

Unique ID used for import pipeline and document ID.

tagsstring[]

Tags to apply to the memories extracted from the files.

stepsstring[]

How to process the files, e.g. how to extract/chunk etc.

filesstring[]

Files to process and extract memories from.

Example request

{
  "tags": [
    "group:abc123",
    "user:xyz"
  ],
  "steps": [
    "extract",
    "partition",
    "gen_embeddings",
    "save_records"
  ]
}

Response

OK

Changes