@futdevpro/nts-dynamo 1.12.15 → 1.14.1

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 (247) hide show
  1. package/build/_modules/ai/_models/ai-input-interfaces.d.ts +61 -0
  2. package/build/_modules/ai/_models/ai-input-interfaces.d.ts.map +1 -0
  3. package/build/_modules/{open-ai/_models/interfaces/oai-document-page.interface.js → ai/_models/ai-input-interfaces.js} +1 -1
  4. package/build/_modules/ai/_models/ai-input-interfaces.js.map +1 -0
  5. package/build/_modules/{open-ai/_collections/oai-chunking.util.d.ts → ai/_modules/document-ai/_collections/dai-chunking.util.d.ts} +10 -10
  6. package/build/_modules/ai/_modules/document-ai/_collections/dai-chunking.util.d.ts.map +1 -0
  7. package/build/_modules/{open-ai/_collections/oai-chunking.util.js → ai/_modules/document-ai/_collections/dai-chunking.util.js} +58 -41
  8. package/build/_modules/ai/_modules/document-ai/_collections/dai-chunking.util.js.map +1 -0
  9. package/build/_modules/ai/_modules/document-ai/_collections/dai-document.util.d.ts +29 -0
  10. package/build/_modules/ai/_modules/document-ai/_collections/dai-document.util.d.ts.map +1 -0
  11. package/build/_modules/ai/_modules/document-ai/_collections/dai-document.util.js +74 -0
  12. package/build/_modules/ai/_modules/document-ai/_collections/dai-document.util.js.map +1 -0
  13. package/build/_modules/ai/_modules/document-ai/_enums/dai-compare-result-type.enum.d.ts +7 -0
  14. package/build/_modules/ai/_modules/document-ai/_enums/dai-compare-result-type.enum.d.ts.map +1 -0
  15. package/build/_modules/ai/_modules/document-ai/_enums/dai-compare-result-type.enum.js +11 -0
  16. package/build/_modules/ai/_modules/document-ai/_enums/dai-compare-result-type.enum.js.map +1 -0
  17. package/build/_modules/{open-ai/_models/oai-doc-chunk.data-model.d.ts → ai/_modules/document-ai/_models/data-models/dai-doc-chunk.data-model.d.ts} +25 -13
  18. package/build/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-chunk.data-model.d.ts.map +1 -0
  19. package/build/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-chunk.data-model.js +132 -0
  20. package/build/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-chunk.data-model.js.map +1 -0
  21. package/build/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-page.data-model.d.ts +29 -0
  22. package/build/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-page.data-model.d.ts.map +1 -0
  23. package/build/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-page.data-model.js +112 -0
  24. package/build/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-page.data-model.js.map +1 -0
  25. package/build/_modules/ai/_modules/document-ai/_models/data-models/dai-document.data-model.d.ts +18 -0
  26. package/build/_modules/ai/_modules/document-ai/_models/data-models/dai-document.data-model.d.ts.map +1 -0
  27. package/build/_modules/ai/_modules/document-ai/_models/data-models/dai-document.data-model.js +71 -0
  28. package/build/_modules/ai/_modules/document-ai/_models/data-models/dai-document.data-model.js.map +1 -0
  29. package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-doc-chunk-compare-result.interface.d.ts +9 -0
  30. package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-doc-chunk-compare-result.interface.d.ts.map +1 -0
  31. package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-doc-chunk-compare-result.interface.js +3 -0
  32. package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-doc-chunk-compare-result.interface.js.map +1 -0
  33. package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-doc-page-compare-result.interface.d.ts +12 -0
  34. package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-doc-page-compare-result.interface.d.ts.map +1 -0
  35. package/build/_modules/{open-ai/_models/interfaces/oai-chunk-compare-result.interface.js → ai/_modules/document-ai/_models/interfaces/dai-doc-page-compare-result.interface.js} +1 -1
  36. package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-doc-page-compare-result.interface.js.map +1 -0
  37. package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-document-compare-result.interface.d.ts +13 -0
  38. package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-document-compare-result.interface.d.ts.map +1 -0
  39. package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-document-compare-result.interface.js +3 -0
  40. package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-document-compare-result.interface.js.map +1 -0
  41. package/build/_modules/ai/_modules/document-ai/index.d.ts +11 -0
  42. package/build/_modules/ai/_modules/document-ai/index.d.ts.map +1 -0
  43. package/build/_modules/ai/_modules/document-ai/index.js +26 -0
  44. package/build/_modules/ai/_modules/document-ai/index.js.map +1 -0
  45. package/build/_modules/ai/_modules/open-ai/_collections/oai-global-settings.const.d.ts.map +1 -0
  46. package/build/_modules/{open-ai → ai/_modules/open-ai}/_collections/oai-global-settings.const.js +2 -2
  47. package/build/_modules/ai/_modules/open-ai/_collections/oai-global-settings.const.js.map +1 -0
  48. package/build/_modules/ai/_modules/open-ai/_collections/oai-llm-predefined-requests-hu.conts.d.ts.map +1 -0
  49. package/build/_modules/ai/_modules/open-ai/_collections/oai-llm-predefined-requests-hu.conts.js.map +1 -0
  50. package/build/_modules/ai/_modules/open-ai/_collections/oai-llm-predefined-requests.conts.d.ts.map +1 -0
  51. package/build/_modules/ai/_modules/open-ai/_collections/oai-llm-predefined-requests.conts.js.map +1 -0
  52. package/build/_modules/ai/_modules/open-ai/_enums/oai-gpt-message-role.enum.d.ts.map +1 -0
  53. package/build/_modules/ai/_modules/open-ai/_enums/oai-gpt-message-role.enum.js.map +1 -0
  54. package/build/_modules/ai/_modules/open-ai/_models/interfaces/oai-global-settings.interface.d.ts +6 -0
  55. package/build/_modules/ai/_modules/open-ai/_models/interfaces/oai-global-settings.interface.d.ts.map +1 -0
  56. package/build/_modules/ai/_modules/open-ai/_models/interfaces/oai-global-settings.interface.js.map +1 -0
  57. package/build/_modules/ai/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.d.ts.map +1 -0
  58. package/build/_modules/ai/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.js.map +1 -0
  59. package/build/_modules/ai/_modules/open-ai/_models/interfaces/oai-llm-predefined-requests.interface.d.ts.map +1 -0
  60. package/build/_modules/ai/_modules/open-ai/_models/interfaces/oai-llm-predefined-requests.interface.js.map +1 -0
  61. package/build/_modules/ai/_modules/open-ai/_services/oai-doc-chunk-data.service.d.ts +22 -0
  62. package/build/_modules/ai/_modules/open-ai/_services/oai-doc-chunk-data.service.d.ts.map +1 -0
  63. package/build/_modules/ai/_modules/open-ai/_services/oai-doc-chunk-data.service.js +223 -0
  64. package/build/_modules/ai/_modules/open-ai/_services/oai-doc-chunk-data.service.js.map +1 -0
  65. package/build/_modules/ai/_modules/open-ai/_services/oai-doc-page.data-service.d.ts +26 -0
  66. package/build/_modules/ai/_modules/open-ai/_services/oai-doc-page.data-service.d.ts.map +1 -0
  67. package/build/_modules/ai/_modules/open-ai/_services/oai-doc-page.data-service.js +232 -0
  68. package/build/_modules/ai/_modules/open-ai/_services/oai-doc-page.data-service.js.map +1 -0
  69. package/build/_modules/ai/_modules/open-ai/_services/oai-document.data-service.d.ts +23 -0
  70. package/build/_modules/ai/_modules/open-ai/_services/oai-document.data-service.d.ts.map +1 -0
  71. package/build/_modules/ai/_modules/open-ai/_services/oai-document.data-service.js +284 -0
  72. package/build/_modules/ai/_modules/open-ai/_services/oai-document.data-service.js.map +1 -0
  73. package/build/_modules/ai/_modules/open-ai/_services/oai-embedding.control-service.d.ts +7 -0
  74. package/build/_modules/ai/_modules/open-ai/_services/oai-embedding.control-service.d.ts.map +1 -0
  75. package/build/_modules/{open-ai → ai/_modules/open-ai}/_services/oai-embedding.control-service.js +5 -5
  76. package/build/_modules/ai/_modules/open-ai/_services/oai-embedding.control-service.js.map +1 -0
  77. package/build/_modules/{open-ai → ai/_modules/open-ai}/_services/oai-llm-chat.service-base.d.ts +16 -16
  78. package/build/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.d.ts.map +1 -0
  79. package/build/_modules/{open-ai → ai/_modules/open-ai}/_services/oai-llm-chat.service-base.js +3 -3
  80. package/build/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.js.map +1 -0
  81. package/build/_modules/{open-ai → ai/_modules/open-ai}/_services/oai-llm.service-base.d.ts +19 -19
  82. package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.d.ts.map +1 -0
  83. package/build/_modules/{open-ai → ai/_modules/open-ai}/_services/oai-llm.service-base.js +6 -6
  84. package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.js.map +1 -0
  85. package/build/_modules/{open-ai → ai/_modules/open-ai}/_services/oai-vector-data.service.d.ts +6 -6
  86. package/build/_modules/ai/_modules/open-ai/_services/oai-vector-data.service.d.ts.map +1 -0
  87. package/build/_modules/{open-ai → ai/_modules/open-ai}/_services/oai-vector-data.service.js +138 -6
  88. package/build/_modules/ai/_modules/open-ai/_services/oai-vector-data.service.js.map +1 -0
  89. package/build/_modules/{open-ai → ai/_modules/open-ai}/index.d.ts +4 -10
  90. package/build/_modules/ai/_modules/open-ai/index.d.ts.map +1 -0
  91. package/build/_modules/{open-ai → ai/_modules/open-ai}/index.js +22 -11
  92. package/build/_modules/ai/_modules/open-ai/index.js.map +1 -0
  93. package/build/_modules/ai/_services/ai-embedding.service-base.d.ts +31 -0
  94. package/build/_modules/ai/_services/ai-embedding.service-base.d.ts.map +1 -0
  95. package/build/_modules/ai/_services/ai-embedding.service-base.js +12 -0
  96. package/build/_modules/ai/_services/ai-embedding.service-base.js.map +1 -0
  97. package/build/_modules/ai/_services/ai-llm-chat.service-base.d.ts +36 -0
  98. package/build/_modules/ai/_services/ai-llm-chat.service-base.d.ts.map +1 -0
  99. package/build/_modules/ai/_services/ai-llm-chat.service-base.js +12 -0
  100. package/build/_modules/ai/_services/ai-llm-chat.service-base.js.map +1 -0
  101. package/build/_modules/ai/_services/ai-llm.service-base.d.ts +45 -0
  102. package/build/_modules/ai/_services/ai-llm.service-base.d.ts.map +1 -0
  103. package/build/_modules/ai/_services/ai-llm.service-base.js +12 -0
  104. package/build/_modules/ai/_services/ai-llm.service-base.js.map +1 -0
  105. package/build/_modules/ai/_services/ai-provider.service-base.d.ts +25 -0
  106. package/build/_modules/ai/_services/ai-provider.service-base.d.ts.map +1 -0
  107. package/build/_modules/ai/_services/ai-provider.service-base.js +11 -0
  108. package/build/_modules/ai/_services/ai-provider.service-base.js.map +1 -0
  109. package/build/_modules/ai/index.d.ts +7 -0
  110. package/build/_modules/ai/index.d.ts.map +1 -0
  111. package/build/_modules/ai/index.js +13 -0
  112. package/build/_modules/ai/index.js.map +1 -0
  113. package/build/_modules/discord-assistant/_collections/dias-global-settings.const.js +2 -2
  114. package/build/_modules/discord-assistant/_collections/dias-global-settings.const.js.map +1 -1
  115. package/build/_modules/discord-assistant/_collections/dias.util.d.ts +1 -1
  116. package/build/_modules/discord-assistant/_collections/dias.util.d.ts.map +1 -1
  117. package/build/_modules/discord-assistant/_collections/dias.util.js +5 -5
  118. package/build/_modules/discord-assistant/_collections/dias.util.js.map +1 -1
  119. package/build/_modules/discord-assistant/_services/dias-chunk.data-service.d.ts +9 -9
  120. package/build/_modules/discord-assistant/_services/dias-chunk.data-service.d.ts.map +1 -1
  121. package/build/_modules/discord-assistant/_services/dias-chunk.data-service.js +11 -10
  122. package/build/_modules/discord-assistant/_services/dias-chunk.data-service.js.map +1 -1
  123. package/build/_modules/discord-assistant/_services/dias-io.control-service.d.ts +2 -2
  124. package/build/_modules/discord-assistant/_services/dias-io.control-service.d.ts.map +1 -1
  125. package/build/_modules/discord-assistant/_services/dias-io.control-service.js +2 -2
  126. package/build/_modules/discord-assistant/_services/dias-io.control-service.js.map +1 -1
  127. package/build/_modules/discord-assistant/_services/dias.service-base.d.ts +2 -2
  128. package/build/_modules/discord-assistant/_services/dias.service-base.d.ts.map +1 -1
  129. package/build/_modules/discord-assistant/_services/dias.service-base.js +1 -1
  130. package/build/_modules/discord-assistant/_services/dias.service-base.js.map +1 -1
  131. package/build/_modules/discord-assistant/index.d.ts +2 -1
  132. package/build/_modules/discord-assistant/index.d.ts.map +1 -1
  133. package/build/_modules/discord-assistant/index.js +2 -1
  134. package/build/_modules/discord-assistant/index.js.map +1 -1
  135. package/package.json +32 -12
  136. package/src/_modules/ai/_models/ai-input-interfaces.ts +79 -0
  137. package/src/_modules/{open-ai/_collections/oai-chunking.util.ts → ai/_modules/document-ai/_collections/dai-chunking.util.ts} +139 -90
  138. package/src/_modules/ai/_modules/document-ai/_collections/dai-document.util.ts +85 -0
  139. package/src/_modules/ai/_modules/document-ai/_enums/dai-compare-result-type.enum.ts +8 -0
  140. package/src/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-chunk.data-model.ts +144 -0
  141. package/src/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-page.data-model.ts +136 -0
  142. package/src/_modules/ai/_modules/document-ai/_models/data-models/dai-document.data-model.ts +93 -0
  143. package/src/_modules/ai/_modules/document-ai/_models/interfaces/dai-doc-chunk-compare-result.interface.ts +18 -0
  144. package/src/_modules/ai/_modules/document-ai/_models/interfaces/dai-doc-page-compare-result.interface.ts +19 -0
  145. package/src/_modules/ai/_modules/document-ai/_models/interfaces/dai-document-compare-result.interface.ts +25 -0
  146. package/src/_modules/ai/_modules/document-ai/index.ts +28 -0
  147. package/src/_modules/{open-ai → ai/_modules/open-ai}/_collections/oai-global-settings.const.ts +2 -2
  148. package/src/_modules/ai/_modules/open-ai/_models/interfaces/oai-global-settings.interface.ts +8 -0
  149. package/src/_modules/ai/_modules/open-ai/_services/oai-doc-chunk-data.service.ts +284 -0
  150. package/src/_modules/ai/_modules/open-ai/_services/oai-doc-page.data-service.ts +508 -0
  151. package/src/_modules/ai/_modules/open-ai/_services/oai-document.data-service.ts +377 -0
  152. package/src/_modules/{open-ai → ai/_modules/open-ai}/_services/oai-embedding.control-service.ts +6 -6
  153. package/src/_modules/{open-ai → ai/_modules/open-ai}/_services/oai-llm-chat.service-base.ts +20 -19
  154. package/src/_modules/{open-ai → ai/_modules/open-ai}/_services/oai-llm.service-base.ts +24 -24
  155. package/src/_modules/{open-ai → ai/_modules/open-ai}/_services/oai-vector-data.service.ts +145 -9
  156. package/src/_modules/ai/_modules/open-ai/index.ts +72 -0
  157. package/src/_modules/ai/_services/ai-embedding.service-base.ts +41 -0
  158. package/src/_modules/ai/_services/ai-llm-chat.service-base.ts +48 -0
  159. package/src/_modules/ai/_services/ai-llm.service-base.ts +81 -0
  160. package/src/_modules/ai/_services/ai-provider.service-base.ts +28 -0
  161. package/src/_modules/ai/index.ts +11 -0
  162. package/src/_modules/discord-assistant/_collections/dias-global-settings.const.ts +2 -2
  163. package/src/_modules/discord-assistant/_collections/dias.util.ts +5 -3
  164. package/src/_modules/discord-assistant/_services/dias-chunk.data-service.ts +25 -18
  165. package/src/_modules/discord-assistant/_services/dias-io.control-service.ts +5 -3
  166. package/src/_modules/discord-assistant/_services/dias.service-base.ts +3 -3
  167. package/src/_modules/discord-assistant/index.ts +2 -1
  168. package/src/index.ts +0 -4
  169. package/build/_modules/open-ai/_collections/oai-chunking.util.d.ts.map +0 -1
  170. package/build/_modules/open-ai/_collections/oai-chunking.util.js.map +0 -1
  171. package/build/_modules/open-ai/_collections/oai-document.util.d.ts +0 -4
  172. package/build/_modules/open-ai/_collections/oai-document.util.d.ts.map +0 -1
  173. package/build/_modules/open-ai/_collections/oai-document.util.js +0 -12
  174. package/build/_modules/open-ai/_collections/oai-document.util.js.map +0 -1
  175. package/build/_modules/open-ai/_collections/oai-global-settings.const.d.ts.map +0 -1
  176. package/build/_modules/open-ai/_collections/oai-global-settings.const.js.map +0 -1
  177. package/build/_modules/open-ai/_collections/oai-llm-predefined-requests-hu.conts.d.ts.map +0 -1
  178. package/build/_modules/open-ai/_collections/oai-llm-predefined-requests-hu.conts.js.map +0 -1
  179. package/build/_modules/open-ai/_collections/oai-llm-predefined-requests.conts.d.ts.map +0 -1
  180. package/build/_modules/open-ai/_collections/oai-llm-predefined-requests.conts.js.map +0 -1
  181. package/build/_modules/open-ai/_enums/oai-compare-result-type.enum.d.ts +0 -6
  182. package/build/_modules/open-ai/_enums/oai-compare-result-type.enum.d.ts.map +0 -1
  183. package/build/_modules/open-ai/_enums/oai-compare-result-type.enum.js +0 -10
  184. package/build/_modules/open-ai/_enums/oai-compare-result-type.enum.js.map +0 -1
  185. package/build/_modules/open-ai/_enums/oai-gpt-message-role.enum.d.ts.map +0 -1
  186. package/build/_modules/open-ai/_enums/oai-gpt-message-role.enum.js.map +0 -1
  187. package/build/_modules/open-ai/_models/interfaces/oai-chunk-compare-result.interface.d.ts +0 -7
  188. package/build/_modules/open-ai/_models/interfaces/oai-chunk-compare-result.interface.d.ts.map +0 -1
  189. package/build/_modules/open-ai/_models/interfaces/oai-chunk-compare-result.interface.js.map +0 -1
  190. package/build/_modules/open-ai/_models/interfaces/oai-document-page.interface.d.ts +0 -15
  191. package/build/_modules/open-ai/_models/interfaces/oai-document-page.interface.d.ts.map +0 -1
  192. package/build/_modules/open-ai/_models/interfaces/oai-document-page.interface.js.map +0 -1
  193. package/build/_modules/open-ai/_models/interfaces/oai-global-settings.interface.d.ts +0 -6
  194. package/build/_modules/open-ai/_models/interfaces/oai-global-settings.interface.d.ts.map +0 -1
  195. package/build/_modules/open-ai/_models/interfaces/oai-global-settings.interface.js.map +0 -1
  196. package/build/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.d.ts.map +0 -1
  197. package/build/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.js.map +0 -1
  198. package/build/_modules/open-ai/_models/interfaces/oai-llm-predefined-requests.interface.d.ts.map +0 -1
  199. package/build/_modules/open-ai/_models/interfaces/oai-llm-predefined-requests.interface.js.map +0 -1
  200. package/build/_modules/open-ai/_models/interfaces/oai-page-compare-result.interface.d.ts +0 -13
  201. package/build/_modules/open-ai/_models/interfaces/oai-page-compare-result.interface.d.ts.map +0 -1
  202. package/build/_modules/open-ai/_models/interfaces/oai-page-compare-result.interface.js +0 -3
  203. package/build/_modules/open-ai/_models/interfaces/oai-page-compare-result.interface.js.map +0 -1
  204. package/build/_modules/open-ai/_models/oai-doc-chunk.data-model.d.ts.map +0 -1
  205. package/build/_modules/open-ai/_models/oai-doc-chunk.data-model.js +0 -101
  206. package/build/_modules/open-ai/_models/oai-doc-chunk.data-model.js.map +0 -1
  207. package/build/_modules/open-ai/_services/oai-chunk.service-base.d.ts +0 -16
  208. package/build/_modules/open-ai/_services/oai-chunk.service-base.d.ts.map +0 -1
  209. package/build/_modules/open-ai/_services/oai-chunk.service-base.js +0 -200
  210. package/build/_modules/open-ai/_services/oai-chunk.service-base.js.map +0 -1
  211. package/build/_modules/open-ai/_services/oai-embedding.control-service.d.ts +0 -7
  212. package/build/_modules/open-ai/_services/oai-embedding.control-service.d.ts.map +0 -1
  213. package/build/_modules/open-ai/_services/oai-embedding.control-service.js.map +0 -1
  214. package/build/_modules/open-ai/_services/oai-llm-chat.service-base.d.ts.map +0 -1
  215. package/build/_modules/open-ai/_services/oai-llm-chat.service-base.js.map +0 -1
  216. package/build/_modules/open-ai/_services/oai-llm.service-base.d.ts.map +0 -1
  217. package/build/_modules/open-ai/_services/oai-llm.service-base.js.map +0 -1
  218. package/build/_modules/open-ai/_services/oai-vector-data.service.d.ts.map +0 -1
  219. package/build/_modules/open-ai/_services/oai-vector-data.service.js.map +0 -1
  220. package/build/_modules/open-ai/index.d.ts.map +0 -1
  221. package/build/_modules/open-ai/index.js.map +0 -1
  222. package/src/_modules/open-ai/_collections/oai-document.util.ts +0 -10
  223. package/src/_modules/open-ai/_enums/oai-compare-result-type.enum.ts +0 -7
  224. package/src/_modules/open-ai/_models/interfaces/oai-chunk-compare-result.interface.ts +0 -15
  225. package/src/_modules/open-ai/_models/interfaces/oai-document-page.interface.ts +0 -28
  226. package/src/_modules/open-ai/_models/interfaces/oai-global-settings.interface.ts +0 -8
  227. package/src/_modules/open-ai/_models/interfaces/oai-page-compare-result.interface.ts +0 -17
  228. package/src/_modules/open-ai/_models/oai-doc-chunk.data-model.ts +0 -115
  229. package/src/_modules/open-ai/_services/oai-chunk.service-base.ts +0 -280
  230. package/src/_modules/open-ai/index.ts +0 -55
  231. /package/build/_modules/{open-ai → ai/_modules/open-ai}/_collections/oai-global-settings.const.d.ts +0 -0
  232. /package/build/_modules/{open-ai → ai/_modules/open-ai}/_collections/oai-llm-predefined-requests-hu.conts.d.ts +0 -0
  233. /package/build/_modules/{open-ai → ai/_modules/open-ai}/_collections/oai-llm-predefined-requests-hu.conts.js +0 -0
  234. /package/build/_modules/{open-ai → ai/_modules/open-ai}/_collections/oai-llm-predefined-requests.conts.d.ts +0 -0
  235. /package/build/_modules/{open-ai → ai/_modules/open-ai}/_collections/oai-llm-predefined-requests.conts.js +0 -0
  236. /package/build/_modules/{open-ai → ai/_modules/open-ai}/_enums/oai-gpt-message-role.enum.d.ts +0 -0
  237. /package/build/_modules/{open-ai → ai/_modules/open-ai}/_enums/oai-gpt-message-role.enum.js +0 -0
  238. /package/build/_modules/{open-ai → ai/_modules/open-ai}/_models/interfaces/oai-global-settings.interface.js +0 -0
  239. /package/build/_modules/{open-ai → ai/_modules/open-ai}/_models/interfaces/oai-gpt-message.interface.d.ts +0 -0
  240. /package/build/_modules/{open-ai → ai/_modules/open-ai}/_models/interfaces/oai-gpt-message.interface.js +0 -0
  241. /package/build/_modules/{open-ai → ai/_modules/open-ai}/_models/interfaces/oai-llm-predefined-requests.interface.d.ts +0 -0
  242. /package/build/_modules/{open-ai → ai/_modules/open-ai}/_models/interfaces/oai-llm-predefined-requests.interface.js +0 -0
  243. /package/src/_modules/{open-ai → ai/_modules/open-ai}/_collections/oai-llm-predefined-requests-hu.conts.ts +0 -0
  244. /package/src/_modules/{open-ai → ai/_modules/open-ai}/_collections/oai-llm-predefined-requests.conts.ts +0 -0
  245. /package/src/_modules/{open-ai → ai/_modules/open-ai}/_enums/oai-gpt-message-role.enum.ts +0 -0
  246. /package/src/_modules/{open-ai → ai/_modules/open-ai}/_models/interfaces/oai-gpt-message.interface.ts +0 -0
  247. /package/src/_modules/{open-ai → ai/_modules/open-ai}/_models/interfaces/oai-llm-predefined-requests.interface.ts +0 -0
