mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-28 14:18:51 +01:00
ℹ️ refactor: Remove use of Agenda for Conversation Imports (#3024)
* chore: remove agenda and npm audit fix * refactor: import conversations without agenda * chore: update package-lock.json and data-provider version to 0.6.7 * fix: import conversations * chore: client npm audit fix
This commit is contained in:
parent
92232afaca
commit
2e559137ae
12 changed files with 52 additions and 402 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "librechat-data-provider",
|
||||
"version": "0.6.6",
|
||||
"version": "0.6.7",
|
||||
"description": "data services for librechat apps",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.es.js",
|
||||
|
|
|
|||
|
|
@ -47,9 +47,6 @@ export const importConversation = () => `${conversationsRoot}/import`;
|
|||
|
||||
export const forkConversation = () => `${conversationsRoot}/fork`;
|
||||
|
||||
export const importConversationJobStatus = (jobId: string) =>
|
||||
`${conversationsRoot}/import/jobs/${jobId}`;
|
||||
|
||||
export const search = (q: string, pageNumber: string) =>
|
||||
`/api/search?q=${q}&pageNumber=${pageNumber}`;
|
||||
|
||||
|
|
|
|||
|
|
@ -305,22 +305,10 @@ export const uploadFile = (data: FormData): Promise<f.TFileUpload> => {
|
|||
* @param data - The FormData containing the file to import.
|
||||
* @returns A Promise that resolves to the import start response.
|
||||
*/
|
||||
export const importConversationsFile = (data: FormData): Promise<t.TImportStartResponse> => {
|
||||
export const importConversationsFile = (data: FormData): Promise<t.TImportResponse> => {
|
||||
return request.postMultiPart(endpoints.importConversation(), data);
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieves the status of an import conversation job.
|
||||
*
|
||||
* @param jobId - The ID of the import conversation job.
|
||||
* @returns A promise that resolves to the import job status.
|
||||
*/
|
||||
export const queryImportConversationJobStatus = async (
|
||||
jobId: string,
|
||||
): Promise<t.TImportJobStatus> => {
|
||||
return request.get(endpoints.importConversationJobStatus(jobId));
|
||||
};
|
||||
|
||||
export const uploadAvatar = (data: FormData): Promise<f.AvatarUploadResponse> => {
|
||||
return request.postMultiPart(endpoints.avatar(), data);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -315,39 +315,9 @@ export type TRequestPasswordResetResponse = {
|
|||
/**
|
||||
* Represents the response from the import endpoint.
|
||||
*/
|
||||
export type TImportStartResponse = {
|
||||
export type TImportResponse = {
|
||||
/**
|
||||
* The message associated with the response.
|
||||
*/
|
||||
message: string;
|
||||
|
||||
/**
|
||||
* The ID of the job associated with the import.
|
||||
*/
|
||||
jobId: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Represents the status of an import job.
|
||||
*/
|
||||
export type TImportJobStatus = {
|
||||
/**
|
||||
* The name of the job.
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* The ID of the job.
|
||||
*/
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* The status of the job.
|
||||
*/
|
||||
status: 'scheduled' | 'running' | 'completed' | 'failed';
|
||||
|
||||
/**
|
||||
* The reason the job failed, if applicable.
|
||||
*/
|
||||
failReason?: string;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue