@isdk/ai-tool 0.2.3 → 0.4.0

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 (267) hide show
  1. package/dist/chunk-SIP3XWIH.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-DUEs7T8M.d.mts → index-BC3GQn6-.d.mts} +7 -0
  7. package/dist/{index-DUEs7T8M.d.ts → index-BC3GQn6-.d.ts} +7 -0
  8. package/dist/index.d.mts +413 -11
  9. package/dist/index.d.ts +413 -11
  10. package/dist/index.js +1 -1
  11. package/dist/index.mjs +1 -1
  12. package/dist/test/util.mjs +1 -1
  13. package/docs/classes/AbortError.md +45 -15
  14. package/docs/classes/AlreadyExistsError.md +45 -15
  15. package/docs/classes/BaseError.md +42 -16
  16. package/docs/classes/CancelableAbility.md +20 -20
  17. package/docs/classes/ClientTools.md +93 -93
  18. package/docs/classes/CommonError.md +45 -15
  19. package/docs/classes/EventClient.md +115 -115
  20. package/docs/classes/EventServer.md +117 -117
  21. package/docs/classes/EventToolFunc.md +85 -85
  22. package/docs/classes/FStringPromptTemplate.md +18 -18
  23. package/docs/classes/FewShotPromptTemplate.md +22 -22
  24. package/docs/classes/GolangPromptTemplate.md +18 -18
  25. package/docs/classes/HFEnvironment.md +9 -9
  26. package/docs/classes/HFInterpreter.md +4 -4
  27. package/docs/classes/HFTemplate.md +4 -4
  28. package/docs/classes/HfPromptTemplate.md +18 -18
  29. package/docs/classes/IntSet.md +11 -11
  30. package/docs/classes/NotFoundError.md +45 -15
  31. package/docs/classes/NotImplementationError.md +45 -15
  32. package/docs/classes/PromptExampleSelector.md +8 -8
  33. package/docs/classes/PromptTemplate.md +17 -17
  34. package/docs/classes/ReadableStreamError.md +45 -15
  35. package/docs/classes/ResClientTools.md +100 -100
  36. package/docs/classes/ResServerTools.md +101 -101
  37. package/docs/classes/SSEChannel.md +14 -14
  38. package/docs/classes/Semaphore.md +8 -8
  39. package/docs/classes/ServerTools.md +89 -89
  40. package/docs/classes/TaskAbortController.md +8 -8
  41. package/docs/classes/ToolFunc.md +82 -82
  42. package/docs/classes/YamlTypeBaseObject.md +29 -0
  43. package/docs/enumerations/AsyncFeatureBits.md +3 -3
  44. package/docs/enumerations/AsyncFeatures.md +3 -3
  45. package/docs/enumerations/ErrorCode.md +21 -21
  46. package/docs/enumerations/HashAlgorithm.md +117 -0
  47. package/docs/functions/AIArgProcessor.md +1 -1
  48. package/docs/functions/AIStream.md +1 -1
  49. package/docs/functions/ChoiceArgProcessor.md +1 -1
  50. package/docs/functions/RateLimit.md +1 -1
  51. package/docs/functions/TemplateArgProcessor.md +1 -1
  52. package/docs/functions/backendEventable.md +1 -1
  53. package/docs/functions/completeSentences.md +23 -0
  54. package/docs/functions/concatText.md +23 -0
  55. package/docs/functions/countLLMTokens.md +23 -0
  56. package/docs/functions/countRegexMatches.md +1 -1
  57. package/docs/functions/createCallbacksTransformer.md +1 -1
  58. package/docs/functions/createEmptyReadableStream.md +1 -1
  59. package/docs/functions/createEndWithRepetitionDetector.md +1 -1
  60. package/docs/functions/createError.md +1 -1
  61. package/docs/functions/createEventStreamTransformer.md +1 -1
  62. package/docs/functions/createHfValueFunc.md +1 -1
  63. package/docs/functions/createLRUCache.md +1 -1
  64. package/docs/functions/createYamlObjectTag.md +23 -0
  65. package/docs/functions/dateToText.md +1 -1
  66. package/docs/functions/decodeCharset.md +23 -0
  67. package/docs/functions/detectCharset.md +23 -0
  68. package/docs/functions/encodeLLMTokens.md +23 -0
  69. package/docs/functions/expandEnv.md +1 -1
  70. package/docs/functions/expandObjEnv.md +1 -1
  71. package/docs/functions/extNameLevel.md +1 -1
  72. package/docs/functions/fileIsExists.md +1 -1
  73. package/docs/functions/filenameReservedRegex.md +1 -1
  74. package/docs/functions/filterValidFnScope.md +1 -1
  75. package/docs/functions/findIndexNonEmptyFrom.md +23 -0
  76. package/docs/functions/findPort.md +1 -1
  77. package/docs/functions/formatTextWithSpace.md +59 -0
  78. package/docs/functions/getAllEnumKeys.md +1 -1
  79. package/docs/functions/getConfigFileNames.md +1 -1
  80. package/docs/functions/getConfigs.md +1 -1
  81. package/docs/functions/getFileMetaInfo.md +21 -0
  82. package/docs/functions/getHashAlgoBySize.md +21 -0
  83. package/docs/functions/getKeysPath.md +1 -1
  84. package/docs/functions/getLLMTokenizer.md +21 -0
  85. package/docs/functions/getMultiLevelExtname.md +1 -1
  86. package/docs/functions/getPackageDir.md +1 -1
  87. package/docs/functions/getRealFilepath.md +1 -1
  88. package/docs/functions/getResponseErrorReadableStream.md +1 -1
  89. package/docs/functions/hasDirectoryIn.md +1 -1
  90. package/docs/functions/hashFile.md +23 -0
  91. package/docs/functions/hashStream.md +23 -0
  92. package/docs/functions/hfParse.md +1 -1
  93. package/docs/functions/hfTokenize.md +1 -1
  94. package/docs/functions/interpolateEnv.md +1 -1
  95. package/docs/functions/interpolateFString.md +1 -1
  96. package/docs/functions/interpolateGolangTemplate.md +1 -1
  97. package/docs/functions/isLangUsingSpaces.md +21 -0
  98. package/docs/functions/isListItemString.md +21 -0
  99. package/docs/functions/isModelNameMatched.md +1 -1
  100. package/docs/functions/isPunctuationChar.md +36 -0
  101. package/docs/functions/isRegExp.md +1 -1
  102. package/docs/functions/isSectionString.md +23 -0
  103. package/docs/functions/isSentenceEnding.md +21 -0
  104. package/docs/functions/isSepLineString.md +21 -0
  105. package/docs/functions/isSubdirectory.md +1 -1
  106. package/docs/functions/isTitleString.md +23 -0
  107. package/docs/functions/isValidFilename.md +1 -1
  108. package/docs/functions/isValidFilepath.md +1 -1
  109. package/docs/functions/isWebStream.md +1 -1
  110. package/docs/functions/jsonFilterToWhere.md +1 -1
  111. package/docs/functions/jsonToMarkdownStr.md +1 -1
  112. package/docs/functions/loadFileFromPaths.md +1 -1
  113. package/docs/functions/loadTextFromPaths.md +1 -1
  114. package/docs/functions/lrucache.md +1 -1
  115. package/docs/functions/makeToolFuncCancelable.md +1 -1
  116. package/docs/functions/matchUrlProtocol.md +1 -1
  117. package/docs/functions/memoize.md +1 -1
  118. package/docs/functions/messagesToText.md +1 -1
  119. package/docs/functions/paramsSizeToScaleStr.md +1 -1
  120. package/docs/functions/parseCommand.md +3 -11
  121. package/docs/functions/parseFString.md +1 -1
  122. package/docs/functions/parseJsJson.md +3 -3
  123. package/docs/functions/parseJsJsonSimpleSync.md +23 -0
  124. package/docs/functions/parseObjectArgInfo.md +1 -1
  125. package/docs/functions/parseObjectArgumentInfos.md +1 -1
  126. package/docs/functions/parseObjectArguments.md +1 -1
  127. package/docs/functions/parseObjectArgumentsAsArgInfos.md +1 -1
  128. package/docs/functions/parseYaml.md +1 -1
  129. package/docs/functions/quoteStr.md +1 -1
  130. package/docs/functions/reControlCharsRegex.md +1 -1
  131. package/docs/functions/readFilenamesRecursiveSync.md +1 -1
  132. package/docs/functions/readTextFileChunks.md +51 -0
  133. package/docs/functions/readTextFileChunksEx.md +23 -0
  134. package/docs/functions/readableFromAsyncIterable.md +1 -1
  135. package/docs/functions/registerCoreTools.md +1 -1
  136. package/docs/functions/registerYamlTag.md +1 -1
  137. package/docs/functions/removeMarkdownBold.md +23 -0
  138. package/docs/functions/removeMarkdownBoldAndItalic.md +23 -0
  139. package/docs/functions/removeMarkdownItalic.md +23 -0
  140. package/docs/functions/replaceWithPlaceholder.md +41 -0
  141. package/docs/functions/restoreFromPlacehoders.md +45 -0
  142. package/docs/functions/sanitizeFilename.md +1 -1
  143. package/docs/functions/sanitizeFilepath.md +1 -1
  144. package/docs/functions/saveConfigFile.md +1 -1
  145. package/docs/functions/scaleStrToParamsSize.md +1 -1
  146. package/docs/functions/simplifyObjectArguments.md +1 -1
  147. package/docs/functions/sortedValues.md +1 -1
  148. package/docs/functions/splitChunks.md +23 -0
  149. package/docs/functions/splitParagraph.md +32 -0
  150. package/docs/functions/splitSentence.md +2 -2
  151. package/docs/functions/stringifyYaml.md +1 -1
  152. package/docs/functions/stripConsoleColor.md +21 -0
  153. package/docs/functions/textToDate.md +1 -1
  154. package/docs/functions/throwError.md +1 -1
  155. package/docs/functions/toDateTime.md +1 -1
  156. package/docs/functions/trimStartOfStreamHelper.md +1 -1
  157. package/docs/functions/truncTo.md +1 -1
  158. package/docs/functions/truncateByToken.md +23 -0
  159. package/docs/functions/truncateToTokenLimit.md +44 -0
  160. package/docs/functions/truncateToTokenLimitEx.md +23 -0
  161. package/docs/functions/uuid.md +1 -1
  162. package/docs/functions/wait.md +1 -1
  163. package/docs/functions/xxhash.md +2 -2
  164. package/docs/functions/xxhash32.md +1 -1
  165. package/docs/functions/xxhash64.md +1 -1
  166. package/docs/functions/xxhashAsStr.md +2 -2
  167. package/docs/globals.md +46 -1
  168. package/docs/interfaces/AIChatAssistantMessageParam.md +48 -6
  169. package/docs/interfaces/AIChatContentPartImage.md +2 -2
  170. package/docs/interfaces/AIChatContentPartText.md +2 -2
  171. package/docs/interfaces/AIChatMessageParamBase.md +31 -1
  172. package/docs/interfaces/AIChatMessageToolCall.md +3 -3
  173. package/docs/interfaces/AIChatSystemMessageParam.md +45 -3
  174. package/docs/interfaces/AIChatToolMessageParam.md +46 -4
  175. package/docs/interfaces/AIChatUserMessageParam.md +49 -7
  176. package/docs/interfaces/AIChoiceConfig.md +7 -7
  177. package/docs/interfaces/AIResult.md +5 -5
  178. package/docs/interfaces/AIStreamParser.md +1 -1
  179. package/docs/interfaces/AIStreamParserOptions.md +1 -1
  180. package/docs/interfaces/BaseFunc.md +9 -9
  181. package/docs/interfaces/BaseFuncItem.md +8 -8
  182. package/docs/interfaces/CancelableAbilityOptions.md +2 -2
  183. package/docs/interfaces/ClientFuncItem.md +11 -11
  184. package/docs/interfaces/DotenvExpandOptions.md +3 -3
  185. package/docs/interfaces/DotenvExpandOutput.md +2 -2
  186. package/docs/interfaces/EventClientFuncParams.md +4 -4
  187. package/docs/interfaces/EventServerFuncParams.md +5 -5
  188. package/docs/interfaces/FewShotPromptTemplateOptions.md +11 -11
  189. package/docs/interfaces/FuncItem.md +9 -9
  190. package/docs/interfaces/FuncParam.md +6 -6
  191. package/docs/interfaces/HashAlgoParams.md +37 -0
  192. package/docs/interfaces/IFileMetaInfo.md +77 -0
  193. package/docs/interfaces/IReadTextFileChunksOptions.md +157 -0
  194. package/docs/interfaces/ITruncateToTokenLimitOptions.md +111 -0
  195. package/docs/interfaces/ParseObjectArgumentOptions.md +55 -5
  196. package/docs/interfaces/PromptExampleSelectorOptions.md +2 -2
  197. package/docs/interfaces/PromptTemplateOptions.md +6 -6
  198. package/docs/interfaces/RemoteFuncItem.md +11 -11
  199. package/docs/interfaces/ReplacePlacehoderOptions.md +47 -0
  200. package/docs/interfaces/ResClientFuncParams.md +2 -2
  201. package/docs/interfaces/ResServerFuncParams.md +5 -5
  202. package/docs/interfaces/SanitizeFilenameOptions.md +2 -2
  203. package/docs/interfaces/SectionStringOptions.md +27 -0
  204. package/docs/interfaces/ServerFuncItem.md +12 -12
  205. package/docs/interfaces/ServerFuncParams.md +2 -2
  206. package/docs/interfaces/SplitSentenceOptions.md +47 -0
  207. package/docs/interfaces/StreamCallbacksAndOptions.md +4 -4
  208. package/docs/interfaces/TaskPromise.md +5 -5
  209. package/docs/interfaces/ToolFuncPackage.md +3 -3
  210. package/docs/type-aliases/AIChatContentPart.md +1 -1
  211. package/docs/type-aliases/AIChatMessageParam.md +1 -1
  212. package/docs/type-aliases/AIChatRole.md +1 -1
  213. package/docs/type-aliases/AIMessageType.md +1 -1
  214. package/docs/type-aliases/AIModelNameRule.md +1 -1
  215. package/docs/type-aliases/AIModelNameRuleFn.md +1 -1
  216. package/docs/type-aliases/AIModelNameRules.md +1 -1
  217. package/docs/type-aliases/AITextGenerationFinishReason.md +1 -1
  218. package/docs/type-aliases/ActionName.md +1 -1
  219. package/docs/type-aliases/AsyncTaskId.md +1 -1
  220. package/docs/type-aliases/EventErrorListenerFn.md +1 -1
  221. package/docs/type-aliases/EventListenerFn.md +1 -1
  222. package/docs/type-aliases/FStringPromptTemplateNode.md +1 -1
  223. package/docs/type-aliases/FuncParamType.md +1 -1
  224. package/docs/type-aliases/PromptExamples.md +1 -1
  225. package/docs/type-aliases/PromptTemplateType.md +1 -1
  226. package/docs/type-aliases/PromptType.md +1 -1
  227. package/docs/type-aliases/TFunc.md +1 -1
  228. package/docs/variables/AIChatRoles.md +1 -1
  229. package/docs/variables/AIMessageTypes.md +1 -1
  230. package/docs/variables/AITextGenerationFinishReasons.md +1 -1
  231. package/docs/variables/AbortErrorCode.md +1 -1
  232. package/docs/variables/ActionNames.md +1 -1
  233. package/docs/variables/AlreadyExistsErrorCode.md +1 -1
  234. package/docs/variables/ClientToolFuncSchema.md +1 -1
  235. package/docs/variables/DefaultAsyncSemaphoreCapacity.md +1 -1
  236. package/docs/variables/EventBusName.md +1 -1
  237. package/docs/variables/EventName.md +1 -1
  238. package/docs/variables/FilenameReservedRegex.md +1 -1
  239. package/docs/variables/HFBuiltins.md +1 -1
  240. package/docs/variables/InternalErrorCode.md +1 -1
  241. package/docs/variables/LLM_TOKENIZER_NAMES.md +83 -0
  242. package/docs/variables/LLM_TOKENIZER_NAMES_MAP.md +13 -0
  243. package/docs/variables/NotFoundErrorCode.md +1 -1
  244. package/docs/variables/NotImplementedErrorCode.md +1 -1
  245. package/docs/variables/PASSING_SCORE.md +1 -1
  246. package/docs/variables/PromptTemplateTypes.md +1 -1
  247. package/docs/variables/PromptTypes.md +1 -1
  248. package/docs/variables/RStreamErrCode.md +1 -1
  249. package/docs/variables/RemoteToolFuncSchema.md +1 -1
  250. package/docs/variables/ResponseRStreamErrCode.md +1 -1
  251. package/docs/variables/SSEChannelAlreadyClosedErrCode.md +1 -1
  252. package/docs/variables/ServerToolFuncSchema.md +1 -1
  253. package/docs/variables/ToolAsyncCancelableBit.md +1 -1
  254. package/docs/variables/ToolAsyncMultiTaskBit.md +1 -1
  255. package/docs/variables/ToolAsyncPriorityBit.md +1 -1
  256. package/docs/variables/ToolFuncSchema.md +1 -1
  257. package/docs/variables/WindowsReservedNameRegex.md +1 -1
  258. package/docs/variables/base32768.md +1 -1
  259. package/docs/variables/defaultTemplateFormat.md +1 -1
  260. package/docs/variables/event.md +1 -1
  261. package/docs/variables/eventClient.md +1 -1
  262. package/docs/variables/eventServer.md +1 -1
  263. package/docs/variables/lrucache.md +1 -1
  264. package/package.json +7 -3
  265. package/dist/chunk-FLVJ4R53.mjs +0 -1
  266. package/docs/enumerations/XXHashAlgorithm.md +0 -27
  267. /package/dist/{chunk-PXQPLL62.mjs → chunk-VIG2GB47.mjs} +0 -0
