adminforth 2.27.0-next.46 → 2.27.0-next.47

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.
@@ -1,3 +1,9 @@
1
+ export type CompletionStreamEvent = {
2
+ type: "output" | "reasoning";
3
+ delta: string;
4
+ text: string;
5
+ source?: "summary" | "text";
6
+ };
1
7
  export interface CompletionAdapter {
2
8
 
3
9
  /**
@@ -11,14 +17,19 @@ export interface CompletionAdapter {
11
17
  * @param content - The input text to complete
12
18
  * @param maxTokens - The maximum number of tokens to generate
13
19
  * @param outputSchema - Optional structured output schema for the response
14
- * @param onChunk - Optional callback invoked for each streamed chunk
20
+ * @param reasoningEffort - Optional parameter to indicate the level of reasoning effort for the completion
21
+ * @param onChunk - Optional callback invoked for each streamed chunk or reasoning event
15
22
  * @returns A promise that resolves to an object containing the completed text and other metadata
16
23
  */
17
24
  complete(
18
25
  content: string,
19
26
  maxTokens: number,
20
27
  outputSchema?: any,
21
- onChunk?: (chunk: string) => void | Promise<void>,
28
+ reasoningEffort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh',
29
+ onChunk?: (
30
+ chunk: string,
31
+ event?: CompletionStreamEvent,
32
+ ) => void | Promise<void>,
22
33
  ): Promise<{
23
34
  content?: string;
24
35
  finishReason?: string;
@@ -1,8 +1,8 @@
1
1
  export type { EmailAdapter } from './EmailAdapter.js';
2
- export type { CompletionAdapter } from './CompletionAdapter.js';
2
+ export type { CompletionAdapter, CompletionStreamEvent } from './CompletionAdapter.js';
3
3
  export type { ImageGenerationAdapter } from './ImageGenerationAdapter.js';
4
4
  export type { KeyValueAdapter } from './KeyValueAdapter.js';
5
5
  export type { ImageVisionAdapter } from './ImageVisionAdapter.js';
6
6
  export type { OAuth2Adapter } from './OAuth2Adapter.js';
7
7
  export type { StorageAdapter } from './StorageAdapter.js';
8
- export type { CaptchaAdapter } from './CaptchaAdapter.js';
8
+ export type { CaptchaAdapter } from './CaptchaAdapter.js';
@@ -1,3 +1,9 @@
1
+ export type CompletionStreamEvent = {
2
+ type: "output" | "reasoning";
3
+ delta: string;
4
+ text: string;
5
+ source?: "summary" | "text";
6
+ };
1
7
  export interface CompletionAdapter {
2
8
  /**
3
9
  * This method is called to validate the configuration of the adapter
@@ -9,10 +15,11 @@ export interface CompletionAdapter {
9
15
  * @param content - The input text to complete
10
16
  * @param maxTokens - The maximum number of tokens to generate
11
17
  * @param outputSchema - Optional structured output schema for the response
12
- * @param onChunk - Optional callback invoked for each streamed chunk
18
+ * @param reasoningEffort - Optional parameter to indicate the level of reasoning effort for the completion
19
+ * @param onChunk - Optional callback invoked for each streamed chunk or reasoning event
13
20
  * @returns A promise that resolves to an object containing the completed text and other metadata
14
21
  */
15
- complete(content: string, maxTokens: number, outputSchema?: any, onChunk?: (chunk: string) => void | Promise<void>): Promise<{
22
+ complete(content: string, maxTokens: number, outputSchema?: any, reasoningEffort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh', onChunk?: (chunk: string, event?: CompletionStreamEvent) => void | Promise<void>): Promise<{
16
23
  content?: string;
17
24
  finishReason?: string;
18
25
  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;;;;;;;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"}
1
+ {"version":3,"file":"CompletionAdapter.d.ts","sourceRoot":"","sources":["../../../types/adapters/CompletionAdapter.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,QAAQ,GAAG,WAAW,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CAC7B,CAAC;AACF,MAAM,WAAW,iBAAiB;IAEhC;;;OAGG;IACH,QAAQ,IAAI,IAAI,CAAC;IAEjB;;;;;;;;OAQG;IACH,QAAQ,CACN,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,GAAG,EAClB,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,EAC1E,OAAO,CAAC,EAAE,CACR,KAAK,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,qBAAqB,KAC1B,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GACxB,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"}
@@ -1,5 +1,5 @@
1
1
  export type { EmailAdapter } from './EmailAdapter.js';
2
- export type { CompletionAdapter } from './CompletionAdapter.js';
2
+ export type { CompletionAdapter, CompletionStreamEvent } from './CompletionAdapter.js';
3
3
  export type { ImageGenerationAdapter } from './ImageGenerationAdapter.js';
4
4
  export type { KeyValueAdapter } from './KeyValueAdapter.js';
5
5
  export type { ImageVisionAdapter } from './ImageVisionAdapter.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../types/adapters/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,YAAY,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,YAAY,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../types/adapters/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,YAAY,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACvF,YAAY,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "2.27.0-next.46",
3
+ "version": "2.27.0-next.47",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",