@isdk/ai-tool 0.0.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.
Files changed (87) hide show
  1. package/README.cn.md +261 -0
  2. package/README.md +3 -0
  3. package/dist/chunk-EZFPVSGF.mjs +22 -0
  4. package/dist/chunk-PKECBABP.mjs +5085 -0
  5. package/dist/funcs.d.mts +6 -0
  6. package/dist/funcs.d.ts +6 -0
  7. package/dist/funcs.js +5016 -0
  8. package/dist/funcs.mjs +37 -0
  9. package/dist/index-D4KjfAKl.d.mts +606 -0
  10. package/dist/index-D4KjfAKl.d.ts +606 -0
  11. package/dist/index.d.mts +1097 -0
  12. package/dist/index.d.ts +1097 -0
  13. package/dist/index.js +5239 -0
  14. package/dist/index.mjs +399 -0
  15. package/dist/test/util.d.mts +7 -0
  16. package/dist/test/util.d.ts +7 -0
  17. package/dist/test/util.js +98 -0
  18. package/dist/test/util.mjs +61 -0
  19. package/docs/.nojekyll +1 -0
  20. package/docs/README.md +5 -0
  21. package/docs/classes/AbortError.md +359 -0
  22. package/docs/classes/AlreadyExistsError.md +339 -0
  23. package/docs/classes/BaseError.md +346 -0
  24. package/docs/classes/ClientTools.md +2705 -0
  25. package/docs/classes/CommonError.md +368 -0
  26. package/docs/classes/ConfigFile.md +346 -0
  27. package/docs/classes/EventClient.md +3183 -0
  28. package/docs/classes/EventServer.md +3138 -0
  29. package/docs/classes/EventToolFunc.md +2498 -0
  30. package/docs/classes/FStringPromptTemplate.md +1236 -0
  31. package/docs/classes/FewShotPromptTemplate.md +1286 -0
  32. package/docs/classes/GolangPromptTemplate.md +1236 -0
  33. package/docs/classes/HFEnvironment.md +212 -0
  34. package/docs/classes/HFInterpreter.md +386 -0
  35. package/docs/classes/HFTemplate.md +79 -0
  36. package/docs/classes/HfPromptTemplate.md +1236 -0
  37. package/docs/classes/NotFoundError.md +339 -0
  38. package/docs/classes/NotImplementationError.md +339 -0
  39. package/docs/classes/PromptExampleSelector.md +207 -0
  40. package/docs/classes/PromptTemplate.md +1163 -0
  41. package/docs/classes/ReadableStreamError.md +359 -0
  42. package/docs/classes/ResClientTools.md +2859 -0
  43. package/docs/classes/ResServerTools.md +2783 -0
  44. package/docs/classes/SSEChannel.md +289 -0
  45. package/docs/classes/ServerTools.md +2633 -0
  46. package/docs/classes/ToolFunc.md +2124 -0
  47. package/docs/enums/ErrorCode.md +217 -0
  48. package/docs/enums/XXHashAlgorithm.md +30 -0
  49. package/docs/interfaces/AIChatAssistantMessageParam.md +84 -0
  50. package/docs/interfaces/AIChatContentPartImage.md +36 -0
  51. package/docs/interfaces/AIChatContentPartText.md +30 -0
  52. package/docs/interfaces/AIChatMessageParamBase.md +35 -0
  53. package/docs/interfaces/AIChatMessageToolCall.md +48 -0
  54. package/docs/interfaces/AIChatSystemMessageParam.md +51 -0
  55. package/docs/interfaces/AIChatToolMessageParam.md +62 -0
  56. package/docs/interfaces/AIChatUserMessageParam.md +95 -0
  57. package/docs/interfaces/AIResult.md +65 -0
  58. package/docs/interfaces/AIStreamCallbacksAndOptions.md +158 -0
  59. package/docs/interfaces/AIStreamParser.md +33 -0
  60. package/docs/interfaces/AIStreamParserOptions.md +23 -0
  61. package/docs/interfaces/BaseFunc.md +145 -0
  62. package/docs/interfaces/BaseFuncItem.md +99 -0
  63. package/docs/interfaces/ClientFuncItem.md +181 -0
  64. package/docs/interfaces/DotenvExpandOptions.md +51 -0
  65. package/docs/interfaces/DotenvExpandOutput.md +30 -0
  66. package/docs/interfaces/DotenvParseInput.md +7 -0
  67. package/docs/interfaces/DotenvParseOutput.md +7 -0
  68. package/docs/interfaces/DotenvPopulateInput.md +7 -0
  69. package/docs/interfaces/EventClientFuncParams.md +66 -0
  70. package/docs/interfaces/EventServerFuncParams.md +79 -0
  71. package/docs/interfaces/FewShotPromptTemplateOptions.md +179 -0
  72. package/docs/interfaces/FuncItem.md +130 -0
  73. package/docs/interfaces/FuncParam.md +67 -0
  74. package/docs/interfaces/FuncParams.md +7 -0
  75. package/docs/interfaces/Funcs.md +7 -0
  76. package/docs/interfaces/IOptions.md +30 -0
  77. package/docs/interfaces/JsonFilter.md +7 -0
  78. package/docs/interfaces/PromptExampleSelectorOptions.md +39 -0
  79. package/docs/interfaces/PromptTemplateOptions.md +84 -0
  80. package/docs/interfaces/RemoteFuncItem.md +167 -0
  81. package/docs/interfaces/ResClientFuncParams.md +34 -0
  82. package/docs/interfaces/ResServerFuncParams.md +79 -0
  83. package/docs/interfaces/SanitizeFilenameOptions.md +30 -0
  84. package/docs/interfaces/ServerFuncItem.md +192 -0
  85. package/docs/interfaces/ServerFuncParams.md +44 -0
  86. package/docs/modules.md +2707 -0
  87. package/package.json +112 -0
