@fugood/buttress-server 2.25.1-beta.1 → 2.25.1-beta.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/README.md +12 -2
- package/config/function-samples/README.md +33 -0
- package/config/function-samples/simple-rag.ts +231 -0
- package/lib/functions/loader.d.ts +5 -0
- package/lib/functions/templates.d.ts +1 -1
- package/lib/functions/types.d.ts +26 -0
- package/lib/index.mjs +93 -45
- package/lib/services/ggml-llm.d.ts +15 -3
- package/lib/services/index.d.ts +1 -1
- package/package.json +7 -5
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type Service as LlmService } from './create-llm-service';
|
|
3
|
+
import type { ServiceContext } from '../types';
|
|
4
|
+
export declare const schemas: {
|
|
5
|
+
initContext: z.ZodTuple<[z.ZodString, z.ZodOptional<z.ZodAny>], null>;
|
|
6
|
+
completion: z.ZodTuple<[z.ZodString, z.ZodOptional<z.ZodAny>], null>;
|
|
7
|
+
tokenize: z.ZodTuple<[z.ZodString, z.ZodAny], null>;
|
|
8
|
+
detokenize: z.ZodTuple<[z.ZodString, z.ZodAny], null>;
|
|
9
|
+
applyChatTemplate: z.ZodTuple<[z.ZodString, z.ZodAny], null>;
|
|
10
|
+
releaseContext: z.ZodTuple<[z.ZodString], null>;
|
|
11
|
+
embedding: z.ZodTuple<[z.ZodString, z.ZodAny], null>;
|
|
12
|
+
};
|
|
13
|
+
export interface Service extends LlmService {
|
|
14
|
+
embedding: (ctx: ServiceContext, ...args: z.infer<typeof schemas.embedding>) => Promise<any>;
|
|
15
|
+
}
|
|
4
16
|
declare const _default: Service;
|
|
5
17
|
export default _default;
|
package/lib/services/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ declare const services: {
|
|
|
19
19
|
}, id: any, audioData: any, options: any): Promise<any>;
|
|
20
20
|
releaseContext: ({ backend, session }: ServiceContext, id: any, force: any) => Promise<any>;
|
|
21
21
|
};
|
|
22
|
-
mlxLlm:
|
|
22
|
+
mlxLlm: MlxLlmService;
|
|
23
23
|
onnxStt: OnnxSttService;
|
|
24
24
|
onnxTts: OnnxTtsService;
|
|
25
25
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fugood/buttress-server",
|
|
3
|
-
"version": "2.25.1-beta.
|
|
3
|
+
"version": "2.25.1-beta.2",
|
|
4
4
|
"main": "lib/index.mjs",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"scripts": {
|
|
21
21
|
"typecheck": "tsc --noEmit",
|
|
22
22
|
"build": "tsdown -c rolldown.config.js --config-loader native && tsc --noCheck --emitDeclarationOnly",
|
|
23
|
-
"build:dist": "
|
|
24
|
-
"release": "
|
|
25
|
-
"release-beta": "
|
|
23
|
+
"build:dist": "$npm_execpath scripts/build-distribution.js",
|
|
24
|
+
"release": "$npm_execpath scripts/build-distribution.js",
|
|
25
|
+
"release-beta": "$npm_execpath scripts/build-distribution.js --beta",
|
|
26
26
|
"upload-release": "node scripts/upload-release.js",
|
|
27
27
|
"upload-beta": "node scripts/upload-release.js --beta",
|
|
28
28
|
"prepublish": "bun run build",
|
|
@@ -60,6 +60,8 @@
|
|
|
60
60
|
"oxc-transform": "^0.105.0",
|
|
61
61
|
"qs": "^6.15.0",
|
|
62
62
|
"sharp": "^0.34.1",
|
|
63
|
+
"sqlite-vec": "0.1.9",
|
|
64
|
+
"sqlite3": "5.1.7",
|
|
63
65
|
"voca": "^1.4.1",
|
|
64
66
|
"zod": "^3.25.76"
|
|
65
67
|
},
|
|
@@ -67,5 +69,5 @@
|
|
|
67
69
|
"tsdown": "^0.22.4",
|
|
68
70
|
"typescript": "^7.0.2"
|
|
69
71
|
},
|
|
70
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "681321c58a5484c661e9feae0b2c3cf2cbea5c16"
|
|
71
73
|
}
|