@@ -1,280 +0,0 @@
1
- import { DyFM_Array, DyFM_DataModel_Params, DyFM_DataProperties, DyFM_DBFilterSimple, DyFM_Error, DyFM_Log, DyFM_Metadata, DyFM_Async } from '@futdevpro/fsm-dynamo';
2
- import { DyFM_OpenAI_Settings, DyFM_OpenAIModel } from '@futdevpro/fsm-dynamo/open-ai';
3
- import { DyNTS_OAI_VectorDataService } from './oai-vector-data.service';
4
- import { DyNTS_OAI_Chunking_Util } from '../_collections/oai-chunking.util';
5
- import { DyNTS_OAI_Chunk } from '../_models/oai-doc-chunk.data-model';
6
- import { DyNTS_OAI_ChunkCompareResult } from '../_models/interfaces/oai-chunk-compare-result.interface';
7
- import { DyNTS_OAI_CompareResult_Type } from '../_enums/oai-compare-result-type.enum';
8
- import { DyNTS_OAI_DocumentPage } from '../_models/interfaces/oai-document-page.interface';
9
- import { DyNTS_OAI_PageCompareResult } from '../_models/interfaces/oai-page-compare-result.interface';
10
-
11
-
12
- export class DyNTS_OAI_Chunk_DataServiceBase<
13
- T_Chunk extends DyNTS_OAI_Chunk = DyNTS_OAI_Chunk,
14
- T_Page extends DyNTS_OAI_DocumentPage<T_Chunk> = DyNTS_OAI_DocumentPage<T_Chunk>,
15
- > extends DyNTS_OAI_VectorDataService<T_Chunk> {
16
-
17
- override debugLog: boolean = true;
18
-
19
- constructor(
20
- dataParams: DyFM_DataModel_Params<T_Chunk>,
21
- openAiSettings: DyFM_OpenAI_Settings,
22
- issuer: string
23
- ) {
24
- super(
25
- null,
26
- dataParams,
27
- openAiSettings,
28
- issuer
29
- );
30
- }
31
-
32
- async updatePage(
33
- pageCompareResult: DyNTS_OAI_PageCompareResult<T_Chunk, T_Page>,
34
- issuer: string
35
- ): Promise<void> {
36
- try {
37
- // save chunks
38
- // (only new and modified pages
39
- // (but all the page element should be updated
40
- // (delete extra elements)))
41
-
42
- if (pageCompareResult.oldChunks.length > pageCompareResult.newChunks.length) {
43
- // delete extra chunks
44
- for (let i = 0; i < pageCompareResult.oldChunks.length; i++) {
45
-
46
- if (i < pageCompareResult.newChunks.length) {
47
- pageCompareResult.newChunks[i]._id = pageCompareResult.oldChunks[i]._id;
48
- } else {
49
- await this.deleteData(pageCompareResult.oldChunks[i]._id, true).catch(error => {
50
- DyFM_Error.logSimple(`❌ ${this.dataParams.dataName} Chunk not deleted`, error);
51
- });
52
- }
53
- }
54
- }
55
-
56
- await DyFM_Array.asyncForEachAllAtOnce(
57
- pageCompareResult.newChunks,
58
- async (chunk) => {
59
- if (
60
- pageCompareResult.chunkCompareResults[chunk.chunkIndex].result !== DyNTS_OAI_CompareResult_Type.equal
61
- ) {
62
- /* chunk.allFlaggedParents = chunk.allFlaggedParents.map(parent => parent.trim())
63
- chunk.na */
64
-
65
- chunk.path = chunk.allFlaggedParents.join('/');
66
-
67
- if (this.debugLog) {
68
- DyFM_Log.H_info(`✅ saving ${this.dataParams.dataName} Chunk: ${pageCompareResult.subjectPage.name}; ${chunk.chunkIndex}`, {
69
- chunk: chunk,
70
- });
71
-
72
- /* DyFM_Log.H_warn(`STOP`);
73
- await DyFM_Async.wait(10_000 * minute); */
74
- }
75
-
76
- await this.saveData(chunk, false, true);
77
- DyFM_Log.info(`✅ ${this.dataParams.dataName} Chunk saved: ${pageCompareResult.subjectPage.name}; ${chunk.chunkIndex}`)
78
- }
79
- }
80
- );
81
-
82
- DyFM_Log.success(`✅ ${this.dataParams.dataName} Chunks updated(SAVED) for page: ${pageCompareResult.subjectPage.name}`);
83
- } catch (error) {
84
- throw new DyFM_Error({
85
- ...this.getDefaultErrorSettings('updatePage', error),
86
- errorCode: 'DCH-CSB-UP0',
87
- });
88
- }
89
- }
90
-
91
- async comparePage(page: T_Page, issuer: string): Promise<DyNTS_OAI_PageCompareResult<T_Chunk, T_Page>> {
92
- try {
93
- if (this.debugLog) {
94
- DyFM_Log.info(`🔍 Comparing ${this.dataParams.dataName} page: ${page.name}`);
95
- }
96
-
97
- if (!page?.allFlaggedParentsMerged) {
98
- DyFM_Log.T_error(
99
- `❌ ${this.dataParams.dataName} allFlaggedParentsMerged is not set (${page.name})`, JSON.stringify(page, null, 2)
100
- );
101
-
102
- throw new DyFM_Error({
103
- ...this.getDefaultErrorSettings(
104
- 'comparePage',
105
- new Error(`${this.dataParams.dataName} allFlaggedParentsMerged is not set (${page.name})`),
106
- ),
107
- errorCode: 'DCH-CSB-CP0',
108
- });
109
- }
110
-
111
- const oldChunks = await this.findDataList({
112
- path: page.allFlaggedParentsMerged,
113
- } as DyFM_DBFilterSimple<T_Chunk>);
114
-
115
- const compareResults: DyNTS_OAI_ChunkCompareResult<T_Chunk>[] = await this.compareChunks(
116
- page.chunks,
117
- oldChunks
118
- );
119
-
120
- /* DyFM_Log.H_info(`✅ Modified page: ${page.name}`, {
121
- compareResults: compareResults,
122
- equal: compareResults.every(result => result.result === DCh_CompareResult_Type.equal),
123
- new: compareResults.every(result => result.result === DCh_CompareResult_Type.new),
124
- modified: compareResults.some(
125
- result => ![ DCh_CompareResult_Type.equal, DCh_CompareResult_Type.new ].includes(result.result)
126
- ),
127
- }); */
128
-
129
- if (
130
- compareResults.every(result => result.result === DyNTS_OAI_CompareResult_Type.equal)
131
- ) {
132
- if (this.debugLog) {
133
- DyFM_Log.info(`✅ ${this.dataParams.dataName} Page is equal: ${page.name}`);
134
- }
135
-
136
- return {
137
- result: DyNTS_OAI_CompareResult_Type.equal,
138
- subjectPage: page,
139
- oldPageContent: page.content,
140
- chunkCompareResults: compareResults,
141
- newChunks: page.chunks,
142
- oldChunks: oldChunks,
143
- };
144
- }
145
-
146
- if (
147
- compareResults.every(result => result.result === DyNTS_OAI_CompareResult_Type.new)
148
- ) {
149
- if (this.debugLog) {
150
- DyFM_Log.info(`✅ ${this.dataParams.dataName} Page is new: ${page.name}`);
151
- }
152
-
153
- return {
154
- result: DyNTS_OAI_CompareResult_Type.new,
155
- subjectPage: page,
156
- oldPageContent: '',
157
- chunkCompareResults: compareResults,
158
- newChunks: page.chunks,
159
- oldChunks: oldChunks,
160
- };
161
- }
162
-
163
- if (this.debugLog) {
164
- DyFM_Log.info(`✅ ${this.dataParams.dataName} Page is modified: ${page.name}`);
165
- }
166
-
167
- return {
168
- result: DyNTS_OAI_CompareResult_Type.modified,
169
- subjectPage: page,
170
- oldPageContent: DyNTS_OAI_Chunking_Util.reassembleChunksToContent(
171
- compareResults.filter(result => result.oldChunk).map(result => result.oldChunk),
172
- issuer
173
- ),
174
- chunkCompareResults: compareResults,
175
- newChunks: page.chunks,
176
- oldChunks: oldChunks,
177
- };
178
- } catch (error) {
179
- throw new DyFM_Error({
180
- ...this.getDefaultErrorSettings('comparePage', error),
181
- errorCode: 'DCH-CSB-CP0',
182
- });
183
- }
184
- }
185
-
186
- async compareChunks(
187
- chunks: T_Chunk[],
188
- oldChunks?: T_Chunk[]
189
- ): Promise<DyNTS_OAI_ChunkCompareResult<T_Chunk>[]> {
190
- try {
191
- if (this.debugLog) {
192
- DyFM_Log.info(`🔍 Comparing ${this.dataParams.dataName} chunks: ${chunks.length}`);
193
- }
194
-
195
- if (chunks.length === 0) {
196
- return [];
197
- }
198
-
199
- if (chunks.some(chunk => !chunk.path)) {
200
- throw new DyFM_Error({
201
- ...this.getDefaultErrorSettings(
202
- 'compareChunks', new Error(`${this.dataParams.dataName} allFlaggedParentsMerged is not set`),
203
- ),
204
- errorCode: 'DCH-CSB-CC0',
205
- });
206
- }
207
-
208
- oldChunks ??= await this.findDataList({
209
- path: chunks[0].path,
210
- } as DyFM_DBFilterSimple<T_Chunk>);
211
- oldChunks.sort((a, b) => a.chunkIndex - b.chunkIndex);
212
-
213
- return await DyFM_Array.asyncForEachAllAtOnce(
214
- chunks,
215
- async (chunk) => {
216
- return await this.compareChunk(chunk, oldChunks[chunk.chunkIndex]);
217
- }
218
- )
219
- } catch (error) {
220
- throw new DyFM_Error({
221
- ...this.getDefaultErrorSettings('compareChunks', error),
222
- errorCode: 'DCH-CSB-CC0',
223
- });
224
- }
225
- }
226
-
227
- async compareChunk(
228
- newChunk: T_Chunk,
229
- oldChunk?: T_Chunk
230
- ): Promise<DyNTS_OAI_ChunkCompareResult<T_Chunk>> {
231
- try {
232
- if (this.debugLog) {
233
- DyFM_Log.info(`🔍 Comparing ${this.dataParams.dataName} chunk: ${newChunk.chunkIndex}`);
234
- }
235
-
236
- oldChunk ??= await this.findData({
237
- path: newChunk.path,
238
- chunkIndex: newChunk.chunkIndex,
239
- } as DyFM_DBFilterSimple<T_Chunk>);
240
-
241
- /* DyFM_Log.H_info(`✅ Comparing ${this.dataParams.dataName} chunk: ${newChunk.chunkIndex}`, {
242
- newChunk: newChunk,
243
- oldChunk: oldChunk,
244
- new: !oldChunk,
245
- equal: oldChunk?.chunkParentedContent === newChunk.chunkParentedContent,
246
- modified: oldChunk && oldChunk.chunkParentedContent !== newChunk.chunkParentedContent,
247
- }); */
248
-
249
- if (!oldChunk) {
250
- // itt kéne vektor search-el utána keresni,
251
- // hogy a page link-je megtalálható-e (avagy csak átnevezésre került-e)
252
- // hogy az adott tartalom, nem-e csak átnevezésre, szétbontásra vagy összevonásra került-e
253
- return {
254
- result: DyNTS_OAI_CompareResult_Type.new,
255
- oldChunk: null,
256
- };
257
- }
258
-
259
- if (oldChunk.chunkContent === newChunk.chunkContent) {
260
- return {
261
- result: DyNTS_OAI_CompareResult_Type.equal,
262
- oldChunk: oldChunk,
263
- };
264
- }
265
-
266
- return {
267
- result: DyNTS_OAI_CompareResult_Type.modified,
268
- oldChunk: oldChunk,
269
- };
270
- } catch (error) {
271
- throw new DyFM_Error({
272
- ...this.getDefaultErrorSettings('compareChunk', error),
273
- errorCode: 'DCH-CSB-CC1',
274
- });
275
- }
276
-
277
-
278
- }
279
-
280
- }
@@ -1,55 +0,0 @@
1
-
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
- /* try {
10
- require.resolve('open-ai');
11
- } catch {
12
- console.log(
13
- '❌ OpenAI package not found, please install it with: pnpm add open-ai'
14
- );
15
- } */
16
-
17
- //
18
- // OpenAI module
19
- //
20
- // This module is created to simplify the usage of OpenAI API
21
- // It creates universal solutions for the most common use cases
22
- //
23
-
24
-
25
- export * from '@futdevpro/fsm-dynamo/open-ai';
26
-
27
- // COLLECTIONS
28
- export * from './_collections/oai-chunking.util';
29
- export * from './_collections/oai-document.util';
30
- export * from './_collections/oai-global-settings.const';
31
- export * from './_collections/oai-llm-predefined-requests.conts';
32
- export * from './_collections/oai-llm-predefined-requests-hu.conts';
33
-
34
- // ENUMS
35
- export * from './_enums/oai-compare-result-type.enum';
36
- export * from './_enums/oai-gpt-message-role.enum';
37
-
38
- // MODELS
39
- export * from './_models/oai-doc-chunk.data-model';
40
- // models/INTERFACES
41
- export * from './_models/interfaces/oai-chunk-compare-result.interface';
42
- export * from './_models/interfaces/oai-page-compare-result.interface';
43
- export * from './_models/interfaces/oai-document-page.interface';
44
- export * from './_models/interfaces/oai-global-settings.interface';
45
- export * from './_models/interfaces/oai-gpt-message.interface';
46
- export * from './_models/interfaces/oai-llm-predefined-requests.interface';
47
- export * from './_models/interfaces/oai-page-compare-result.interface';
48
-
49
- // SERVICES
50
- export * from './_services/oai-chunk.service-base';
51
- export * from './_services/oai-embedding.control-service';
52
- export * from './_services/oai-llm-chat.service-base';
53
- export * from './_services/oai-llm.service-base';
54
- export * from './_services/oai-vector-data.service';
55
-