@agentica/core 0.10.3 → 0.11.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 (265) hide show
  1. package/README.md +2 -2
  2. package/lib/Agentica.d.ts +14 -14
  3. package/lib/Agentica.js +54 -29
  4. package/lib/Agentica.js.map +1 -1
  5. package/lib/chatgpt/ChatGptAgent.d.ts +3 -3
  6. package/lib/chatgpt/ChatGptAgent.js +1 -1
  7. package/lib/chatgpt/ChatGptAgent.js.map +1 -1
  8. package/lib/chatgpt/ChatGptCallFunctionAgent.d.ts +3 -3
  9. package/lib/chatgpt/ChatGptCallFunctionAgent.js +61 -63
  10. package/lib/chatgpt/ChatGptCallFunctionAgent.js.map +1 -1
  11. package/lib/chatgpt/ChatGptCancelFunctionAgent.d.ts +6 -6
  12. package/lib/chatgpt/ChatGptCancelFunctionAgent.js +28 -30
  13. package/lib/chatgpt/ChatGptCancelFunctionAgent.js.map +1 -1
  14. package/lib/chatgpt/ChatGptCompletionMessageUtil.d.ts +8 -0
  15. package/lib/chatgpt/ChatGptCompletionMessageUtil.js +536 -0
  16. package/lib/chatgpt/ChatGptCompletionMessageUtil.js.map +1 -0
  17. package/lib/chatgpt/ChatGptDescribeFunctionAgent.d.ts +4 -3
  18. package/lib/chatgpt/ChatGptDescribeFunctionAgent.js +56 -6
  19. package/lib/chatgpt/ChatGptDescribeFunctionAgent.js.map +1 -1
  20. package/lib/chatgpt/ChatGptHistoryDecoder.d.ts +2 -2
  21. package/lib/chatgpt/ChatGptHistoryDecoder.js +8 -8
  22. package/lib/chatgpt/ChatGptHistoryDecoder.js.map +1 -1
  23. package/lib/chatgpt/ChatGptInitializeFunctionAgent.d.ts +3 -3
  24. package/lib/chatgpt/ChatGptInitializeFunctionAgent.js +11 -5
  25. package/lib/chatgpt/ChatGptInitializeFunctionAgent.js.map +1 -1
  26. package/lib/chatgpt/ChatGptSelectFunctionAgent.d.ts +3 -3
  27. package/lib/chatgpt/ChatGptSelectFunctionAgent.js +39 -42
  28. package/lib/chatgpt/ChatGptSelectFunctionAgent.js.map +1 -1
  29. package/lib/chatgpt/ChatGptUsageAggregator.d.ts +6 -0
  30. package/lib/chatgpt/ChatGptUsageAggregator.js +48 -0
  31. package/lib/chatgpt/ChatGptUsageAggregator.js.map +1 -0
  32. package/lib/context/AgenticaCancelPrompt.d.ts +16 -0
  33. package/lib/context/AgenticaCancelPrompt.js +20 -0
  34. package/lib/context/AgenticaCancelPrompt.js.map +1 -0
  35. package/lib/context/AgenticaClassOperation.d.ts +8 -0
  36. package/lib/context/AgenticaClassOperation.js +11 -0
  37. package/lib/context/AgenticaClassOperation.js.map +1 -0
  38. package/lib/{structures/IAgenticaContext.d.ts → context/AgenticaContext.d.ts} +15 -14
  39. package/lib/{structures/IAgenticaPrompt.js → context/AgenticaContext.js} +1 -1
  40. package/lib/context/AgenticaContext.js.map +1 -0
  41. package/lib/context/AgenticaHttpOperation.d.ts +8 -0
  42. package/lib/context/AgenticaHttpOperation.js +11 -0
  43. package/lib/context/AgenticaHttpOperation.js.map +1 -0
  44. package/lib/context/AgenticaOperation.d.ts +46 -0
  45. package/lib/{structures/IAgenticaContext.js → context/AgenticaOperation.js} +1 -1
  46. package/lib/context/AgenticaOperation.js.map +1 -0
  47. package/lib/context/AgenticaOperationBase.d.ts +29 -0
  48. package/lib/context/AgenticaOperationBase.js +21 -0
  49. package/lib/context/AgenticaOperationBase.js.map +1 -0
  50. package/lib/{structures/IAgenticaOperationCollection.d.ts → context/AgenticaOperationCollection.d.ts} +6 -6
  51. package/lib/{structures/IAgenticaOperationSelection.js → context/AgenticaOperationCollection.js} +1 -1
  52. package/lib/context/AgenticaOperationCollection.js.map +1 -0
  53. package/lib/context/AgenticaOperationSelection.d.ts +15 -0
  54. package/lib/context/AgenticaOperationSelection.js +17 -0
  55. package/lib/context/AgenticaOperationSelection.js.map +1 -0
  56. package/lib/context/AgenticaTokenUsage.d.ts +82 -0
  57. package/lib/context/AgenticaTokenUsage.js +97 -0
  58. package/lib/context/AgenticaTokenUsage.js.map +1 -0
  59. package/lib/context/internal/AgenticaTokenUsageAggregator.d.ts +10 -0
  60. package/lib/context/internal/AgenticaTokenUsageAggregator.js +47 -0
  61. package/lib/context/internal/AgenticaTokenUsageAggregator.js.map +1 -0
  62. package/lib/context/internal/__IChatCancelFunctionsApplication.js.map +1 -0
  63. package/lib/context/internal/__IChatFunctionReference.js.map +1 -0
  64. package/lib/context/internal/__IChatInitialApplication.js.map +1 -0
  65. package/lib/context/internal/__IChatSelectFunctionsApplication.js.map +1 -0
  66. package/lib/events/AgenticaCallEvent.d.ts +18 -0
  67. package/lib/events/AgenticaCallEvent.js +22 -0
  68. package/lib/events/AgenticaCallEvent.js.map +1 -0
  69. package/lib/events/AgenticaCancelEvent.d.ts +14 -0
  70. package/lib/events/AgenticaCancelEvent.js +18 -0
  71. package/lib/events/AgenticaCancelEvent.js.map +1 -0
  72. package/lib/events/AgenticaDescribeEvent.d.ts +27 -0
  73. package/lib/events/AgenticaDescribeEvent.js +40 -0
  74. package/lib/events/AgenticaDescribeEvent.js.map +1 -0
  75. package/lib/events/AgenticaEvent.d.ts +25 -0
  76. package/lib/{structures/IAgenticaEvent.js → events/AgenticaEvent.js} +1 -1
  77. package/lib/events/AgenticaEvent.js.map +1 -0
  78. package/lib/events/AgenticaEventBase.d.ts +4 -0
  79. package/lib/events/AgenticaEventBase.js +10 -0
  80. package/lib/events/AgenticaEventBase.js.map +1 -0
  81. package/lib/events/AgenticaEventSource.d.ts +1 -0
  82. package/lib/events/AgenticaEventSource.js +3 -0
  83. package/lib/events/AgenticaEventSource.js.map +1 -0
  84. package/lib/events/AgenticaExecuteEvent.d.ts +22 -0
  85. package/lib/events/AgenticaExecuteEvent.js +33 -0
  86. package/lib/events/AgenticaExecuteEvent.js.map +1 -0
  87. package/lib/events/AgenticaInitializeEvent.d.ts +6 -0
  88. package/lib/events/AgenticaInitializeEvent.js +16 -0
  89. package/lib/events/AgenticaInitializeEvent.js.map +1 -0
  90. package/lib/events/AgenticaRequestEvent.d.ts +27 -0
  91. package/lib/events/AgenticaRequestEvent.js +22 -0
  92. package/lib/events/AgenticaRequestEvent.js.map +1 -0
  93. package/lib/events/AgenticaResponseEvent.d.ts +35 -0
  94. package/lib/events/AgenticaResponseEvent.js +16 -0
  95. package/lib/events/AgenticaResponseEvent.js.map +1 -0
  96. package/lib/events/AgenticaSelectEvent.d.ts +16 -0
  97. package/lib/events/AgenticaSelectEvent.js +26 -0
  98. package/lib/events/AgenticaSelectEvent.js.map +1 -0
  99. package/lib/events/AgenticaTextEvent.d.ts +25 -0
  100. package/lib/events/AgenticaTextEvent.js +40 -0
  101. package/lib/events/AgenticaTextEvent.js.map +1 -0
  102. package/lib/index.d.ts +26 -8
  103. package/lib/index.js +29 -9
  104. package/lib/index.js.map +1 -1
  105. package/lib/index.mjs +1391 -304
  106. package/lib/index.mjs.map +1 -1
  107. package/lib/internal/AgenticaOperationComposer.d.ts +2 -2
  108. package/lib/internal/AgenticaOperationComposer.js +12 -0
  109. package/lib/internal/AgenticaOperationComposer.js.map +1 -1
  110. package/lib/internal/ByteArrayUtil.d.ts +3 -0
  111. package/lib/internal/ByteArrayUtil.js +10 -0
  112. package/lib/internal/ByteArrayUtil.js.map +1 -0
  113. package/lib/internal/MPSCUtil.d.ts +21 -0
  114. package/lib/internal/MPSCUtil.js +84 -0
  115. package/lib/internal/MPSCUtil.js.map +1 -0
  116. package/lib/internal/StreamUtil.d.ts +6 -0
  117. package/lib/internal/StreamUtil.js +65 -0
  118. package/lib/internal/StreamUtil.js.map +1 -0
  119. package/lib/json/IAgenticaEventJson.d.ts +149 -0
  120. package/lib/{structures/IAgenticaOperation.js → json/IAgenticaEventJson.js} +1 -1
  121. package/lib/json/IAgenticaEventJson.js.map +1 -0
  122. package/lib/json/IAgenticaOperationJson.d.ts +33 -0
  123. package/lib/json/IAgenticaOperationJson.js +3 -0
  124. package/lib/json/IAgenticaOperationJson.js.map +1 -0
  125. package/lib/json/IAgenticaOperationSelectionJson.d.ts +18 -0
  126. package/lib/{structures/IAgenticaOperationCollection.js → json/IAgenticaOperationSelectionJson.js} +1 -1
  127. package/lib/json/IAgenticaOperationSelectionJson.js.map +1 -0
  128. package/lib/json/IAgenticaPromptJson.d.ts +111 -0
  129. package/lib/json/IAgenticaPromptJson.js +3 -0
  130. package/lib/json/IAgenticaPromptJson.js.map +1 -0
  131. package/lib/{structures/IAgenticaTokenUsage.d.ts → json/IAgenticaTokenUsageJson.d.ts} +10 -10
  132. package/lib/json/IAgenticaTokenUsageJson.js +3 -0
  133. package/lib/json/IAgenticaTokenUsageJson.js.map +1 -0
  134. package/lib/prompts/AgenticaCancelPrompt.d.ts +16 -0
  135. package/lib/prompts/AgenticaCancelPrompt.js +20 -0
  136. package/lib/prompts/AgenticaCancelPrompt.js.map +1 -0
  137. package/lib/prompts/AgenticaDescribePrompt.d.ts +24 -0
  138. package/lib/prompts/AgenticaDescribePrompt.js +20 -0
  139. package/lib/prompts/AgenticaDescribePrompt.js.map +1 -0
  140. package/lib/prompts/AgenticaExecutePrompt.d.ts +20 -0
  141. package/lib/prompts/AgenticaExecutePrompt.js +24 -0
  142. package/lib/prompts/AgenticaExecutePrompt.js.map +1 -0
  143. package/lib/prompts/AgenticaPrompt.d.ts +7 -0
  144. package/lib/{typings/AgenticaSource.js → prompts/AgenticaPrompt.js} +1 -1
  145. package/lib/prompts/AgenticaPrompt.js.map +1 -0
  146. package/lib/prompts/AgenticaPromptBase.d.ts +22 -0
  147. package/lib/prompts/AgenticaPromptBase.js +22 -0
  148. package/lib/prompts/AgenticaPromptBase.js.map +1 -0
  149. package/lib/prompts/AgenticaSelectPrompt.d.ts +16 -0
  150. package/lib/prompts/AgenticaSelectPrompt.js +20 -0
  151. package/lib/prompts/AgenticaSelectPrompt.js.map +1 -0
  152. package/lib/prompts/AgenticaTextPrompt.d.ts +14 -0
  153. package/lib/prompts/AgenticaTextPrompt.js +20 -0
  154. package/lib/prompts/AgenticaTextPrompt.js.map +1 -0
  155. package/lib/structures/IAgenticaConfig.d.ts +3 -3
  156. package/lib/structures/IAgenticaExecutor.d.ts +12 -11
  157. package/lib/structures/IAgenticaProps.d.ts +2 -3
  158. package/lib/structures/IAgenticaSystemPrompt.d.ts +12 -11
  159. package/lib/transformers/AgenticaEventTransformer.d.ts +45 -0
  160. package/lib/transformers/AgenticaEventTransformer.js +127 -0
  161. package/lib/transformers/AgenticaEventTransformer.js.map +1 -0
  162. package/lib/transformers/AgenticaPromptTransformer.d.ts +34 -0
  163. package/lib/transformers/AgenticaPromptTransformer.js +90 -0
  164. package/lib/transformers/AgenticaPromptTransformer.js.map +1 -0
  165. package/package.json +1 -1
  166. package/src/Agentica.ts +94 -61
  167. package/src/chatgpt/ChatGptAgent.ts +8 -7
  168. package/src/chatgpt/ChatGptCallFunctionAgent.ts +90 -88
  169. package/src/chatgpt/ChatGptCancelFunctionAgent.ts +51 -58
  170. package/src/chatgpt/ChatGptCompletionMessageUtil.ts +166 -0
  171. package/src/chatgpt/ChatGptDescribeFunctionAgent.ts +81 -12
  172. package/src/chatgpt/ChatGptHistoryDecoder.ts +14 -14
  173. package/src/chatgpt/ChatGptInitializeFunctionAgent.ts +21 -13
  174. package/src/chatgpt/ChatGptSelectFunctionAgent.ts +66 -74
  175. package/src/chatgpt/ChatGptUsageAggregator.ts +62 -0
  176. package/src/context/AgenticaCancelPrompt.ts +32 -0
  177. package/src/context/AgenticaClassOperation.ts +23 -0
  178. package/src/{structures/IAgenticaContext.ts → context/AgenticaContext.ts} +17 -16
  179. package/src/context/AgenticaHttpOperation.ts +27 -0
  180. package/src/{structures/IAgenticaOperation.ts → context/AgenticaOperation.ts} +25 -22
  181. package/src/context/AgenticaOperationBase.ts +57 -0
  182. package/src/{structures/IAgenticaOperationCollection.ts → context/AgenticaOperationCollection.ts} +6 -6
  183. package/src/context/AgenticaOperationSelection.ts +27 -0
  184. package/src/context/AgenticaTokenUsage.ts +170 -0
  185. package/src/context/internal/AgenticaTokenUsageAggregator.ts +66 -0
  186. package/src/events/AgenticaCallEvent.ts +36 -0
  187. package/src/events/AgenticaCancelEvent.ts +28 -0
  188. package/src/events/AgenticaDescribeEvent.ts +61 -0
  189. package/src/events/AgenticaEvent.ts +36 -0
  190. package/src/events/AgenticaEventBase.ts +7 -0
  191. package/src/{typings/AgenticaSource.ts → events/AgenticaEventSource.ts} +1 -1
  192. package/src/events/AgenticaExecuteEvent.ts +50 -0
  193. package/src/events/AgenticaInitializeEvent.ts +14 -0
  194. package/src/events/AgenticaRequestEvent.ts +45 -0
  195. package/src/events/AgenticaResponseEvent.ts +48 -0
  196. package/src/events/AgenticaSelectEvent.ts +37 -0
  197. package/src/events/AgenticaTextEvent.ts +57 -0
  198. package/src/index.ts +33 -9
  199. package/src/internal/AgenticaOperationComposer.ts +24 -15
  200. package/src/internal/ByteArrayUtil.ts +5 -0
  201. package/src/internal/MPSCUtil.ts +75 -0
  202. package/src/internal/StreamUtil.ts +64 -0
  203. package/src/json/IAgenticaEventJson.ts +178 -0
  204. package/src/json/IAgenticaOperationJson.ts +36 -0
  205. package/src/json/IAgenticaOperationSelectionJson.ts +19 -0
  206. package/src/json/IAgenticaPromptJson.ts +130 -0
  207. package/src/{structures/IAgenticaTokenUsage.ts → json/IAgenticaTokenUsageJson.ts} +10 -10
  208. package/src/prompts/AgenticaCancelPrompt.ts +32 -0
  209. package/src/prompts/AgenticaDescribePrompt.ts +41 -0
  210. package/src/prompts/AgenticaExecutePrompt.ts +52 -0
  211. package/src/prompts/AgenticaPrompt.ts +14 -0
  212. package/src/prompts/AgenticaPromptBase.ts +27 -0
  213. package/src/prompts/AgenticaSelectPrompt.ts +32 -0
  214. package/src/prompts/AgenticaTextPrompt.ts +31 -0
  215. package/src/structures/IAgenticaConfig.ts +3 -3
  216. package/src/structures/IAgenticaExecutor.ts +14 -13
  217. package/src/structures/IAgenticaProps.ts +2 -3
  218. package/src/structures/IAgenticaSystemPrompt.ts +12 -11
  219. package/src/transformers/AgenticaEventTransformer.ts +165 -0
  220. package/src/transformers/AgenticaPromptTransformer.ts +134 -0
  221. package/lib/internal/AgenticaPromptFactory.d.ts +0 -7
  222. package/lib/internal/AgenticaPromptFactory.js +0 -9
  223. package/lib/internal/AgenticaPromptFactory.js.map +0 -1
  224. package/lib/internal/AgenticaPromptTransformer.d.ts +0 -10
  225. package/lib/internal/AgenticaPromptTransformer.js +0 -58
  226. package/lib/internal/AgenticaPromptTransformer.js.map +0 -1
  227. package/lib/internal/AgenticaTokenUsageAggregator.d.ts +0 -11
  228. package/lib/internal/AgenticaTokenUsageAggregator.js +0 -92
  229. package/lib/internal/AgenticaTokenUsageAggregator.js.map +0 -1
  230. package/lib/structures/IAgenticaContext.js.map +0 -1
  231. package/lib/structures/IAgenticaEvent.d.ts +0 -192
  232. package/lib/structures/IAgenticaEvent.js.map +0 -1
  233. package/lib/structures/IAgenticaOperation.d.ts +0 -47
  234. package/lib/structures/IAgenticaOperation.js.map +0 -1
  235. package/lib/structures/IAgenticaOperationCollection.js.map +0 -1
  236. package/lib/structures/IAgenticaOperationSelection.d.ts +0 -50
  237. package/lib/structures/IAgenticaOperationSelection.js.map +0 -1
  238. package/lib/structures/IAgenticaPrompt.d.ts +0 -138
  239. package/lib/structures/IAgenticaPrompt.js.map +0 -1
  240. package/lib/structures/IAgenticaTokenUsage.js +0 -3
  241. package/lib/structures/IAgenticaTokenUsage.js.map +0 -1
  242. package/lib/structures/internal/__IChatCancelFunctionsApplication.js.map +0 -1
  243. package/lib/structures/internal/__IChatFunctionReference.js.map +0 -1
  244. package/lib/structures/internal/__IChatInitialApplication.js.map +0 -1
  245. package/lib/structures/internal/__IChatSelectFunctionsApplication.js.map +0 -1
  246. package/lib/typings/AgenticaSource.d.ts +0 -1
  247. package/lib/typings/AgenticaSource.js.map +0 -1
  248. package/src/internal/AgenticaPromptFactory.ts +0 -32
  249. package/src/internal/AgenticaPromptTransformer.ts +0 -86
  250. package/src/internal/AgenticaTokenUsageAggregator.ts +0 -115
  251. package/src/structures/IAgenticaEvent.ts +0 -229
  252. package/src/structures/IAgenticaOperationSelection.ts +0 -68
  253. package/src/structures/IAgenticaPrompt.ts +0 -182
  254. /package/lib/{structures → context}/internal/__IChatCancelFunctionsApplication.d.ts +0 -0
  255. /package/lib/{structures → context}/internal/__IChatCancelFunctionsApplication.js +0 -0
  256. /package/lib/{structures → context}/internal/__IChatFunctionReference.d.ts +0 -0
  257. /package/lib/{structures → context}/internal/__IChatFunctionReference.js +0 -0
  258. /package/lib/{structures → context}/internal/__IChatInitialApplication.d.ts +0 -0
  259. /package/lib/{structures → context}/internal/__IChatInitialApplication.js +0 -0
  260. /package/lib/{structures → context}/internal/__IChatSelectFunctionsApplication.d.ts +0 -0
  261. /package/lib/{structures → context}/internal/__IChatSelectFunctionsApplication.js +0 -0
  262. /package/src/{structures → context}/internal/__IChatCancelFunctionsApplication.ts +0 -0
  263. /package/src/{structures → context}/internal/__IChatFunctionReference.ts +0 -0
  264. /package/src/{structures → context}/internal/__IChatInitialApplication.ts +0 -0
  265. /package/src/{structures → context}/internal/__IChatSelectFunctionsApplication.ts +0 -0
