@absolutejs/absolute 0.19.0-beta.466 → 0.19.0-beta.467
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/dist/ai/index.js +74 -3
- package/dist/ai/index.js.map +6 -5
- package/dist/src/ai/index.d.ts +2 -2
- package/dist/src/ai/rag/collection.d.ts +2 -2
- package/dist/src/ai/rag/index.d.ts +2 -1
- package/dist/src/ai/rag/reranking.d.ts +17 -0
- package/dist/src/ai/rag/types.d.ts +1 -1
- package/dist/types/ai.d.ts +8 -2
- package/package.json +7 -7
package/dist/src/ai/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export { aiChat } from '../plugins/aiChat';
|
|
2
2
|
export { streamAI } from './streamAI';
|
|
3
3
|
export { ragChat } from './rag';
|
|
4
|
-
export { buildRAGCitations, buildRAGCitationReferenceMap, buildRAGSourceGroups, buildRAGSourceSummaries, buildRAGUpsertInputFromDirectory, buildRAGUpsertInputFromDocuments, createRAGCollection, createRAGEmbeddingProvider, createRAGHTMXConfig, createRAGHTMXWorkflowRenderConfig, alibabaEmbeddings, deepseekEmbeddings, geminiEmbeddings, getLatestAssistantMessage, getLatestRAGSources, buildRAGStreamProgress, googleEmbeddings, ingestDocuments, ingestRAGDocuments, loadRAGDocumentFile, loadRAGDocumentsFromDirectory, loadRAGDocumentFromURL, loadRAGDocumentsFromURLs, metaEmbeddings, mistralaiEmbeddings, moonshotEmbeddings, ollamaEmbeddings, openaiCompatibleEmbeddings, openaiEmbeddings, prepareRAGDirectoryDocuments, buildRAGUpsertInputFromUploads, loadRAGDocumentUpload, loadRAGDocumentsFromUploads, buildRAGUpsertInputFromURLs, prepareRAGDocument, prepareRAGDocumentFile, prepareRAGDocuments, ragPlugin, resolveRAGEmbeddingProvider, resolveRAGStreamStage, searchDocuments, validateRAGEmbeddingDimensions, xaiEmbeddings } from './rag';
|
|
4
|
+
export { buildRAGCitations, buildRAGCitationReferenceMap, buildRAGSourceGroups, buildRAGSourceSummaries, buildRAGUpsertInputFromDirectory, buildRAGUpsertInputFromDocuments, createRAGCollection, createRAGEmbeddingProvider, createHeuristicRAGReranker, createRAGHTMXConfig, createRAGReranker, createRAGHTMXWorkflowRenderConfig, alibabaEmbeddings, deepseekEmbeddings, geminiEmbeddings, getLatestAssistantMessage, getLatestRAGSources, buildRAGStreamProgress, googleEmbeddings, ingestDocuments, ingestRAGDocuments, loadRAGDocumentFile, loadRAGDocumentsFromDirectory, loadRAGDocumentFromURL, loadRAGDocumentsFromURLs, metaEmbeddings, mistralaiEmbeddings, moonshotEmbeddings, ollamaEmbeddings, openaiCompatibleEmbeddings, openaiEmbeddings, prepareRAGDirectoryDocuments, buildRAGUpsertInputFromUploads, loadRAGDocumentUpload, loadRAGDocumentsFromUploads, buildRAGUpsertInputFromURLs, prepareRAGDocument, prepareRAGDocumentFile, prepareRAGDocuments, ragPlugin, resolveRAGEmbeddingProvider, resolveRAGReranker, resolveRAGStreamStage, searchDocuments, applyRAGReranking, validateRAGEmbeddingDimensions, xaiEmbeddings } from './rag';
|
|
5
5
|
export { createInMemoryRAGStore } from './rag/adapters/inMemory';
|
|
6
6
|
export { createSQLiteRAGStore } from './rag/adapters/sqlite';
|
|
7
7
|
export { resolveAbsoluteSQLiteVec, resolveAbsoluteSQLiteVecExtensionPath } from './rag/resolveAbsoluteSQLiteVec';
|
|
8
8
|
export { createRAGVector, normalizeVector, querySimilarity } from './rag/adapters/utils';
|
|
9
9
|
export type { GeminiEmbeddingsConfig, OllamaEmbeddingsConfig, OpenAICompatibleEmbeddingsConfig, OpenAIEmbeddingsConfig, NativeSQLiteRAGStoreOptions, SQLiteRAGStoreOptions } from './rag';
|
|
10
|
-
export type { AIHTMXRenderConfig, RAGSource, RAGBackendCapabilities, RAGCitation, RAGCitationReferenceMap, RAGChunkingOptions, RAGChunkingStrategy, RAGDocumentChunk, RAGDocumentChunkPreview, RAGDirectoryIngestInput, RAGDocumentFileInput, RAGDocumentIngestInput, RAGDocumentUploadIngestInput, RAGDocumentUploadInput, RAGEmbeddingFunction, RAGEmbeddingInput, RAGEmbeddingProvider, RAGEmbeddingProviderLike, RAGBackendDescriptor, RAGCollection, RAGCollectionSearchParams, RAGContentFormat, RAGReranker, RAGRerankerInput, RAGHTMXConfig, RAGHTMXWorkflowRenderConfig, RAGIngestDocument, RAGDocumentUrlIngestInput, RAGDocumentUrlInput, RAGIndexedDocument, RAGQueryInput, RAGQueryResult, RAGIngestResponse, RAGPostgresNativeDiagnostics, RAGPreparedDocument, RAGSearchRequest, RAGSourceGroup, RAGSourceSummary, RAGSQLiteNativeDiagnostics, RAGStatusResponse, RAGStreamStage, RAGEvaluationCase, RAGEvaluationCaseResult, RAGEvaluationInput, RAGEvaluationResponse, RAGEvaluationSummary, RAGMutationResponse, RAGUpsertInput, RAGVectorStore, RAGVectorStoreStatus, SQLiteVecResolution, RAGChatPluginConfig } from '../../types/ai';
|
|
10
|
+
export type { AIHTMXRenderConfig, RAGSource, RAGBackendCapabilities, RAGCitation, RAGCitationReferenceMap, RAGChunkingOptions, RAGChunkingStrategy, RAGDocumentChunk, RAGDocumentChunkPreview, RAGDirectoryIngestInput, RAGDocumentFileInput, RAGDocumentIngestInput, RAGDocumentUploadIngestInput, RAGDocumentUploadInput, RAGEmbeddingFunction, RAGEmbeddingInput, RAGEmbeddingProvider, RAGEmbeddingProviderLike, RAGBackendDescriptor, RAGCollection, RAGCollectionSearchParams, RAGContentFormat, RAGReranker, RAGRerankerInput, RAGRerankerProvider, RAGRerankerProviderLike, RAGHTMXConfig, RAGHTMXWorkflowRenderConfig, RAGIngestDocument, RAGDocumentUrlIngestInput, RAGDocumentUrlInput, RAGIndexedDocument, RAGQueryInput, RAGQueryResult, RAGIngestResponse, RAGPostgresNativeDiagnostics, RAGPreparedDocument, RAGSearchRequest, RAGSourceGroup, RAGSourceSummary, RAGSQLiteNativeDiagnostics, RAGStatusResponse, RAGStreamStage, RAGEvaluationCase, RAGEvaluationCaseResult, RAGEvaluationInput, RAGEvaluationResponse, RAGEvaluationSummary, RAGMutationResponse, RAGUpsertInput, RAGVectorStore, RAGVectorStoreStatus, SQLiteVecResolution, RAGChatPluginConfig } from '../../types/ai';
|
|
11
11
|
export type { RAGStreamProgress, RAGStreamProgressState } from './rag';
|
|
12
12
|
export { createConversationManager } from './conversationManager';
|
|
13
13
|
export { createMemoryStore } from './memoryStore';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { RAGCollection, RAGCollectionSearchParams,
|
|
1
|
+
import type { RAGCollection, RAGCollectionSearchParams, RAGRerankerProviderLike, RAGDocumentIngestInput, RAGEmbeddingProviderLike, RAGUpsertInput, RAGVectorStore } from '../../../types/ai';
|
|
2
2
|
export type CreateRAGCollectionOptions = {
|
|
3
3
|
store: RAGVectorStore;
|
|
4
4
|
embedding?: RAGEmbeddingProviderLike;
|
|
5
5
|
defaultTopK?: number;
|
|
6
6
|
defaultModel?: string;
|
|
7
|
-
rerank?:
|
|
7
|
+
rerank?: RAGRerankerProviderLike;
|
|
8
8
|
};
|
|
9
9
|
export declare const createRAGCollection: (options: CreateRAGCollectionOptions) => RAGCollection;
|
|
10
10
|
export declare const ingestDocuments: (collection: RAGCollection, input: RAGUpsertInput) => Promise<void>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { ragChat, ragChat as ragPlugin } from './chat';
|
|
2
2
|
export { createRAGHTMXConfig, createRAGHTMXWorkflowRenderConfig } from './htmxConfig';
|
|
3
3
|
export { createRAGEmbeddingProvider, resolveRAGEmbeddingProvider, validateRAGEmbeddingDimensions } from './embedding';
|
|
4
|
+
export { applyRAGReranking, createHeuristicRAGReranker, createRAGReranker, resolveRAGReranker } from './reranking';
|
|
4
5
|
export { alibabaEmbeddings, deepseekEmbeddings, geminiEmbeddings, googleEmbeddings, metaEmbeddings, mistralaiEmbeddings, moonshotEmbeddings, ollamaEmbeddings, openaiCompatibleEmbeddings, openaiEmbeddings, xaiEmbeddings } from './embeddingProviders';
|
|
5
6
|
export { buildRAGUpsertInputFromDirectory, buildRAGUpsertInputFromDocuments, buildRAGUpsertInputFromUploads, loadRAGDocumentFromURL, loadRAGDocumentUpload, loadRAGDocumentsFromUploads, buildRAGUpsertInputFromURLs, loadRAGDocumentFile, loadRAGDocumentsFromDirectory, loadRAGDocumentsFromURLs, prepareRAGDirectoryDocuments, prepareRAGDocument, prepareRAGDocumentFile, prepareRAGDocuments } from './ingestion';
|
|
6
7
|
export { buildRAGCitations, buildRAGCitationReferenceMap, buildRAGSourceGroups, buildRAGSourceSummaries, buildRAGStreamProgress, getLatestAssistantMessage, getLatestRAGSources, resolveRAGStreamStage } from './presentation';
|
|
@@ -12,5 +13,5 @@ export { resolveAbsoluteSQLiteVec, resolveAbsoluteSQLiteVecExtensionPath } from
|
|
|
12
13
|
export { createRAGVector, normalizeVector, querySimilarity } from './adapters/utils';
|
|
13
14
|
export type { GeminiEmbeddingsConfig, OllamaEmbeddingsConfig, OpenAICompatibleEmbeddingsConfig, OpenAIEmbeddingsConfig } from './embeddingProviders';
|
|
14
15
|
export type { NativeSQLiteRAGStoreOptions, SQLiteRAGStoreOptions } from './adapters/sqlite';
|
|
15
|
-
export type { AIHTMXRenderConfig, RAGBackendCapabilities, RAGCitation, RAGCitationReferenceMap, RAGChunkingOptions, RAGChunkingStrategy, RAGDocumentChunk, RAGDocumentChunkPreview, RAGDocumentFileInput, RAGDirectoryIngestInput, RAGDocumentIngestInput, RAGDocumentUploadIngestInput, RAGDocumentUploadInput, RAGDocumentUrlIngestInput, RAGDocumentUrlInput, RAGEmbeddingFunction, RAGEmbeddingInput, RAGEmbeddingProvider, RAGEmbeddingProviderLike, RAGBackendDescriptor, RAGCollection, RAGCollectionSearchParams, RAGContentFormat, RAGEvaluationCase, RAGEvaluationCaseResult, RAGEvaluationInput, RAGEvaluationResponse, RAGEvaluationSummary, RAGHTMXConfig, RAGHTMXWorkflowRenderConfig, RAGIngestDocument, RAGIngestResponse, RAGIndexedDocument, RAGMutationResponse, RAGQueryInput, RAGQueryResult, RAGPreparedDocument, RAGReranker, RAGRerankerInput, RAGSearchRequest, RAGSource, RAGSourceGroup, RAGSourceSummary, RAGSQLiteNativeDiagnostics, RAGStatusResponse, RAGUpsertInput, RAGVectorStore, RAGVectorStoreStatus, SQLiteVecResolution } from './types';
|
|
16
|
+
export type { AIHTMXRenderConfig, RAGBackendCapabilities, RAGCitation, RAGCitationReferenceMap, RAGChunkingOptions, RAGChunkingStrategy, RAGDocumentChunk, RAGDocumentChunkPreview, RAGDocumentFileInput, RAGDirectoryIngestInput, RAGDocumentIngestInput, RAGDocumentUploadIngestInput, RAGDocumentUploadInput, RAGDocumentUrlIngestInput, RAGDocumentUrlInput, RAGEmbeddingFunction, RAGEmbeddingInput, RAGEmbeddingProvider, RAGEmbeddingProviderLike, RAGBackendDescriptor, RAGCollection, RAGCollectionSearchParams, RAGContentFormat, RAGEvaluationCase, RAGEvaluationCaseResult, RAGEvaluationInput, RAGEvaluationResponse, RAGEvaluationSummary, RAGHTMXConfig, RAGHTMXWorkflowRenderConfig, RAGIngestDocument, RAGIngestResponse, RAGIndexedDocument, RAGMutationResponse, RAGQueryInput, RAGQueryResult, RAGPreparedDocument, RAGReranker, RAGRerankerInput, RAGRerankerProvider, RAGRerankerProviderLike, RAGSearchRequest, RAGSource, RAGSourceGroup, RAGSourceSummary, RAGSQLiteNativeDiagnostics, RAGStatusResponse, RAGUpsertInput, RAGVectorStore, RAGVectorStoreStatus, SQLiteVecResolution } from './types';
|
|
16
17
|
export type { RAGPostgresNativeDiagnostics } from '../../../types/ai';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { RAGQueryResult, RAGReranker, RAGRerankerInput, RAGRerankerProvider, RAGRerankerProviderLike } from '../../../types/ai';
|
|
2
|
+
export type CreateRAGRerankerOptions = {
|
|
3
|
+
rerank: RAGReranker;
|
|
4
|
+
defaultModel?: string;
|
|
5
|
+
providerName?: string;
|
|
6
|
+
};
|
|
7
|
+
export type HeuristicRAGRerankerOptions = {
|
|
8
|
+
defaultModel?: string;
|
|
9
|
+
providerName?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const createRAGReranker: (options: CreateRAGRerankerOptions) => RAGRerankerProvider;
|
|
12
|
+
export declare const resolveRAGReranker: (reranker: RAGRerankerProviderLike | undefined) => RAGRerankerProvider | null;
|
|
13
|
+
export declare const applyRAGReranking: ({ input, reranker }: {
|
|
14
|
+
input: RAGRerankerInput;
|
|
15
|
+
reranker?: RAGRerankerProviderLike;
|
|
16
|
+
}) => Promise<RAGQueryResult[]>;
|
|
17
|
+
export declare const createHeuristicRAGReranker: (options?: HeuristicRAGRerankerOptions) => RAGRerankerProvider;
|
|
@@ -7,5 +7,5 @@ export type InternalRAGStoredChunk = RAGDocumentChunk & {
|
|
|
7
7
|
export type { RAGUpsertInput as RAGDocumentBatch };
|
|
8
8
|
export type { RAGQueryInput as RAGQueryParams };
|
|
9
9
|
export type { GeminiEmbeddingsConfig, OllamaEmbeddingsConfig, OpenAICompatibleEmbeddingsConfig, OpenAIEmbeddingsConfig } from './embeddingProviders';
|
|
10
|
-
export type { RAGReranker, RAGRerankerInput } from '../../../types/ai';
|
|
10
|
+
export type { RAGReranker, RAGRerankerInput, RAGRerankerProvider, RAGRerankerProviderLike } from '../../../types/ai';
|
|
11
11
|
export declare const buildRAGContext: (hits: RAGQueryResult[]) => string;
|
package/dist/types/ai.d.ts
CHANGED
|
@@ -139,6 +139,12 @@ export type RAGRerankerInput = {
|
|
|
139
139
|
results: RAGQueryResult[];
|
|
140
140
|
};
|
|
141
141
|
export type RAGReranker = (input: RAGRerankerInput) => Promise<RAGQueryResult[]> | RAGQueryResult[];
|
|
142
|
+
export type RAGRerankerProvider = {
|
|
143
|
+
rerank: RAGReranker;
|
|
144
|
+
defaultModel?: string;
|
|
145
|
+
providerName?: string;
|
|
146
|
+
};
|
|
147
|
+
export type RAGRerankerProviderLike = RAGReranker | RAGRerankerProvider;
|
|
142
148
|
export type RAGQueryResult = {
|
|
143
149
|
chunkId: string;
|
|
144
150
|
score: number;
|
|
@@ -275,7 +281,7 @@ export type RAGCollectionSearchParams = {
|
|
|
275
281
|
topK?: number;
|
|
276
282
|
filter?: Record<string, unknown>;
|
|
277
283
|
scoreThreshold?: number;
|
|
278
|
-
rerank?:
|
|
284
|
+
rerank?: RAGRerankerProviderLike;
|
|
279
285
|
model?: string;
|
|
280
286
|
signal?: AbortSignal;
|
|
281
287
|
};
|
|
@@ -819,7 +825,7 @@ export type RAGChatPluginConfig = AIChatPluginConfig & {
|
|
|
819
825
|
collection?: RAGCollection;
|
|
820
826
|
embedding?: RAGEmbeddingProviderLike;
|
|
821
827
|
embeddingModel?: string;
|
|
822
|
-
rerank?:
|
|
828
|
+
rerank?: RAGRerankerProviderLike;
|
|
823
829
|
indexManager?: RAGIndexManager;
|
|
824
830
|
topK?: number;
|
|
825
831
|
scoreThreshold?: number;
|
package/package.json
CHANGED
|
@@ -228,12 +228,12 @@
|
|
|
228
228
|
"main": "./dist/index.js",
|
|
229
229
|
"name": "@absolutejs/absolute",
|
|
230
230
|
"optionalDependencies": {
|
|
231
|
-
"@absolutejs/native-darwin-arm64": "0.19.0-beta.
|
|
232
|
-
"@absolutejs/native-darwin-x64": "0.19.0-beta.
|
|
233
|
-
"@absolutejs/native-linux-arm64": "0.19.0-beta.
|
|
234
|
-
"@absolutejs/native-linux-x64": "0.19.0-beta.
|
|
235
|
-
"@absolutejs/native-windows-arm64": "0.19.0-beta.
|
|
236
|
-
"@absolutejs/native-windows-x64": "0.19.0-beta.
|
|
231
|
+
"@absolutejs/native-darwin-arm64": "0.19.0-beta.467",
|
|
232
|
+
"@absolutejs/native-darwin-x64": "0.19.0-beta.467",
|
|
233
|
+
"@absolutejs/native-linux-arm64": "0.19.0-beta.467",
|
|
234
|
+
"@absolutejs/native-linux-x64": "0.19.0-beta.467",
|
|
235
|
+
"@absolutejs/native-windows-arm64": "0.19.0-beta.467",
|
|
236
|
+
"@absolutejs/native-windows-x64": "0.19.0-beta.467"
|
|
237
237
|
},
|
|
238
238
|
"overrides": {
|
|
239
239
|
"@typescript-eslint/utils": "8.56.1"
|
|
@@ -314,5 +314,5 @@
|
|
|
314
314
|
"typecheck": "bun run src/cli/index.ts typecheck --config example/absolute.config.ts"
|
|
315
315
|
},
|
|
316
316
|
"types": "./dist/src/index.d.ts",
|
|
317
|
-
"version": "0.19.0-beta.
|
|
317
|
+
"version": "0.19.0-beta.467"
|
|
318
318
|
}
|