@futdevpro/nts-dynamo 1.10.77 → 1.11.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 (316) hide show
  1. package/build/_collections/atlas-default-db-options.const.d.ts +28 -0
  2. package/build/_collections/atlas-default-db-options.const.d.ts.map +1 -0
  3. package/build/_collections/atlas-default-db-options.const.js +10 -0
  4. package/build/_collections/atlas-default-db-options.const.js.map +1 -0
  5. package/build/_collections/get-environment-settings.util.d.ts +3 -0
  6. package/build/_collections/get-environment-settings.util.d.ts.map +1 -0
  7. package/build/_collections/get-environment-settings.util.js +45 -0
  8. package/build/_collections/get-environment-settings.util.js.map +1 -0
  9. package/build/_collections/global-settings.const.d.ts.map +1 -1
  10. package/build/_collections/global-settings.const.js +9 -4
  11. package/build/_collections/global-settings.const.js.map +1 -1
  12. package/build/_models/control-models/app-params.control-model.d.ts +6 -0
  13. package/build/_models/control-models/app-params.control-model.d.ts.map +1 -1
  14. package/build/_models/control-models/app-params.control-model.js +29 -2
  15. package/build/_models/control-models/app-params.control-model.js.map +1 -1
  16. package/build/_models/control-models/app-params.control-model.spec.js +5 -4
  17. package/build/_models/control-models/app-params.control-model.spec.js.map +1 -1
  18. package/build/_models/control-models/endpoint-params.control-model.js +1 -1
  19. package/build/_models/control-models/endpoint-params.control-model.js.map +1 -1
  20. package/build/_models/interfaces/environment-settings.interface.d.ts +35 -0
  21. package/build/_models/interfaces/environment-settings.interface.d.ts.map +1 -0
  22. package/build/_models/interfaces/environment-settings.interface.js +3 -0
  23. package/build/_models/interfaces/environment-settings.interface.js.map +1 -0
  24. package/build/_models/interfaces/global-settings.interface.d.ts +34 -2
  25. package/build/_models/interfaces/global-settings.interface.d.ts.map +1 -1
  26. package/build/_modules/custom-data/index.d.ts.map +1 -1
  27. package/build/_modules/custom-data/index.js +1 -0
  28. package/build/_modules/custom-data/index.js.map +1 -1
  29. package/build/_modules/discord-assistant/_collections/dias-global-settings.const.d.ts +3 -0
  30. package/build/_modules/discord-assistant/_collections/dias-global-settings.const.d.ts.map +1 -0
  31. package/build/_modules/discord-assistant/_collections/dias-global-settings.const.js +17 -0
  32. package/build/_modules/discord-assistant/_collections/dias-global-settings.const.js.map +1 -0
  33. package/build/_modules/discord-assistant/_collections/dias.util.d.ts +6 -0
  34. package/build/_modules/discord-assistant/_collections/dias.util.d.ts.map +1 -0
  35. package/build/_modules/discord-assistant/_collections/dias.util.js +36 -0
  36. package/build/_modules/discord-assistant/_collections/dias.util.js.map +1 -0
  37. package/build/_modules/discord-assistant/_models/dias-global-settings.interface.d.ts +18 -0
  38. package/build/_modules/discord-assistant/_models/dias-global-settings.interface.d.ts.map +1 -0
  39. package/build/_modules/discord-assistant/_models/dias-global-settings.interface.js +3 -0
  40. package/build/_modules/discord-assistant/_models/dias-global-settings.interface.js.map +1 -0
  41. package/build/_modules/discord-assistant/_models/dias-knowledge.data-model.d.ts +10 -0
  42. package/build/_modules/discord-assistant/_models/dias-knowledge.data-model.d.ts.map +1 -0
  43. package/build/_modules/discord-assistant/_models/dias-knowledge.data-model.js +41 -0
  44. package/build/_modules/discord-assistant/_models/dias-knowledge.data-model.js.map +1 -0
  45. package/build/_modules/discord-assistant/_services/dias-chunk.data-service.d.ts +14 -0
  46. package/build/_modules/discord-assistant/_services/dias-chunk.data-service.d.ts.map +1 -0
  47. package/build/_modules/discord-assistant/_services/dias-chunk.data-service.js +88 -0
  48. package/build/_modules/discord-assistant/_services/dias-chunk.data-service.js.map +1 -0
  49. package/build/_modules/discord-assistant/_services/dias-io.control-service.d.ts +10 -0
  50. package/build/_modules/discord-assistant/_services/dias-io.control-service.d.ts.map +1 -0
  51. package/build/_modules/discord-assistant/_services/dias-io.control-service.js +40 -0
  52. package/build/_modules/discord-assistant/_services/dias-io.control-service.js.map +1 -0
  53. package/build/_modules/discord-assistant/_services/dias-main.control-service.d.ts +8 -0
  54. package/build/_modules/discord-assistant/_services/dias-main.control-service.d.ts.map +1 -0
  55. package/build/_modules/discord-assistant/_services/dias-main.control-service.js +23 -0
  56. package/build/_modules/discord-assistant/_services/dias-main.control-service.js.map +1 -0
  57. package/build/_modules/discord-assistant/_services/dias.service-base.d.ts +11 -0
  58. package/build/_modules/discord-assistant/_services/dias.service-base.d.ts.map +1 -0
  59. package/build/_modules/discord-assistant/_services/dias.service-base.js +33 -0
  60. package/build/_modules/discord-assistant/_services/dias.service-base.js.map +1 -0
  61. package/build/_modules/discord-assistant/index.d.ts +10 -0
  62. package/build/_modules/discord-assistant/index.d.ts.map +1 -0
  63. package/build/_modules/discord-assistant/index.js +23 -0
  64. package/build/_modules/discord-assistant/index.js.map +1 -0
  65. package/build/_modules/discord-assistant-voiced/_services/dias-discord-bot.control-service.d.ts +4 -0
  66. package/build/_modules/discord-assistant-voiced/_services/dias-discord-bot.control-service.d.ts.map +1 -0
  67. package/build/_modules/discord-assistant-voiced/_services/dias-discord-bot.control-service.js +8 -0
  68. package/build/_modules/discord-assistant-voiced/_services/dias-discord-bot.control-service.js.map +1 -0
  69. package/build/_modules/discord-assistant-voiced/index.d.ts +3 -0
  70. package/build/_modules/discord-assistant-voiced/index.d.ts.map +1 -0
  71. package/build/_modules/discord-assistant-voiced/index.js +26 -0
  72. package/build/_modules/discord-assistant-voiced/index.js.map +1 -0
  73. package/build/_modules/discord-bot/_collections/dibo-default-commands.const.d.ts +3 -0
  74. package/build/_modules/discord-bot/_collections/dibo-default-commands.const.d.ts.map +1 -0
  75. package/build/_modules/discord-bot/_collections/dibo-default-commands.const.js +13 -0
  76. package/build/_modules/discord-bot/_collections/dibo-default-commands.const.js.map +1 -0
  77. package/build/_modules/discord-bot/_collections/dibo-global-settings.conts.d.ts +3 -0
  78. package/build/_modules/discord-bot/_collections/dibo-global-settings.conts.d.ts.map +1 -0
  79. package/build/_modules/discord-bot/_collections/dibo-global-settings.conts.js +44 -0
  80. package/build/_modules/discord-bot/_collections/dibo-global-settings.conts.js.map +1 -0
  81. package/build/_modules/discord-bot/_collections/dibo-operations.util.d.ts +22 -0
  82. package/build/_modules/discord-bot/_collections/dibo-operations.util.d.ts.map +1 -0
  83. package/build/_modules/discord-bot/_collections/dibo-operations.util.js +261 -0
  84. package/build/_modules/discord-bot/_collections/dibo-operations.util.js.map +1 -0
  85. package/build/_modules/discord-bot/_models/dibo-command.interface.d.ts +8 -0
  86. package/build/_modules/discord-bot/_models/dibo-command.interface.d.ts.map +1 -0
  87. package/build/_modules/discord-bot/_models/dibo-command.interface.js +3 -0
  88. package/build/_modules/discord-bot/_models/dibo-command.interface.js.map +1 -0
  89. package/build/_modules/discord-bot/_models/dibo-last-mention-date.inteface.d.ts +7 -0
  90. package/build/_modules/discord-bot/_models/dibo-last-mention-date.inteface.d.ts.map +1 -0
  91. package/build/_modules/discord-bot/_models/dibo-last-mention-date.inteface.js +3 -0
  92. package/build/_modules/discord-bot/_models/dibo-last-mention-date.inteface.js.map +1 -0
  93. package/build/_modules/discord-bot/_models/dibo-last-message-date.interface.d.ts +6 -0
  94. package/build/_modules/discord-bot/_models/dibo-last-message-date.interface.d.ts.map +1 -0
  95. package/build/_modules/discord-bot/_models/dibo-last-message-date.interface.js +3 -0
  96. package/build/_modules/discord-bot/_models/dibo-last-message-date.interface.js.map +1 -0
  97. package/build/_modules/discord-bot/_models/global-bot-log-settings.interface.d.ts +88 -0
  98. package/build/_modules/discord-bot/_models/global-bot-log-settings.interface.d.ts.map +1 -0
  99. package/build/_modules/discord-bot/_models/global-bot-log-settings.interface.js +3 -0
  100. package/build/_modules/discord-bot/_models/global-bot-log-settings.interface.js.map +1 -0
  101. package/build/_modules/discord-bot/_services/dibo-commands.control-service.d.ts +12 -0
  102. package/build/_modules/discord-bot/_services/dibo-commands.control-service.d.ts.map +1 -0
  103. package/build/_modules/discord-bot/_services/dibo-commands.control-service.js +72 -0
  104. package/build/_modules/discord-bot/_services/dibo-commands.control-service.js.map +1 -0
  105. package/build/_modules/discord-bot/_services/dibo-io.control-service.d.ts +19 -0
  106. package/build/_modules/discord-bot/_services/dibo-io.control-service.d.ts.map +1 -0
  107. package/build/_modules/discord-bot/_services/dibo-io.control-service.js +176 -0
  108. package/build/_modules/discord-bot/_services/dibo-io.control-service.js.map +1 -0
  109. package/build/_modules/discord-bot/_services/dibo-main.control-service.d.ts +85 -0
  110. package/build/_modules/discord-bot/_services/dibo-main.control-service.d.ts.map +1 -0
  111. package/build/_modules/discord-bot/_services/dibo-main.control-service.js +228 -0
  112. package/build/_modules/discord-bot/_services/dibo-main.control-service.js.map +1 -0
  113. package/build/_modules/discord-bot/_services/dibo-routines.control-service.d.ts +13 -0
  114. package/build/_modules/discord-bot/_services/dibo-routines.control-service.d.ts.map +1 -0
  115. package/build/_modules/discord-bot/_services/dibo-routines.control-service.js +38 -0
  116. package/build/_modules/discord-bot/_services/dibo-routines.control-service.js.map +1 -0
  117. package/build/_modules/discord-bot/index.d.ts +12 -0
  118. package/build/_modules/discord-bot/index.d.ts.map +1 -0
  119. package/build/_modules/discord-bot/index.js +30 -0
  120. package/build/_modules/discord-bot/index.js.map +1 -0
  121. package/build/_modules/oauth2/index.d.ts.map +1 -1
  122. package/build/_modules/oauth2/index.js +7 -0
  123. package/build/_modules/oauth2/index.js.map +1 -1
  124. package/build/_modules/open-ai/_collections/oai-chunking.util.d.ts +74 -0
  125. package/build/_modules/open-ai/_collections/oai-chunking.util.d.ts.map +1 -0
  126. package/build/_modules/open-ai/_collections/oai-chunking.util.js +385 -0
  127. package/build/_modules/open-ai/_collections/oai-chunking.util.js.map +1 -0
  128. package/build/_modules/open-ai/_collections/oai-document.util.d.ts +4 -0
  129. package/build/_modules/open-ai/_collections/oai-document.util.d.ts.map +1 -0
  130. package/build/_modules/open-ai/_collections/oai-document.util.js +12 -0
  131. package/build/_modules/open-ai/_collections/oai-document.util.js.map +1 -0
  132. package/build/_modules/open-ai/_collections/oai-global-settings.const.d.ts +3 -0
  133. package/build/_modules/open-ai/_collections/oai-global-settings.const.d.ts.map +1 -0
  134. package/build/_modules/open-ai/_collections/oai-global-settings.const.js +9 -0
  135. package/build/_modules/open-ai/_collections/oai-global-settings.const.js.map +1 -0
  136. package/build/_modules/open-ai/_collections/oai-llm-predefined-requests-hu.conts.d.ts +3 -0
  137. package/build/_modules/open-ai/_collections/oai-llm-predefined-requests-hu.conts.d.ts.map +1 -0
  138. package/build/_modules/open-ai/_collections/oai-llm-predefined-requests-hu.conts.js +75 -0
  139. package/build/_modules/open-ai/_collections/oai-llm-predefined-requests-hu.conts.js.map +1 -0
  140. package/build/_modules/open-ai/_collections/oai-llm-predefined-requests.conts.d.ts +3 -0
  141. package/build/_modules/open-ai/_collections/oai-llm-predefined-requests.conts.d.ts.map +1 -0
  142. package/build/_modules/open-ai/_collections/oai-llm-predefined-requests.conts.js +68 -0
  143. package/build/_modules/open-ai/_collections/oai-llm-predefined-requests.conts.js.map +1 -0
  144. package/build/_modules/open-ai/_enums/oai-compare-result-type.enum.d.ts +6 -0
  145. package/build/_modules/open-ai/_enums/oai-compare-result-type.enum.d.ts.map +1 -0
  146. package/build/_modules/open-ai/_enums/oai-compare-result-type.enum.js +10 -0
  147. package/build/_modules/open-ai/_enums/oai-compare-result-type.enum.js.map +1 -0
  148. package/build/_modules/open-ai/_enums/oai-gpt-message-role.enum.d.ts +18 -0
  149. package/build/_modules/open-ai/_enums/oai-gpt-message-role.enum.d.ts.map +1 -0
  150. package/build/_modules/open-ai/_enums/oai-gpt-message-role.enum.js +40 -0
  151. package/build/_modules/open-ai/_enums/oai-gpt-message-role.enum.js.map +1 -0
  152. package/build/_modules/open-ai/_models/interfaces/oai-chunk-compare-result.interface.d.ts +7 -0
  153. package/build/_modules/open-ai/_models/interfaces/oai-chunk-compare-result.interface.d.ts.map +1 -0
  154. package/build/_modules/open-ai/_models/interfaces/oai-chunk-compare-result.interface.js +3 -0
  155. package/build/_modules/open-ai/_models/interfaces/oai-chunk-compare-result.interface.js.map +1 -0
  156. package/build/_modules/open-ai/_models/interfaces/oai-document-page.interface.d.ts +15 -0
  157. package/build/_modules/open-ai/_models/interfaces/oai-document-page.interface.d.ts.map +1 -0
  158. package/build/_modules/open-ai/_models/interfaces/oai-document-page.interface.js +3 -0
  159. package/build/_modules/open-ai/_models/interfaces/oai-document-page.interface.js.map +1 -0
  160. package/build/_modules/open-ai/_models/interfaces/oai-global-settings.interface.d.ts +6 -0
  161. package/build/_modules/open-ai/_models/interfaces/oai-global-settings.interface.d.ts.map +1 -0
  162. package/build/_modules/open-ai/_models/interfaces/oai-global-settings.interface.js +3 -0
  163. package/build/_modules/open-ai/_models/interfaces/oai-global-settings.interface.js.map +1 -0
  164. package/build/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.d.ts +6 -0
  165. package/build/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.d.ts.map +1 -0
  166. package/build/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.js +3 -0
  167. package/build/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.js.map +1 -0
  168. package/build/_modules/open-ai/_models/interfaces/oai-llm-predefined-requests.interface.d.ts +52 -0
  169. package/build/_modules/open-ai/_models/interfaces/oai-llm-predefined-requests.interface.d.ts.map +1 -0
  170. package/build/_modules/open-ai/_models/interfaces/oai-llm-predefined-requests.interface.js +3 -0
  171. package/build/_modules/open-ai/_models/interfaces/oai-llm-predefined-requests.interface.js.map +1 -0
  172. package/build/_modules/open-ai/_models/interfaces/oai-page-compare-result.interface.d.ts +13 -0
  173. package/build/_modules/open-ai/_models/interfaces/oai-page-compare-result.interface.d.ts.map +1 -0
  174. package/build/_modules/open-ai/_models/interfaces/oai-page-compare-result.interface.js +3 -0
  175. package/build/_modules/open-ai/_models/interfaces/oai-page-compare-result.interface.js.map +1 -0
  176. package/build/_modules/open-ai/_models/oai-doc-chunk.data-model.d.ts +18 -0
  177. package/build/_modules/open-ai/_models/oai-doc-chunk.data-model.d.ts.map +1 -0
  178. package/build/_modules/open-ai/_models/oai-doc-chunk.data-model.js +80 -0
  179. package/build/_modules/open-ai/_models/oai-doc-chunk.data-model.js.map +1 -0
  180. package/build/_modules/open-ai/_services/oai-chunk.service-base.d.ts +13 -0
  181. package/build/_modules/open-ai/_services/oai-chunk.service-base.d.ts.map +1 -0
  182. package/build/_modules/open-ai/_services/oai-chunk.service-base.js +170 -0
  183. package/build/_modules/open-ai/_services/oai-chunk.service-base.js.map +1 -0
  184. package/build/_modules/open-ai/_services/{embedding.control-service.d.ts → oai-embedding.control-service.d.ts} +3 -3
  185. package/build/_modules/open-ai/_services/oai-embedding.control-service.d.ts.map +1 -0
  186. package/build/_modules/open-ai/_services/{embedding.control-service.js → oai-embedding.control-service.js} +5 -5
  187. package/build/_modules/open-ai/_services/oai-embedding.control-service.js.map +1 -0
  188. package/build/_modules/open-ai/_services/oai-llm-chat.service-base.d.ts +181 -0
  189. package/build/_modules/open-ai/_services/oai-llm-chat.service-base.d.ts.map +1 -0
  190. package/build/_modules/open-ai/_services/oai-llm-chat.service-base.js +344 -0
  191. package/build/_modules/open-ai/_services/oai-llm-chat.service-base.js.map +1 -0
  192. package/build/_modules/open-ai/_services/oai-llm.service-base.d.ts +234 -0
  193. package/build/_modules/open-ai/_services/oai-llm.service-base.d.ts.map +1 -0
  194. package/build/_modules/open-ai/_services/oai-llm.service-base.js +441 -0
  195. package/build/_modules/open-ai/_services/oai-llm.service-base.js.map +1 -0
  196. package/build/_modules/open-ai/_services/{vector-data.service.d.ts → oai-vector-data.service.d.ts} +4 -4
  197. package/build/_modules/open-ai/_services/oai-vector-data.service.d.ts.map +1 -0
  198. package/build/_modules/open-ai/_services/{vector-data.service.js → oai-vector-data.service.js} +27 -7
  199. package/build/_modules/open-ai/_services/oai-vector-data.service.js.map +1 -0
  200. package/build/_modules/open-ai/index.d.ts +19 -4
  201. package/build/_modules/open-ai/index.d.ts.map +1 -1
  202. package/build/_modules/open-ai/index.js +36 -4
  203. package/build/_modules/open-ai/index.js.map +1 -1
  204. package/build/_modules/server/index.d.ts +1 -1
  205. package/build/_modules/server/index.d.ts.map +1 -1
  206. package/build/_modules/server/index.js +16 -2
  207. package/build/_modules/server/index.js.map +1 -1
  208. package/build/_modules/server/server-status/server-status.controller.d.ts.map +1 -1
  209. package/build/_modules/server/server-status/server-status.controller.js +10 -0
  210. package/build/_modules/server/server-status/server-status.controller.js.map +1 -1
  211. package/build/_modules/socket/index.d.ts.map +1 -1
  212. package/build/_modules/socket/index.js +18 -0
  213. package/build/_modules/socket/index.js.map +1 -1
  214. package/build/_modules/test/index.d.ts.map +1 -1
  215. package/build/_modules/test/index.js +5 -0
  216. package/build/_modules/test/index.js.map +1 -1
  217. package/build/_modules/usage/index.d.ts.map +1 -1
  218. package/build/_modules/usage/index.js +5 -0
  219. package/build/_modules/usage/index.js.map +1 -1
  220. package/build/_services/base/data.service.d.ts +6 -0
  221. package/build/_services/base/data.service.d.ts.map +1 -1
  222. package/build/_services/base/data.service.js +6 -0
  223. package/build/_services/base/data.service.js.map +1 -1
  224. package/build/_services/base/db.service.d.ts +10 -0
  225. package/build/_services/base/db.service.d.ts.map +1 -1
  226. package/build/_services/base/db.service.js +10 -0
  227. package/build/_services/base/db.service.js.map +1 -1
  228. package/build/_services/server/app.server.js +1 -2
  229. package/build/_services/server/app.server.js.map +1 -1
  230. package/build/index.d.ts +3 -1
  231. package/build/index.d.ts.map +1 -1
  232. package/build/index.js +26 -1
  233. package/build/index.js.map +1 -1
  234. package/package.json +40 -10
  235. package/src/_collections/atlas-default-db-options.const.ts +10 -0
  236. package/src/_collections/get-environment-settings.util.ts +49 -0
  237. package/src/_collections/global-settings.const.ts +15 -4
  238. package/src/_collections/sample.env +21 -0
  239. package/src/_models/control-models/app-params.control-model.spec.ts +5 -4
  240. package/src/_models/control-models/app-params.control-model.ts +31 -2
  241. package/src/_models/control-models/endpoint-params.control-model.ts +1 -1
  242. package/src/_models/interfaces/environment-settings.interface.ts +59 -0
  243. package/src/_models/interfaces/global-settings.interface.ts +41 -1
  244. package/src/_modules/custom-data/index.ts +3 -0
  245. package/src/_modules/discord-assistant/_collections/dias-global-settings.const.ts +19 -0
  246. package/src/_modules/discord-assistant/_collections/dias.util.ts +43 -0
  247. package/src/_modules/discord-assistant/_models/dias-global-settings.interface.ts +20 -0
  248. package/src/_modules/discord-assistant/_models/dias-knowledge.data-model.ts +46 -0
  249. package/src/_modules/discord-assistant/_services/dias-chunk.data-service.ts +152 -0
  250. package/src/_modules/discord-assistant/_services/dias-io.control-service.ts +64 -0
  251. package/src/_modules/discord-assistant/_services/dias-main.control-service.ts +28 -0
  252. package/src/_modules/discord-assistant/_services/dias.service-base.ts +49 -0
  253. package/src/_modules/discord-assistant/index.ts +36 -0
  254. package/src/_modules/discord-assistant-voiced/_services/dias-discord-bot.control-service.ts +11 -0
  255. package/src/_modules/discord-assistant-voiced/index.ts +36 -0
  256. package/src/_modules/discord-bot/_collections/dibo-default-commands.const.ts +17 -0
  257. package/src/_modules/discord-bot/_collections/dibo-global-settings.conts.ts +56 -0
  258. package/src/_modules/discord-bot/_collections/dibo-operations.util.ts +372 -0
  259. package/src/_modules/discord-bot/_models/dibo-command.interface.ts +12 -0
  260. package/src/_modules/discord-bot/_models/dibo-last-mention-date.inteface.ts +8 -0
  261. package/src/_modules/discord-bot/_models/dibo-last-message-date.interface.ts +6 -0
  262. package/src/_modules/discord-bot/_models/global-bot-log-settings.interface.ts +98 -0
  263. package/src/_modules/discord-bot/_services/dibo-commands.control-service.ts +120 -0
  264. package/src/_modules/discord-bot/_services/dibo-io.control-service.ts +245 -0
  265. package/src/_modules/discord-bot/_services/dibo-main.control-service.ts +304 -0
  266. package/src/_modules/discord-bot/_services/dibo-routines.control-service.ts +60 -0
  267. package/src/_modules/discord-bot/index.ts +36 -0
  268. package/src/_modules/oauth2/index.ts +8 -0
  269. package/src/_modules/open-ai/_collections/oai-chunking.util.ts +496 -0
  270. package/src/_modules/open-ai/_collections/oai-document.util.ts +10 -0
  271. package/src/_modules/open-ai/_collections/oai-global-settings.const.ts +9 -0
  272. package/src/_modules/open-ai/_collections/oai-llm-predefined-requests-hu.conts.ts +83 -0
  273. package/src/_modules/open-ai/_collections/oai-llm-predefined-requests.conts.ts +76 -0
  274. package/src/_modules/open-ai/_enums/oai-compare-result-type.enum.ts +7 -0
  275. package/src/_modules/open-ai/_enums/oai-gpt-message-role.enum.ts +45 -0
  276. package/src/_modules/open-ai/_models/interfaces/oai-chunk-compare-result.interface.ts +10 -0
  277. package/src/_modules/open-ai/_models/interfaces/oai-document-page.interface.ts +21 -0
  278. package/src/_modules/open-ai/_models/interfaces/oai-global-settings.interface.ts +8 -0
  279. package/src/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.ts +7 -0
  280. package/src/_modules/open-ai/_models/interfaces/oai-llm-predefined-requests.interface.ts +57 -0
  281. package/src/_modules/open-ai/_models/interfaces/oai-page-compare-result.interface.ts +18 -0
  282. package/src/_modules/open-ai/_models/oai-doc-chunk.data-model.ts +92 -0
  283. package/src/_modules/open-ai/_services/oai-chunk.service-base.ts +214 -0
  284. package/src/_modules/open-ai/_services/{embedding.control-service.ts → oai-embedding.control-service.ts} +2 -2
  285. package/src/_modules/open-ai/_services/oai-llm-chat.service-base.ts +621 -0
  286. package/src/_modules/open-ai/_services/oai-llm.service-base.ts +651 -0
  287. package/src/_modules/open-ai/_services/{vector-data.service.ts → oai-vector-data.service.ts} +32 -5
  288. package/src/_modules/open-ai/index.ts +43 -4
  289. package/src/_modules/server/index.ts +18 -2
  290. package/src/_modules/server/server-status/server-status.controller.ts +13 -0
  291. package/src/_modules/socket/index.ts +23 -0
  292. package/src/_modules/test/index.ts +8 -0
  293. package/src/_modules/usage/index.ts +8 -0
  294. package/src/_services/base/data.service.ts +6 -0
  295. package/src/_services/base/db.service.ts +10 -0
  296. package/src/_services/server/app.server.ts +1 -1
  297. package/src/index.ts +28 -1
  298. package/build/_modules/open-ai/_services/embedding.control-service.d.ts.map +0 -1
  299. package/build/_modules/open-ai/_services/embedding.control-service.js.map +0 -1
  300. package/build/_modules/open-ai/_services/gpt.service-base.d.ts +0 -98
  301. package/build/_modules/open-ai/_services/gpt.service-base.d.ts.map +0 -1
  302. package/build/_modules/open-ai/_services/gpt.service-base.js +0 -284
  303. package/build/_modules/open-ai/_services/gpt.service-base.js.map +0 -1
  304. package/build/_modules/open-ai/_services/open-ai.service-base.d.ts +0 -21
  305. package/build/_modules/open-ai/_services/open-ai.service-base.d.ts.map +0 -1
  306. package/build/_modules/open-ai/_services/open-ai.service-base.js +0 -50
  307. package/build/_modules/open-ai/_services/open-ai.service-base.js.map +0 -1
  308. package/build/_modules/open-ai/_services/vector-data.service.d.ts.map +0 -1
  309. package/build/_modules/open-ai/_services/vector-data.service.js.map +0 -1
  310. package/build/_services/server/env-set.d.ts +0 -2
  311. package/build/_services/server/env-set.d.ts.map +0 -1
  312. package/build/_services/server/env-set.js +0 -20
  313. package/build/_services/server/env-set.js.map +0 -1
  314. package/src/_modules/open-ai/_services/gpt.service-base.ts +0 -438
  315. package/src/_modules/open-ai/_services/open-ai.service-base.ts +0 -69
  316. package/src/_services/server/env-set.ts +0 -21
