@isdk/ai-tool 0.2.0 → 0.2.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 (248) hide show
  1. package/dist/chunk-PY6NRGZE.mjs +1 -0
  2. package/dist/funcs.d.mts +1 -1
  3. package/dist/funcs.d.ts +1 -1
  4. package/dist/funcs.js +1 -1
  5. package/dist/funcs.mjs +1 -1
  6. package/dist/{index-nP9lSU6E.d.mts → index-DUEs7T8M.d.mts} +2 -2
  7. package/dist/{index-nP9lSU6E.d.ts → index-DUEs7T8M.d.ts} +2 -2
  8. package/dist/index.d.mts +5 -4
  9. package/dist/index.d.ts +5 -4
  10. package/dist/index.js +1 -1
  11. package/dist/index.mjs +1 -1
  12. package/docs/README.md +5 -3
  13. package/docs/_media/CONTRIBUTING.md +18 -0
  14. package/docs/_media/LICENSE-MIT +22 -0
  15. package/docs/classes/AbortError.md +108 -129
  16. package/docs/classes/AlreadyExistsError.md +105 -126
  17. package/docs/classes/BaseError.md +112 -125
  18. package/docs/classes/CancelableAbility.md +136 -188
  19. package/docs/classes/ClientTools.md +1005 -1107
  20. package/docs/classes/CommonError.md +115 -136
  21. package/docs/classes/ConfigFile.md +150 -163
  22. package/docs/classes/EventClient.md +1128 -1282
  23. package/docs/classes/EventServer.md +1165 -1303
  24. package/docs/classes/EventToolFunc.md +958 -1028
  25. package/docs/classes/FStringPromptTemplate.md +352 -438
  26. package/docs/classes/FewShotPromptTemplate.md +364 -464
  27. package/docs/classes/GolangPromptTemplate.md +352 -438
  28. package/docs/classes/HFEnvironment.md +53 -79
  29. package/docs/classes/HFInterpreter.md +20 -377
  30. package/docs/classes/HFTemplate.md +21 -33
  31. package/docs/classes/HfPromptTemplate.md +352 -438
  32. package/docs/classes/IntSet.md +67 -100
  33. package/docs/classes/NotFoundError.md +105 -126
  34. package/docs/classes/NotImplementationError.md +105 -126
  35. package/docs/classes/PromptExampleSelector.md +58 -70
  36. package/docs/classes/PromptTemplate.md +338 -422
  37. package/docs/classes/ReadableStreamError.md +108 -129
  38. package/docs/classes/ResClientTools.md +916 -1026
  39. package/docs/classes/ResServerTools.md +919 -1026
  40. package/docs/classes/SSEChannel.md +93 -112
  41. package/docs/classes/Semaphore.md +44 -140
  42. package/docs/classes/ServerTools.md +981 -1072
  43. package/docs/classes/TaskAbortController.md +46 -66
  44. package/docs/classes/ToolFunc.md +840 -910
  45. package/docs/enumerations/AsyncFeatureBits.md +37 -0
  46. package/docs/enumerations/AsyncFeatures.md +37 -0
  47. package/docs/enumerations/ErrorCode.md +217 -0
  48. package/docs/enumerations/XXHashAlgorithm.md +27 -0
  49. package/docs/functions/AIArgProcessor.md +27 -0
  50. package/docs/functions/AIStream.md +50 -0
  51. package/docs/functions/ChoiceArgProcessor.md +27 -0
  52. package/docs/functions/RateLimit.md +33 -0
  53. package/docs/functions/TemplateArgProcessor.md +27 -0
  54. package/docs/functions/backendEventable.md +23 -0
  55. package/docs/functions/canonicalize.md +21 -0
  56. package/docs/functions/countRegexMatches.md +33 -0
  57. package/docs/functions/createAbilityInjector.md +87 -0
  58. package/docs/functions/createCallbacksTransformer.md +49 -0
  59. package/docs/functions/createEmptyReadableStream.md +23 -0
  60. package/docs/functions/createEndWithRepetitionDetector.md +29 -0
  61. package/docs/functions/createError.md +35 -0
  62. package/docs/functions/createEventStreamTransformer.md +33 -0
  63. package/docs/functions/createHfValueFunc.md +29 -0
  64. package/docs/functions/createLRUCache.md +23 -0
  65. package/docs/functions/dateToText.md +23 -0
  66. package/docs/functions/expandEnv.md +40 -0
  67. package/docs/functions/expandObjEnv.md +54 -0
  68. package/docs/functions/extNameLevel.md +43 -0
  69. package/docs/functions/fileIsExists.md +34 -0
  70. package/docs/functions/filenameReservedRegex.md +22 -0
  71. package/docs/functions/filterValidFnScope.md +21 -0
  72. package/docs/functions/findPort.md +23 -0
  73. package/docs/functions/formatISO.md +71 -0
  74. package/docs/functions/getAllEnumKeys.md +31 -0
  75. package/docs/functions/getConfigFileNames.md +23 -0
  76. package/docs/functions/getConfigs.md +23 -0
  77. package/docs/functions/getKeysPath.md +38 -0
  78. package/docs/functions/getMultiLevelExtname.md +31 -0
  79. package/docs/functions/getPackageDir.md +39 -0
  80. package/docs/functions/getRealFilepath.md +34 -0
  81. package/docs/functions/getResponseErrorReadableStream.md +21 -0
  82. package/docs/functions/hfParse.md +24 -0
  83. package/docs/functions/hfTokenize.md +25 -0
  84. package/docs/functions/interpolateEnv.md +25 -0
  85. package/docs/functions/interpolateFString.md +27 -0
  86. package/docs/functions/interpolateGolangTemplate.md +31 -0
  87. package/docs/functions/isModelNameMatched.md +45 -0
  88. package/docs/functions/isValidFilename.md +38 -0
  89. package/docs/functions/isValidFilepath.md +27 -0
  90. package/docs/functions/isWebStream.md +21 -0
  91. package/docs/functions/jsonFilterToWhere.md +45 -0
  92. package/docs/functions/jsonToMarkdownStr.md +31 -0
  93. package/docs/functions/loadFileFromPaths.md +54 -0
  94. package/docs/functions/loadTextFromPaths.md +29 -0
  95. package/docs/functions/lrucache.md +29 -0
  96. package/docs/functions/makeToolFuncCancelable.md +23 -0
  97. package/docs/functions/matchUrlProtocol.md +48 -0
  98. package/docs/functions/memoize.md +27 -0
  99. package/docs/functions/messagesToText.md +21 -0
  100. package/docs/functions/paramsSizeToScaleStr.md +32 -0
  101. package/docs/functions/parseCommand.md +33 -0
  102. package/docs/functions/parseDateFormat.md +360 -0
  103. package/docs/functions/parseFString.md +26 -0
  104. package/docs/functions/parseISO.md +72 -0
  105. package/docs/functions/parseJsJson.md +38 -0
  106. package/docs/functions/parseObjectArgInfo.md +27 -0
  107. package/docs/functions/parseObjectArgumentInfos.md +25 -0
  108. package/docs/functions/parseObjectArguments.md +68 -0
  109. package/docs/functions/parseObjectArgumentsAsArgInfos.md +42 -0
  110. package/docs/functions/parseYaml.md +21 -0
  111. package/docs/functions/quoteStr.md +21 -0
  112. package/docs/functions/reControlCharsRegex.md +21 -0
  113. package/docs/functions/readFilenamesRecursiveSync.md +47 -0
  114. package/docs/functions/readableFromAsyncIterable.md +28 -0
  115. package/docs/functions/registerCoreTools.md +17 -0
  116. package/docs/functions/registerYamlTag.md +21 -0
  117. package/docs/functions/sanitizeFilename.md +37 -0
  118. package/docs/functions/sanitizeFilepath.md +31 -0
  119. package/docs/functions/saveConfigFile.md +25 -0
  120. package/docs/functions/scaleStrToParamsSize.md +27 -0
  121. package/docs/functions/simplifyObjectArguments.md +21 -0
  122. package/docs/functions/sortedValues.md +25 -0
  123. package/docs/functions/splitSentence.md +37 -0
  124. package/docs/functions/stringifyYaml.md +49 -0
  125. package/docs/functions/textToDate.md +23 -0
  126. package/docs/functions/throwError.md +37 -0
  127. package/docs/functions/toDate.md +76 -0
  128. package/docs/functions/toDateTime.md +21 -0
  129. package/docs/functions/trimStartOfStreamHelper.md +41 -0
  130. package/docs/functions/truncTo.md +47 -0
  131. package/docs/functions/uuid.md +23 -0
  132. package/docs/functions/uuidParse.md +21 -0
  133. package/docs/functions/uuidStringify.md +23 -0
  134. package/docs/functions/uuidValidate.md +21 -0
  135. package/docs/functions/uuidVersion.md +21 -0
  136. package/docs/functions/uuidv1.md +47 -0
  137. package/docs/functions/uuidv4.md +47 -0
  138. package/docs/functions/uuidv5.md +51 -0
  139. package/docs/functions/wait.md +21 -0
  140. package/docs/functions/xxhash.md +25 -0
  141. package/docs/functions/xxhash32.md +23 -0
  142. package/docs/functions/xxhash64.md +23 -0
  143. package/docs/functions/xxhashAsStr.md +25 -0
  144. package/docs/globals.md +236 -0
  145. package/docs/interfaces/AIChatAssistantMessageParam.md +29 -38
  146. package/docs/interfaces/AIChatContentPartImage.md +11 -16
  147. package/docs/interfaces/AIChatContentPartText.md +9 -12
  148. package/docs/interfaces/AIChatMessageParamBase.md +12 -19
  149. package/docs/interfaces/AIChatMessageToolCall.md +18 -21
  150. package/docs/interfaces/AIChatSystemMessageParam.md +16 -22
  151. package/docs/interfaces/AIChatToolMessageParam.md +19 -26
  152. package/docs/interfaces/AIChatUserMessageParam.md +32 -42
  153. package/docs/interfaces/AIChoiceConfig.md +31 -39
  154. package/docs/interfaces/AIResult.md +29 -32
  155. package/docs/interfaces/AIStreamParser.md +24 -18
  156. package/docs/interfaces/AIStreamParserOptions.md +8 -10
  157. package/docs/interfaces/BaseFunc.md +55 -75
  158. package/docs/interfaces/BaseFuncItem.md +43 -61
  159. package/docs/interfaces/CancelableAbilityOptions.md +43 -54
  160. package/docs/interfaces/ClientFuncItem.md +66 -83
  161. package/docs/interfaces/DotenvExpandOptions.md +15 -19
  162. package/docs/interfaces/DotenvExpandOutput.md +11 -14
  163. package/docs/interfaces/DotenvParseInput.md +6 -2
  164. package/docs/interfaces/DotenvParseOutput.md +6 -2
  165. package/docs/interfaces/DotenvPopulateInput.md +6 -2
  166. package/docs/interfaces/EventClientFuncParams.md +22 -33
  167. package/docs/interfaces/EventServerFuncParams.md +27 -35
  168. package/docs/interfaces/FewShotPromptTemplateOptions.md +58 -74
  169. package/docs/interfaces/FuncItem.md +53 -70
  170. package/docs/interfaces/FuncParam.md +29 -36
  171. package/docs/interfaces/FuncParams.md +6 -2
  172. package/docs/interfaces/Funcs.md +6 -2
  173. package/docs/interfaces/JsonFilter.md +6 -2
  174. package/docs/interfaces/ParseObjectArgumentOptions.md +23 -29
  175. package/docs/interfaces/PromptExampleSelectorOptions.md +13 -16
  176. package/docs/interfaces/PromptTemplateOptions.md +31 -40
  177. package/docs/interfaces/RemoteFuncItem.md +64 -82
  178. package/docs/interfaces/ResClientFuncParams.md +14 -19
  179. package/docs/interfaces/ResServerFuncParams.md +28 -36
  180. package/docs/interfaces/SanitizeFilenameOptions.md +11 -14
  181. package/docs/interfaces/ServerFuncItem.md +70 -88
  182. package/docs/interfaces/ServerFuncParams.md +15 -20
  183. package/docs/interfaces/StreamCallbacksAndOptions.md +36 -65
  184. package/docs/interfaces/TaskAbortControllers.md +6 -2
  185. package/docs/interfaces/TaskPromise.md +48 -61
  186. package/docs/interfaces/ToolFuncPackage.md +18 -32
  187. package/docs/type-aliases/AIChatContentPart.md +13 -0
  188. package/docs/type-aliases/AIChatMessageParam.md +13 -0
  189. package/docs/type-aliases/AIChatRole.md +13 -0
  190. package/docs/type-aliases/AIMessageType.md +13 -0
  191. package/docs/type-aliases/AIModelNameRule.md +13 -0
  192. package/docs/type-aliases/AIModelNameRuleFn.md +21 -0
  193. package/docs/type-aliases/AIModelNameRules.md +13 -0
  194. package/docs/type-aliases/AITextGenerationFinishReason.md +13 -0
  195. package/docs/type-aliases/ActionName.md +13 -0
  196. package/docs/type-aliases/AsyncTaskId.md +13 -0
  197. package/docs/type-aliases/EventErrorListenerFn.md +27 -0
  198. package/docs/type-aliases/EventListenerFn.md +25 -0
  199. package/docs/type-aliases/FStringPromptTemplateNode.md +16 -0
  200. package/docs/type-aliases/FuncParamType.md +13 -0
  201. package/docs/type-aliases/PromptExamples.md +17 -0
  202. package/docs/type-aliases/PromptTemplateType.md +13 -0
  203. package/docs/type-aliases/PromptType.md +13 -0
  204. package/docs/type-aliases/TFunc.md +23 -0
  205. package/docs/variables/AIChatRoles.md +13 -0
  206. package/docs/variables/AIMessageTypes.md +13 -0
  207. package/docs/variables/AITextGenerationFinishReasons.md +13 -0
  208. package/docs/variables/AbortErrorCode.md +13 -0
  209. package/docs/variables/ActionNames.md +13 -0
  210. package/docs/variables/AlreadyExistsErrorCode.md +13 -0
  211. package/docs/variables/ClientToolFuncSchema.md +87 -0
  212. package/docs/variables/DefaultAsyncSemaphoreCapacity.md +13 -0
  213. package/docs/variables/EventBusName.md +13 -0
  214. package/docs/variables/EventName.md +13 -0
  215. package/docs/variables/FilenameReservedRegex.md +16 -0
  216. package/docs/variables/HFBuiltins.md +92 -0
  217. package/docs/variables/InternalErrorCode.md +13 -0
  218. package/docs/variables/NotFoundErrorCode.md +13 -0
  219. package/docs/variables/NotImplementedErrorCode.md +13 -0
  220. package/docs/variables/PASSING_SCORE.md +13 -0
  221. package/docs/variables/PromptTemplateTypes.md +13 -0
  222. package/docs/variables/PromptTypes.md +16 -0
  223. package/docs/variables/RStreamErrCode.md +13 -0
  224. package/docs/variables/RemoteToolFuncSchema.md +87 -0
  225. package/docs/variables/ResponseRStreamErrCode.md +13 -0
  226. package/docs/variables/SSEChannelAlreadyClosedErrCode.md +13 -0
  227. package/docs/variables/ServerToolFuncSchema.md +87 -0
  228. package/docs/variables/ToolAsyncCancelableBit.md +13 -0
  229. package/docs/variables/ToolAsyncMultiTaskBit.md +13 -0
  230. package/docs/variables/ToolAsyncPriorityBit.md +13 -0
  231. package/docs/variables/ToolFuncSchema.md +125 -0
  232. package/docs/variables/WindowsReservedNameRegex.md +15 -0
  233. package/docs/variables/base32768.md +13 -0
  234. package/docs/variables/defaultTemplateFormat.md +13 -0
  235. package/docs/variables/event.md +13 -0
  236. package/docs/variables/eventClient.md +13 -0
  237. package/docs/variables/eventServer.md +13 -0
  238. package/docs/variables/lrucache.md +13 -0
  239. package/docs/variables/mimeType.md +13 -0
  240. package/docs/variables/uuidNIL.md +13 -0
  241. package/package.json +26 -27
  242. package/dist/chunk-W2LO3HZT.mjs +0 -1
  243. package/docs/.nojekyll +0 -1
  244. package/docs/enums/AsyncFeatureBits.md +0 -41
  245. package/docs/enums/AsyncFeatures.md +0 -41
  246. package/docs/enums/ErrorCode.md +0 -239
  247. package/docs/enums/XXHashAlgorithm.md +0 -30
  248. package/docs/modules.md +0 -4062
