Feature/Indexing (#1802)

* indexing

* fix for multiple files upsert

* fix default Postgres port

* fix SQLite node description

* add MySQLRecordManager node

* fix MySQL unique index

* add upsert history

* update jsx ui

* lint-fix

* update dialog details

* update llamaindex pinecone

---------

Co-authored-by: chungyau97 <chungyau97@gmail.com>
This commit is contained in:
Henry Heng
2024-04-02 23:47:19 +01:00
committed by GitHub
parent 957694a912
commit e422ce287b
67 changed files with 3006 additions and 246 deletions
@@ -19,7 +19,7 @@ const creatTool = async (req: Request, res: Response, next: NextFunction) => {
const deleteTool = async (req: Request, res: Response, next: NextFunction) => {
try {
if (typeof req.params.id === 'undefined' || req.params.id === '') {
throw new Error(`Error: toolsController.updateTool - id not provided!`)
throw new Error(`Error: toolsController.deleteTool - id not provided!`)
}
const apiResponse = await toolsService.deleteTool(req.params.id)
if (apiResponse.executionError) {
@@ -0,0 +1,30 @@
import { Request, Response, NextFunction } from 'express'
import upsertHistoryService from '../../services/upsert-history'
const getAllUpsertHistory = async (req: Request, res: Response, next: NextFunction) => {
try {
const sortOrder = req.query?.order as string | undefined
const chatflowid = req.params?.id as string | undefined
const startDate = req.query?.startDate as string | undefined
const endDate = req.query?.endDate as string | undefined
const apiResponse = await upsertHistoryService.getAllUpsertHistory(sortOrder, chatflowid, startDate, endDate)
return res.json(apiResponse)
} catch (error) {
next(error)
}
}
const patchDeleteUpsertHistory = async (req: Request, res: Response, next: NextFunction) => {
try {
const ids = req.body.ids ?? []
const apiResponse = await upsertHistoryService.patchDeleteUpsertHistory(ids)
return res.json(apiResponse)
} catch (error) {
next(error)
}
}
export default {
getAllUpsertHistory,
patchDeleteUpsertHistory
}