@@ -11,7 +11,8 @@ import { DyFM_OpenAI_Settings, DyFM_OpenAIModel } from '@futdevpro/fsm-dynamo/op
11
11
 
12
12
  import { DyNTS_global_settings } from '../../../_collections/global-settings.const';
13
13
  import { DyNTS_DataService } from '../../../_services/base/data.service';
14
- import { Embedding_ControlService } from './embedding.control-service';
14
+ import { DyNTS_OAI_Embedding_ControlService } from './oai-embedding.control-service';
15
+ import { DyNTS_OAI_global_settings } from '../_collections/oai-global-settings.const';
15
16
 
16
17
  /**
17
18
  * Vector Data Service that is connected to the relevant DBServices
@@ -50,7 +51,7 @@ import { Embedding_ControlService } from './embedding.control-service';
50
51
  * }
51
52
  * }
52
53
  */
53
- export class DyNTS_VectorDataService<T extends DyFM_Metadata> extends DyNTS_DataService<T> {
54
+ export class DyNTS_OAI_VectorDataService<T extends DyFM_Metadata> extends DyNTS_DataService<T> {
54
55
 
55
56
  /**
56
57
  * Properties that are vectorized
@@ -59,7 +60,7 @@ export class DyNTS_VectorDataService<T extends DyFM_Metadata> extends DyNTS_Data
59
60
  readonly vectorizeProperties: DyFM_DataProperty_Params<any>[];
60
61
  /* readonly vectorizeProperties: { from: string, to: string }[]; */
61
62
 
62
- embedding_CS: Embedding_ControlService;
63
+ embedding_CS: DyNTS_OAI_Embedding_ControlService;
63
64
 
64
65
  constructor(
65
66
  /**
@@ -86,6 +87,28 @@ export class DyNTS_VectorDataService<T extends DyFM_Metadata> extends DyNTS_Data
86
87
  (dataParams.properties[key] as DyFM_DataProperty_Params<any>).vectorizedFrom !== key
87
88
  );
88
89
 
90
+ if (!openAISettings.openAIConfig.apiKey) {
91
+ throw new DyFM_Error({
92
+ ...this.getDefaultErrorSettings(
93
+ 'constructor',
94
+ new Error('openAIConfig.apiKey is required')
95
+ ),
96
+ });
97
+ }
98
+
99
+ const model = openAISettings.defaultSettings.useModel ?? DyFM_OpenAIModel.textEmbedding_3Large;
100
+
101
+ /* if (
102
+ !DyFM_allOpenAIEmbeddingModels.includes(model)
103
+ ) {
104
+ throw new DyFM_Error({
105
+ ...this.getDefaultErrorSettings(
106
+ 'constructor',
107
+ new Error(`useModel "${model}" is not an embedding model!`)
108
+ ),
109
+ });
110
+ } */
111
+
89
112
  if (!vectorizePropertyKeys.length) {
90
113
  throw new Error(
91
114
  'vectorizedPropertyKeys is missing! ' +
@@ -97,6 +120,10 @@ export class DyNTS_VectorDataService<T extends DyFM_Metadata> extends DyNTS_Data
97
120
  );
98
121
  }
99
122
 
123
+ vectorizePropertyKeys.forEach((key: string): void => {
124
+ dataParams.properties[key].embeddingModel ??= model;
125
+ });
126
+
100
127
  this.vectorizeProperties = vectorizePropertyKeys.map(
101
128
  (key: string): DyFM_DataProperty_Params<any> =>
102
129
  dataParams.properties[key] as DyFM_DataProperty_Params<any>
@@ -176,7 +203,7 @@ export class DyNTS_VectorDataService<T extends DyFM_Metadata> extends DyNTS_Data
176
203
  });
177
204
  }
178
205
 
179
- this.embedding_CS ??= new Embedding_ControlService(
206
+ this.embedding_CS ??= new DyNTS_OAI_Embedding_ControlService(
180
207
  this.openAISettings
181
208
  );
182
209
 
@@ -219,7 +246,7 @@ export class DyNTS_VectorDataService<T extends DyFM_Metadata> extends DyNTS_Data
219
246
  });