package/package.json ADDED
@@ -0,0 +1,112 @@
1
+ {
2
+ "name": "@isdk/ai-tool",
3
+ "version": "0.0.2",
4
+ "author": "Riceball LEE <snowyu.lee@gmail.com>",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.mjs",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "require": "./dist/index.js",
11
+ "import": "./dist/index.mjs"
12
+ },
13
+ "./funcs": {
14
+ "types": "./dist/funcs.d.ts",
15
+ "require": "./dist/funcs.js",
16
+ "import": "./dist/funcs.mjs"
17
+ },
18
+ "./test/util": {
19
+ "types": "./dist/test/util.d.ts",
20
+ "require": "./dist/test/util.js",
21
+ "import": "./dist/test/util.mjs"
22
+ }
23
+ },
24
+ "dependencies": {
25
+ "@xenova/transformers": "^2.17.2",
26
+ "abstract-error": "^2.0.0-alpha.8",
27
+ "base32768": "^3.0.1",
28
+ "custom-ability": "^2.0.0-alpha.6",
29
+ "custom-factory": "2.3.0-alpha.6",
30
+ "events-ex": "^2.0.0-alpha.15",
31
+ "eventsource-parser": "^1.1.2",
32
+ "json-canonicalize": "^1.0.6",
33
+ "load-config-file": "2.0.0-alpha.3",
34
+ "mime-db": "^1.52.0",
35
+ "mime-type": "5.0.0-alpha.1",
36
+ "property-manager": "^2.0.0-alpha.5",
37
+ "secondary-cache": "^2.0.0-alpha.5",
38
+ "secure-json-parse": "^2.7.0",
39
+ "util-ex": "2.0.0-alpha.18",
40
+ "uuid": "^9.0.1",
41
+ "xxhashjs": "^0.2.2",
42
+ "yaml": "^2.4.3",
43
+ "yaml-types": "^0.3.0",
44
+ "zod": "^3.23.5",
45
+ "zod-to-json-schema": "^3.23.0"
46
+ },
47
+ "devDependencies": {
48
+ "@antfu/eslint-config": "^2.16.0",
49
+ "@types/jest": "^29.5.12",
50
+ "@types/node": "^20.12.7",
51
+ "@types/uuid": "^9.0.8",
52
+ "@types/xxhashjs": "^0.2.4",
53
+ "@typescript-eslint/eslint-plugin": "^7.8.0",
54
+ "bumpp": "^9.4.1",
55
+ "esbuild-plugin-wasm": "^1.1.0",
56
+ "eslint": "^8.57.0",
57
+ "eslint-config-prettier": "^9.1.0",
58
+ "eslint-plugin-tsdoc": "^0.2.17",
59
+ "eventsource": "^2.0.2",
60
+ "fastify": "^4.26.2",
61
+ "onnxruntime-node": "1.18.0",
62
+ "onnxruntime-web": "^1.18.0",
63
+ "prettier": "^3.2.5",
64
+ "tsup": "^8.0.2",
65
+ "tsx": "^4.10.2",
66
+ "type-fest": "^4.18.0",
67
+ "typedoc": "^0.25.13",
68
+ "typedoc-plugin-markdown": "^3.17.1",
69
+ "typescript": "^5.4.5",
70
+ "vite": "^5.2.10",
71
+ "vite-plugin-wasm": "^3.3.0",
72
+ "vitest": "^1.5.2"
73
+ },
74
+ "bug": "https://github.com/isdk/ai-tool.js/issues",
75
+ "description": "AI tools",
76
+ "files": [
77
+ "docs",
78
+ "dist"
79
+ ],
80
+ "homepage": "https://github.com/isdk/ai-tool.js/#readme",
81
+ "keywords": [
82
+ "ai",
83
+ "tool"
84
+ ],
85
+ "license": "MIT",
86
+ "maintainers": [
87
+ "Riceball LEE <snowyu.lee@gmail.com>"
88
+ ],
89
+ "engines": {
90
+ "node": ">=20.11.1"
91
+ },
92
+ "publishConfig": {
93
+ "access": "public"
94
+ },
95
+ "types": "./dist/index.d.ts",
96
+ "scripts": {
97
+ "build-fast": "tsup",
98
+ "build": "pnpm run build-fast --dts-resolve --dts && pnpm run doc:md",
99
+ "clean": "rm -fr web docs dist",
100
+ "doc": "typedoc --plugin none --out web",
101
+ "doc:md": "typedoc --plugin typedoc-plugin-markdown --out docs",
102
+ "style": "pnpm run format -c && pnpm run lint",
103
+ "style:fix": "pnpm run format:fix && npm run lint:fix",
104
+ "format": "prettier \"**/*.{ts,tsx,js,jsx,css,scss,sass,less,md}\"",
105
+ "format:fix": "pnpm run format --write",
106
+ "lint": "eslint .",
107
+ "lint:fix": "pnpm run lint --fix",
108
+ "test": "vitest run",
109
+ "release": "pnpm run clean && pnpm run build && git add -f docs && git ci -m 'docs: update API docs' && pnpm dlx commit-and-tag-version -s",
110
+ "release.alpha": "npm run release -- --prerelease alpha"
111
+ }
112
+ }