@@ -0,0 +1,149 @@
1
+ import OpenAI from "openai";
2
+ import { AgenticaEventSource } from "../events/AgenticaEventSource";
3
+ import { IAgenticaOperationJson } from "./IAgenticaOperationJson";
4
+ import { IAgenticaOperationSelectionJson } from "./IAgenticaOperationSelectionJson";
5
+ import { IAgenticaPromptJson } from "./IAgenticaPromptJson";
6
+ /**
7
+ * Nestia A.I. chatbot event.
8
+ *
9
+ * `IAgenticaEventJson` is an union type of all possible events that can
10
+ * be emitted by the A.I. chatbot of the {@link Agentica} class. You
11
+ * can discriminate the subtype by checking the {@link type} property.
12
+ *
13
+ * @author Samchon
14
+ */
15
+ export type IAgenticaEventJson = IAgenticaEventJson.ICall | IAgenticaEventJson.ICancel | IAgenticaEventJson.IDescribe | IAgenticaEventJson.IExecute | IAgenticaEventJson.IInitialize | IAgenticaEventJson.IRequest | IAgenticaEventJson.ISelect | IAgenticaEventJson.IText;
16
+ export declare namespace IAgenticaEventJson {
17
+ export type Type = IAgenticaEventJson["type"];
18
+ export type Mapper = {
19
+ initialize: IInitialize;
20
+ select: ISelect;
21
+ cancel: ICancel;
22
+ call: ICall;
23
+ execute: IExecute;
24
+ describe: IDescribe;
25
+ text: IText;
26
+ request: IRequest;
27
+ };
28
+ /**
29
+ * Event of initializing the chatbot.
30
+ */
31
+ export interface IInitialize extends IBase<"initialize"> {
32
+ }
33
+ /**
34
+ * Event of selecting a function to call.
35
+ */
36
+ export interface ISelect extends IBase<"select"> {
37
+ selection: IAgenticaOperationSelectionJson;
38
+ }
39
+ /**
40
+ * Event of canceling a function calling.
41
+ */
42
+ export interface ICancel extends IBase<"cancel"> {
43
+ selection: IAgenticaOperationSelectionJson;
44
+ }
45
+ /**
46
+ * Event of calling a function.
47
+ */
48
+ export interface ICall extends IBase<"call"> {
49
+ /**
50
+ * ID of the tool calling.
51
+ */
52
+ id: string;
53
+ /**
54
+ * Target operation to call.
55
+ */
56
+ operation: IAgenticaOperationJson;
57
+ /**
58
+ * Arguments of the function calling.
59
+ *
60
+ * If you modify this {@link arguments} property, it actually modifies
61
+ * the backend server's request. Therefore, be careful when you're
62
+ * trying to modify this property.
63
+ */
64
+ arguments: Record<string, any>;
65
+ }
66
+ /**
67
+ * Event of function calling execution.
68
+ */
69
+ export interface IExecute extends IBase<"execute"> {
70
+ /**
71
+ * ID of the tool calling.
72
+ */
73
+ id: string;
74
+ /**
75
+ * Target operation had called.
76
+ */
77
+ operation: IAgenticaOperationJson;
78
+ /**
79
+ * Arguments of the function calling.
80
+ */
81
+ arguments: object;
82
+ /**
83
+ * Return value.
84
+ */
85
+ value: any;
86
+ }
87
+ /**
88
+ * Event of description.
89
+ *
90
+ * Event describing return values of LLM function callings.
91
+ */
92
+ export interface IDescribe extends IBase<"describe"> {
93
+ /**
94
+ * Executions of the LLM function calling.
95
+ *
96
+ * This prompt describes the return value of them.
97
+ */
98
+ executes: IAgenticaPromptJson.IExecute[];
99
+ /**
100
+ * Description text.
101
+ */
102
+ text: string;
103
+ /**
104
+ * Whether the streaming is completed or not.
105
+ */
106
+ done: boolean;
107
+ }
108
+ /**
109
+ * Event of text message.
110
+ */
111
+ export interface IText extends IBase<"text"> {
112
+ /**
113
+ * Role of the orator.
114
+ */
115
+ role: "assistant" | "user";
116
+ /**
117
+ * Conversation text.
118
+ */
119
+ text: string;
120
+ /**
121
+ * Whether the streaming is completed or not.
122
+ */
123
+ done: boolean;
124
+ }
125
+ /**
126
+ * Request event of LLM vendor API.
127
+ */
128
+ export interface IRequest extends IBase<"request"> {
129
+ /**
130
+ * The source agent of the request.
131
+ */
132
+ source: AgenticaEventSource;
133
+ /**
134
+ * Request body.
135
+ */
136
+ body: OpenAI.ChatCompletionCreateParamsStreaming;
137
+ /**
138
+ * Options for the request.
139
+ */
140
+ options?: OpenAI.RequestOptions | undefined;
141
+ }
142
+ interface IBase<Type extends string> {
143
+ /**
144
+ * Discriminator type.
145
+ */
146
+ type: Type;
147
+ }
148
+ export {};
149
+ }
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IAgenticaOperation.js.map
3
+ //# sourceMappingURL=IAgenticaEventJson.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IAgenticaEventJson.js","sourceRoot":"","sources":["../../src/json/IAgenticaEventJson.ts"],"names":[],"mappings":""}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Operation information in the Agentica Agent.
3
+ *
4
+ * `IAgenticaOperation` is a type represents an operation that would
5
+ * be selected by the A.I. chatbot of {@link Agentica} class to
6
+ * perform the LLM (Large Language Model) function calling.
7
+ *
8
+ * Also, it is an union type that is discriminated by the {@link protocol}
9
+ * property. If the protocol value is `http`, it means that the HTTP API
10
+ * operation would be called by the A.I. chatbot. Otherwise, if the protocol
11
+ * value is `class`, it means that the operation has come from a
12
+ * TypeScript class.
13
+ *
14
+ * @author Samchon
15
+ */
16
+ export interface IAgenticaOperationJson {
17
+ /**
18
+ * Protocol discriminator.
19
+ */
20
+ protocol: "class" | "http";
21
+ /**
22
+ * Belonged controller of the target function.
23
+ */
24
+ controller: string;
25
+ /**
26
+ * Target function to call.
27
+ */
28
+ function: string;
29
+ /**
30
+ * Identifier name.
31
+ */
32
+ name: string;
33
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IAgenticaOperationJson.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IAgenticaOperationJson.js","sourceRoot":"","sources":["../../src/json/IAgenticaOperationJson.ts"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ import { IAgenticaOperationJson } from "./IAgenticaOperationJson";
2
+ /**
3
+ * Nestia agent operation selection.
4
+ *
5
+ * `IAgenticaOperationSelection` is a type represents an operation
6
+ * which has been selected by the A.I. chatbot of {@link Agentica}
7
+ * class for the LLM (Large Language Model) function calling with
8
+ * detailed {@link reason} of the selection (or cancellation).
9
+ *
10
+ * Also, `IAgenticaOperationSelection` is an union type that can
11
+ * specify a subtype by checking the {@link protocol} property.
12
+ *
13
+ * @author Samchon
14
+ */
15
+ export interface IAgenticaOperationSelectionJson {
16
+ reason: string;
17
+ operation: IAgenticaOperationJson;
18
+ }
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IAgenticaOperationCollection.js.map
3
+ //# sourceMappingURL=IAgenticaOperationSelectionJson.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IAgenticaOperationSelectionJson.js","sourceRoot":"","sources":["../../src/json/IAgenticaOperationSelectionJson.ts"],"names":[],"mappings":""}
@@ -0,0 +1,111 @@
1
+ import { IAgenticaOperationJson } from "./IAgenticaOperationJson";
2
+ import { IAgenticaOperationSelectionJson } from "./IAgenticaOperationSelectionJson";
3
+ /**
4
+ * Nestia A.I. chatbot prompt.
5
+ *
6
+ * `IWrtnChatPrompt` is an union type of all possible prompts that can
7
+ * be generated by the A.I. chatbot of the {@link Agentica} class.
8
+ *
9
+ * In other words, `IWrtnChatPrompt` is a type of chat history that
10
+ * is occurred during the conversation between the user and the A.I. chatbot
11
+ * in the {@link Agentica} class.
12
+ *
13
+ * If you want to continue the previous A.I. chatbot session, you can
14
+ * accomplish it by assigning the {@link IAgenticaProps.histories}
15
+ * property when creating a new {@link Agentica} instance.
16
+ *
17
+ * @author Samchon
18
+ */
19
+ export type IAgenticaPromptJson = IAgenticaPromptJson.IText | IAgenticaPromptJson.ISelect | IAgenticaPromptJson.ICancel | IAgenticaPromptJson.IExecute | IAgenticaPromptJson.IDescribe;
20
+ export declare namespace IAgenticaPromptJson {
21
+ /**
22
+ * Select prompt.
23
+ *
24
+ * Selection prompt about candidate functions to call.
25
+ */
26
+ export interface ISelect extends IBase<"select"> {
27
+ /**
28
+ * ID of the LLM tool call result.
29
+ */
30
+ id: string;
31
+ /**
32
+ * Operations that have been selected.
33
+ */
34
+ selections: IAgenticaOperationSelectionJson[];
35
+ }
36
+ /**
37
+ * Cancel prompt.
38
+ *
39
+ * Cancellation prompt about the candidate functions to be discarded.
40
+ */
41
+ export interface ICancel extends IBase<"cancel"> {
42
+ /**
43
+ * ID of the LLM tool call result.
44
+ */
45
+ id: string;
46
+ /**
47
+ * Operations that have been cancelled.
48
+ */
49
+ selections: IAgenticaOperationSelectionJson[];
50
+ }
51
+ /**
52
+ * Execute prompt.
53
+ *
54
+ * Execution prompt about the LLM function calling.
55
+ */
56
+ export interface IExecute extends IBase<"execute"> {
57
+ /**
58
+ * ID of the LLM tool call result.
59
+ */
60
+ id: string;
61
+ /**
62
+ * Target operation to call.
63
+ */
64
+ operation: IAgenticaOperationJson;
65
+ /**
66
+ * Arguments of the LLM function calling.
67
+ */
68
+ arguments: Record<string, any>;
69
+ /**
70
+ * Return value.
71
+ */
72
+ value: any;
73
+ }
74
+ /**
75
+ * Description prompt.
76
+ *
77
+ * Description prompt about the return value of the LLM function calling.
78
+ */
79
+ export interface IDescribe extends IBase<"describe"> {
80
+ /**
81
+ * Executions of the LLM function calling.
82
+ *
83
+ * This prompt describes the return value of them.
84
+ */
85
+ executions: IExecute[];
86
+ /**
87
+ * Description text.
88
+ */
89
+ text: string;
90
+ }
91
+ /**
92
+ * Text prompt.
93
+ */
94
+ export interface IText<Role extends "assistant" | "user" = "assistant" | "user"> extends IBase<"text"> {
95
+ /**
96
+ * Role of the orator.
97
+ */
98
+ role: Role;
99
+ /**
100
+ * The text content.
101
+ */
102
+ text: string;
103
+ }
104
+ interface IBase<Type extends string> {
105
+ /**
106
+ * Discriminator type.
107
+ */
108
+ type: Type;
109
+ }
110
+ export {};
111
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IAgenticaPromptJson.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IAgenticaPromptJson.js","sourceRoot":"","sources":["../../src/json/IAgenticaPromptJson.ts"],"names":[],"mappings":""}
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * Token usage information from the A.I. chatbot.
3
3
  *
4
- * `IAgenticaTokenUsage` is a structure representing the token usage
4
+ * `IAgenticaTokenUsageJson` is a structure representing the token usage
5
5
  * information from the {@link Agentica} class. And you can get the
6
6
  * token usage information by calling the {@link Agentica.getTokenUsage}
7
7
  * method.
8
8
  *
9
- * For reference, `IAgenticaTokenUsage` provides only the token usage
9
+ * For reference, `IAgenticaTokenUsageJson` provides only the token usage
10
10
  * information, and does not contain any price or cost information. It is
11
11
  * because the price or cost can be changed by below reasons.
12
12
  *
@@ -16,33 +16,33 @@
16
16
  *
17
17
  * @author Samchon
18
18
  */
19
- export interface IAgenticaTokenUsage {
19
+ export interface IAgenticaTokenUsageJson {
20
20
  /**
21
21
  * Aggregated token usage.
22
22
  */
23
- aggregate: IAgenticaTokenUsage.IComponent;
23
+ aggregate: IAgenticaTokenUsageJson.IComponent;
24
24
  /**
25
25
  * Token uasge of initializer agent.
26
26
  */
27
- initialize: IAgenticaTokenUsage.IComponent;
27
+ initialize: IAgenticaTokenUsageJson.IComponent;
28
28
  /**
29
29
  * Token usage of function selector agent.
30
30
  */
31
- select: IAgenticaTokenUsage.IComponent;
31
+ select: IAgenticaTokenUsageJson.IComponent;
32
32
  /**
33
33
  * Token usage of function canceler agent.
34
34
  */
35
- cancel: IAgenticaTokenUsage.IComponent;
35
+ cancel: IAgenticaTokenUsageJson.IComponent;
36
36
  /**
37
37
  * Token usage of function caller agent.
38
38
  */
39
- call: IAgenticaTokenUsage.IComponent;
39
+ call: IAgenticaTokenUsageJson.IComponent;
40
40
  /**
41
41
  * Token usage of function calling describer agent.
42
42
  */
43
- describe: IAgenticaTokenUsage.IComponent;
43
+ describe: IAgenticaTokenUsageJson.IComponent;
44
44
  }
45
- export declare namespace IAgenticaTokenUsage {
45
+ export declare namespace IAgenticaTokenUsageJson {
46
46
  interface IComponent {
47
47
  /**
48
48
  * Total token usage.
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IAgenticaTokenUsageJson.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IAgenticaTokenUsageJson.js","sourceRoot":"","sources":["../../src/json/IAgenticaTokenUsageJson.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ import { ILlmSchema } from "@samchon/openapi";
2
+ import { AgenticaOperationSelection } from "../context/AgenticaOperationSelection";
3
+ import { IAgenticaPromptJson } from "../json/IAgenticaPromptJson";
4
+ import { AgenticaPromptBase } from "./AgenticaPromptBase";
5
+ export declare class AgenticaCancelPrompt<Model extends ILlmSchema.Model> extends AgenticaPromptBase<"cancel", IAgenticaPromptJson.ICancel> {
6
+ readonly id: string;
7
+ readonly selections: AgenticaOperationSelection<Model>[];
8
+ constructor(props: AgenticaCancelPrompt.IProps<Model>);
9
+ toJSON(): IAgenticaPromptJson.ICancel;
10
+ }
11
+ export declare namespace AgenticaCancelPrompt {
12
+ interface IProps<Model extends ILlmSchema.Model> {
13
+ id: string;
14
+ selections: AgenticaOperationSelection<Model>[];
15
+ }
16
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgenticaCancelPrompt = void 0;
4
+ const AgenticaPromptBase_1 = require("./AgenticaPromptBase");
5
+ class AgenticaCancelPrompt extends AgenticaPromptBase_1.AgenticaPromptBase {
6
+ constructor(props) {
7
+ super("cancel");
8
+ this.id = props.id;
9
+ this.selections = props.selections;
10
+ }
11
+ toJSON() {
12
+ return {
13
+ type: this.type,
14
+ id: this.id,
15
+ selections: this.selections.map((s) => s.toJSON()),
16
+ };
17
+ }
18
+ }
19
+ exports.AgenticaCancelPrompt = AgenticaCancelPrompt;
20
+ //# sourceMappingURL=AgenticaCancelPrompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgenticaCancelPrompt.js","sourceRoot":"","sources":["../../src/prompts/AgenticaCancelPrompt.ts"],"names":[],"mappings":";;;AAIA,6DAA0D;AAE1D,MAAa,oBAEX,SAAQ,uCAAyD;IAIjE,YAAmB,KAAyC;QAC1D,KAAK,CAAC,QAAQ,CAAC,CAAC;QAChB,IAAI,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC;QACnB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC;IACrC,CAAC;IAEM,MAAM;QACX,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;SACnD,CAAC;IACJ,CAAC;CACF;AAnBD,oDAmBC"}
@@ -0,0 +1,24 @@
1
+ import { ILlmSchema } from "@samchon/openapi";
2
+ import { IAgenticaPromptJson } from "../json/IAgenticaPromptJson";
3
+ import { AgenticaExecutePrompt } from "./AgenticaExecutePrompt";
4
+ import { AgenticaPromptBase } from "./AgenticaPromptBase";
5
+ export declare class AgenticaDescribePrompt<Model extends ILlmSchema.Model> extends AgenticaPromptBase<"describe", IAgenticaPromptJson.IDescribe> {
6
+ /**
7
+ * Executions of the LLM function calling.
8
+ *
9
+ * This prompt describes the return value of them.
10
+ */
11
+ readonly executes: AgenticaExecutePrompt<Model>[];
12
+ /**
13
+ * Description text.
14
+ */
15
+ readonly text: string;
16
+ constructor(props: AgenticaDescribePrompt.IProps<Model>);
17
+ toJSON(): IAgenticaPromptJson.IDescribe;
18
+ }
19
+ export declare namespace AgenticaDescribePrompt {
20
+ interface IProps<Model extends ILlmSchema.Model> {
21
+ executes: AgenticaExecutePrompt<Model>[];
22
+ text: string;
23
+ }
24
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgenticaDescribePrompt = void 0;
4
+ const AgenticaPromptBase_1 = require("./AgenticaPromptBase");
5
+ class AgenticaDescribePrompt extends AgenticaPromptBase_1.AgenticaPromptBase {
6
+ constructor(props) {
7
+ super("describe");
8
+ this.executes = props.executes;
9
+ this.text = props.text;
10
+ }
11
+ toJSON() {
12
+ return {
13
+ type: this.type,
14
+ executions: this.executes.map((e) => e.toJSON()),
15
+ text: this.text,
16
+ };
17
+ }
18
+ }
19
+ exports.AgenticaDescribePrompt = AgenticaDescribePrompt;
20
+ //# sourceMappingURL=AgenticaDescribePrompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgenticaDescribePrompt.js","sourceRoot":"","sources":["../../src/prompts/AgenticaDescribePrompt.ts"],"names":[],"mappings":";;;AAIA,6DAA0D;AAE1D,MAAa,sBAEX,SAAQ,uCAA6D;IAarE,YAAmB,KAA2C;QAC5D,KAAK,CAAC,UAAU,CAAC,CAAC;QAClB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IACzB,CAAC;IAEM,MAAM;QACX,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;YAChD,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;IACJ,CAAC;CACF;AA5BD,wDA4BC"}
@@ -0,0 +1,20 @@
1
+ import { IHttpResponse, ILlmSchema } from "@samchon/openapi";
2
+ import { AgenticaOperation } from "../context/AgenticaOperation";
3
+ import { IAgenticaPromptJson } from "../json/IAgenticaPromptJson";
4
+ import { AgenticaPromptBase } from "./AgenticaPromptBase";
5
+ export declare class AgenticaExecutePrompt<Model extends ILlmSchema.Model, Protocol extends "http" | "class" = any> extends AgenticaPromptBase<"execute", IAgenticaPromptJson.IExecute> {
6
+ readonly id: string;
7
+ readonly operation: Protocol extends "http" ? AgenticaOperation.Http<Model> : Protocol extends "class" ? AgenticaOperation.Class<Model> : AgenticaOperation<Model>;
8
+ readonly arguments: Record<string, any>;
9
+ readonly value: Protocol extends "http" ? IHttpResponse : any;
10
+ constructor(props: AgenticaExecutePrompt.IProps<Model, Protocol>);
11
+ toJSON(): IAgenticaPromptJson.IExecute;
12
+ }
13
+ export declare namespace AgenticaExecutePrompt {
14
+ interface IProps<Model extends ILlmSchema.Model, Protocol extends "http" | "class" = any> {
15
+ id: string;
16
+ operation: Protocol extends "http" ? AgenticaOperation.Http<Model> : Protocol extends "class" ? AgenticaOperation.Class<Model> : AgenticaOperation<Model>;
17
+ arguments: Record<string, any>;
18
+ value: Protocol extends "http" ? IHttpResponse : any;
19
+ }
20
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgenticaExecutePrompt = void 0;
4
+ const AgenticaPromptBase_1 = require("./AgenticaPromptBase");
5
+ class AgenticaExecutePrompt extends AgenticaPromptBase_1.AgenticaPromptBase {
6
+ constructor(props) {
7
+ super("execute");
8
+ this.id = props.id;
9
+ this.operation = props.operation;
10
+ this.arguments = props.arguments;
11
+ this.value = props.value;
12
+ }
13
+ toJSON() {
14
+ return {
15
+ type: this.type,
16
+ id: this.id,
17
+ operation: this.operation.toJSON(),
18
+ arguments: this.arguments,
19
+ value: this.value,
20
+ };
21
+ }
22
+ }
23
+ exports.AgenticaExecutePrompt = AgenticaExecutePrompt;
24
+ //# sourceMappingURL=AgenticaExecutePrompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgenticaExecutePrompt.js","sourceRoot":"","sources":["../../src/prompts/AgenticaExecutePrompt.ts"],"names":[],"mappings":";;;AAIA,6DAA0D;AAE1D,MAAa,qBAGX,SAAQ,uCAA2D;IAUnE,YAAmB,KAAoD;QACrE,KAAK,CAAC,SAAS,CAAC,CAAC;QACjB,IAAI,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC;QACnB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;QACjC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAC3B,CAAC;IAEM,MAAM;QACX,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE;YAClC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;IACJ,CAAC;CACF;AA9BD,sDA8BC"}
@@ -0,0 +1,7 @@
1
+ import { ILlmSchema } from "@samchon/openapi";
2
+ import { AgenticaCancelPrompt } from "../context/AgenticaCancelPrompt";
3
+ import { AgenticaDescribePrompt } from "./AgenticaDescribePrompt";
4
+ import { AgenticaExecutePrompt } from "./AgenticaExecutePrompt";
5
+ import { AgenticaSelectPrompt } from "./AgenticaSelectPrompt";
6
+ import { AgenticaTextPrompt } from "./AgenticaTextPrompt";
7
+ export type AgenticaPrompt<Model extends ILlmSchema.Model> = AgenticaCancelPrompt<Model> | AgenticaDescribePrompt<Model> | AgenticaExecutePrompt<Model> | AgenticaSelectPrompt<Model> | AgenticaTextPrompt;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=AgenticaSource.js.map
3
+ //# sourceMappingURL=AgenticaPrompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgenticaPrompt.js","sourceRoot":"","sources":["../../src/prompts/AgenticaPrompt.ts"],"names":[],"mappings":""}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Base class for all prompts in Agentica.
3
+ *
4
+ * `AgenticaPromptBase` is a base class for every prompt classes
5
+ * in Agentica. It is generated by {@link Agentica.conversate} function,
6
+ * and used for restoring the previous conversation history when
7
+ * constructing the {@link Agentica} instance.
8
+ *
9
+ * @template Type Discriminator type
10
+ * @template Json Primitive type of the prompt
11
+ * @author Samchon
12
+ */
13
+ export declare abstract class AgenticaPromptBase<Type extends string, Json extends {
14
+ type: Type;
15
+ }> {
16
+ /**
17
+ * Discriminator type.
18
+ */
19
+ readonly type: Type;
20
+ protected constructor(type: Type);
21
+ abstract toJSON(): Json;
22
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgenticaPromptBase = void 0;
4
+ /**
5
+ * Base class for all prompts in Agentica.
6
+ *
7
+ * `AgenticaPromptBase` is a base class for every prompt classes
8
+ * in Agentica. It is generated by {@link Agentica.conversate} function,
9
+ * and used for restoring the previous conversation history when
10
+ * constructing the {@link Agentica} instance.
11
+ *
12
+ * @template Type Discriminator type
13
+ * @template Json Primitive type of the prompt
14
+ * @author Samchon
15
+ */
16
+ class AgenticaPromptBase {
17
+ constructor(type) {
18
+ this.type = type;
19
+ }
20
+ }
21
+ exports.AgenticaPromptBase = AgenticaPromptBase;
22
+ //# sourceMappingURL=AgenticaPromptBase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgenticaPromptBase.js","sourceRoot":"","sources":["../../src/prompts/AgenticaPromptBase.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;GAWG;AACH,MAAsB,kBAAkB;IAStC,YAAsB,IAAU;QAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CAGF;AAdD,gDAcC"}
@@ -0,0 +1,16 @@
1
+ import { ILlmSchema } from "@samchon/openapi";
2
+ import { AgenticaOperationSelection } from "../context/AgenticaOperationSelection";
3
+ import { IAgenticaPromptJson } from "../json/IAgenticaPromptJson";
4
+ import { AgenticaPromptBase } from "./AgenticaPromptBase";
5
+ export declare class AgenticaSelectPrompt<Model extends ILlmSchema.Model> extends AgenticaPromptBase<"select", IAgenticaPromptJson.ISelect> {
6
+ readonly id: string;
7
+ readonly selections: AgenticaOperationSelection<Model>[];
8
+ constructor(props: AgenticaSelectPrompt.IProps<Model>);
9
+ toJSON(): IAgenticaPromptJson.ISelect;
10
+ }
11
+ export declare namespace AgenticaSelectPrompt {
12
+ interface IProps<Model extends ILlmSchema.Model> {
13
+ id: string;
14
+ selections: AgenticaOperationSelection<Model>[];
15
+ }
16
+ }