220
247
  }
221
248
 
222
- this.embedding_CS ??= new Embedding_ControlService(
249
+ this.embedding_CS ??= new DyNTS_OAI_Embedding_ControlService(
223
250
  this.openAISettings
224
251
  );
225
252
 
@@ -1,9 +1,48 @@
1
1
 
2
2
 
3
- export * from './_services/embedding.control-service';
4
- export * from './_services/gpt.service-base';
5
- export * from './_services/open-ai.service-base';
6
- export * from './_services/vector-data.service';
3
+ try {
4
+ require('open-ai');
5
+ } catch (error) {
6
+ console.log(
7
+ '❌ OpenAI package not found, please install it with: pnpm add open-ai'
8
+ );
9
+ }
10
+
11
+ //
12
+ // OpenAI module
13
+ //
14
+ // This module is created to simplify the usage of OpenAI API
15
+ // It creates universal solutions for the most common use cases
16
+ //
17
+
7
18
 
8
19
  export * from '@futdevpro/fsm-dynamo/open-ai';
9
20
 
21
+ // COLLECTIONS
22
+ export * from './_collections/oai-chunking.util';
23
+ export * from './_collections/oai-document.util';
24
+ export * from './_collections/oai-global-settings.const';
25
+ export * from './_collections/oai-llm-predefined-requests.conts';
26
+ export * from './_collections/oai-llm-predefined-requests-hu.conts';
27
+
28
+ // ENUMS
29
+ export * from './_enums/oai-compare-result-type.enum';
30
+ export * from './_enums/oai-gpt-message-role.enum';
31
+
32
+ // MODELS
33
+ export * from './_models/oai-doc-chunk.data-model';
34
+ // models/INTERFACES
35
+ export * from './_models/interfaces/oai-chunk-compare-result.interface';
36
+ export * from './_models/interfaces/oai-document-page.interface';
37
+ export * from './_models/interfaces/oai-global-settings.interface';
38
+ export * from './_models/interfaces/oai-gpt-message.interface';
39
+ export * from './_models/interfaces/oai-llm-predefined-requests.interface';
40
+ export * from './_models/interfaces/oai-page-compare-result.interface';
41
+
42
+ // SERVICES
43
+ export * from './_services/oai-chunk.service-base';
44
+ export * from './_services/oai-embedding.control-service';
45
+ export * from './_services/oai-llm-chat.service-base';
46
+ export * from './_services/oai-llm.service-base';
47
+ export * from './_services/oai-vector-data.service';
48
+
@@ -1,12 +1,28 @@
1
1
 
2
- // ERROR
2
+ //
3
+ // Server module
4
+ //
5
+ // This module contains solutions for basic server endpoints such as:
6
+ //
7
+ // - Errors;
8
+ // saving and retrieving errors that are occuring on the server
9
+ //
10
+ // - Server Status;
11
+ // retrieving the status of the server
12
+ //
13
+ // - Server Status Snapshot;
14
+ // saving and retrieving the status of the server at a specific time
15
+ //
16
+
17
+
18
+ // ERRORS
3
19
  export * from './errors/errors.controller';
4
20
  export * from './errors/errors.control-service';
5
21
  export * from './errors/errors.data-service';
6
22
 
7
23
  // SERVER-STATUS
8
- export * from './server-status/server-status-snapshot.control-service';
9
24
  export * from './server-status/server-status-snapshot.data-service';
25
+ export * from './server-status/server-status-snapshot.control-service';
10
26
  export * from './server-status/server-status.control-service';
11
27
  export * from './server-status/server-status.controller';
12
28
 
@@ -80,6 +80,19 @@ export abstract class DyNTS_ServerStatus_Controller<
80
80
  ],