@@ -0,0 +1,44 @@
1
+ [**@isdk/ai-tool**](../README.md) • **Docs**
2
+
3
+ ***
4
+
5
+ [@isdk/ai-tool](../globals.md) / truncateToTokenLimit
6
+
7
+ # Function: truncateToTokenLimit()
8
+
9
+ > **truncateToTokenLimit**(`content`, `options`?): `Promise`\<`string`\>
10
+
11
+ Truncates the given content to fit within a specified token limit by removing sentences from the end.
12
+ This function is suitable for text content with multiple sentences.
13
+
14
+ ## Parameters
15
+
16
+ • **content**: `string`
17
+
18
+ The original text content to be processed.
19
+
20
+ • **options?**: [`ITruncateToTokenLimitOptions`](../interfaces/ITruncateToTokenLimitOptions.md)
21
+
22
+ Optional configuration including model ID and size limit.
23
+
24
+ ## Returns
25
+
26
+ `Promise`\<`string`\>
27
+
28
+ The truncated text content.
29
+
30
+ ## Example
31
+
32
+ ```typescript
33
+ const text = "This is an example text that will be truncated to fit within the token limit. It contains multiple sentences. Each sentence will be removed until the content fits within the specified token limit. This is the fourth sentence. This is the fifth sentence.";
34
+ const truncatedText = await truncateToTokenLimit(text, { modelId: "exampleModel", size: 50 });
35
+ console.log(truncatedText); // Output may be the truncated text
36
+ ```
37
+
38
+ ## Warning
39
+
40
+ This function is designed for text content with multiple sentences.
41
+
42
+ ## Defined in
43
+
44
+ [packages/ai-tool/src/utils/truncate-to-token-limit.ts:31](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/truncate-to-token-limit.ts#L31)
@@ -0,0 +1,23 @@
1
+ [**@isdk/ai-tool**](../README.md) • **Docs**
2
+
3
+ ***
4
+
5
+ [@isdk/ai-tool](../globals.md) / truncateToTokenLimitEx
6
+
7
+ # Function: truncateToTokenLimitEx()
8
+
9
+ > **truncateToTokenLimitEx**(`sentences`, `options`?): `Promise`\<`string`[]\>
10
+
11
+ ## Parameters
12
+
13
+ • **sentences**: `string`[]
14
+
15
+ • **options?**: [`ITruncateToTokenLimitOptions`](../interfaces/ITruncateToTokenLimitOptions.md)
16
+
17
+ ## Returns
18
+
19
+ `Promise`\<`string`[]\>
20
+
21
+ ## Defined in
22
+
23
+ [packages/ai-tool/src/utils/truncate-to-token-limit.ts:111](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/truncate-to-token-limit.ts#L111)
@@ -20,4 +20,4 @@
20
20
 
21
21
  ## Defined in
22
22
 
23
- [packages/ai-tool/src/utils/hash/uuid.ts:8](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/hash/uuid.ts#L8)
23
+ [packages/ai-tool/src/utils/hash/uuid.ts:8](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/hash/uuid.ts#L8)
@@ -18,4 +18,4 @@
18
18
 
19
19
  ## Defined in
20
20
 
21
- [packages/ai-tool/src/utils/wait.ts:1](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/wait.ts#L1)
21
+ [packages/ai-tool/src/utils/wait.ts:1](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/wait.ts#L1)
@@ -12,7 +12,7 @@
12
12
 
13
13
  • **value**: `HashValue`
14
14
 
15
- • **hashAlgo**: [`XXHashAlgorithm`](../enumerations/XXHashAlgorithm.md) = `XXHashAlgorithm.xxhash64`
15
+ • **hashAlgo**: [`HashAlgorithm`](../enumerations/HashAlgorithm.md) = `HashAlgorithm.xxhash64`
16
16
 
17
17
  • **seed**: `number` = `SEED`
18
18
 
@@ -22,4 +22,4 @@
22
22
 
23
23
  ## Defined in
24
24
 
25
- [packages/ai-tool/src/utils/hash/xxhash.ts:32](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/hash/xxhash.ts#L32)
25
+ [packages/ai-tool/src/utils/hash/xxhash.ts:54](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/hash/xxhash.ts#L54)
@@ -20,4 +20,4 @@
20
20
 
21
21
  ## Defined in
22
22
 
23
- [packages/ai-tool/src/utils/hash/xxhash.ts:11](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/hash/xxhash.ts#L11)
23
+ [packages/ai-tool/src/utils/hash/xxhash.ts:12](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/hash/xxhash.ts#L12)
@@ -20,4 +20,4 @@
20
20
 
21
21
  ## Defined in
22
22
 
23
- [packages/ai-tool/src/utils/hash/xxhash.ts:18](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/hash/xxhash.ts#L18)
23
+ [packages/ai-tool/src/utils/hash/xxhash.ts:19](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/hash/xxhash.ts#L19)
@@ -12,7 +12,7 @@
12
12
 
13
13
  • **value**: `string` \| `Uint8Array`
14
14
 
15
- • **hashAlgo**: [`XXHashAlgorithm`](../enumerations/XXHashAlgorithm.md) = `XXHashAlgorithm.xxhash64`
15
+ • **hashAlgo**: [`HashAlgorithm`](../enumerations/HashAlgorithm.md) = `HashAlgorithm.xxhash64`
16
16
 
17
17
  • **seed**: `number` = `SEED`
18
18
 
@@ -22,4 +22,4 @@
22
22
 
23
23
  ## Defined in
24
24
 
25
- [packages/ai-tool/src/utils/hash/xxhash.ts:48](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/hash/xxhash.ts#L48)
25
+ [packages/ai-tool/src/utils/hash/xxhash.ts:70](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/hash/xxhash.ts#L70)
package/docs/globals.md CHANGED
@@ -16,7 +16,7 @@
16
16
  - [AsyncFeatureBits](enumerations/AsyncFeatureBits.md)
17
17
  - [AsyncFeatures](enumerations/AsyncFeatures.md)
18
18
  - [ErrorCode](enumerations/ErrorCode.md)
19
- - [XXHashAlgorithm](enumerations/XXHashAlgorithm.md)
19
+ - [HashAlgorithm](enumerations/HashAlgorithm.md)
20
20
  - [AbortError](classes/AbortError.md)
21
21
  - [AlreadyExistsError](classes/AlreadyExistsError.md)
22
22
  - [BaseError](classes/BaseError.md)
@@ -47,6 +47,7 @@
47
47
  - [SSEChannel](classes/SSEChannel.md)
48
48
  - [TaskAbortController](classes/TaskAbortController.md)
49
49
  - [ToolFunc](classes/ToolFunc.md)
50
+ - [YamlTypeBaseObject](classes/YamlTypeBaseObject.md)
50
51
  - [AIChatAssistantMessageParam](interfaces/AIChatAssistantMessageParam.md)
51
52
  - [AIChatContentPartImage](interfaces/AIChatContentPartImage.md)
52
53
  - [AIChatContentPartText](interfaces/AIChatContentPartText.md)
@@ -75,16 +76,23 @@
75
76
  - [FuncParam](interfaces/FuncParam.md)
76
77
  - [FuncParams](interfaces/FuncParams.md)
77
78
  - [Funcs](interfaces/Funcs.md)
79
+ - [HashAlgoParams](interfaces/HashAlgoParams.md)
80
+ - [IFileMetaInfo](interfaces/IFileMetaInfo.md)
81
+ - [IReadTextFileChunksOptions](interfaces/IReadTextFileChunksOptions.md)
82
+ - [ITruncateToTokenLimitOptions](interfaces/ITruncateToTokenLimitOptions.md)
78
83
  - [JsonFilter](interfaces/JsonFilter.md)
79
84
  - [ParseObjectArgumentOptions](interfaces/ParseObjectArgumentOptions.md)
80
85
  - [PromptExampleSelectorOptions](interfaces/PromptExampleSelectorOptions.md)
81
86
  - [PromptTemplateOptions](interfaces/PromptTemplateOptions.md)
82
87
  - [RemoteFuncItem](interfaces/RemoteFuncItem.md)
88
+ - [ReplacePlacehoderOptions](interfaces/ReplacePlacehoderOptions.md)
83
89
  - [ResClientFuncParams](interfaces/ResClientFuncParams.md)
84
90
  - [ResServerFuncParams](interfaces/ResServerFuncParams.md)
85
91
  - [SanitizeFilenameOptions](interfaces/SanitizeFilenameOptions.md)
92
+ - [SectionStringOptions](interfaces/SectionStringOptions.md)
86
93
  - [ServerFuncItem](interfaces/ServerFuncItem.md)
87
94
  - [ServerFuncParams](interfaces/ServerFuncParams.md)
95
+ - [SplitSentenceOptions](interfaces/SplitSentenceOptions.md)
88
96
  - [StreamCallbacksAndOptions](interfaces/StreamCallbacksAndOptions.md)
89
97
  - [TaskAbortControllers](interfaces/TaskAbortControllers.md)
90
98
  - [TaskPromise](interfaces/TaskPromise.md)
@@ -125,6 +133,8 @@
125
133
  - [FilenameReservedRegex](variables/FilenameReservedRegex.md)
126
134
  - [HFBuiltins](variables/HFBuiltins.md)
127
135
  - [InternalErrorCode](variables/InternalErrorCode.md)
136
+ - [LLM\_TOKENIZER\_NAMES](variables/LLM_TOKENIZER_NAMES.md)
137
+ - [LLM\_TOKENIZER\_NAMES\_MAP](variables/LLM_TOKENIZER_NAMES_MAP.md)
128
138
  - [lrucache](variables/lrucache.md)
129
139
  - [mimeType](variables/mimeType.md)
130
140
  - [NotFoundErrorCode](variables/NotFoundErrorCode.md)
@@ -149,6 +159,9 @@
149
159
  - [backendEventable](functions/backendEventable.md)
150
160
  - [canonicalize](functions/canonicalize.md)
151
161
  - [ChoiceArgProcessor](functions/ChoiceArgProcessor.md)
162
+ - [completeSentences](functions/completeSentences.md)
163
+ - [concatText](functions/concatText.md)
164
+ - [countLLMTokens](functions/countLLMTokens.md)
152
165
  - [countRegexMatches](functions/countRegexMatches.md)
153
166
  - [createAbilityInjector](functions/createAbilityInjector.md)
154
167
  - [createCallbacksTransformer](functions/createCallbacksTransformer.md)
@@ -158,31 +171,49 @@
158
171
  - [createEventStreamTransformer](functions/createEventStreamTransformer.md)
159
172
  - [createHfValueFunc](functions/createHfValueFunc.md)
160
173
  - [createLRUCache](functions/createLRUCache.md)
174
+ - [createYamlObjectTag](functions/createYamlObjectTag.md)
161
175
  - [dateToText](functions/dateToText.md)
176
+ - [decodeCharset](functions/decodeCharset.md)
177
+ - [detectCharset](functions/detectCharset.md)
178
+ - [encodeLLMTokens](functions/encodeLLMTokens.md)
162
179
  - [expandEnv](functions/expandEnv.md)
163
180
  - [expandObjEnv](functions/expandObjEnv.md)
164
181
  - [extNameLevel](functions/extNameLevel.md)
165
182
  - [fileIsExists](functions/fileIsExists.md)
166
183
  - [filenameReservedRegex](functions/filenameReservedRegex.md)
167
184
  - [filterValidFnScope](functions/filterValidFnScope.md)
185
+ - [findIndexNonEmptyFrom](functions/findIndexNonEmptyFrom.md)
168
186
  - [findPort](functions/findPort.md)
187
+ - [formatTextWithSpace](functions/formatTextWithSpace.md)
169
188
  - [getAllEnumKeys](functions/getAllEnumKeys.md)
170
189
  - [getConfigFileNames](functions/getConfigFileNames.md)
171
190
  - [getConfigs](functions/getConfigs.md)
191
+ - [getFileMetaInfo](functions/getFileMetaInfo.md)
192
+ - [getHashAlgoBySize](functions/getHashAlgoBySize.md)
172
193
  - [getKeysPath](functions/getKeysPath.md)
194
+ - [getLLMTokenizer](functions/getLLMTokenizer.md)
173
195
  - [getMultiLevelExtname](functions/getMultiLevelExtname.md)
174
196
  - [getPackageDir](functions/getPackageDir.md)
175
197
  - [getRealFilepath](functions/getRealFilepath.md)
176
198
  - [getResponseErrorReadableStream](functions/getResponseErrorReadableStream.md)
177
199
  - [hasDirectoryIn](functions/hasDirectoryIn.md)
200
+ - [hashFile](functions/hashFile.md)
201
+ - [hashStream](functions/hashStream.md)
178
202
  - [hfParse](functions/hfParse.md)
179
203
  - [hfTokenize](functions/hfTokenize.md)
180
204
  - [interpolateEnv](functions/interpolateEnv.md)
181
205
  - [interpolateFString](functions/interpolateFString.md)
182
206
  - [interpolateGolangTemplate](functions/interpolateGolangTemplate.md)
207
+ - [isLangUsingSpaces](functions/isLangUsingSpaces.md)
208
+ - [isListItemString](functions/isListItemString.md)
183
209
  - [isModelNameMatched](functions/isModelNameMatched.md)
210
+ - [isPunctuationChar](functions/isPunctuationChar.md)
184
211
  - [isRegExp](functions/isRegExp.md)
212
+ - [isSectionString](functions/isSectionString.md)
213
+ - [isSentenceEnding](functions/isSentenceEnding.md)
214
+ - [isSepLineString](functions/isSepLineString.md)
185
215
  - [isSubdirectory](functions/isSubdirectory.md)
216
+ - [isTitleString](functions/isTitleString.md)
186
217
  - [isValidFilename](functions/isValidFilename.md)
187
218
  - [isValidFilepath](functions/isValidFilepath.md)
188
219
  - [isWebStream](functions/isWebStream.md)
@@ -198,6 +229,7 @@
198
229
  - [parseCommand](functions/parseCommand.md)
199
230
  - [parseFString](functions/parseFString.md)
200
231
  - [parseJsJson](functions/parseJsJson.md)
232
+ - [parseJsJsonSimpleSync](functions/parseJsJsonSimpleSync.md)
201
233
  - [parseObjectArgInfo](functions/parseObjectArgInfo.md)
202
234
  - [parseObjectArgumentInfos](functions/parseObjectArgumentInfos.md)
203
235
  - [parseObjectArguments](functions/parseObjectArguments.md)
@@ -207,23 +239,36 @@
207
239
  - [RateLimit](functions/RateLimit.md)
208
240
  - [readableFromAsyncIterable](functions/readableFromAsyncIterable.md)
209
241
  - [readFilenamesRecursiveSync](functions/readFilenamesRecursiveSync.md)
242
+ - [readTextFileChunks](functions/readTextFileChunks.md)
243
+ - [readTextFileChunksEx](functions/readTextFileChunksEx.md)
210
244
  - [reControlCharsRegex](functions/reControlCharsRegex.md)
211
245
  - [registerCoreTools](functions/registerCoreTools.md)
212
246
  - [registerYamlTag](functions/registerYamlTag.md)
247
+ - [removeMarkdownBold](functions/removeMarkdownBold.md)
248
+ - [removeMarkdownBoldAndItalic](functions/removeMarkdownBoldAndItalic.md)
249
+ - [removeMarkdownItalic](functions/removeMarkdownItalic.md)
250
+ - [replaceWithPlaceholder](functions/replaceWithPlaceholder.md)
251
+ - [restoreFromPlacehoders](functions/restoreFromPlacehoders.md)
213
252
  - [sanitizeFilename](functions/sanitizeFilename.md)
214
253
  - [sanitizeFilepath](functions/sanitizeFilepath.md)
215
254
  - [saveConfigFile](functions/saveConfigFile.md)
216
255
  - [scaleStrToParamsSize](functions/scaleStrToParamsSize.md)
217
256
  - [simplifyObjectArguments](functions/simplifyObjectArguments.md)
218
257
  - [sortedValues](functions/sortedValues.md)
258
+ - [splitChunks](functions/splitChunks.md)
259
+ - [splitParagraph](functions/splitParagraph.md)
219
260
  - [splitSentence](functions/splitSentence.md)
220
261
  - [stringifyYaml](functions/stringifyYaml.md)
262
+ - [stripConsoleColor](functions/stripConsoleColor.md)
221
263
  - [TemplateArgProcessor](functions/TemplateArgProcessor.md)
222
264
  - [textToDate](functions/textToDate.md)
223
265
  - [throwError](functions/throwError.md)
224
266
  - [toDateTime](functions/toDateTime.md)
225
267
  - [toRegExp](functions/toRegExp.md)
226
268
  - [trimStartOfStreamHelper](functions/trimStartOfStreamHelper.md)
269
+ - [truncateByToken](functions/truncateByToken.md)
270
+ - [truncateToTokenLimit](functions/truncateToTokenLimit.md)
271
+ - [truncateToTokenLimitEx](functions/truncateToTokenLimitEx.md)
227
272
  - [truncTo](functions/truncTo.md)
228
273
  - [uuid](functions/uuid.md)
229
274
  - [uuidParse](functions/uuidParse.md)
@@ -18,7 +18,7 @@
18
18
 
19
19
  #### Defined in
20
20
 
21
- [packages/ai-tool/src/utils/chat.ts:94](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/chat.ts#L94)
21
+ [packages/ai-tool/src/utils/chat.ts:97](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L97)
22
22
 
23
23
  ***
24
24
 
@@ -28,7 +28,35 @@
28
28
 
29
29
  #### Defined in
30
30
 
31
- [packages/ai-tool/src/utils/chat.ts:97](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/chat.ts#L97)
31
+ [packages/ai-tool/src/utils/chat.ts:100](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L100)
32
+
33
+ ***
34
+
35
+ ### private?
36
+
37
+ > `optional` **private**: `boolean`
38
+
39
+ #### Inherited from
40
+
41
+ [`AIChatMessageParamBase`](AIChatMessageParamBase.md).[`private`](AIChatMessageParamBase.md#private)
42
+
43
+ #### Defined in
44
+
45
+ [packages/ai-tool/src/utils/chat.ts:56](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L56)
46
+
47
+ ***
48
+
49
+ ### replies?
50
+
51
+ > `optional` **replies**: `Record`\<`string`, `Partial`\<[`AIChatMessageParam`](../type-aliases/AIChatMessageParam.md)\>\>
52
+
53
+ #### Inherited from
54
+
55
+ [`AIChatMessageParamBase`](AIChatMessageParamBase.md).[`replies`](AIChatMessageParamBase.md#replies)
56
+
57
+ #### Defined in
58
+
59
+ [packages/ai-tool/src/utils/chat.ts:55](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L55)
32
60
 
33
61
  ***
34
62
 
@@ -42,7 +70,7 @@
42
70
 
43
71
  #### Defined in
44
72
 
45
- [packages/ai-tool/src/utils/chat.ts:93](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/chat.ts#L93)
73
+ [packages/ai-tool/src/utils/chat.ts:96](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L96)
46
74
 
47
75
  ***
48
76
 
@@ -52,7 +80,7 @@
52
80
 
53
81
  #### Defined in
54
82
 
55
- [packages/ai-tool/src/utils/chat.ts:99](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/chat.ts#L99)
83
+ [packages/ai-tool/src/utils/chat.ts:102](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L102)
56
84
 
57
85
  ***
58
86
 
@@ -62,7 +90,21 @@
62
90
 
63
91
  #### Defined in
64
92
 
65
- [packages/ai-tool/src/utils/chat.ts:95](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/chat.ts#L95)
93
+ [packages/ai-tool/src/utils/chat.ts:98](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L98)
94
+
95
+ ***
96
+
97
+ ### toRole?
98
+
99
+ > `optional` **toRole**: `string` \| `string`[] \| `Record`\<`string`, `Partial`\<[`AIChatMessageParam`](../type-aliases/AIChatMessageParam.md)\>\>
100
+
101
+ #### Inherited from
102
+
103
+ [`AIChatMessageParamBase`](AIChatMessageParamBase.md).[`toRole`](AIChatMessageParamBase.md#torole)
104
+
105
+ #### Defined in
106
+
107
+ [packages/ai-tool/src/utils/chat.ts:54](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L54)
66
108
 
67
109
  ***
68
110
 
@@ -72,4 +114,4 @@
72
114
 
73
115
  #### Defined in
74
116
 
75
- [packages/ai-tool/src/utils/chat.ts:98](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/chat.ts#L98)
117
+ [packages/ai-tool/src/utils/chat.ts:101](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L101)
@@ -18,7 +18,7 @@
18
18
 
19
19
  #### Defined in
20
20
 
21
- [packages/ai-tool/src/utils/chat.ts:82](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/chat.ts#L82)
21
+ [packages/ai-tool/src/utils/chat.ts:85](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L85)
22
22
 
23
23
  ***
24
24
 
@@ -28,4 +28,4 @@
28
28
 
29
29
  #### Defined in
30
30
 
31
- [packages/ai-tool/src/utils/chat.ts:81](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/chat.ts#L81)
31
+ [packages/ai-tool/src/utils/chat.ts:84](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L84)
@@ -14,7 +14,7 @@
14
14
 
15
15
  #### Defined in
16
16
 
17
- [packages/ai-tool/src/utils/chat.ts:89](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/chat.ts#L89)
17
+ [packages/ai-tool/src/utils/chat.ts:92](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L92)
18
18
 
19
19
  ***
20
20
 
@@ -24,4 +24,4 @@
24
24
 
25
25
  #### Defined in
26
26
 
27
- [packages/ai-tool/src/utils/chat.ts:88](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/chat.ts#L88)
27
+ [packages/ai-tool/src/utils/chat.ts:91](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L91)
@@ -19,10 +19,40 @@
19
19
 
20
20
  ## Properties
21
21
 
22
+ ### private?
23
+
24
+ > `optional` **private**: `boolean`
25
+
26
+ #### Defined in
27
+
28
+ [packages/ai-tool/src/utils/chat.ts:56](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L56)
29
+
30
+ ***
31
+
32
+ ### replies?
33
+
34
+ > `optional` **replies**: `Record`\<`string`, `Partial`\<[`AIChatMessageParam`](../type-aliases/AIChatMessageParam.md)\>\>
35
+
36
+ #### Defined in
37
+
38
+ [packages/ai-tool/src/utils/chat.ts:55](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L55)
39
+
40
+ ***
41
+
22
42
  ### role
23
43
 
24
44
  > **role**: `string`
25
45
 
26
46
  #### Defined in
27
47
 
28
- [packages/ai-tool/src/utils/chat.ts:53](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/chat.ts#L53)
48
+ [packages/ai-tool/src/utils/chat.ts:53](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L53)
49
+
50
+ ***
51
+
52
+ ### toRole?
53
+
54
+ > `optional` **toRole**: `string` \| `string`[] \| `Record`\<`string`, `Partial`\<[`AIChatMessageParam`](../type-aliases/AIChatMessageParam.md)\>\>
55
+
56
+ #### Defined in
57
+
58
+ [packages/ai-tool/src/utils/chat.ts:54](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L54)
@@ -22,7 +22,7 @@
22
22
 
23
23
  #### Defined in
24
24
 
25
- [packages/ai-tool/src/utils/chat.ts:105](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/chat.ts#L105)
25
+ [packages/ai-tool/src/utils/chat.ts:108](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L108)
26
26
 
27
27
  ***
28
28
 
@@ -32,7 +32,7 @@
32
32
 
33
33
  #### Defined in
34
34
 
35
- [packages/ai-tool/src/utils/chat.ts:104](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/chat.ts#L104)
35
+ [packages/ai-tool/src/utils/chat.ts:107](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L107)
36
36
 
37
37
  ***
38
38
 
@@ -42,4 +42,4 @@
42
42
 
43
43
  #### Defined in
44
44
 
45
- [packages/ai-tool/src/utils/chat.ts:103](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/chat.ts#L103)
45
+ [packages/ai-tool/src/utils/chat.ts:106](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L106)
@@ -18,7 +18,35 @@
18
18
 
19
19
  #### Defined in
20
20
 
21
- [packages/ai-tool/src/utils/chat.ts:59](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/chat.ts#L59)
21
+ [packages/ai-tool/src/utils/chat.ts:62](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L62)
22
+
23
+ ***
24
+
25
+ ### private?
26
+
27
+ > `optional` **private**: `boolean`
28
+
29
+ #### Inherited from
30
+
31
+ [`AIChatMessageParamBase`](AIChatMessageParamBase.md).[`private`](AIChatMessageParamBase.md#private)
32
+
33
+ #### Defined in
34
+
35
+ [packages/ai-tool/src/utils/chat.ts:56](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L56)
36
+
37
+ ***
38
+
39
+ ### replies?
40
+
41
+ > `optional` **replies**: `Record`\<`string`, `Partial`\<[`AIChatMessageParam`](../type-aliases/AIChatMessageParam.md)\>\>
42
+
43
+ #### Inherited from
44
+
45
+ [`AIChatMessageParamBase`](AIChatMessageParamBase.md).[`replies`](AIChatMessageParamBase.md#replies)
46
+
47
+ #### Defined in
48
+
49
+ [packages/ai-tool/src/utils/chat.ts:55](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L55)
22
50
 
23
51
  ***
24
52
 
@@ -32,7 +60,7 @@
32
60
 
33
61
  #### Defined in
34
62
 
35
- [packages/ai-tool/src/utils/chat.ts:58](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/chat.ts#L58)
63
+ [packages/ai-tool/src/utils/chat.ts:61](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L61)
36
64
 
37
65
  ***
38
66
 
@@ -42,4 +70,18 @@
42
70
 
43
71
  #### Defined in
44
72
 
45
- [packages/ai-tool/src/utils/chat.ts:60](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/chat.ts#L60)
73
+ [packages/ai-tool/src/utils/chat.ts:63](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L63)
74
+
75
+ ***
76
+
77
+ ### toRole?
78
+
79
+ > `optional` **toRole**: `string` \| `string`[] \| `Record`\<`string`, `Partial`\<[`AIChatMessageParam`](../type-aliases/AIChatMessageParam.md)\>\>
80
+
81
+ #### Inherited from
82
+
83
+ [`AIChatMessageParamBase`](AIChatMessageParamBase.md).[`toRole`](AIChatMessageParamBase.md#torole)
84
+
85
+ #### Defined in
86
+
87
+ [packages/ai-tool/src/utils/chat.ts:54](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L54)
@@ -18,7 +18,35 @@
18
18
 
19
19
  #### Defined in
20
20
 
21
- [packages/ai-tool/src/utils/chat.ts:113](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/chat.ts#L113)
21
+ [packages/ai-tool/src/utils/chat.ts:116](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L116)
22
+
23
+ ***
24
+
25
+ ### private?
26
+
27
+ > `optional` **private**: `boolean`
28
+
29
+ #### Inherited from
30
+
31
+ [`AIChatMessageParamBase`](AIChatMessageParamBase.md).[`private`](AIChatMessageParamBase.md#private)
32
+
33
+ #### Defined in
34
+
35
+ [packages/ai-tool/src/utils/chat.ts:56](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L56)
36
+
37
+ ***
38
+
39
+ ### replies?
40
+
41
+ > `optional` **replies**: `Record`\<`string`, `Partial`\<[`AIChatMessageParam`](../type-aliases/AIChatMessageParam.md)\>\>
42
+
43
+ #### Inherited from
44
+
45
+ [`AIChatMessageParamBase`](AIChatMessageParamBase.md).[`replies`](AIChatMessageParamBase.md#replies)
46
+
47
+ #### Defined in
48
+
49
+ [packages/ai-tool/src/utils/chat.ts:55](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L55)
22
50
 
23
51
  ***
24
52
 
@@ -32,7 +60,7 @@
32
60
 
33
61
  #### Defined in
34
62
 
35
- [packages/ai-tool/src/utils/chat.ts:112](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/chat.ts#L112)
63
+ [packages/ai-tool/src/utils/chat.ts:115](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L115)
36
64
 
37
65
  ***
38
66
 
@@ -42,7 +70,7 @@
42
70
 
43
71
  #### Defined in
44
72
 
45
- [packages/ai-tool/src/utils/chat.ts:115](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/chat.ts#L115)
73
+ [packages/ai-tool/src/utils/chat.ts:118](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L118)
46
74
 
47
75
  ***
48
76
 
@@ -52,4 +80,18 @@
52
80
 
53
81
  #### Defined in
54
82
 
55
- [packages/ai-tool/src/utils/chat.ts:114](https://github.com/isdk/ai-tool.js/blob/fe6b47f429fb128627d2210e367fa914b891d314/src/utils/chat.ts#L114)
83
+ [packages/ai-tool/src/utils/chat.ts:117](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L117)
84
+
85
+ ***
86
+
87
+ ### toRole?
88
+
89
+ > `optional` **toRole**: `string` \| `string`[] \| `Record`\<`string`, `Partial`\<[`AIChatMessageParam`](../type-aliases/AIChatMessageParam.md)\>\>
90
+
91
+ #### Inherited from
92
+
93
+ [`AIChatMessageParamBase`](AIChatMessageParamBase.md).[`toRole`](AIChatMessageParamBase.md#torole)
94
+
95
+ #### Defined in
96
+
97
+ [packages/ai-tool/src/utils/chat.ts:54](https://github.com/isdk/ai-tool.js/blob/b0813174e9b350ae47231f8e5f885150313123b0/src/utils/chat.ts#L54)