Feature/add ability to upload file from chat (#3059)

add ability to upload file from chat
This commit is contained in:
Henry Heng
2024-08-25 13:22:48 +01:00
committed by GitHub
parent e8f5f07735
commit 66acd0c000
37 changed files with 1111 additions and 259 deletions
+5
View File
@@ -1,11 +1,16 @@
import client from './client'
const upsertVectorStore = (id, input) => client.post(`/vector/internal-upsert/${id}`, input)
const upsertVectorStoreWithFormData = (id, formData) =>
client.post(`/vector/internal-upsert/${id}`, formData, {
headers: { 'Content-Type': 'multipart/form-data' }
})
const getUpsertHistory = (id, params = {}) => client.get(`/upsert-history/${id}`, { params: { order: 'DESC', ...params } })
const deleteUpsertHistory = (ids) => client.patch(`/upsert-history`, { ids })
export default {
getUpsertHistory,
upsertVectorStore,
upsertVectorStoreWithFormData,
deleteUpsertHistory
}