adminforth 2.27.0-next.48 → 2.27.0-next.49
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,9 +1,18 @@
|
|
|
1
|
+
import type { JSONSchemaType } from "ajv";
|
|
2
|
+
|
|
1
3
|
export type CompletionStreamEvent = {
|
|
2
4
|
type: "output" | "reasoning";
|
|
3
5
|
delta: string;
|
|
4
6
|
text: string;
|
|
5
7
|
source?: "summary" | "text";
|
|
6
8
|
};
|
|
9
|
+
|
|
10
|
+
export type CompletionTool<Input = Record<string, any>, Output = any> = {
|
|
11
|
+
name: string;
|
|
12
|
+
input_schema: JSONSchemaType<Input>;
|
|
13
|
+
description?: string;
|
|
14
|
+
handler: (input: Input) => Promise<Output> | Output;
|
|
15
|
+
};
|
|
7
16
|
export interface CompletionAdapter {
|
|
8
17
|
|
|
9
18
|
/**
|
|
@@ -26,6 +35,7 @@ export interface CompletionAdapter {
|
|
|
26
35
|
maxTokens: number,
|
|
27
36
|
outputSchema?: any,
|
|
28
37
|
reasoningEffort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh',
|
|
38
|
+
tools?: CompletionTool[],
|
|
29
39
|
onChunk?: (
|
|
30
40
|
chunk: string,
|
|
31
41
|
event?: CompletionStreamEvent,
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
import type { JSONSchemaType } from "ajv";
|
|
1
2
|
export type CompletionStreamEvent = {
|
|
2
3
|
type: "output" | "reasoning";
|
|
3
4
|
delta: string;
|
|
4
5
|
text: string;
|
|
5
6
|
source?: "summary" | "text";
|
|
6
7
|
};
|
|
8
|
+
export type CompletionTool<Input = Record<string, any>, Output = any> = {
|
|
9
|
+
name: string;
|
|
10
|
+
input_schema: JSONSchemaType<Input>;
|
|
11
|
+
description?: string;
|
|
12
|
+
handler: (input: Input) => Promise<Output> | Output;
|
|
13
|
+
};
|
|
7
14
|
export interface CompletionAdapter {
|
|
8
15
|
/**
|
|
9
16
|
* This method is called to validate the configuration of the adapter
|
|
@@ -19,7 +26,7 @@ export interface CompletionAdapter {
|
|
|
19
26
|
* @param onChunk - Optional callback invoked for each streamed chunk or reasoning event
|
|
20
27
|
* @returns A promise that resolves to an object containing the completed text and other metadata
|
|
21
28
|
*/
|
|
22
|
-
complete(content: string, maxTokens: number, outputSchema?: any, reasoningEffort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh', onChunk?: (chunk: string, event?: CompletionStreamEvent) => void | Promise<void>): Promise<{
|
|
29
|
+
complete(content: string, maxTokens: number, outputSchema?: any, reasoningEffort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh', tools?: CompletionTool[], onChunk?: (chunk: string, event?: CompletionStreamEvent) => void | Promise<void>): Promise<{
|
|
23
30
|
content?: string;
|
|
24
31
|
finishReason?: string;
|
|
25
32
|
error?: string;
|
|
@@ -1 +1 @@
|
|
|
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,O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,CAAC,EAAE,cAAc,EAAE,EACxB,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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adminforth",
|
|
3
|
-
"version": "2.27.0-next.
|
|
3
|
+
"version": "2.27.0-next.49",
|
|
4
4
|
"description": "OpenSource Vue3 powered forth-generation admin panel",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
"@inquirer/prompts": "^7.4.1",
|
|
74
74
|
"@qdrant/js-client-rest": "^1.17.0",
|
|
75
75
|
"@types/express": "^4.17.21",
|
|
76
|
+
"ajv": "^8.18.0",
|
|
76
77
|
"arg": "^5.0.2",
|
|
77
78
|
"ast-types": "^0.14.2",
|
|
78
79
|
"better-sqlite3": "^11.10.0",
|