@@ -1,62 +1,55 @@
1
- [@isdk/ai-tool](../README.md) / [Exports](../modules.md) / AIChatToolMessageParam
1
+ [**@isdk/ai-tool**](../README.md) **Docs**
2
2
 
3
- # Interface: AIChatToolMessageParam
4
-
5
- ## Hierarchy
6
-
7
- - [`AIChatMessageParamBase`](AIChatMessageParamBase.md)
3
+ ***
8
4
 
9
- **`AIChatToolMessageParam`**
5
+ [@isdk/ai-tool](../globals.md) / AIChatToolMessageParam
10
6
 
11
- ## Table of contents
7
+ # Interface: AIChatToolMessageParam
12
8
 
13
- ### Properties
9
+ ## Extends
14
10
 
15
- - [content](AIChatToolMessageParam.md#content)
16
- - [role](AIChatToolMessageParam.md#role)
17
- - [templateFormat](AIChatToolMessageParam.md#templateformat)
18
- - [tool\_call\_id](AIChatToolMessageParam.md#tool_call_id)
11
+ - [`AIChatMessageParamBase`](AIChatMessageParamBase.md)
19
12
 
20
13
  ## Properties
21
14
 
22
15
  ### content
23
16
 
24
- **content**: `string`
17
+ > **content**: `string`
25
18
 
26
19
  #### Defined in
27
20
 
28
- [packages/ai-tool/src/utils/chat.ts:111](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/chat.ts#L111)
21
+ [packages/ai-tool/src/utils/chat.ts:113](https://github.com/isdk/ai-tool.js/blob/37ada542a786fbbc770f2d61beb564f6e603941d/src/utils/chat.ts#L113)
29
22
 
30
- ___
23
+ ***
31
24
 
32
25
  ### role
33
26
 
34
- **role**: ``"tool"``
27
+ > **role**: `"tool"`
35
28
 
36
29
  #### Overrides
37
30
 
38
- [AIChatMessageParamBase](AIChatMessageParamBase.md).[role](AIChatMessageParamBase.md#role)
31
+ [`AIChatMessageParamBase`](AIChatMessageParamBase.md).[`role`](AIChatMessageParamBase.md#role)
39
32
 
40
33
  #### Defined in
41
34
 
42
- [packages/ai-tool/src/utils/chat.ts:110](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/chat.ts#L110)
35
+ [packages/ai-tool/src/utils/chat.ts:112](https://github.com/isdk/ai-tool.js/blob/37ada542a786fbbc770f2d61beb564f6e603941d/src/utils/chat.ts#L112)
43
36
 
44
- ___
37
+ ***
45
38
 
46
- ### templateFormat
39
+ ### templateFormat?
47
40
 
48
- `Optional` **templateFormat**: `string`
41
+ > `optional` **templateFormat**: `string`
49
42
 
50
43
  #### Defined in
51
44
 
52
- [packages/ai-tool/src/utils/chat.ts:113](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/chat.ts#L113)
45
+ [packages/ai-tool/src/utils/chat.ts:115](https://github.com/isdk/ai-tool.js/blob/37ada542a786fbbc770f2d61beb564f6e603941d/src/utils/chat.ts#L115)
53
46
 
54
- ___
47
+ ***
55
48
 
56
49
  ### tool\_call\_id
57
50
 
58
- **tool\_call\_id**: `string`
51
+ > **tool\_call\_id**: `string`
59
52
 
60
53
  #### Defined in
61
54
 
62
- [packages/ai-tool/src/utils/chat.ts:112](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/chat.ts#L112)
55
+ [packages/ai-tool/src/utils/chat.ts:114](https://github.com/isdk/ai-tool.js/blob/37ada542a786fbbc770f2d61beb564f6e603941d/src/utils/chat.ts#L114)
@@ -1,95 +1,85 @@
1
- [@isdk/ai-tool](../README.md) / [Exports](../modules.md) / AIChatUserMessageParam
1
+ [**@isdk/ai-tool**](../README.md) **Docs**
2
2
 
3
- # Interface: AIChatUserMessageParam
4
-
5
- ## Hierarchy
6
-
7
- - [`AIChatMessageParamBase`](AIChatMessageParamBase.md)
3
+ ***
8
4
 
9
- **`AIChatUserMessageParam`**
5
+ [@isdk/ai-tool](../globals.md) / AIChatUserMessageParam
10
6
 
11
- ## Table of contents
7
+ # Interface: AIChatUserMessageParam
12
8
 
13
- ### Properties
9
+ ## Extends
14
10
 
15
- - [charId](AIChatUserMessageParam.md#charid)
16
- - [content](AIChatUserMessageParam.md#content)
17
- - [createdAt](AIChatUserMessageParam.md#createdat)
18
- - [from](AIChatUserMessageParam.md#from)
19
- - [role](AIChatUserMessageParam.md#role)
20
- - [templateFormat](AIChatUserMessageParam.md#templateformat)
21
- - [updatedAt](AIChatUserMessageParam.md#updatedat)
11
+ - [`AIChatMessageParamBase`](AIChatMessageParamBase.md)
22
12
 
23
13
  ## Properties
24
14
 
25
- ### charId
15
+ ### charId?
26
16
 
27
- `Optional` **charId**: `string`
17
+ > `optional` **charId**: `string`
28
18
 
29
19
  #### Defined in
30
20
 
31
- [packages/ai-tool/src/utils/chat.ts:68](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/chat.ts#L68)
21
+ [packages/ai-tool/src/utils/chat.ts:70](https://github.com/isdk/ai-tool.js/blob/37ada542a786fbbc770f2d61beb564f6e603941d/src/utils/chat.ts#L70)
32
22
 
33
- ___
23
+ ***
34
24
 
35
25
  ### content
36
26
 
37
- **content**: `string` \| [`AIChatContentPart`](../modules.md#aichatcontentpart)[]
27
+ > **content**: `string` \| [`AIChatContentPart`](../type-aliases/AIChatContentPart.md)[]
38
28
 
39
29
  #### Defined in
40
30
 
41
- [packages/ai-tool/src/utils/chat.ts:63](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/chat.ts#L63)
31
+ [packages/ai-tool/src/utils/chat.ts:65](https://github.com/isdk/ai-tool.js/blob/37ada542a786fbbc770f2d61beb564f6e603941d/src/utils/chat.ts#L65)
42
32
 
43
- ___
33
+ ***
44
34
 
45
- ### createdAt
35
+ ### createdAt?
46
36
 
47
- `Optional` **createdAt**: `string` \| `Date`
37
+ > `optional` **createdAt**: `string` \| `Date`
48
38
 
49
39
  #### Defined in
50
40
 
51
- [packages/ai-tool/src/utils/chat.ts:65](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/chat.ts#L65)
41
+ [packages/ai-tool/src/utils/chat.ts:67](https://github.com/isdk/ai-tool.js/blob/37ada542a786fbbc770f2d61beb564f6e603941d/src/utils/chat.ts#L67)
52
42
 
53
- ___
43
+ ***
54
44
 
55
- ### from
45
+ ### from?
56
46
 
57
- `Optional` **from**: `string`
47
+ > `optional` **from**: `string`
58
48
 
59
49
  #### Defined in
60
50
 
61
- [packages/ai-tool/src/utils/chat.ts:70](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/chat.ts#L70)
51
+ [packages/ai-tool/src/utils/chat.ts:72](https://github.com/isdk/ai-tool.js/blob/37ada542a786fbbc770f2d61beb564f6e603941d/src/utils/chat.ts#L72)
62
52
 
63
- ___
53
+ ***
64
54
 
65
55
  ### role
66
56
 
67
- **role**: ``"user"``
57
+ > **role**: `"user"`
68
58
 
69
59
  #### Overrides
70
60
 
71
- [AIChatMessageParamBase](AIChatMessageParamBase.md).[role](AIChatMessageParamBase.md#role)
61
+ [`AIChatMessageParamBase`](AIChatMessageParamBase.md).[`role`](AIChatMessageParamBase.md#role)
72
62
 
73
63
  #### Defined in
74
64
 
75
- [packages/ai-tool/src/utils/chat.ts:62](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/chat.ts#L62)
65
+ [packages/ai-tool/src/utils/chat.ts:64](https://github.com/isdk/ai-tool.js/blob/37ada542a786fbbc770f2d61beb564f6e603941d/src/utils/chat.ts#L64)
76
66
 
77
- ___
67
+ ***
78
68
 
79
- ### templateFormat
69
+ ### templateFormat?
80
70
 
81
- `Optional` **templateFormat**: `string`
71
+ > `optional` **templateFormat**: `string`
82
72
 
83
73
  #### Defined in
84
74
 
85
- [packages/ai-tool/src/utils/chat.ts:71](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/chat.ts#L71)
75
+ [packages/ai-tool/src/utils/chat.ts:73](https://github.com/isdk/ai-tool.js/blob/37ada542a786fbbc770f2d61beb564f6e603941d/src/utils/chat.ts#L73)
86
76
 
87
- ___
77
+ ***
88
78
 
89
- ### updatedAt
79
+ ### updatedAt?
90
80
 
91
- `Optional` **updatedAt**: `string` \| `Date`
81
+ > `optional` **updatedAt**: `string` \| `Date`
92
82
 
93
83
  #### Defined in
94
84
 
95
- [packages/ai-tool/src/utils/chat.ts:66](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/chat.ts#L66)
85
+ [packages/ai-tool/src/utils/chat.ts:68](https://github.com/isdk/ai-tool.js/blob/37ada542a786fbbc770f2d61beb564f6e603941d/src/utils/chat.ts#L68)
@@ -1,85 +1,77 @@
1
- [@isdk/ai-tool](../README.md) / [Exports](../modules.md) / AIChoiceConfig
1
+ [**@isdk/ai-tool**](../README.md) **Docs**
2
2
 
3
- # Interface: AIChoiceConfig
4
-
5
- ## Table of contents
3
+ ***
6
4
 
7
- ### Properties
5
+ [@isdk/ai-tool](../globals.md) / AIChoiceConfig
8
6
 
9
- - [end](AIChoiceConfig.md#end)
10
- - [items](AIChoiceConfig.md#items)
11
- - [maxPick](AIChoiceConfig.md#maxpick)
12
- - [minPick](AIChoiceConfig.md#minpick)
13
- - [prefix](AIChoiceConfig.md#prefix)
14
- - [separator](AIChoiceConfig.md#separator)
15
- - [type](AIChoiceConfig.md#type)
7
+ # Interface: AIChoiceConfig
16
8
 
17
9
  ## Properties
18
10
 
19
- ### end
11
+ ### end?
20
12
 
21
- `Optional` **end**: `string`
13
+ > `optional` **end**: `string`
22
14
 
23
15
  #### Defined in
24
16
 
25
- [packages/ai-tool/src/utils/parse-command.ts:16](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/parse-command.ts#L16)
17
+ [packages/ai-tool/src/utils/parse-command.ts:16](https://github.com/isdk/ai-tool.js/blob/37ada542a786fbbc770f2d61beb564f6e603941d/src/utils/parse-command.ts#L16)
26
18
 
27
- ___
19
+ ***
28
20
 
29
- ### items
21
+ ### items?
30
22
 
31
- `Optional` **items**: `string`[]
23
+ > `optional` **items**: `string`[]
32
24
 
33
25
  #### Defined in
34
26
 
35
- [packages/ai-tool/src/utils/parse-command.ts:10](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/parse-command.ts#L10)
27
+ [packages/ai-tool/src/utils/parse-command.ts:10](https://github.com/isdk/ai-tool.js/blob/37ada542a786fbbc770f2d61beb564f6e603941d/src/utils/parse-command.ts#L10)
36
28
 
37
- ___
29
+ ***
38
30
 
39
- ### maxPick
31
+ ### maxPick?
40
32
 
41
- `Optional` **maxPick**: `number`
33
+ > `optional` **maxPick**: `number`
42
34
 
43
35
  #### Defined in
44
36
 
45
- [packages/ai-tool/src/utils/parse-command.ts:11](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/parse-command.ts#L11)
37
+ [packages/ai-tool/src/utils/parse-command.ts:11](https://github.com/isdk/ai-tool.js/blob/37ada542a786fbbc770f2d61beb564f6e603941d/src/utils/parse-command.ts#L11)
46
38
 
47
- ___
39
+ ***
48
40
 
49
- ### minPick
41
+ ### minPick?
50
42
 
51
- `Optional` **minPick**: `number`
43
+ > `optional` **minPick**: `number`
52
44
 
53
45
  #### Defined in
54
46
 
55
- [packages/ai-tool/src/utils/parse-command.ts:12](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/parse-command.ts#L12)
47
+ [packages/ai-tool/src/utils/parse-command.ts:12](https://github.com/isdk/ai-tool.js/blob/37ada542a786fbbc770f2d61beb564f6e603941d/src/utils/parse-command.ts#L12)
56
48
 
57
- ___
49
+ ***
58
50
 
59
- ### prefix
51
+ ### prefix?
60
52
 
61
- `Optional` **prefix**: `string`
53
+ > `optional` **prefix**: `string`
62
54
 
63
55
  #### Defined in
64
56
 
65
- [packages/ai-tool/src/utils/parse-command.ts:14](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/parse-command.ts#L14)
57
+ [packages/ai-tool/src/utils/parse-command.ts:14](https://github.com/isdk/ai-tool.js/blob/37ada542a786fbbc770f2d61beb564f6e603941d/src/utils/parse-command.ts#L14)
66
58
 
67
- ___
59
+ ***
68
60
 
69
- ### separator
61
+ ### separator?
70
62
 
71
- `Optional` **separator**: `string`
63
+ > `optional` **separator**: `string`
72
64
 
73
65
  #### Defined in
74
66
 
75
- [packages/ai-tool/src/utils/parse-command.ts:13](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/parse-command.ts#L13)
67
+ [packages/ai-tool/src/utils/parse-command.ts:13](https://github.com/isdk/ai-tool.js/blob/37ada542a786fbbc770f2d61beb564f6e603941d/src/utils/parse-command.ts#L13)
76
68
 
77
- ___
69
+ ***
78
70
 
79
- ### type
71
+ ### type?
80
72
 
81
- `Optional` **type**: ``"ai"`` \| ``"random"``
73
+ > `optional` **type**: `"ai"` \| `"random"`
82
74
 
83
75
  #### Defined in
84
76
 
85
- [packages/ai-tool/src/utils/parse-command.ts:15](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/parse-command.ts#L15)
77
+ [packages/ai-tool/src/utils/parse-command.ts:15](https://github.com/isdk/ai-tool.js/blob/37ada542a786fbbc770f2d61beb564f6e603941d/src/utils/parse-command.ts#L15)
@@ -1,76 +1,73 @@
1
- [@isdk/ai-tool](../README.md) / [Exports](../modules.md) / AIResult
1
+ [**@isdk/ai-tool**](../README.md) **Docs**
2
+
3
+ ***
4
+
5
+ [@isdk/ai-tool](../globals.md) / AIResult
2
6
 
3
7
  # Interface: AIResult\<TValue, TOptions\>
4
8
 
5
- ## Type parameters
9
+ ## Type Parameters
6
10
 
7
- | Name | Type |
8
- | :------ | :------ |
9
- | `TValue` | `any` |
10
- | `TOptions` | `any` |
11
+ **TValue** = `any`
11
12
 
12
- ## Table of contents
13
+ **TOptions** = `any`
13
14
 
14
- ### Properties
15
+ ## Indexable
15
16
 
16
- - [content](AIResult.md#content)
17
- - [finishReason](AIResult.md#finishreason)
18
- - [options](AIResult.md#options)
19
- - [stop](AIResult.md#stop)
20
- - [taskId](AIResult.md#taskid)
17
+ \[`name`: `string`\]: `any`
21
18
 
22
19
  ## Properties
23
20
 
24
- ### content
21
+ ### content?
25
22
 
26
- `Optional` **content**: `TValue`
23
+ > `optional` **content**: `TValue`
27
24
 
28
25
  The generated value.
29
26
 
30
27
  #### Defined in
31
28
 
32
- [packages/ai-tool/src/utils/chat.ts:19](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/chat.ts#L19)
29
+ [packages/ai-tool/src/utils/chat.ts:20](https://github.com/isdk/ai-tool.js/blob/37ada542a786fbbc770f2d61beb564f6e603941d/src/utils/chat.ts#L20)
33
30
 
34
- ___
31
+ ***
35
32
 
36
- ### finishReason
33
+ ### finishReason?
37
34
 
38
- `Optional` **finishReason**: ``null`` \| ``"abort"`` \| ``"stop"`` \| ``"length"`` \| ``"content-filter"`` \| ``"tool-calls"`` \| ``"error"`` \| ``"other"``
35
+ > `optional` **finishReason**: `null` \| `"abort"` \| `"stop"` \| `"length"` \| `"content_filter"` \| `"tool_calls"` \| `"function_call"` \| `"error"` \| `"other"`
39
36
 
40
37
  The reason why the generation stopped.
41
38
 
42
39
  #### Defined in
43
40
 
44
- [packages/ai-tool/src/utils/chat.ts:24](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/chat.ts#L24)
41
+ [packages/ai-tool/src/utils/chat.ts:25](https://github.com/isdk/ai-tool.js/blob/37ada542a786fbbc770f2d61beb564f6e603941d/src/utils/chat.ts#L25)
45
42
 
46
- ___
43
+ ***
47
44
 
48
- ### options
45
+ ### options?
49
46
 
50
- `Optional` **options**: `TOptions`
47
+ > `optional` **options**: `TOptions`
51
48
 
52
49
  #### Defined in
53
50
 
54
- [packages/ai-tool/src/utils/chat.ts:25](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/chat.ts#L25)
51
+ [packages/ai-tool/src/utils/chat.ts:26](https://github.com/isdk/ai-tool.js/blob/37ada542a786fbbc770f2d61beb564f6e603941d/src/utils/chat.ts#L26)
55
52
 
56
- ___
53
+ ***
57
54
 
58
- ### stop
55
+ ### stop?
59
56
 
60
- `Optional` **stop**: `boolean`
57
+ > `optional` **stop**: `boolean`
61
58
 
62
59
  for stream mode
63
60
 
64
61
  #### Defined in
65
62
 
66
- [packages/ai-tool/src/utils/chat.ts:29](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/chat.ts#L29)
63
+ [packages/ai-tool/src/utils/chat.ts:30](https://github.com/isdk/ai-tool.js/blob/37ada542a786fbbc770f2d61beb564f6e603941d/src/utils/chat.ts#L30)
67
64
 
68
- ___
65
+ ***
69
66
 
70
- ### taskId
67
+ ### taskId?
71
68
 
72
- `Optional` **taskId**: [`AsyncTaskId`](../modules.md#asynctaskid)
69
+ > `optional` **taskId**: [`AsyncTaskId`](../type-aliases/AsyncTaskId.md)
73
70
 
74
71
  #### Defined in
75
72
 
76
- [packages/ai-tool/src/utils/chat.ts:30](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/chat.ts#L30)
73
+ [packages/ai-tool/src/utils/chat.ts:31](https://github.com/isdk/ai-tool.js/blob/37ada542a786fbbc770f2d61beb564f6e603941d/src/utils/chat.ts#L31)
@@ -1,33 +1,39 @@
1
- [@isdk/ai-tool](../README.md) / [Exports](../modules.md) / AIStreamParser
1
+ [**@isdk/ai-tool**](../README.md) **Docs**
2
2
 
3
- # Interface: AIStreamParser\<T, TOptions\>
3
+ ***
4
+
5
+ [@isdk/ai-tool](../globals.md) / AIStreamParser
6
+
7
+ # Interface: AIStreamParser()\<T, TOptions\>
4
8
 
5
9
  Custom parser for AIStream data.
6
10
 
7
- ## Type parameters
11
+ ## Type Parameters
8
12
 
9
- | Name | Type |
10
- | :------ | :------ |
11
- | `T` | `any` |
12
- | `TOptions` | `any` |
13
+ **T** = `any`
13
14
 
14
- ## Callable
15
+ **TOptions** = `any`
15
16
 
16
- ### AIStreamParser
17
+ > **AIStreamParser**(`data`, `options`): `void` \| [`AIResult`](AIResult.md)\<`T`, `TOptions`\>
18
+
19
+ Custom parser for AIStream data.
17
20
 
18
- **AIStreamParser**(`data`, `options`): `void` \| [`AIResult`](AIResult.md)\<`T`, `TOptions`\>
21
+ ## Parameters
19
22
 
20
- #### Parameters
23
+ **data**: `string`
21
24
 
22
- | Name | Type |
23
- | :------ | :------ |
24
- | `data` | `string` |
25
- | `options` | [`AIStreamParserOptions`](AIStreamParserOptions.md) |
25
+ The data to be parsed.
26
26
 
27
- #### Returns
27
+ **options**: [`AIStreamParserOptions`](AIStreamParserOptions.md)
28
+
29
+ The options for the parser.
30
+
31
+ ## Returns
28
32
 
29
33
  `void` \| [`AIResult`](AIResult.md)\<`T`, `TOptions`\>
30
34
 
31
- #### Defined in
35
+ The parsed data or void.
36
+
37
+ ## Defined in
32
38
 
33
- [packages/ai-tool/src/utils/stream/ai-stream.ts:27](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/stream/ai-stream.ts#L27)
39
+ [packages/ai-tool/src/utils/stream/ai-stream.ts:27](https://github.com/isdk/ai-tool.js/blob/37ada542a786fbbc770f2d61beb564f6e603941d/src/utils/stream/ai-stream.ts#L27)
@@ -1,23 +1,21 @@
1
- [@isdk/ai-tool](../README.md) / [Exports](../modules.md) / AIStreamParserOptions
1
+ [**@isdk/ai-tool**](../README.md) **Docs**
2
2
 
3
- # Interface: AIStreamParserOptions
4
-
5
- Options for the AIStreamParser.
3
+ ***
6
4
 
7
- ## Table of contents
5
+ [@isdk/ai-tool](../globals.md) / AIStreamParserOptions
8
6
 
9
- ### Properties
7
+ # Interface: AIStreamParserOptions
10
8
 
11
- - [event](AIStreamParserOptions.md#event)
9
+ Options for the AIStreamParser.
12
10
 
13
11
  ## Properties
14
12
 
15
- ### event
13
+ ### event?
16
14
 
17
- `Optional` **event**: `string`
15
+ > `optional` **event**: `string`
18
16
 
19
17
  The event (type) from the server side event stream.
20
18
 
21
19
  #### Defined in
22
20
 
23
- [packages/ai-tool/src/utils/stream/ai-stream.ts:16](https://github.com/isdk/ai-tool.js/blob/c5e620338f3b80d6ef09148577c5087098896d8b/src/utils/stream/ai-stream.ts#L16)
21
+ [packages/ai-tool/src/utils/stream/ai-stream.ts:16](https://github.com/isdk/ai-tool.js/blob/37ada542a786fbbc770f2d61beb564f6e603941d/src/utils/stream/ai-stream.ts#L16)