ak-gemini 1.0.5 → 1.0.51
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/index.cjs +2 -0
- package/index.js +1 -1
- package/package.json +1 -1
- package/types.ts +7 -4
package/index.cjs
CHANGED
|
@@ -29,6 +29,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
// index.js
|
|
30
30
|
var index_exports = {};
|
|
31
31
|
__export(index_exports, {
|
|
32
|
+
AITransformer: () => AITransformer,
|
|
32
33
|
default: () => AITransformer,
|
|
33
34
|
log: () => logger_default
|
|
34
35
|
});
|
|
@@ -374,5 +375,6 @@ if (import_meta.url === new URL(`file://${process.argv[1]}`).href) {
|
|
|
374
375
|
}
|
|
375
376
|
// Annotate the CommonJS export names for ESM import in node:
|
|
376
377
|
0 && (module.exports = {
|
|
378
|
+
AITransformer,
|
|
377
379
|
log
|
|
378
380
|
});
|
package/index.js
CHANGED
|
@@ -99,7 +99,7 @@ export default class AITransformer {
|
|
|
99
99
|
this.estimate = estimateTokenUsage.bind(this);
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
|
|
102
|
+
export { AITransformer };
|
|
103
103
|
/**
|
|
104
104
|
* factory function to create an AI Transformer instance
|
|
105
105
|
* @param {AITransformerOptions} [options={}] - Configuration options for the transformer
|
package/package.json
CHANGED
package/types.ts
CHANGED
|
@@ -28,9 +28,9 @@ export interface AITransformerContext {
|
|
|
28
28
|
contextKey?: string;
|
|
29
29
|
maxRetries?: number;
|
|
30
30
|
retryDelay?: number;
|
|
31
|
-
init
|
|
32
|
-
seed
|
|
33
|
-
message
|
|
31
|
+
init?: () => Promise<void>; // Initialization function
|
|
32
|
+
seed?: () => Promise<void>; // Function to seed the transformer with examples
|
|
33
|
+
message?: (payload: Record<string, unknown>) => Promise<Record<string, unknown>>; // Function to send messages to the model
|
|
34
34
|
genAIClient?: GoogleGenAI; // Google GenAI client instance
|
|
35
35
|
|
|
36
36
|
}
|
|
@@ -62,4 +62,7 @@ export interface AITransformerOptions {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
// Async validator function type
|
|
65
|
-
export type AsyncValidatorFunction = (payload: Record<string, unknown>) => Promise<Record<string, unknown>>;
|
|
65
|
+
export type AsyncValidatorFunction = (payload: Record<string, unknown>) => Promise<Record<string, unknown>>;
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
export declare class AITransformer implements AITransformerContext {}
|