@futdevpro/fsm-dynamo 1.14.1 → 1.14.2
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/build/_modules/ai/_models/ai-embedding-request.interface.d.ts +20 -0
- package/build/_modules/ai/_models/ai-embedding-request.interface.d.ts.map +1 -0
- package/build/_modules/ai/_models/ai-embedding-request.interface.js +3 -0
- package/build/_modules/ai/_models/ai-embedding-request.interface.js.map +1 -0
- package/build/_modules/ai/_models/ai-embedding-response.interface.d.ts +26 -0
- package/build/_modules/ai/_models/ai-embedding-response.interface.d.ts.map +1 -0
- package/build/_modules/ai/_models/ai-embedding-response.interface.js +3 -0
- package/build/_modules/ai/_models/ai-embedding-response.interface.js.map +1 -0
- package/build/_modules/ai/_models/ai-llm-request.interface.d.ts +23 -0
- package/build/_modules/ai/_models/ai-llm-request.interface.d.ts.map +1 -0
- package/build/_modules/ai/_models/{ai-input-interfaces.js → ai-llm-request.interface.js} +1 -1
- package/build/_modules/ai/_models/ai-llm-request.interface.js.map +1 -0
- package/build/_modules/ai/_models/ai-llm-response.interface.d.ts +24 -0
- package/build/_modules/ai/_models/ai-llm-response.interface.d.ts.map +1 -0
- package/build/_modules/ai/_models/ai-llm-response.interface.js +3 -0
- package/build/_modules/ai/_models/ai-llm-response.interface.js.map +1 -0
- package/build/_modules/ai/_models/ai-provider-capabilities.interface.d.ts +29 -0
- package/build/_modules/ai/_models/ai-provider-capabilities.interface.d.ts.map +1 -0
- package/build/_modules/ai/_models/ai-provider-capabilities.interface.js +3 -0
- package/build/_modules/ai/_models/ai-provider-capabilities.interface.js.map +1 -0
- package/build/_modules/ai/_modules/document-ai/_models/dai-embedding-info.interface.d.ts +12 -0
- package/build/_modules/ai/_modules/document-ai/_models/dai-embedding-info.interface.d.ts.map +1 -0
- package/build/_modules/ai/_modules/document-ai/_models/dai-embedding-info.interface.js +3 -0
- package/build/_modules/ai/_modules/document-ai/_models/dai-embedding-info.interface.js.map +1 -0
- package/build/_modules/ai/_modules/document-ai/_models/dai-vector-search-params.interface.d.ts +22 -0
- package/build/_modules/ai/_modules/document-ai/_models/dai-vector-search-params.interface.d.ts.map +1 -0
- package/build/_modules/ai/_modules/document-ai/_models/dai-vector-search-params.interface.js +3 -0
- package/build/_modules/ai/_modules/document-ai/_models/dai-vector-search-params.interface.js.map +1 -0
- package/build/_modules/ai/_modules/document-ai/index.d.ts +3 -0
- package/build/_modules/ai/_modules/document-ai/index.d.ts.map +1 -0
- package/build/_modules/ai/_modules/document-ai/index.js +7 -0
- package/build/_modules/ai/_modules/document-ai/index.js.map +1 -0
- package/build/_modules/ai/_modules/open-ai/_collections/oai-embedding-model-dimensions.const.d.ts +3 -0
- package/build/_modules/ai/_modules/open-ai/_collections/oai-embedding-model-dimensions.const.d.ts.map +1 -0
- package/build/_modules/ai/_modules/open-ai/_collections/oai-embedding-model-dimensions.const.js +10 -0
- package/build/_modules/ai/_modules/open-ai/_collections/oai-embedding-model-dimensions.const.js.map +1 -0
- package/build/_modules/ai/_modules/open-ai/_models/oai-embedding-info.interface.d.ts +12 -0
- package/build/_modules/ai/_modules/open-ai/_models/oai-embedding-info.interface.d.ts.map +1 -0
- package/build/_modules/ai/_modules/open-ai/_models/oai-embedding-info.interface.js +3 -0
- package/build/_modules/ai/_modules/open-ai/_models/oai-embedding-info.interface.js.map +1 -0
- package/build/_modules/ai/_modules/open-ai/index.d.ts +2 -0
- package/build/_modules/ai/_modules/open-ai/index.d.ts.map +1 -1
- package/build/_modules/ai/_modules/open-ai/index.js +3 -0
- package/build/_modules/ai/_modules/open-ai/index.js.map +1 -1
- package/build/_modules/ai/index.d.ts +6 -1
- package/build/_modules/ai/index.d.ts.map +1 -1
- package/build/_modules/ai/index.js +6 -1
- package/build/_modules/ai/index.js.map +1 -1
- package/futdevpro-fsm-dynamo-01.14.02.tgz +0 -0
- package/package.json +15 -1
- package/src/_modules/ai/_models/ai-embedding-request.interface.ts +20 -0
- package/src/_modules/ai/_models/ai-embedding-response.interface.ts +26 -0
- package/src/_modules/ai/_models/ai-llm-request.interface.ts +24 -0
- package/src/_modules/ai/_models/ai-llm-response.interface.ts +25 -0
- package/src/_modules/ai/_models/ai-provider-capabilities.interface.ts +28 -0
- package/src/_modules/ai/_modules/document-ai/_models/dai-embedding-info.interface.ts +12 -0
- package/src/_modules/ai/_modules/document-ai/_models/dai-vector-search-params.interface.ts +22 -0
- package/src/_modules/ai/_modules/document-ai/index.ts +4 -0
- package/src/_modules/ai/_modules/open-ai/_collections/oai-embedding-model-dimensions.const.ts +8 -0
- package/src/_modules/ai/_modules/open-ai/_models/oai-embedding-info.interface.ts +13 -0
- package/src/_modules/ai/_modules/open-ai/index.ts +3 -0
- package/src/_modules/ai/index.ts +6 -5
- package/build/_modules/ai/_models/ai-input-interfaces.d.ts +0 -61
- package/build/_modules/ai/_models/ai-input-interfaces.d.ts.map +0 -1
- package/build/_modules/ai/_models/ai-input-interfaces.js.map +0 -1
- package/futdevpro-fsm-dynamo-01.14.01.tgz +0 -0
- package/src/_modules/ai/_models/ai-input-interfaces.ts +0 -81
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic embedding request structure
|
|
3
|
+
* Used by all AI providers for embedding operations
|
|
4
|
+
*/
|
|
5
|
+
export interface DyFM_AI_Embedding_Request {
|
|
6
|
+
text: string;
|
|
7
|
+
model: string;
|
|
8
|
+
issuer: string;
|
|
9
|
+
debugLog?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Batch embedding request for multiple texts
|
|
13
|
+
*/
|
|
14
|
+
export interface DyFM_AI_Embedding_Batch_Request {
|
|
15
|
+
texts: string[];
|
|
16
|
+
model: string;
|
|
17
|
+
issuer: string;
|
|
18
|
+
debugLog?: boolean;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=ai-embedding-request.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-embedding-request.interface.d.ts","sourceRoot":"","sources":["../../../../src/_modules/ai/_models/ai-embedding-request.interface.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC9C,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-embedding-request.interface.js","sourceRoot":"","sources":["../../../../src/_modules/ai/_models/ai-embedding-request.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic embedding response structure
|
|
3
|
+
* Used by all AI providers for embedding operations
|
|
4
|
+
*/
|
|
5
|
+
export interface DyFM_AI_Embedding_Response {
|
|
6
|
+
embedding: number[];
|
|
7
|
+
model: string;
|
|
8
|
+
usage?: {
|
|
9
|
+
promptTokens: number;
|
|
10
|
+
totalTokens: number;
|
|
11
|
+
};
|
|
12
|
+
rawResponse?: any;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Batch embedding response for multiple texts
|
|
16
|
+
*/
|
|
17
|
+
export interface DyFM_AI_Embedding_Batch_Response {
|
|
18
|
+
embeddings: number[][];
|
|
19
|
+
model: string;
|
|
20
|
+
usage?: {
|
|
21
|
+
promptTokens: number;
|
|
22
|
+
totalTokens: number;
|
|
23
|
+
};
|
|
24
|
+
rawResponse?: any;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=ai-embedding-response.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-embedding-response.interface.d.ts","sourceRoot":"","sources":["../../../../src/_modules/ai/_models/ai-embedding-response.interface.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE;QACN,YAAY,EAAE,MAAM,CAAC;QACrB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,WAAW,CAAC,EAAE,GAAG,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C,UAAU,EAAE,MAAM,EAAE,EAAE,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE;QACN,YAAY,EAAE,MAAM,CAAC;QACrB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,WAAW,CAAC,EAAE,GAAG,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-embedding-response.interface.js","sourceRoot":"","sources":["../../../../src/_modules/ai/_models/ai-embedding-response.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DyFM_AI_Message } from './ai-message.interface';
|
|
2
|
+
import { DyFM_AI_CallSettings } from './ai-call-settings.interface';
|
|
3
|
+
/**
|
|
4
|
+
* Generic LLM request structure
|
|
5
|
+
* Used by all AI providers for LLM operations
|
|
6
|
+
*/
|
|
7
|
+
export interface DyFM_AI_LLM_Request {
|
|
8
|
+
messages: DyFM_AI_Message[];
|
|
9
|
+
settings?: DyFM_AI_CallSettings;
|
|
10
|
+
issuer: string;
|
|
11
|
+
debugLog?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Simple LLM request with system and user messages
|
|
15
|
+
*/
|
|
16
|
+
export interface DyFM_AI_LLM_Simple_Request {
|
|
17
|
+
systemMessage: string;
|
|
18
|
+
userMessage: string;
|
|
19
|
+
settings?: DyFM_AI_CallSettings;
|
|
20
|
+
issuer: string;
|
|
21
|
+
debugLog?: boolean;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=ai-llm-request.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-llm-request.interface.d.ts","sourceRoot":"","sources":["../../../../src/_modules/ai/_models/ai-llm-request.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-llm-request.interface.js","sourceRoot":"","sources":["../../../../src/_modules/ai/_models/ai-llm-request.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DyFM_AI_Message } from './ai-message.interface';
|
|
2
|
+
/**
|
|
3
|
+
* Generic LLM response structure
|
|
4
|
+
* Used by all AI providers for LLM operations
|
|
5
|
+
*/
|
|
6
|
+
export interface DyFM_AI_LLM_Response {
|
|
7
|
+
content: string;
|
|
8
|
+
usage?: {
|
|
9
|
+
promptTokens: number;
|
|
10
|
+
completionTokens: number;
|
|
11
|
+
totalTokens: number;
|
|
12
|
+
};
|
|
13
|
+
model?: string;
|
|
14
|
+
finishReason?: string;
|
|
15
|
+
rawResponse?: any;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Raw LLM response with full provider details
|
|
19
|
+
*/
|
|
20
|
+
export interface DyFM_AI_LLM_Raw_Response extends DyFM_AI_LLM_Response {
|
|
21
|
+
messages: DyFM_AI_Message[];
|
|
22
|
+
rawResponse: any;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=ai-llm-response.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-llm-response.interface.d.ts","sourceRoot":"","sources":["../../../../src/_modules/ai/_models/ai-llm-response.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE;QACN,YAAY,EAAE,MAAM,CAAC;QACrB,gBAAgB,EAAE,MAAM,CAAC;QACzB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,GAAG,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,oBAAoB;IACpE,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,WAAW,EAAE,GAAG,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-llm-response.interface.js","sourceRoot":"","sources":["../../../../src/_modules/ai/_models/ai-llm-response.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines what capabilities each AI provider supports
|
|
3
|
+
* Used to determine which operations are available for each provider
|
|
4
|
+
*/
|
|
5
|
+
export interface DyFM_AI_ProviderCapabilities {
|
|
6
|
+
/** Can perform text generation/chat operations */
|
|
7
|
+
chat: boolean;
|
|
8
|
+
/** Can perform embedding operations */
|
|
9
|
+
embeddings: boolean;
|
|
10
|
+
/** Can perform image generation */
|
|
11
|
+
imageGeneration: boolean;
|
|
12
|
+
/** Can perform image analysis/vision */
|
|
13
|
+
vision: boolean;
|
|
14
|
+
/** Can perform audio generation (TTS) */
|
|
15
|
+
audioGeneration: boolean;
|
|
16
|
+
/** Can perform audio analysis (STT) */
|
|
17
|
+
audioAnalysis: boolean;
|
|
18
|
+
/** Can perform function calling/tool use */
|
|
19
|
+
functionCalling: boolean;
|
|
20
|
+
/** Can perform streaming responses */
|
|
21
|
+
streaming: boolean;
|
|
22
|
+
/** Can perform batch operations */
|
|
23
|
+
batchOperations: boolean;
|
|
24
|
+
/** Maximum context length in tokens */
|
|
25
|
+
maxContextLength?: number;
|
|
26
|
+
/** Supported model types */
|
|
27
|
+
supportedModelTypes: string[];
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=ai-provider-capabilities.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-provider-capabilities.interface.d.ts","sourceRoot":"","sources":["../../../../src/_modules/ai/_models/ai-provider-capabilities.interface.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C,kDAAkD;IAClD,IAAI,EAAE,OAAO,CAAC;IACd,uCAAuC;IACvC,UAAU,EAAE,OAAO,CAAC;IACpB,mCAAmC;IACnC,eAAe,EAAE,OAAO,CAAC;IACzB,wCAAwC;IACxC,MAAM,EAAE,OAAO,CAAC;IAChB,yCAAyC;IACzC,eAAe,EAAE,OAAO,CAAC;IACzB,uCAAuC;IACvC,aAAa,EAAE,OAAO,CAAC;IACvB,4CAA4C;IAC5C,eAAe,EAAE,OAAO,CAAC;IACzB,sCAAsC;IACtC,SAAS,EAAE,OAAO,CAAC;IACnB,mCAAmC;IACnC,eAAe,EAAE,OAAO,CAAC;IACzB,uCAAuC;IACvC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,4BAA4B;IAC5B,mBAAmB,EAAE,MAAM,EAAE,CAAC;CAC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-provider-capabilities.interface.js","sourceRoot":"","sources":["../../../../src/_modules/ai/_models/ai-provider-capabilities.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DyFM_AI_Provider } from '../../../_enums/ai-provider.enum';
|
|
2
|
+
/**
|
|
3
|
+
* Information about the embedding model used for vectorization
|
|
4
|
+
* Stores model details to ensure consistency between document creation and search
|
|
5
|
+
*/
|
|
6
|
+
export interface DyFM_DAI_EmbeddingInfo {
|
|
7
|
+
/** The AI provider that generated the embedding */
|
|
8
|
+
provider: DyFM_AI_Provider;
|
|
9
|
+
/** The specific model name used */
|
|
10
|
+
model: string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=dai-embedding-info.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dai-embedding-info.interface.d.ts","sourceRoot":"","sources":["../../../../../../src/_modules/ai/_modules/document-ai/_models/dai-embedding-info.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,mDAAmD;IACnD,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dai-embedding-info.interface.js","sourceRoot":"","sources":["../../../../../../src/_modules/ai/_modules/document-ai/_models/dai-embedding-info.interface.ts"],"names":[],"mappings":""}
|
package/build/_modules/ai/_modules/document-ai/_models/dai-vector-search-params.interface.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DyFM_DAI_EmbeddingInfo } from './dai-embedding-info.interface';
|
|
2
|
+
/**
|
|
3
|
+
* Parameters for vector search operations
|
|
4
|
+
* Used to configure similarity search with validation
|
|
5
|
+
*/
|
|
6
|
+
export interface DyFM_DAI_VectorSearchParams {
|
|
7
|
+
/** The query text to search for */
|
|
8
|
+
query: string;
|
|
9
|
+
/** The embedding model info to use for the search */
|
|
10
|
+
embeddingInfo: DyFM_DAI_EmbeddingInfo;
|
|
11
|
+
/** Maximum number of results to return */
|
|
12
|
+
limit?: number;
|
|
13
|
+
/** Minimum similarity score threshold (0-1) */
|
|
14
|
+
minSimilarity?: number;
|
|
15
|
+
/** Maximum similarity score threshold (0-1) */
|
|
16
|
+
maxSimilarity?: number;
|
|
17
|
+
/** Optional filter criteria */
|
|
18
|
+
filters?: Record<string, any>;
|
|
19
|
+
/** Whether to validate embedding model compatibility */
|
|
20
|
+
validateModel?: boolean;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=dai-vector-search-params.interface.d.ts.map
|
package/build/_modules/ai/_modules/document-ai/_models/dai-vector-search-params.interface.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dai-vector-search-params.interface.d.ts","sourceRoot":"","sources":["../../../../../../src/_modules/ai/_modules/document-ai/_models/dai-vector-search-params.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAExE;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,aAAa,EAAE,sBAAsB,CAAC;IACtC,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+CAA+C;IAC/C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+BAA+B;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9B,wDAAwD;IACxD,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB"}
|
package/build/_modules/ai/_modules/document-ai/_models/dai-vector-search-params.interface.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dai-vector-search-params.interface.js","sourceRoot":"","sources":["../../../../../../src/_modules/ai/_modules/document-ai/_models/dai-vector-search-params.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/_modules/ai/_modules/document-ai/index.ts"],"names":[],"mappings":"AAEA,cAAc,wCAAwC,CAAC;AACvD,cAAc,8CAA8C,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
// MODELS
|
|
5
|
+
tslib_1.__exportStar(require("./_models/dai-embedding-info.interface"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./_models/dai-vector-search-params.interface"), exports);
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/_modules/ai/_modules/document-ai/index.ts"],"names":[],"mappings":";;;AACA,SAAS;AACT,iFAAuD;AACvD,uFAA6D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oai-embedding-model-dimensions.const.d.ts","sourceRoot":"","sources":["../../../../../../src/_modules/ai/_modules/open-ai/_collections/oai-embedding-model-dimensions.const.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAkB,MAAM,0BAA0B,CAAC;AAGnF,eAAO,MAAM,iCAAiC,EAAE,MAAM,CAAC,uBAAuB,EAAE,MAAM,CAIrF,CAAC"}
|
package/build/_modules/ai/_modules/open-ai/_collections/oai-embedding-model-dimensions.const.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DyFM_OAI_EmbeddingModelDimensions = void 0;
|
|
4
|
+
const oai_model_enum_1 = require("../_enums/oai-model.enum");
|
|
5
|
+
exports.DyFM_OAI_EmbeddingModelDimensions = {
|
|
6
|
+
[oai_model_enum_1.DyFM_OAI_Model.textEmbedding_3Small]: 1536,
|
|
7
|
+
[oai_model_enum_1.DyFM_OAI_Model.textEmbedding_3Large]: 3072,
|
|
8
|
+
[oai_model_enum_1.DyFM_OAI_Model.textEmbedding_ada002]: 1536,
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=oai-embedding-model-dimensions.const.js.map
|
package/build/_modules/ai/_modules/open-ai/_collections/oai-embedding-model-dimensions.const.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oai-embedding-model-dimensions.const.js","sourceRoot":"","sources":["../../../../../../src/_modules/ai/_modules/open-ai/_collections/oai-embedding-model-dimensions.const.ts"],"names":[],"mappings":";;;AAAA,6DAAmF;AAGtE,QAAA,iCAAiC,GAA4C;IACxF,CAAC,+BAAc,CAAC,oBAAoB,CAAC,EAAE,IAAI;IAC3C,CAAC,+BAAc,CAAC,oBAAoB,CAAC,EAAE,IAAI;IAC3C,CAAC,+BAAc,CAAC,oBAAoB,CAAC,EAAE,IAAI;CAC5C,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DyFM_DAI_EmbeddingInfo } from '../../document-ai/_models/dai-embedding-info.interface';
|
|
2
|
+
import { DyFM_AI_Provider } from '../../../_enums/ai-provider.enum';
|
|
3
|
+
import { DyFM_OAI_EmbeddingModel } from '../_enums/oai-model.enum';
|
|
4
|
+
/**
|
|
5
|
+
* OpenAI implementation of the generic embedding info
|
|
6
|
+
* Provides OpenAI-specific embedding model information
|
|
7
|
+
*/
|
|
8
|
+
export interface DyFM_OAI_EmbeddingInfo extends DyFM_DAI_EmbeddingInfo {
|
|
9
|
+
provider: DyFM_AI_Provider.OpenAI;
|
|
10
|
+
model: DyFM_OAI_EmbeddingModel;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=oai-embedding-info.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oai-embedding-info.interface.d.ts","sourceRoot":"","sources":["../../../../../../src/_modules/ai/_modules/open-ai/_models/oai-embedding-info.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wDAAwD,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAkB,MAAM,0BAA0B,CAAC;AAGnF;;;GAGG;AACH,MAAM,WAAW,sBAAuB,SAAQ,sBAAsB;IACpE,QAAQ,EAAE,gBAAgB,CAAC,MAAM,CAAC;IAClC,KAAK,EAAE,uBAAuB,CAAC;CAChC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oai-embedding-info.interface.js","sourceRoot":"","sources":["../../../../../../src/_modules/ai/_modules/open-ai/_models/oai-embedding-info.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
export * from './_collections/oai-embedding-model-dimensions.const';
|
|
1
2
|
export * from './_enums/oai-model.enum';
|
|
2
3
|
export * from './_models/oai-call-settings.control-model';
|
|
3
4
|
export * from './_models/oai-client-options.interface';
|
|
5
|
+
export * from './_models/oai-embedding-info.interface';
|
|
4
6
|
export * from './_models/oai-settings.control-model';
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/_modules/ai/_modules/open-ai/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/_modules/ai/_modules/open-ai/index.ts"],"names":[],"mappings":"AAYA,cAAc,qDAAqD,CAAC;AAGpE,cAAc,yBAAyB,CAAC;AAGxC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC"}
|
|
@@ -8,10 +8,13 @@
|
|
|
8
8
|
} */
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
const tslib_1 = require("tslib");
|
|
11
|
+
// COLLECTIONS
|
|
12
|
+
tslib_1.__exportStar(require("./_collections/oai-embedding-model-dimensions.const"), exports);
|
|
11
13
|
// ENUMS
|
|
12
14
|
tslib_1.__exportStar(require("./_enums/oai-model.enum"), exports);
|
|
13
15
|
// MODELS
|
|
14
16
|
tslib_1.__exportStar(require("./_models/oai-call-settings.control-model"), exports);
|
|
15
17
|
tslib_1.__exportStar(require("./_models/oai-client-options.interface"), exports);
|
|
18
|
+
tslib_1.__exportStar(require("./_models/oai-embedding-info.interface"), exports);
|
|
16
19
|
tslib_1.__exportStar(require("./_models/oai-settings.control-model"), exports);
|
|
17
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/_modules/ai/_modules/open-ai/index.ts"],"names":[],"mappings":";AAGA;;;;;;IAMI;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/_modules/ai/_modules/open-ai/index.ts"],"names":[],"mappings":";AAGA;;;;;;IAMI;;;AAEJ,cAAc;AACd,8FAAoE;AAEpE,QAAQ;AACR,kEAAwC;AAExC,SAAS;AACT,oFAA0D;AAC1D,iFAAuD;AACvD,iFAAuD;AACvD,+EAAqD"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
export * from './_enums/ai-provider.enum';
|
|
2
2
|
export * from './_enums/ai-model-type.enum';
|
|
3
3
|
export * from './_enums/ai-message-role.enum';
|
|
4
|
-
export * from './_models/ai-message.interface';
|
|
5
4
|
export * from './_models/ai-call-settings.interface';
|
|
6
5
|
export * from './_models/ai-config.interface';
|
|
6
|
+
export * from './_models/ai-embedding-request.interface';
|
|
7
|
+
export * from './_models/ai-embedding-response.interface';
|
|
8
|
+
export * from './_models/ai-llm-request.interface';
|
|
9
|
+
export * from './_models/ai-llm-response.interface';
|
|
10
|
+
export * from './_models/ai-message.interface';
|
|
11
|
+
export * from './_models/ai-provider-capabilities.interface';
|
|
7
12
|
export * from './_models/ai-settings.interface';
|
|
8
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/_modules/ai/index.ts"],"names":[],"mappings":"AACA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAG9C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/_modules/ai/index.ts"],"names":[],"mappings":"AACA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAG9C,cAAc,sCAAsC,CAAC;AACrD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0CAA0C,CAAC;AACzD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8CAA8C,CAAC;AAC7D,cAAc,iCAAiC,CAAC"}
|
|
@@ -6,8 +6,13 @@ tslib_1.__exportStar(require("./_enums/ai-provider.enum"), exports);
|
|
|
6
6
|
tslib_1.__exportStar(require("./_enums/ai-model-type.enum"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./_enums/ai-message-role.enum"), exports);
|
|
8
8
|
// MODELS
|
|
9
|
-
tslib_1.__exportStar(require("./_models/ai-message.interface"), exports);
|
|
10
9
|
tslib_1.__exportStar(require("./_models/ai-call-settings.interface"), exports);
|
|
11
10
|
tslib_1.__exportStar(require("./_models/ai-config.interface"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./_models/ai-embedding-request.interface"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./_models/ai-embedding-response.interface"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./_models/ai-llm-request.interface"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./_models/ai-llm-response.interface"), exports);
|
|
15
|
+
tslib_1.__exportStar(require("./_models/ai-message.interface"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./_models/ai-provider-capabilities.interface"), exports);
|
|
12
17
|
tslib_1.__exportStar(require("./_models/ai-settings.interface"), exports);
|
|
13
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_modules/ai/index.ts"],"names":[],"mappings":";;;AAAA,QAAQ;AACR,oEAA0C;AAC1C,sEAA4C;AAC5C,wEAA8C;AAE9C,SAAS;AACT,yEAA+C;AAC/C
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_modules/ai/index.ts"],"names":[],"mappings":";;;AAAA,QAAQ;AACR,oEAA0C;AAC1C,sEAA4C;AAC5C,wEAA8C;AAE9C,SAAS;AACT,+EAAqD;AACrD,wEAA8C;AAC9C,mFAAyD;AACzD,oFAA0D;AAC1D,6EAAmD;AACnD,8EAAoD;AACpD,yEAA+C;AAC/C,uFAA6D;AAC7D,0EAAgD"}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@futdevpro/fsm-dynamo",
|
|
3
|
-
"version": "01.14.
|
|
3
|
+
"version": "01.14.02",
|
|
4
4
|
"description": "Full Stack Model Collection for Dynamic (NodeJS-Typescript) Framework called Dynamo, by Future Development Ltd.",
|
|
5
5
|
"DyBu_settings": {
|
|
6
6
|
"packageType": "full-stack-package",
|
|
@@ -60,6 +60,12 @@
|
|
|
60
60
|
"types": "./build/_modules/ai/_modules/anthropic/index.d.ts",
|
|
61
61
|
"typings": "./build/_modules/ai/_modules/anthropic/index.d.ts"
|
|
62
62
|
},
|
|
63
|
+
"./ai/document-ai": {
|
|
64
|
+
"default": "./build/_modules/ai/_modules/document-ai/index.js",
|
|
65
|
+
"module": "./build/_modules/ai/_modules/document-ai/index.js",
|
|
66
|
+
"types": "./build/_modules/ai/_modules/document-ai/index.d.ts",
|
|
67
|
+
"typings": "./build/_modules/ai/_modules/document-ai/index.d.ts"
|
|
68
|
+
},
|
|
63
69
|
"./ai/google": {
|
|
64
70
|
"default": "./build/_modules/ai/_modules/google/index.js",
|
|
65
71
|
"module": "./build/_modules/ai/_modules/google/index.js",
|
|
@@ -72,6 +78,7 @@
|
|
|
72
78
|
"types": "./build/_modules/ai/_modules/local/index.d.ts",
|
|
73
79
|
"typings": "./build/_modules/ai/_modules/local/index.d.ts"
|
|
74
80
|
},
|
|
81
|
+
|
|
75
82
|
"./ci-tools": {
|
|
76
83
|
"default": "./build/_modules/ci-tools/index.js",
|
|
77
84
|
"module": "./build/_modules/ci-tools/index.js",
|
|
@@ -123,6 +130,13 @@
|
|
|
123
130
|
},
|
|
124
131
|
"typesVersions": {
|
|
125
132
|
"*": {
|
|
133
|
+
"ai": [ "build/_modules/ai/index.d.ts" ],
|
|
134
|
+
"ai/document-ai": [ "build/_modules/ai/_modules/document-ai/index.d.ts" ],
|
|
135
|
+
"ai/open-ai": [ "build/_modules/ai/_modules/open-ai/index.d.ts" ],
|
|
136
|
+
"ai/anthropic": [ "build/_modules/ai/_modules/anthropic/index.d.ts" ],
|
|
137
|
+
"ai/google": [ "build/_modules/ai/_modules/google/index.d.ts" ],
|
|
138
|
+
"ai/local": [ "build/_modules/ai/_modules/local/index.d.ts" ],
|
|
139
|
+
|
|
126
140
|
"ci-tools": [ "build/_modules/ci-tools/index.d.ts" ],
|
|
127
141
|
"crypto": [ "build/_modules/crypto/index.d.ts" ],
|
|
128
142
|
"custom-data": [ "build/_modules/custom-data/index.d.ts" ],
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic embedding request structure
|
|
3
|
+
* Used by all AI providers for embedding operations
|
|
4
|
+
*/
|
|
5
|
+
export interface DyFM_AI_Embedding_Request {
|
|
6
|
+
text: string;
|
|
7
|
+
model: string;
|
|
8
|
+
issuer: string;
|
|
9
|
+
debugLog?: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Batch embedding request for multiple texts
|
|
14
|
+
*/
|
|
15
|
+
export interface DyFM_AI_Embedding_Batch_Request {
|
|
16
|
+
texts: string[];
|
|
17
|
+
model: string;
|
|
18
|
+
issuer: string;
|
|
19
|
+
debugLog?: boolean;
|
|
20
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic embedding response structure
|
|
3
|
+
* Used by all AI providers for embedding operations
|
|
4
|
+
*/
|
|
5
|
+
export interface DyFM_AI_Embedding_Response {
|
|
6
|
+
embedding: number[];
|
|
7
|
+
model: string;
|
|
8
|
+
usage?: {
|
|
9
|
+
promptTokens: number;
|
|
10
|
+
totalTokens: number;
|
|
11
|
+
};
|
|
12
|
+
rawResponse?: any; // Provider-specific raw response
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Batch embedding response for multiple texts
|
|
17
|
+
*/
|
|
18
|
+
export interface DyFM_AI_Embedding_Batch_Response {
|
|
19
|
+
embeddings: number[][];
|
|
20
|
+
model: string;
|
|
21
|
+
usage?: {
|
|
22
|
+
promptTokens: number;
|
|
23
|
+
totalTokens: number;
|
|
24
|
+
};
|
|
25
|
+
rawResponse?: any; // Provider-specific raw response
|
|
26
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DyFM_AI_Message } from './ai-message.interface';
|
|
2
|
+
import { DyFM_AI_CallSettings } from './ai-call-settings.interface';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Generic LLM request structure
|
|
6
|
+
* Used by all AI providers for LLM operations
|
|
7
|
+
*/
|
|
8
|
+
export interface DyFM_AI_LLM_Request {
|
|
9
|
+
messages: DyFM_AI_Message[];
|
|
10
|
+
settings?: DyFM_AI_CallSettings;
|
|
11
|
+
issuer: string;
|
|
12
|
+
debugLog?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Simple LLM request with system and user messages
|
|
17
|
+
*/
|
|
18
|
+
export interface DyFM_AI_LLM_Simple_Request {
|
|
19
|
+
systemMessage: string;
|
|
20
|
+
userMessage: string;
|
|
21
|
+
settings?: DyFM_AI_CallSettings;
|
|
22
|
+
issuer: string;
|
|
23
|
+
debugLog?: boolean;
|
|
24
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DyFM_AI_Message } from './ai-message.interface';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Generic LLM response structure
|
|
5
|
+
* Used by all AI providers for LLM operations
|
|
6
|
+
*/
|
|
7
|
+
export interface DyFM_AI_LLM_Response {
|
|
8
|
+
content: string;
|
|
9
|
+
usage?: {
|
|
10
|
+
promptTokens: number;
|
|
11
|
+
completionTokens: number;
|
|
12
|
+
totalTokens: number;
|
|
13
|
+
};
|
|
14
|
+
model?: string;
|
|
15
|
+
finishReason?: string;
|
|
16
|
+
rawResponse?: any; // Provider-specific raw response
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Raw LLM response with full provider details
|
|
21
|
+
*/
|
|
22
|
+
export interface DyFM_AI_LLM_Raw_Response extends DyFM_AI_LLM_Response {
|
|
23
|
+
messages: DyFM_AI_Message[];
|
|
24
|
+
rawResponse: any;
|
|
25
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines what capabilities each AI provider supports
|
|
3
|
+
* Used to determine which operations are available for each provider
|
|
4
|
+
*/
|
|
5
|
+
export interface DyFM_AI_ProviderCapabilities {
|
|
6
|
+
/** Can perform text generation/chat operations */
|
|
7
|
+
chat: boolean;
|
|
8
|
+
/** Can perform embedding operations */
|
|
9
|
+
embeddings: boolean;
|
|
10
|
+
/** Can perform image generation */
|
|
11
|
+
imageGeneration: boolean;
|
|
12
|
+
/** Can perform image analysis/vision */
|
|
13
|
+
vision: boolean;
|
|
14
|
+
/** Can perform audio generation (TTS) */
|
|
15
|
+
audioGeneration: boolean;
|
|
16
|
+
/** Can perform audio analysis (STT) */
|
|
17
|
+
audioAnalysis: boolean;
|
|
18
|
+
/** Can perform function calling/tool use */
|
|
19
|
+
functionCalling: boolean;
|
|
20
|
+
/** Can perform streaming responses */
|
|
21
|
+
streaming: boolean;
|
|
22
|
+
/** Can perform batch operations */
|
|
23
|
+
batchOperations: boolean;
|
|
24
|
+
/** Maximum context length in tokens */
|
|
25
|
+
maxContextLength?: number;
|
|
26
|
+
/** Supported model types */
|
|
27
|
+
supportedModelTypes: string[];
|
|
28
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DyFM_AI_Provider } from '../../../_enums/ai-provider.enum';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Information about the embedding model used for vectorization
|
|
5
|
+
* Stores model details to ensure consistency between document creation and search
|
|
6
|
+
*/
|
|
7
|
+
export interface DyFM_DAI_EmbeddingInfo {
|
|
8
|
+
/** The AI provider that generated the embedding */
|
|
9
|
+
provider: DyFM_AI_Provider;
|
|
10
|
+
/** The specific model name used */
|
|
11
|
+
model: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DyFM_DAI_EmbeddingInfo } from './dai-embedding-info.interface';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Parameters for vector search operations
|
|
5
|
+
* Used to configure similarity search with validation
|
|
6
|
+
*/
|
|
7
|
+
export interface DyFM_DAI_VectorSearchParams {
|
|
8
|
+
/** The query text to search for */
|
|
9
|
+
query: string;
|
|
10
|
+
/** The embedding model info to use for the search */
|
|
11
|
+
embeddingInfo: DyFM_DAI_EmbeddingInfo;
|
|
12
|
+
/** Maximum number of results to return */
|
|
13
|
+
limit?: number;
|
|
14
|
+
/** Minimum similarity score threshold (0-1) */
|
|
15
|
+
minSimilarity?: number;
|
|
16
|
+
/** Maximum similarity score threshold (0-1) */
|
|
17
|
+
maxSimilarity?: number;
|
|
18
|
+
/** Optional filter criteria */
|
|
19
|
+
filters?: Record<string, any>;
|
|
20
|
+
/** Whether to validate embedding model compatibility */
|
|
21
|
+
validateModel?: boolean;
|
|
22
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DyFM_OAI_EmbeddingModel, DyFM_OAI_Model } from '../_enums/oai-model.enum';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export const DyFM_OAI_EmbeddingModelDimensions: Record<DyFM_OAI_EmbeddingModel, number> = {
|
|
5
|
+
[DyFM_OAI_Model.textEmbedding_3Small]: 1536,
|
|
6
|
+
[DyFM_OAI_Model.textEmbedding_3Large]: 3072,
|
|
7
|
+
[DyFM_OAI_Model.textEmbedding_ada002]: 1536,
|
|
8
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DyFM_DAI_EmbeddingInfo } from '../../document-ai/_models/dai-embedding-info.interface';
|
|
2
|
+
import { DyFM_AI_Provider } from '../../../_enums/ai-provider.enum';
|
|
3
|
+
import { DyFM_OAI_EmbeddingModel, DyFM_OAI_Model } from '../_enums/oai-model.enum';
|
|
4
|
+
import { DyFM_OAI_EmbeddingModelDimensions } from '../_collections/oai-embedding-model-dimensions.const';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* OpenAI implementation of the generic embedding info
|
|
8
|
+
* Provides OpenAI-specific embedding model information
|
|
9
|
+
*/
|
|
10
|
+
export interface DyFM_OAI_EmbeddingInfo extends DyFM_DAI_EmbeddingInfo {
|
|
11
|
+
provider: DyFM_AI_Provider.OpenAI;
|
|
12
|
+
model: DyFM_OAI_EmbeddingModel;
|
|
13
|
+
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
);
|
|
10
10
|
} */
|
|
11
11
|
|
|
12
|
+
// COLLECTIONS
|
|
13
|
+
export * from './_collections/oai-embedding-model-dimensions.const';
|
|
12
14
|
|
|
13
15
|
// ENUMS
|
|
14
16
|
export * from './_enums/oai-model.enum';
|
|
@@ -16,6 +18,7 @@ export * from './_enums/oai-model.enum';
|
|
|
16
18
|
// MODELS
|
|
17
19
|
export * from './_models/oai-call-settings.control-model';
|
|
18
20
|
export * from './_models/oai-client-options.interface';
|
|
21
|
+
export * from './_models/oai-embedding-info.interface';
|
|
19
22
|
export * from './_models/oai-settings.control-model';
|
|
20
23
|
|
|
21
24
|
|
package/src/_modules/ai/index.ts
CHANGED
|
@@ -4,11 +4,12 @@ export * from './_enums/ai-model-type.enum';
|
|
|
4
4
|
export * from './_enums/ai-message-role.enum';
|
|
5
5
|
|
|
6
6
|
// MODELS
|
|
7
|
-
export * from './_models/ai-message.interface';
|
|
8
7
|
export * from './_models/ai-call-settings.interface';
|
|
9
8
|
export * from './_models/ai-config.interface';
|
|
9
|
+
export * from './_models/ai-embedding-request.interface';
|
|
10
|
+
export * from './_models/ai-embedding-response.interface';
|
|
11
|
+
export * from './_models/ai-llm-request.interface';
|
|
12
|
+
export * from './_models/ai-llm-response.interface';
|
|
13
|
+
export * from './_models/ai-message.interface';
|
|
14
|
+
export * from './_models/ai-provider-capabilities.interface';
|
|
10
15
|
export * from './_models/ai-settings.interface';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { DyFM_AI_Message } from './ai-message.interface';
|
|
2
|
-
import { DyFM_AI_CallSettings } from './ai-call-settings.interface';
|
|
3
|
-
export interface DyFM_AI_Base_Input {
|
|
4
|
-
issuer: string;
|
|
5
|
-
settings?: DyFM_AI_CallSettings;
|
|
6
|
-
debugLog?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export interface DyFM_AI_Question_Input extends DyFM_AI_Base_Input {
|
|
9
|
-
question: string;
|
|
10
|
-
replaceThisInLog?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface DyFM_AI_ListSelect_Input extends DyFM_AI_Question_Input {
|
|
13
|
-
selectFrom: string[];
|
|
14
|
-
}
|
|
15
|
-
export interface DyFM_AI_GenericSelect_Input<T> extends DyFM_AI_Question_Input {
|
|
16
|
-
selectFrom: T[];
|
|
17
|
-
}
|
|
18
|
-
export interface DyFM_AI_MultiSelect_Input extends DyFM_AI_Question_Input {
|
|
19
|
-
options: string[];
|
|
20
|
-
}
|
|
21
|
-
export interface DyFM_AI_GenericMultiSelect_Input<T> extends DyFM_AI_Question_Input {
|
|
22
|
-
options: T[];
|
|
23
|
-
}
|
|
24
|
-
export interface DyFM_AI_JSONKeysDescription_Input extends DyFM_AI_Question_Input {
|
|
25
|
-
keysDescription: string;
|
|
26
|
-
}
|
|
27
|
-
export interface DyFM_AI_JSONExactKeys_Input extends DyFM_AI_Question_Input {
|
|
28
|
-
keys: string[];
|
|
29
|
-
}
|
|
30
|
-
export interface DyFM_AI_SimpleMessage_Input extends DyFM_AI_Base_Input {
|
|
31
|
-
message: string;
|
|
32
|
-
}
|
|
33
|
-
export interface DyFM_AI_ConversationBase_Input extends DyFM_AI_Base_Input {
|
|
34
|
-
conversation: DyFM_AI_Message[];
|
|
35
|
-
replaceThisInLog?: string;
|
|
36
|
-
}
|
|
37
|
-
export interface DyFM_AI_ConversationQuestion_Input extends DyFM_AI_ConversationBase_Input {
|
|
38
|
-
question: string;
|
|
39
|
-
}
|
|
40
|
-
export interface DyFM_AI_ConversationSelect_Input extends DyFM_AI_ConversationQuestion_Input {
|
|
41
|
-
selectFrom: string[];
|
|
42
|
-
}
|
|
43
|
-
export interface DyFM_AI_ConversationGenericSelect_Input<T> extends DyFM_AI_ConversationQuestion_Input {
|
|
44
|
-
selectFrom: T[];
|
|
45
|
-
}
|
|
46
|
-
export interface DyFM_AI_ConversationMultiSelect_Input extends DyFM_AI_ConversationQuestion_Input {
|
|
47
|
-
options: string[];
|
|
48
|
-
}
|
|
49
|
-
export interface DyFM_AI_ConversationGenericMultiSelect_Input<T> extends DyFM_AI_ConversationQuestion_Input {
|
|
50
|
-
options: T[];
|
|
51
|
-
}
|
|
52
|
-
export interface DyFM_AI_ConversationJSONKeysDescription_Input extends DyFM_AI_ConversationQuestion_Input {
|
|
53
|
-
keysDescription: string;
|
|
54
|
-
}
|
|
55
|
-
export interface DyFM_AI_ConversationJSONExactKeys_Input extends DyFM_AI_ConversationQuestion_Input {
|
|
56
|
-
keys: string[];
|
|
57
|
-
}
|
|
58
|
-
export interface DyFM_AI_ConversationGetAnswer_Input extends DyFM_AI_ConversationBase_Input {
|
|
59
|
-
newMessage?: string;
|
|
60
|
-
}
|
|
61
|
-
//# sourceMappingURL=ai-input-interfaces.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ai-input-interfaces.d.ts","sourceRoot":"","sources":["../../../../src/_modules/ai/_models/ai-input-interfaces.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,sBAAuB,SAAQ,kBAAkB;IAChE,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,wBAAyB,SAAQ,sBAAsB;IACtE,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,2BAA2B,CAAC,CAAC,CAAE,SAAQ,sBAAsB;IAC5E,UAAU,EAAE,CAAC,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,yBAA0B,SAAQ,sBAAsB;IACvE,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,gCAAgC,CAAC,CAAC,CAAE,SAAQ,sBAAsB;IACjF,OAAO,EAAE,CAAC,EAAE,CAAC;CACd;AAED,MAAM,WAAW,iCAAkC,SAAQ,sBAAsB;IAC/E,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,2BAA4B,SAAQ,sBAAsB;IACzE,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,MAAM,WAAW,2BAA4B,SAAQ,kBAAkB;IACrE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,8BAA+B,SAAQ,kBAAkB;IACxE,YAAY,EAAE,eAAe,EAAE,CAAC;IAChC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,kCAAmC,SAAQ,8BAA8B;IACxF,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gCAAiC,SAAQ,kCAAkC;IAC1F,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,uCAAuC,CAAC,CAAC,CAAE,SAAQ,kCAAkC;IACpG,UAAU,EAAE,CAAC,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,qCAAsC,SAAQ,kCAAkC;IAC/F,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,4CAA4C,CAAC,CAAC,CAAE,SAAQ,kCAAkC;IACzG,OAAO,EAAE,CAAC,EAAE,CAAC;CACd;AAED,MAAM,WAAW,6CAA8C,SAAQ,kCAAkC;IACvG,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,uCAAwC,SAAQ,kCAAkC;IACjG,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,MAAM,WAAW,mCAAoC,SAAQ,8BAA8B;IACzF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ai-input-interfaces.js","sourceRoot":"","sources":["../../../../src/_modules/ai/_models/ai-input-interfaces.ts"],"names":[],"mappings":""}
|
|
Binary file
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { DyFM_AI_MessageRole } from '../_enums/ai-message-role.enum';
|
|
2
|
-
import { DyFM_AI_Message } from './ai-message.interface';
|
|
3
|
-
import { DyFM_AI_CallSettings } from './ai-call-settings.interface';
|
|
4
|
-
|
|
5
|
-
export interface DyFM_AI_Base_Input {
|
|
6
|
-
issuer: string;
|
|
7
|
-
settings?: DyFM_AI_CallSettings;
|
|
8
|
-
debugLog?: boolean;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface DyFM_AI_Question_Input extends DyFM_AI_Base_Input {
|
|
12
|
-
question: string;
|
|
13
|
-
replaceThisInLog?: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface DyFM_AI_ListSelect_Input extends DyFM_AI_Question_Input {
|
|
17
|
-
selectFrom: string[];
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface DyFM_AI_GenericSelect_Input<T> extends DyFM_AI_Question_Input {
|
|
21
|
-
selectFrom: T[];
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface DyFM_AI_MultiSelect_Input extends DyFM_AI_Question_Input {
|
|
25
|
-
options: string[];
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface DyFM_AI_GenericMultiSelect_Input<T> extends DyFM_AI_Question_Input {
|
|
29
|
-
options: T[];
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface DyFM_AI_JSONKeysDescription_Input extends DyFM_AI_Question_Input {
|
|
33
|
-
keysDescription: string;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface DyFM_AI_JSONExactKeys_Input extends DyFM_AI_Question_Input {
|
|
37
|
-
keys: string[];
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface DyFM_AI_SimpleMessage_Input extends DyFM_AI_Base_Input {
|
|
41
|
-
message: string;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface DyFM_AI_ConversationBase_Input extends DyFM_AI_Base_Input {
|
|
45
|
-
conversation: DyFM_AI_Message[];
|
|
46
|
-
replaceThisInLog?: string;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export interface DyFM_AI_ConversationQuestion_Input extends DyFM_AI_ConversationBase_Input {
|
|
50
|
-
question: string;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface DyFM_AI_ConversationSelect_Input extends DyFM_AI_ConversationQuestion_Input {
|
|
54
|
-
selectFrom: string[];
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface DyFM_AI_ConversationGenericSelect_Input<T> extends DyFM_AI_ConversationQuestion_Input {
|
|
58
|
-
selectFrom: T[];
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export interface DyFM_AI_ConversationMultiSelect_Input extends DyFM_AI_ConversationQuestion_Input {
|
|
62
|
-
options: string[];
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export interface DyFM_AI_ConversationGenericMultiSelect_Input<T> extends DyFM_AI_ConversationQuestion_Input {
|
|
66
|
-
options: T[];
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export interface DyFM_AI_ConversationJSONKeysDescription_Input extends DyFM_AI_ConversationQuestion_Input {
|
|
70
|
-
keysDescription: string;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export interface DyFM_AI_ConversationJSONExactKeys_Input extends DyFM_AI_ConversationQuestion_Input {
|
|
74
|
-
keys: string[];
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export interface DyFM_AI_ConversationGetAnswer_Input extends DyFM_AI_ConversationBase_Input {
|
|
78
|
-
newMessage?: string;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|