81
81
  }),
82
82
 
83
+ new DyNTS_Endpoint_Params({
84
+ name: 'getServerHealth',
85
+ type: DyFM_HttpCallType.get,
86
+ endpoint: '/health',
87
+ tasks: [
88
+ async (req: Request, res: Response): Promise<void> => {
89
+ res.send(
90
+ this.server_CS.getServerStatus()
91
+ );
92
+ },
93
+ ],
94
+ }),
95
+
83
96
  new DyNTS_Endpoint_Params({
84
97
  name: 'getServerStatusForClient',
85
98
  type: DyFM_HttpCallType.get,
@@ -1,5 +1,28 @@
1
1
 
2
2
 
3
+ try {
4
+ require('socket.io');
5
+ } catch (error) {
6
+ console.log(
7
+ '❌ Socket.io package not found, please install it with: pnpm add socket.io'
8
+ );
9
+ }
10
+
11
+ try {
12
+ require('socket.io-client');
13
+ } catch (error) {
14
+ console.log(
15
+ '❌ Socket.io-client package not found, please install it with: pnpm add socket.io-client'
16
+ );
17
+ }
18
+
19
+ //
20
+ // Socket.io module
21
+ //
22
+ // This module is created to be able to decide if your aplication is needed to have socket.io
23
+ // It extends the server App solution with socket.io solutions
24
+ //
25
+
3
26
 
4
27
  // ENUMS
5
28
  export * from './_enums/socket-security.enum';
@@ -1,4 +1,12 @@
1
1
 
2
+
3
+
4
+ //
5
+ // Test module
6
+ //
7
+ // This module is creates simple test elements for your application
8
+ //
9
+
2
10
  export * from './test.controller';
3
11
  export * from './get-test-routing-module.util';
4
12
  export * from '@futdevpro/fsm-dynamo/test';
@@ -1,4 +1,12 @@
1
1
 
2
+
3
+ //
4
+ // Usage module
5
+ //
6
+ // This module is creates solutions to register and manage usage data
7
+ //
8
+
9
+
2
10
  // USAGE MODULE
3
11
  export * from './usage.controller';
4
12
  export * from './usage.data-service';
@@ -549,6 +549,8 @@ export class DyNTS_DataService<T extends DyFM_Metadata> {
549
549
  * @example
550
550
  * // or by id that is in list:
551
551
  * { userIds: { $in: this.userId } }
552
+ * // or by userIds:
553
+ * { userId: { $in: userIds } }
552
554
  * //
553
555
  * @example
554
556
  * // or by number or Date that is Greater Than AND Less Than:
@@ -605,6 +607,8 @@ export class DyNTS_DataService<T extends DyFM_Metadata> {
605
607
  * @example
606
608
  * // or by id that is in list:
607
609
  * { userIds: { $in: this.userId } }
610
+ * // or by userIds:
611
+ * { userId: { $in: userIds } }
608
612
  * //
609
613
  * @example
610
614
  * // or by number or Date that is Greater Than AND Less Than:
@@ -661,6 +665,8 @@ export class DyNTS_DataService<T extends DyFM_Metadata> {
661
665
  * @example
662
666
  * // or by id that is in list:
663
667
  * { userIds: { $in: this.userId } }
668
+ * // or by userIds:
669
+ * { userId: { $in: userIds } }
664
670
  * //
665
671
  * @example
666
672
  * // or by number or Date that is Greater Than AND Less Than:
@@ -735,6 +735,8 @@ export class DyNTS_DBService<T extends DyFM_Metadata> {
735
735
  * @example
736
736
  * // or by id that is in list:
737
737
  * { userIds: { $in: this.userId } }
738
+ * // or by userIds:
739
+ * { userId: { $in: userIds } }
738
740
  * //
739
741
  * @example
740
742
  * // or by number or Date that is Greater Than AND Less Than:
@@ -778,6 +780,8 @@ export class DyNTS_DBService<T extends DyFM_Metadata> {
778
780
  * @example
779
781
  * // or by id that is in list:
780
782
  * { userIds: { $in: this.userId } }
783
+ * // or by userIds:
784
+ * { userId: { $in: userIds } }
781
785
  * //
782
786
  * @example
783
787
  * // or by number or Date that is Greater Than AND Less Than:
@@ -825,6 +829,8 @@ export class DyNTS_DBService<T extends DyFM_Metadata> {
825
829
  * @example
826
830
  * // or by id that is in list:
827
831
  * { userIds: { $in: this.userId } }
832
+ * // or by userIds:
833
+ * { userId: { $in: userIds } }
828
834
  * //
829
835
  * @example
830
836
  * // or by number or Date that is Greater Than AND Less Than:
@@ -929,6 +935,8 @@ export class DyNTS_DBService<T extends DyFM_Metadata> {
929
935
  * @example
930
936
  * // or by id that is in list:
931
937
  * { userIds: { $in: this.userId } }
938
+ * // or by userIds:
939
+ * { userId: { $in: userIds } }
932
940
  * //
933
941
  * @example
934
942
  * // or by number or Date that is Greater Than AND Less Than:
@@ -1008,6 +1016,8 @@ export class DyNTS_DBService<T extends DyFM_Metadata> {
1008
1016
  * @example
1009
1017
  * // or by id that is in list:
1010
1018
  * { userIds: { $in: this.userId } }
1019
+ * // or by userIds:
1020
+ * { userId: { $in: userIds } }
1011
1021
  * //
1012
1022
  * @example
1013
1023
  * // or by number or Date that is Greater Than AND Less Than:
@@ -292,7 +292,7 @@ export abstract class DyNTS_App extends DyNTS_SingletonService {
292
292
  constructor(/* extended?: boolean */){
293
293
  super();
294
294
 
295
- dotenv.config()
295
+ /* dotenv.config() */
296
296
 
297
297
  process.on(
298
298
  'unhandledRejection',
package/src/index.ts CHANGED
@@ -1,6 +1,33 @@
1
1
 
2
+
3
+ /* try {
4
+ require('@futdevpro/fsm-dynamo');
5
+ } catch (error) {
6
+ console.log(
7
+ '❌ FSM-Dynamo package not found, please install it with: pnpm add @futdevpro/fsm-dynamo'
8
+ );
9
+ }
10
+
11
+ try {
12
+ require('express');
13
+ } catch (error) {
14
+ console.log(
15
+ '❌ Express package not found, please install it with: pnpm add express'
16
+ );
17
+ }
18
+
19
+ try {
20
+ require('axios');
21
+ } catch (error) {
22
+ console.log(
23
+ '❌ Axios package not found, please install it with: pnpm add axios'
24
+ );
25
+ } */
26
+
2
27
  // COLLECTIONS
3
28
  export * from './_collections/archive.util';
29
+ export * from './_collections/atlas-default-db-options.const';
30
+ export * from './_collections/get-environment-settings.util';
4
31
  export * from './_collections/global-settings.const';
5
32
 
6
33
 
@@ -15,6 +42,7 @@ export * from './_enums/route-security.enum';
15
42
 
16
43
  /** Interfaces describing global configuration and certificates. */
17
44
  export * from './_models/interfaces/certification-settings.interface';
45
+ export * from './_models/interfaces/environment-settings.interface';
18
46
  export * from './_models/interfaces/global-service-settings.interface';
19
47
  export * from './_models/interfaces/global-settings.interface';
20
48
  export * from './_models/interfaces/routing-module-settings.interface';
@@ -52,7 +80,6 @@ export * from './_services/base/singleton.service';
52
80
 
53
81
  // services/SERVER
54
82
  export * from './_services/server/app.server';
55
- export * from './_services/server/env-set';
56
83
 
57
84
  // services/ROUTE
58
85
  export * from './_services/route/controller.service';
@@ -1 +0,0 @@
1
- {"version":3,"file":"embedding.control-service.d.ts","sourceRoot":"","sources":["../../../../src/_modules/open-ai/_services/embedding.control-service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAGlE,qBAAa,wBAAyB,SAAQ,wBAAwB;IAE9D,eAAe,CACnB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,gBAAgB,GAAG,MAA8C,EACxE,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,EAAE,CAAC;IAyBd,gBAAgB,CACpB,KAAK,EAAE,MAAM,EAAE,EACf,KAAK,EAAE,gBAAgB,GAAG,MAA8C,EACxE,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;CAwBvB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"embedding.control-service.js","sourceRoot":"","sources":["../../../../src/_modules/open-ai/_services/embedding.control-service.ts"],"names":[],"mappings":";;;AACA,2DAAiE;AACjE,sDAAmD;AAEnD,iEAAkE;AAClE,uFAAoF;AAEpF,MAAa,wBAAyB,SAAQ,+CAAwB;IAEpE,KAAK,CAAC,eAAe,CACnB,IAAY,EACZ,QAAmC,0BAAgB,CAAC,oBAAoB,EACxE,MAAc;QAEd,IAAI,CAAC;YACH,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,MAAM,IAAI,uBAAU,CAAC;oBACnB,GAAG,IAAI,CAAC,uBAAuB,CAAC,iBAAiB,EAAE,IAAI,KAAK,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;oBAEzF,SAAS,EAAE,GAAG,6CAAqB,CAAC,mBAAmB,gBAAgB;iBACxE,CAAC,CAAC;YACL,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC;gBACnD,KAAK;gBACL,KAAK,EAAE,IAAI;aACZ,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACpC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,uBAAU,CAAC;gBACnB,GAAG,IAAI,CAAC,uBAAuB,CAAC,iBAAiB,EAAE,KAAK,EAAE,MAAM,CAAC;gBAEjE,SAAS,EAAE,GAAG,6CAAqB,CAAC,mBAAmB,gBAAgB;aACxE,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,KAAK,CAAC,gBAAgB,CACpB,KAAe,EACf,QAAmC,0BAAgB,CAAC,oBAAoB,EACxE,MAAc;QAEd,IAAI,CAAC;YACH,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,MAAM,IAAI,uBAAU,CAAC;oBACnB,GAAG,IAAI,CAAC,uBAAuB,CAAC,kBAAkB,EAAE,IAAI,KAAK,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;oBAE3F,SAAS,EAAE,GAAG,6CAAqB,CAAC,mBAAmB,iBAAiB;iBACzE,CAAC,CAAC;YACL,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC;gBACnD,KAAK;gBACL,KAAK,EAAE,KAAK;aACb,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACnD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,uBAAU,CAAC;gBACnB,GAAG,IAAI,CAAC,uBAAuB,CAAC,kBAAkB,EAAE,KAAK,EAAE,MAAM,CAAC;gBAElE,SAAS,EAAE,GAAG,6CAAqB,CAAC,mBAAmB,iBAAiB;aACzE,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF;AA3DD,4DA2DC"}
@@ -1,98 +0,0 @@
1
- import { ChatCompletion } from 'openai/resources';
2
- import { DyFM_GPTCall_Settings } from '@futdevpro/fsm-dynamo/open-ai';
3
- import { DyNTS_OpenAI_ServiceBase } from './open-ai.service-base';
4
- /**
5
- * {
6
- organization: 'org-XY',
7
- apiKey: 'sk-XY',
8
- project: 'proj_XY',
9
- }
10
- */
11
- export declare class DyNTS_GPT_ServiceBase extends DyNTS_OpenAI_ServiceBase {
12
- defaultLogReplacer: string;
13
- askYesNoQuestion(question: string, issuer: string, replaceThisInLog?: string): Promise<boolean>;
14
- askSimpleQuestion(question: string, issuer: string, replaceThisInLog?: string): Promise<string>;
15
- askPercentageQuestion(question: string, issuer: string, replaceThisInLog?: string): Promise<number>;
16
- askSelectQuestion(question: string, selectFrom: string[], issuer: string, replaceThisInLog?: string): Promise<string>;
17
- askMultipleSelectQuestionWithOptions(question: string, options: string[], issuer: string, replaceThisInLog?: string): Promise<string[]>;
18
- /**
19
- * Azt kérjük tőle, hogy adjon egy JSON formában választ.
20
- * Amit aztán megpróbálunk JSON.parse-olni.
21
- * Ha nem sikerül, akkor { unparsable: answer }-t adunk vissza.
22
- */
23
- askJSONQuestion(question: string, issuer: string, replaceThisInLog?: string): Promise<any>;
24
- /**
25
- * Azt kérjük tőle, hogy adjon egy JSON formában választ.
26
- * Amit aztán megpróbálunk JSON.parse-olni.
27
- * Ha nem sikerül, akkor { unparsable: answer }-t adunk vissza.
28
- *
29
- * A keysDescription-be leírjuk, milyen kulcsokat várunk. (nem konkrét kulcsneveket)
30
- */
31
- askJSONQuestionWithKeysDescription(question: string, keysDescription: string, issuer: string, replaceThisInLog?: string): Promise<any>;
32
- /**
33
- * Azt kérjük tőle, hogy adjon egy JSON formában választ.
34
- * Amit aztán megpróbálunk JSON.parse-olni.
35
- * Ha nem sikerül, akkor { unparsable: answer }-t adunk vissza.
36
- *
37
- * A keys-be leírjuk a konkrét kulcsneveket.
38
- */
39
- askJSONQuestionWithExactKeys(question: string, keys: string[], issuer: string, replaceThisInLog?: string): Promise<any>;
40
- askListQuestion(question: string, issuer: string, replaceThisInLog?: string): Promise<string[]>;
41
- private logQuestion;
42
- /**
43
- * This function will log the answer if the debugLog is true
44
- */
45
- getQuestionAnswer(question: string, issuer: string, messageSettings?: DyFM_GPTCall_Settings): Promise<string>;
46
- /**
47
- * olvasható mondatszerű-listaszerű formába teszi a listaelemeket
48
- * pl.: ['a', 'b', 'c'] -> '"a", "b" or "c"'
49
- */
50
- getListAsText(list: string[]): string;
51
- /**
52
- * This function will log the question and the answer if the debugLog is true
53
- */
54
- getAnswer(question: string, issuer: string, settings?: DyFM_GPTCall_Settings): Promise<string>;
55
- resolveSimpleUserMessage(message: string, issuer: string, settings?: DyFM_GPTCall_Settings): Promise<string>;
56
- resolveConversation(conversation: DyNTS_GPT_Message[], issuer: string, settings?: DyFM_GPTCall_Settings, getFullResponse?: boolean): Promise<string | ChatCompletion>;
57
- /**
58
- * TODO: Overview this: maybe it should use each setting from default if not provided here
59
- */
60
- private getMessageCreateInput;
61
- private getDefaultSystemMessage;
62
- }
63
- export interface DyNTS_GPT_Message {
64
- role: DyNTS_GPT_Message_Role | string;
65
- content: string;
66
- }
67
- export declare enum DyNTS_GPT_Message_Role {
68
- /**
69
- * Developer-provided instructions that the model should follow, regardless of
70
- * messages sent by the user. With o1 models and newer, `developer` messages
71
- * replace the previous `system` messages.
72
- */
73
- developer = "developer",
74
- /**
75
- * Developer-provided instructions that the model should follow, regardless of
76
- * messages sent by the user. With o1 models and newer, use `developer` messages
77
- * for this purpose instead.
78
- */
79
- system = "system",
80
- /**
81
- * Messages sent by an end user, containing prompts or additional context
82
- * information.
83
- */
84
- user = "user",
85
- /**
86
- * Messages sent by the model in response to user messages.
87
- */
88
- assistant = "assistant",
89
- /** ??? */
90
- tool = "tool",
91
- /**
92
- * ???
93
- * @deprecated
94
- */
95
- function = "function"
96
- }
97
- export declare function DyFM_notNull(value: any): boolean;
98
- //# sourceMappingURL=gpt.service-base.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gpt.service-base.d.ts","sourceRoot":"","sources":["../../../../src/_modules/open-ai/_services/gpt.service-base.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAA8B,MAAM,kBAAkB,CAAC;AAG9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAGtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAIlE;;;;;;GAMG;AAIH,qBAAa,qBAAsB,SAAQ,wBAAwB;IAEjE,kBAAkB,EAAE,MAAM,CAAS;IAE7B,gBAAgB,CACpB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,gBAAgB,CAAC,EAAE,MAAM,GACxB,OAAO,CAAC,OAAO,CAAC;IAUb,iBAAiB,CACrB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,gBAAgB,CAAC,EAAE,MAAM,GACxB,OAAO,CAAC,MAAM,CAAC;IAMZ,qBAAqB,CACzB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,gBAAgB,CAAC,EAAE,MAAM,GACxB,OAAO,CAAC,MAAM,CAAC;IAmBZ,iBAAiB,CACrB,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAAE,EACpB,MAAM,EAAE,MAAM,EACd,gBAAgB,CAAC,EAAE,MAAM,GACxB,OAAO,CAAC,MAAM,CAAC;IAgBZ,oCAAoC,CACxC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EAAE,EACjB,MAAM,EAAE,MAAM,EACd,gBAAgB,CAAC,EAAE,MAAM,GACxB,OAAO,CAAC,MAAM,EAAE,CAAC;IAoBpB;;;;OAIG;IACG,eAAe,CACnB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,gBAAgB,CAAC,EAAE,MAAM,GACxB,OAAO,CAAC,GAAG,CAAC;IAmBf;;;;;;OAMG;IACG,kCAAkC,CACtC,QAAQ,EAAE,MAAM,EAChB,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,MAAM,EACd,gBAAgB,CAAC,EAAE,MAAM,GACxB,OAAO,CAAC,GAAG,CAAC;IAmBf;;;;;;OAMG;IACG,4BAA4B,CAChC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EAAE,EACd,MAAM,EAAE,MAAM,EACd,gBAAgB,CAAC,EAAE,MAAM,GACxB,OAAO,CAAC,GAAG,CAAC;IAoBT,eAAe,CACnB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,gBAAgB,CAAC,EAAE,MAAM,GACxB,OAAO,CAAC,MAAM,EAAE,CAAC;IA6BpB,OAAO,CAAC,WAAW;IAUnB;;OAEG;IACG,iBAAiB,CACrB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,eAAe,GAAE,qBAA4C,GAC5D,OAAO,CAAC,MAAM,CAAC;IAQlB;;;OAGG;IACH,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM;IAUrC;;OAEG;IACG,SAAS,CACb,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,qBAAqB,GAC/B,OAAO,CAAC,MAAM,CAAC;IAcZ,wBAAwB,CAC5B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,qBAAqB,GAC/B,OAAO,CAAC,MAAM,CAAC;IASZ,mBAAmB,CACvB,YAAY,EAAE,iBAAiB,EAAE,EACjC,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,qBAAqB,EAChC,eAAe,CAAC,EAAE,OAAO,GACxB,OAAO,CAAC,MAAM,GAAG,cAAc,CAAC;IAoBnC;;OAEG;IACH,OAAO,CAAC,qBAAqB;IA2C7B,OAAO,CAAC,uBAAuB;CAMhC;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,sBAAsB,GAAG,MAAM,CAAC;IACtC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,oBAAY,sBAAsB;IAChC;;;;OAIG;IACH,SAAS,cAAc;IAEvB;;;;OAIG;IACH,MAAM,WAAW;IAEjB;;;OAGG;IACH,IAAI,SAAS;IAEb;;OAEG;IACH,SAAS,cAAc;IAEvB,UAAU;IACV,IAAI,SAAS;IAEb;;;OAGG;IACH,QAAQ,aAAa;CACtB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAEhD"}