gotrip-fx-transaction-form 1.0.299-dev → 1.0.301-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types/components/Rag/RagDocumentPreviewDialog.d.ts +15 -0
- package/types/components/Rag/RagIngestProgress.d.ts +4 -0
- package/types/components/Rag/RagStatusBadge.d.ts +7 -1
- package/types/hooks/useRagAdmin.d.ts +2 -1
- package/types/pages/admin/rag/RagLogsPage.d.ts +0 -5
- package/types/types/rag.d.ts +18 -2
- package/types/util/rag.d.ts +2 -0
package/package.json
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
/** Document to preview; null closes the dialog. */
|
|
3
|
+
documentId: number | null;
|
|
4
|
+
title: string;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Shows the uploaded source file so an admin can check it against the chunks
|
|
9
|
+
* that were extracted from it.
|
|
10
|
+
*
|
|
11
|
+
* The file is fetched as a short-lived signed URL each time the dialog opens
|
|
12
|
+
* rather than being cached, since the URL expires after 30 minutes.
|
|
13
|
+
*/
|
|
14
|
+
export declare const RagDocumentPreviewDialog: ({ documentId, title, onClose }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IRagDocument } from '../../types/rag';
|
|
2
|
+
type Props = Pick<IRagDocument, 'status' | 'progressStage' | 'progressCurrent' | 'progressTotal'>;
|
|
3
|
+
export declare const RagIngestProgress: ({ status, progressStage, progressCurrent, progressTotal, }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
4
|
+
export {};
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import { ERagDocumentStatus, ERagEmbeddingStatus } from '../../types/rag';
|
|
1
|
+
import { ERagDocumentStatus, ERagEmbeddingStatus, ERagSourceType } from '../../types/rag';
|
|
2
2
|
export declare const RagDocumentStatusBadge: ({ status }: {
|
|
3
3
|
status: ERagDocumentStatus;
|
|
4
4
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export declare const RagEmbeddingStatusBadge: ({ status }: {
|
|
6
6
|
status: ERagEmbeddingStatus;
|
|
7
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* File format of a source document.
|
|
10
|
+
*/
|
|
11
|
+
export declare const RagSourceTypeBadge: ({ sourceType }: {
|
|
12
|
+
sourceType: ERagSourceType;
|
|
13
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ERagDocumentStatus, ERagQueryOutcome, IPaginated, IRagChunk, IRagDocument, IRagIndexHealth, IRagPreviewResult, IRagQueryLog, IRagSettings } from '../types/rag';
|
|
1
|
+
import { ERagDocumentStatus, ERagQueryOutcome, IPaginated, IRagChunk, IRagDocument, IRagDocumentFile, IRagIndexHealth, IRagPreviewResult, IRagQueryLog, IRagSettings } from '../types/rag';
|
|
2
2
|
export declare const useRagAdmin: () => {
|
|
3
3
|
listDocuments: (params: {
|
|
4
4
|
page?: number;
|
|
@@ -8,6 +8,7 @@ export declare const useRagAdmin: () => {
|
|
|
8
8
|
}) => Promise<IPaginated<IRagDocument>>;
|
|
9
9
|
uploadDocument: (file: File, title?: string) => Promise<IRagDocument>;
|
|
10
10
|
getDocument: (id: number) => Promise<IRagDocument>;
|
|
11
|
+
getDocumentFileUrl: (id: number) => Promise<IRagDocumentFile>;
|
|
11
12
|
updateDocument: (id: number, changes: {
|
|
12
13
|
title?: string;
|
|
13
14
|
status?: ERagDocumentStatus;
|
package/types/types/rag.d.ts
CHANGED
|
@@ -7,9 +7,16 @@ export declare enum ERagDocumentStatus {
|
|
|
7
7
|
}
|
|
8
8
|
export declare enum ERagSourceType {
|
|
9
9
|
DOCX = "docx",
|
|
10
|
+
DOC = "doc",
|
|
10
11
|
PDF = "pdf",
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
XLSX = "xlsx",
|
|
13
|
+
XLS = "xls"
|
|
14
|
+
}
|
|
15
|
+
export declare enum ERagIngestStage {
|
|
16
|
+
DOWNLOADING = "downloading",
|
|
17
|
+
PARSING = "parsing",
|
|
18
|
+
CHUNKING = "chunking",
|
|
19
|
+
EMBEDDING = "embedding"
|
|
13
20
|
}
|
|
14
21
|
export declare enum ERagEmbeddingStatus {
|
|
15
22
|
PENDING = "pending",
|
|
@@ -34,6 +41,9 @@ export interface IRagDocument {
|
|
|
34
41
|
status: ERagDocumentStatus;
|
|
35
42
|
errorMessage: string | null;
|
|
36
43
|
chunkCount: number;
|
|
44
|
+
progressStage: ERagIngestStage | null;
|
|
45
|
+
progressCurrent: number;
|
|
46
|
+
progressTotal: number;
|
|
37
47
|
createdAt: string;
|
|
38
48
|
updatedAt: string;
|
|
39
49
|
}
|
|
@@ -102,6 +112,12 @@ export interface IRagIndexHealth {
|
|
|
102
112
|
actualPoints: number | null;
|
|
103
113
|
inSync: boolean;
|
|
104
114
|
}
|
|
115
|
+
export interface IRagDocumentFile {
|
|
116
|
+
url: string;
|
|
117
|
+
expiresAt: number;
|
|
118
|
+
filename: string;
|
|
119
|
+
sourceType: ERagSourceType;
|
|
120
|
+
}
|
|
105
121
|
export interface IPaginated<T> {
|
|
106
122
|
data: T[];
|
|
107
123
|
total: number;
|