You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -107,8 +108,63 @@ public static RouteHandlerBuilder AddPostUploadEndpoint(
107
108
})
108
109
.WithName("UploadDocument")
109
110
.WithDisplayName("UploadDocument")
110
-
.WithDescription("Upload a new document to the knowledge base and extract memories from it.")
111
-
.WithSummary("Upload a document to the knowledge base and extract memories from it. If a document with the same ID already exists, it will be overwritten and the memories previously extracted will be updated. Note: a document can contain multiple files.")
111
+
.WithOpenApi(
112
+
operation =>
113
+
{
114
+
operation.Summary="Upload a new document to the knowledge base";
115
+
operation.Description="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.";
116
+
operation.RequestBody=newOpenApiRequestBody
117
+
{
118
+
Content=
119
+
{
120
+
["multipart/form-data"]=newOpenApiMediaType
121
+
{
122
+
Schema=newOpenApiSchema
123
+
{
124
+
Type="object",
125
+
Properties=
126
+
{
127
+
["index"]=newOpenApiSchema
128
+
{
129
+
Type="string",
130
+
Description="Name of the index where to store memories generated by the files."
131
+
},
132
+
["documentId"]=newOpenApiSchema
133
+
{
134
+
Type="string",
135
+
Description="Unique ID used for import pipeline and document ID."
Copy file name to clipboardExpand all lines: swagger.json
+118-3Lines changed: 118 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -94,10 +94,58 @@
94
94
"tags": [
95
95
"Microsoft.KernelMemory.ServiceAssembly"
96
96
],
97
-
"summary": "Upload a document to the knowledge base and extract memories from it. If a document with the same ID already exists, it will be overwritten and the memories previously extracted will be updated. Note: a document can contain multiple files.",
98
-
"description": "Upload a new document to the knowledge base and extract memories from it.",
97
+
"summary": "Upload a new document to the knowledge base",
98
+
"description": "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.",
99
99
"operationId": "UploadDocument",
100
+
"requestBody": {
101
+
"description": "Document to upload and extract memories from",
102
+
"content": {
103
+
"multipart/form-data": {
104
+
"schema": {
105
+
"type": "object",
106
+
"properties": {
107
+
"index": {
108
+
"type": "string",
109
+
"description": "Name of the index where to store memories generated by the files."
110
+
},
111
+
"documentId": {
112
+
"type": "string",
113
+
"description": "Unique ID used for import pipeline and document ID."
114
+
},
115
+
"tags": {
116
+
"type": "object",
117
+
"additionalProperties": {
118
+
"type": "string"
119
+
},
120
+
"description": "Tags to apply to the memories extracted from the files."
121
+
},
122
+
"steps": {
123
+
"type": "array",
124
+
"items": {
125
+
"type": "string"
126
+
},
127
+
"description": "How to process the files, e.g. how to extract/chunk etc."
128
+
},
129
+
"files": {
130
+
"type": "array",
131
+
"items": {
132
+
"type": "string",
133
+
"format": "binary"
134
+
},
135
+
"description": "Files to process and extract memories from."
0 commit comments