adminforth 2.27.0-next.45 → 2.27.0-next.46
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.
|
@@ -7,17 +7,18 @@ export interface CompletionAdapter {
|
|
|
7
7
|
validate(): void;
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* This method should return a text completion based on the provided content
|
|
10
|
+
* This method should return a text completion based on the provided content.
|
|
11
11
|
* @param content - The input text to complete
|
|
12
|
-
* @param stop - An array of stop sequences to indicate where to stop the completion
|
|
13
12
|
* @param maxTokens - The maximum number of tokens to generate
|
|
13
|
+
* @param outputSchema - Optional structured output schema for the response
|
|
14
|
+
* @param onChunk - Optional callback invoked for each streamed chunk
|
|
14
15
|
* @returns A promise that resolves to an object containing the completed text and other metadata
|
|
15
16
|
*/
|
|
16
17
|
complete(
|
|
17
18
|
content: string,
|
|
18
|
-
stop: string[],
|
|
19
19
|
maxTokens: number,
|
|
20
|
-
outputSchema?: any
|
|
20
|
+
outputSchema?: any,
|
|
21
|
+
onChunk?: (chunk: string) => void | Promise<void>,
|
|
21
22
|
): Promise<{
|
|
22
23
|
content?: string;
|
|
23
24
|
finishReason?: string;
|
|
@@ -30,4 +31,4 @@ export interface CompletionAdapter {
|
|
|
30
31
|
* @returns The number of tokens in the input content
|
|
31
32
|
*/
|
|
32
33
|
measureTokensCount(content: string): Promise<number> | number;
|
|
33
|
-
}
|
|
34
|
+
}
|
|
@@ -5,13 +5,14 @@ export interface CompletionAdapter {
|
|
|
5
5
|
*/
|
|
6
6
|
validate(): void;
|
|
7
7
|
/**
|
|
8
|
-
* This method should return a text completion based on the provided content
|
|
8
|
+
* This method should return a text completion based on the provided content.
|
|
9
9
|
* @param content - The input text to complete
|
|
10
|
-
* @param stop - An array of stop sequences to indicate where to stop the completion
|
|
11
10
|
* @param maxTokens - The maximum number of tokens to generate
|
|
11
|
+
* @param outputSchema - Optional structured output schema for the response
|
|
12
|
+
* @param onChunk - Optional callback invoked for each streamed chunk
|
|
12
13
|
* @returns A promise that resolves to an object containing the completed text and other metadata
|
|
13
14
|
*/
|
|
14
|
-
complete(content: string,
|
|
15
|
+
complete(content: string, maxTokens: number, outputSchema?: any, onChunk?: (chunk: string) => void | Promise<void>): Promise<{
|
|
15
16
|
content?: string;
|
|
16
17
|
finishReason?: string;
|
|
17
18
|
error?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompletionAdapter.d.ts","sourceRoot":"","sources":["../../../types/adapters/CompletionAdapter.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAEhC;;;OAGG;IACH,QAAQ,IAAI,IAAI,CAAC;IAEjB
|
|
1
|
+
{"version":3,"file":"CompletionAdapter.d.ts","sourceRoot":"","sources":["../../../types/adapters/CompletionAdapter.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAEhC;;;OAGG;IACH,QAAQ,IAAI,IAAI,CAAC;IAEjB;;;;;;;OAOG;IACH,QAAQ,CACN,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,GAAG,EAClB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAChD,OAAO,CAAC;QACT,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;IAEH;;;;OAIG;IACH,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;CAC/D"}
|