@@ -305,6 +305,10 @@ paths:
305
305
type : string
306
306
format : binary
307
307
description : Files to be uploaded
308
+ base64 :
309
+ type : boolean
310
+ default : false
311
+ description : Return contents of the files in base64 format
308
312
required :
309
313
- files
310
314
required : true
@@ -618,171 +622,109 @@ paths:
618
622
' 500 ' :
619
623
description : Internal server error
620
624
621
- /document-store/loader/preview :
625
+ /document-store/upsert/{id} :
622
626
post :
623
627
tags :
624
628
- document-store
625
629
security :
626
630
- bearerAuth : []
627
- summary : Preview document chunks
628
- description : Preview document chunks from loader
629
- operationId : previewChunking
631
+ summary : Upsert new document to document store
632
+ description : Upsert new document to document store
633
+ operationId : upsertDocument
634
+ parameters :
635
+ - in : path
636
+ name : id
637
+ required : true
638
+ schema :
639
+ type : string
640
+ format : uuid
641
+ description : Document store ID
630
642
requestBody :
631
643
content :
632
644
application/json :
633
645
schema :
634
- $ref : ' #/components/schemas/DocumentStoreLoaderForPreview'
635
- required : true
636
- responses :
637
- ' 200 ' :
638
- description : Successfully preview chunks
639
- content :
640
- application/json :
641
- schema :
642
- type : object
643
- properties :
644
- chunks :
645
- type : array
646
- items :
647
- $ref : ' #/components/schemas/Document'
648
- totalChunks :
649
- type : integer
650
- example : 10
651
- previewChunkCount :
652
- type : integer
653
- example : 5
654
- ' 400 ' :
655
- description : Invalid request body
656
- ' 500 ' :
657
- description : Internal server error
658
-
659
- /document-store/loader/process :
660
- post :
661
- tags :
662
- - document-store
663
- security :
664
- - bearerAuth : []
665
- summary : Process loading & chunking operation
666
- description : Process loading & chunking operation of document from loader
667
- operationId : processChunking
668
- requestBody :
669
- content :
670
- application/json :
646
+ $ref : ' #/components/schemas/DocumentStoreLoaderForUpsert'
647
+ multipart/form-data :
671
648
schema :
672
649
type : object
673
- required :
674
- - storeId
675
- - id
676
650
properties :
677
- storeId :
678
- type : string
679
- description : Document store ID
680
- example : ' 603a7b51-ae7c-4b0a-8865-e454ed2f6766'
681
- id :
651
+ files :
652
+ type : array
653
+ items :
654
+ type : string
655
+ format : binary
656
+ description : Files to be uploaded
657
+ loader :
682
658
type : string
683
- description : Document loader ID. If your URL is /document-stores/{storeId}/{id}, then id is the last part of the URL
684
- example : ' c427e569-b81a-469a-b14c-fa73dd5bae49'
685
- required : true
686
- responses :
687
- ' 200 ' :
688
- description : Successfully process chunking operation
689
- content :
690
- application/json :
691
- schema :
692
- $ref : ' #/components/schemas/DocumentStoreFileChunkPagedResponse'
693
-
694
- ' 400 ' :
695
- description : Invalid request body
696
- ' 500 ' :
697
- description : Internal server error
698
-
699
- /document-store/vectorstore/save :
700
- post :
701
- tags :
702
- - document-store
703
- security :
704
- - bearerAuth : []
705
- summary : Save upsert configuration of document store
706
- description : Save upsert configuration of document store
707
- operationId : saveVectorStoreConfig
708
- requestBody :
709
- content :
710
- application/json :
711
- schema :
712
- type : object
713
- required :
714
- - storeId
715
- properties :
716
- storeId :
659
+ nullable : true
660
+ example : ' {"name":"plainText","config":{"text":"why the sky is blue"}}'
661
+ description : Loader configurations
662
+ splitter :
717
663
type : string
718
- description : Document store ID
719
- example : ' 603a7b51-ae7c-4b0a-8865-e454ed2f6766'
720
- embeddingName :
664
+ nullable : true
665
+ example : ' {"name":"recursiveCharacterTextSplitter","config":{"chunkSize":2000}}'
666
+ description : Splitter configurations
667
+ embedding :
721
668
type : string
722
- description : Name of the embedding
723
- example : ' openAIEmbeddings'
724
- embeddingConfig :
725
- type : object
726
- description : Configuration of the embedding
727
- example : { 'model': 'text-embedding-ada-002', 'credential': '1eba5808-c55b-4817-a285-b0c92846a7ad' }
728
- vectorStoreName :
669
+ nullable : true
670
+ example : ' {"name":"openAIEmbeddings","config":{"modelName":"text-embedding-ada-002"}}'
671
+ description : Embedding configurations
672
+ vectorStore :
729
673
type : string
730
- description : Name of the vector store
731
- example : ' faiss'
732
- vectorStoreConfig :
733
- type : object
734
- description : Configuration of the embedding
735
- example : { 'basePath': './faiss' }
736
- recordManagerName :
674
+ nullable : true
675
+ example : ' {"name":"faiss"}'
676
+ description : Vector Store configurations
677
+ recordManager :
737
678
type : string
738
- description : Name of the record manager
739
- example : ' SQLiteRecordManager'
740
- recordManagerConfig :
741
- type : object
742
- description : Configuration of the embedding
743
- example : { 'databaseFilePath': './recordManager.db' }
679
+ nullable : true
680
+ example : ' {"name":"postgresRecordManager"}'
681
+ description : Record Manager configurations
682
+ required :
683
+ - files
744
684
required : true
745
685
responses :
746
686
' 200 ' :
747
- description : Successfully save upsert configuration of document store
687
+ description : Successfully execute upsert operation
748
688
content :
749
689
application/json :
750
690
schema :
751
- $ref : ' #/components/schemas/DocumentStore '
691
+ $ref : ' #/components/schemas/VectorUpsertResponse '
752
692
753
693
' 400 ' :
754
694
description : Invalid request body
755
695
' 500 ' :
756
696
description : Internal server error
757
697
758
- /document-store/vectorstore/insert :
698
+ /document-store/refresh/{id} :
759
699
post :
760
700
tags :
761
701
- document-store
762
702
security :
763
703
- bearerAuth : []
764
- summary : Upsert chunks from document store
765
- description : Upsert chunks from document store using the saved configuration
766
- operationId : insertIntoVectorStore
704
+ summary : Re-process and upsert all documents in document store
705
+ description : Re-process and upsert all existing documents in document store
706
+ operationId : refreshDocument
707
+ parameters :
708
+ - in : path
709
+ name : id
710
+ required : true
711
+ schema :
712
+ type : string
713
+ format : uuid
714
+ description : Document store ID
767
715
requestBody :
768
716
content :
769
717
application/json :
770
718
schema :
771
- type : object
772
- required :
773
- - storeId
774
- properties :
775
- storeId :
776
- type : string
777
- description : Document store ID
778
- example : ' 603a7b51-ae7c-4b0a-8865-e454ed2f6766'
719
+ $ref : ' #/components/schemas/DocumentStoreLoaderForRefresh'
779
720
required : true
780
721
responses :
781
722
' 200 ' :
782
- description : Successfully save upsert configuration of document store
723
+ description : Successfully execute refresh operation
783
724
content :
784
725
application/json :
785
- schema :
726
+ type : array
727
+ items :
786
728
$ref : ' #/components/schemas/VectorUpsertResponse'
787
729
788
730
' 400 ' :
@@ -2220,6 +2162,72 @@ components:
2220
2162
description :
2221
2163
type : string
2222
2164
2165
+ DocumentStoreLoaderForUpsert :
2166
+ type : object
2167
+ properties :
2168
+ docId :
2169
+ type : string
2170
+ format : uuid
2171
+ description : Document ID within the store. If provided, existing configuration from the document will be used for the new document
2172
+ loader :
2173
+ type : object
2174
+ properties :
2175
+ name :
2176
+ type : string
2177
+ example : plainText
2178
+ description : Name of the loader (camelCase)
2179
+ config :
2180
+ type : object
2181
+ description : Configuration for the loader
2182
+ splitter :
2183
+ type : object
2184
+ properties :
2185
+ name :
2186
+ type : string
2187
+ example : recursiveCharacterTextSplitter
2188
+ description : Name of the text splitter (camelCase)
2189
+ config :
2190
+ type : object
2191
+ description : Configuration for the text splitter
2192
+ embedding :
2193
+ type : object
2194
+ properties :
2195
+ name :
2196
+ type : string
2197
+ example : openAIEmbeddings
2198
+ description : Name of the embedding generator (camelCase)
2199
+ config :
2200
+ type : object
2201
+ description : Configuration for the embedding generator
2202
+ vectorStore :
2203
+ type : object
2204
+ properties :
2205
+ name :
2206
+ type : string
2207
+ example : faiss
2208
+ description : Name of the vector store (camelCase)
2209
+ config :
2210
+ type : object
2211
+ description : Configuration for the vector store
2212
+ recordManager :
2213
+ type : object
2214
+ properties :
2215
+ name :
2216
+ type : string
2217
+ example : postgresRecordManager
2218
+ description : Name of the record manager (camelCase)
2219
+ config :
2220
+ type : object
2221
+ description : Configuration for the record manager
2222
+
2223
+ DocumentStoreLoaderForRefresh :
2224
+ type : object
2225
+ properties :
2226
+ items :
2227
+ type : array
2228
+ items :
2229
+ $ref : ' #/components/schemas/DocumentStoreLoaderForUpsert'
2230
+
2223
2231
ChatMessageFeedback :
2224
2232
type : object
2225
2233
properties :
0 commit comments