@agentica/core 0.15.7 → 0.16.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 (195) hide show
  1. package/lib/Agentica.d.ts +21 -21
  2. package/lib/Agentica.js +29 -29
  3. package/lib/Agentica.js.map +1 -1
  4. package/lib/MicroAgentica.d.ts +115 -0
  5. package/lib/MicroAgentica.js +279 -0
  6. package/lib/MicroAgentica.js.map +1 -0
  7. package/lib/constants/AgenticaDefaultPrompt.d.ts +2 -1
  8. package/lib/constants/AgenticaDefaultPrompt.js +4 -4
  9. package/lib/constants/AgenticaDefaultPrompt.js.map +1 -1
  10. package/lib/context/AgenticaCancelPrompt.d.ts +3 -3
  11. package/lib/context/AgenticaContext.d.ts +12 -12
  12. package/lib/context/AgenticaOperationCollection.d.ts +1 -1
  13. package/lib/context/MicroAgenticaContext.d.ts +75 -0
  14. package/lib/{prompts/AgenticaCancelPrompt.js → context/MicroAgenticaContext.js} +1 -1
  15. package/lib/context/MicroAgenticaContext.js.map +1 -0
  16. package/lib/context/internal/AgenticaOperationComposer.d.ts +2 -1
  17. package/lib/context/internal/AgenticaOperationComposer.js +3 -2
  18. package/lib/context/internal/AgenticaOperationComposer.js.map +1 -1
  19. package/lib/context/internal/isAgenticaContext.d.ts +1 -0
  20. package/lib/context/internal/isAgenticaContext.js +10 -0
  21. package/lib/context/internal/isAgenticaContext.js.map +1 -0
  22. package/lib/events/AgenticaDescribeEvent.d.ts +4 -4
  23. package/lib/events/AgenticaEvent.d.ts +1 -0
  24. package/lib/events/AgenticaExecuteEvent.d.ts +5 -5
  25. package/lib/events/AgenticaSelectEvent.d.ts +2 -2
  26. package/lib/events/AgenticaTextEvent.d.ts +2 -2
  27. package/lib/events/MicroAgenticaEvent.d.ts +32 -0
  28. package/lib/{prompts/AgenticaTextPrompt.js → events/MicroAgenticaEvent.js} +1 -1
  29. package/lib/events/MicroAgenticaEvent.js.map +1 -0
  30. package/lib/factory/events.d.ts +2 -2
  31. package/lib/factory/events.js +5 -5
  32. package/lib/factory/events.js.map +1 -1
  33. package/lib/factory/histories.d.ts +33 -0
  34. package/lib/factory/{prompts.js → histories.js} +13 -13
  35. package/lib/factory/histories.js.map +1 -0
  36. package/lib/factory/index.d.ts +1 -1
  37. package/lib/factory/index.js +1 -1
  38. package/lib/factory/index.js.map +1 -1
  39. package/lib/functional/assertHttpLlmApplication.js +577 -387
  40. package/lib/functional/assertHttpLlmApplication.js.map +1 -1
  41. package/lib/functional/validateHttpLlmApplication.js +500 -348
  42. package/lib/functional/validateHttpLlmApplication.js.map +1 -1
  43. package/lib/histories/AgenticaCancelHistory.d.ts +8 -0
  44. package/lib/{prompts/AgenticaExecutePrompt.js → histories/AgenticaCancelHistory.js} +1 -1
  45. package/lib/histories/AgenticaCancelHistory.js.map +1 -0
  46. package/lib/histories/AgenticaDescribeHistory.d.ts +16 -0
  47. package/lib/histories/AgenticaDescribeHistory.js +3 -0
  48. package/lib/histories/AgenticaDescribeHistory.js.map +1 -0
  49. package/lib/{prompts/AgenticaExecutePrompt.d.ts → histories/AgenticaExecuteHistory.d.ts} +5 -5
  50. package/lib/{prompts/AgenticaDescribePrompt.js → histories/AgenticaExecuteHistory.js} +1 -1
  51. package/lib/histories/AgenticaExecuteHistory.js.map +1 -0
  52. package/lib/histories/AgenticaHistory.d.ts +17 -0
  53. package/lib/{prompts/AgenticaPrompt.js → histories/AgenticaHistory.js} +1 -1
  54. package/lib/histories/AgenticaHistory.js.map +1 -0
  55. package/lib/{prompts/AgenticaPromptBase.d.ts → histories/AgenticaHistoryBase.d.ts} +4 -4
  56. package/lib/{json/IAgenticaPromptJson.js → histories/AgenticaHistoryBase.js} +1 -1
  57. package/lib/histories/AgenticaHistoryBase.js.map +1 -0
  58. package/lib/histories/AgenticaSelectHistory.d.ts +8 -0
  59. package/lib/histories/AgenticaSelectHistory.js +3 -0
  60. package/lib/histories/AgenticaSelectHistory.js.map +1 -0
  61. package/lib/histories/AgenticaTextHistory.d.ts +6 -0
  62. package/lib/{prompts/AgenticaPromptBase.js → histories/AgenticaTextHistory.js} +1 -1
  63. package/lib/histories/AgenticaTextHistory.js.map +1 -0
  64. package/lib/histories/MicroAgenticaHistory.d.ts +13 -0
  65. package/lib/histories/MicroAgenticaHistory.js +3 -0
  66. package/lib/histories/MicroAgenticaHistory.js.map +1 -0
  67. package/lib/index.d.ts +12 -7
  68. package/lib/index.js +12 -7
  69. package/lib/index.js.map +1 -1
  70. package/lib/index.mjs +1408 -917
  71. package/lib/index.mjs.map +1 -1
  72. package/lib/json/IAgenticaEventJson.d.ts +6 -5
  73. package/lib/json/{IAgenticaPromptJson.d.ts → IAgenticaHistoryJson.d.ts} +8 -8
  74. package/lib/json/IAgenticaHistoryJson.js +3 -0
  75. package/lib/json/IAgenticaHistoryJson.js.map +1 -0
  76. package/lib/json/IAgenticaOperationSelectionJson.d.ts +7 -1
  77. package/lib/json/IMicroAgenticaEventJson.d.ts +13 -0
  78. package/lib/json/IMicroAgenticaEventJson.js +3 -0
  79. package/lib/json/IMicroAgenticaEventJson.js.map +1 -0
  80. package/lib/json/IMicroAgenticaHistoryJson.d.ts +19 -0
  81. package/lib/json/IMicroAgenticaHistoryJson.js +3 -0
  82. package/lib/json/IMicroAgenticaHistoryJson.js.map +1 -0
  83. package/lib/orchestrate/call.d.ts +4 -2
  84. package/lib/orchestrate/call.js +58 -49
  85. package/lib/orchestrate/call.js.map +1 -1
  86. package/lib/orchestrate/cancel.js +4 -4
  87. package/lib/orchestrate/cancel.js.map +1 -1
  88. package/lib/orchestrate/describe.d.ts +4 -3
  89. package/lib/orchestrate/describe.js +5 -5
  90. package/lib/orchestrate/describe.js.map +1 -1
  91. package/lib/orchestrate/execute.d.ts +2 -2
  92. package/lib/orchestrate/execute.js +1 -1
  93. package/lib/orchestrate/execute.js.map +1 -1
  94. package/lib/orchestrate/initialize.d.ts +2 -2
  95. package/lib/orchestrate/initialize.js +5 -5
  96. package/lib/orchestrate/initialize.js.map +1 -1
  97. package/lib/orchestrate/internal/selectFunction.d.ts +1 -5
  98. package/lib/orchestrate/internal/selectFunction.js +5 -2
  99. package/lib/orchestrate/internal/selectFunction.js.map +1 -1
  100. package/lib/orchestrate/select.d.ts +2 -2
  101. package/lib/orchestrate/select.js +5 -5
  102. package/lib/orchestrate/select.js.map +1 -1
  103. package/lib/structures/IAgenticaConfig.d.ts +6 -5
  104. package/lib/structures/IAgenticaController.d.ts +1 -1
  105. package/lib/structures/IAgenticaExecutor.d.ts +11 -9
  106. package/lib/structures/IAgenticaProps.d.ts +3 -3
  107. package/lib/structures/IAgenticaSystemPrompt.d.ts +13 -13
  108. package/lib/structures/IAgenticaVendor.d.ts +1 -1
  109. package/lib/structures/IMicroAgenticaConfig.d.ts +74 -0
  110. package/lib/structures/IMicroAgenticaConfig.js +3 -0
  111. package/lib/structures/IMicroAgenticaConfig.js.map +1 -0
  112. package/lib/structures/IMicroAgenticaExecutor.d.ts +57 -0
  113. package/lib/structures/IMicroAgenticaExecutor.js +3 -0
  114. package/lib/structures/IMicroAgenticaExecutor.js.map +1 -0
  115. package/lib/structures/IMicroAgenticaProps.d.ts +63 -0
  116. package/lib/structures/IMicroAgenticaProps.js +3 -0
  117. package/lib/structures/IMicroAgenticaProps.js.map +1 -0
  118. package/lib/structures/IMicroAgenticaSystemPrompt.d.ts +66 -0
  119. package/lib/structures/IMicroAgenticaSystemPrompt.js +3 -0
  120. package/lib/structures/IMicroAgenticaSystemPrompt.js.map +1 -0
  121. package/lib/transformers/AgenticaPromptTransformer.d.ts +19 -19
  122. package/lib/transformers/AgenticaPromptTransformer.js +27 -27
  123. package/lib/transformers/AgenticaPromptTransformer.js.map +1 -1
  124. package/package.json +7 -7
  125. package/src/Agentica.ts +36 -36
  126. package/src/MicroAgentica.ts +337 -0
  127. package/src/constants/AgenticaDefaultPrompt.ts +4 -2
  128. package/src/context/AgenticaCancelPrompt.ts +3 -3
  129. package/src/context/AgenticaContext.ts +12 -12
  130. package/src/context/AgenticaOperationCollection.ts +1 -1
  131. package/src/context/MicroAgenticaContext.ts +95 -0
  132. package/src/context/internal/AgenticaOperationComposer.ts +6 -3
  133. package/src/context/internal/isAgenticaContext.ts +13 -0
  134. package/src/events/AgenticaDescribeEvent.ts +4 -4
  135. package/src/events/AgenticaEvent.ts +6 -0
  136. package/src/events/AgenticaExecuteEvent.ts +5 -5
  137. package/src/events/AgenticaSelectEvent.ts +2 -2
  138. package/src/events/AgenticaTextEvent.ts +2 -2
  139. package/src/events/MicroAgenticaEvent.ts +41 -0
  140. package/src/factory/events.ts +8 -8
  141. package/src/factory/{prompts.ts → histories.ts} +18 -18
  142. package/src/factory/index.ts +1 -1
  143. package/src/histories/AgenticaCancelHistory.ts +13 -0
  144. package/src/histories/AgenticaDescribeHistory.ts +22 -0
  145. package/src/{prompts/AgenticaExecutePrompt.ts → histories/AgenticaExecuteHistory.ts} +7 -7
  146. package/src/histories/AgenticaHistory.ts +25 -0
  147. package/src/{prompts/AgenticaPromptBase.ts → histories/AgenticaHistoryBase.ts} +4 -4
  148. package/src/histories/AgenticaSelectHistory.ts +13 -0
  149. package/src/histories/AgenticaTextHistory.ts +10 -0
  150. package/src/histories/MicroAgenticaHistory.ts +18 -0
  151. package/src/index.ts +18 -15
  152. package/src/json/IAgenticaEventJson.ts +6 -5
  153. package/src/json/{IAgenticaPromptJson.ts → IAgenticaHistoryJson.ts} +13 -13
  154. package/src/json/IAgenticaOperationSelectionJson.ts +8 -1
  155. package/src/json/IMicroAgenticaEventJson.ts +21 -0
  156. package/src/json/IMicroAgenticaHistoryJson.ts +23 -0
  157. package/src/orchestrate/call.ts +91 -67
  158. package/src/orchestrate/cancel.ts +4 -4
  159. package/src/orchestrate/describe.ts +13 -9
  160. package/src/orchestrate/execute.ts +7 -7
  161. package/src/orchestrate/initialize.ts +8 -8
  162. package/src/orchestrate/internal/selectFunction.ts +5 -2
  163. package/src/orchestrate/select.ts +13 -13
  164. package/src/structures/IAgenticaConfig.ts +6 -5
  165. package/src/structures/IAgenticaController.ts +1 -1
  166. package/src/structures/IAgenticaExecutor.ts +12 -10
  167. package/src/structures/IAgenticaProps.ts +3 -3
  168. package/src/structures/IAgenticaSystemPrompt.ts +13 -13
  169. package/src/structures/IAgenticaVendor.ts +1 -1
  170. package/src/structures/IMicroAgenticaConfig.ts +82 -0
  171. package/src/structures/IMicroAgenticaExecutor.ts +63 -0
  172. package/src/structures/IMicroAgenticaProps.ts +70 -0
  173. package/src/structures/IMicroAgenticaSystemPrompt.ts +71 -0
  174. package/src/transformers/AgenticaPromptTransformer.ts +46 -46
  175. package/lib/factory/prompts.d.ts +0 -33
  176. package/lib/factory/prompts.js.map +0 -1
  177. package/lib/json/IAgenticaPromptJson.js.map +0 -1
  178. package/lib/prompts/AgenticaCancelPrompt.d.ts +0 -8
  179. package/lib/prompts/AgenticaCancelPrompt.js.map +0 -1
  180. package/lib/prompts/AgenticaDescribePrompt.d.ts +0 -16
  181. package/lib/prompts/AgenticaDescribePrompt.js.map +0 -1
  182. package/lib/prompts/AgenticaExecutePrompt.js.map +0 -1
  183. package/lib/prompts/AgenticaPrompt.d.ts +0 -17
  184. package/lib/prompts/AgenticaPrompt.js.map +0 -1
  185. package/lib/prompts/AgenticaPromptBase.js.map +0 -1
  186. package/lib/prompts/AgenticaSelectPrompt.d.ts +0 -8
  187. package/lib/prompts/AgenticaSelectPrompt.js +0 -3
  188. package/lib/prompts/AgenticaSelectPrompt.js.map +0 -1
  189. package/lib/prompts/AgenticaTextPrompt.d.ts +0 -6
  190. package/lib/prompts/AgenticaTextPrompt.js.map +0 -1
  191. package/src/prompts/AgenticaCancelPrompt.ts +0 -13
  192. package/src/prompts/AgenticaDescribePrompt.ts +0 -22
  193. package/src/prompts/AgenticaPrompt.ts +0 -25
  194. package/src/prompts/AgenticaSelectPrompt.ts +0 -13
  195. package/src/prompts/AgenticaTextPrompt.ts +0 -10
@@ -1,69 +1,69 @@
1
1
  import type { ILlmSchema } from "@samchon/openapi";
2
2
 
3
3
  import type { AgenticaOperation } from "../context/AgenticaOperation";
4
- import type { IAgenticaPromptJson } from "../json/IAgenticaPromptJson";
5
- import type { AgenticaCancelPrompt } from "../prompts/AgenticaCancelPrompt";
6
- import type { AgenticaDescribePrompt } from "../prompts/AgenticaDescribePrompt";
7
- import type { AgenticaExecutePrompt } from "../prompts/AgenticaExecutePrompt";
8
- import type { AgenticaPrompt } from "../prompts/AgenticaPrompt";
9
- import type { AgenticaSelectPrompt } from "../prompts/AgenticaSelectPrompt";
10
- import type { AgenticaTextPrompt } from "../prompts/AgenticaTextPrompt";
4
+ import type { AgenticaCancelHistory } from "../histories/AgenticaCancelHistory";
5
+ import type { AgenticaDescribeHistory } from "../histories/AgenticaDescribeHistory";
6
+ import type { AgenticaExecuteHistory } from "../histories/AgenticaExecuteHistory";
7
+ import type { AgenticaHistory } from "../histories/AgenticaHistory";
8
+ import type { AgenticaSelectHistory } from "../histories/AgenticaSelectHistory";
9
+ import type { AgenticaTextHistory } from "../histories/AgenticaTextHistory";
10
+ import type { IAgenticaHistoryJson } from "../json/IAgenticaHistoryJson";
11
11
 
12
+ import { createCancelHistory, createDescribeHistory, createExecuteHistory, createSelectHistory, createTextHistory } from "../factory/histories";
12
13
  import { createOperationSelection } from "../factory/operations";
13
- import { createCancelPrompt, createDescribePrompt, createExecutePrompt, createSelectPrompt, createTextPrompt } from "../factory/prompts";
14
14
 
15
15
  function transform<Model extends ILlmSchema.Model>(props: {
16
16
  operations: Map<string, Map<string, AgenticaOperation<Model>>>;
17
- prompt: IAgenticaPromptJson;
18
- }): AgenticaPrompt<Model> {
17
+ history: IAgenticaHistoryJson;
18
+ }): AgenticaHistory<Model> {
19
19
  // TEXT
20
- if (props.prompt.type === "text") {
20
+ if (props.history.type === "text") {
21
21
  return transformText({
22
- prompt: props.prompt,
22
+ history: props.history,
23
23
  });
24
24
  }
25
25
  // SELECT & CANCEL
26
- else if (props.prompt.type === "select") {
26
+ else if (props.history.type === "select") {
27
27
  return transformSelect({
28
28
  operations: props.operations,
29
- prompt: props.prompt,
29
+ history: props.history,
30
30
  });
31
31
  }
32
- else if (props.prompt.type === "cancel") {
32
+ else if (props.history.type === "cancel") {
33
33
  return transformCancel({
34
34
  operations: props.operations,
35
- prompt: props.prompt,
35
+ history: props.history,
36
36
  });
37
37
  }
38
38
  // EXECUTE
39
- else if (props.prompt.type === "execute") {
39
+ else if (props.history.type === "execute") {
40
40
  return transformExecute({
41
41
  operations: props.operations,
42
- prompt: props.prompt,
42
+ history: props.history,
43
43
  });
44
44
  }
45
- else if (props.prompt.type === "describe") {
45
+ else if (props.history.type === "describe") {
46
46
  return transformDescribe({
47
47
  operations: props.operations,
48
- prompt: props.prompt,
48
+ history: props.history,
49
49
  });
50
50
  }
51
51
  throw new Error("Invalid prompt type.");
52
52
  }
53
53
 
54
54
  function transformText(props: {
55
- prompt: IAgenticaPromptJson.IText;
56
- }): AgenticaTextPrompt {
57
- return createTextPrompt(props.prompt);
55
+ history: IAgenticaHistoryJson.IText;
56
+ }): AgenticaTextHistory {
57
+ return createTextHistory(props.history);
58
58
  }
59
59
 
60
60
  function transformSelect<Model extends ILlmSchema.Model>(props: {
61
61
  operations: Map<string, Map<string, AgenticaOperation<Model>>>;
62
- prompt: IAgenticaPromptJson.ISelect;
63
- }): AgenticaSelectPrompt<Model> {
64
- return createSelectPrompt({
65
- id: props.prompt.id,
66
- selections: props.prompt.selections.map(
62
+ history: IAgenticaHistoryJson.ISelect;
63
+ }): AgenticaSelectHistory<Model> {
64
+ return createSelectHistory({
65
+ id: props.history.id,
66
+ selections: props.history.selections.map(
67
67
  select =>
68
68
  createOperationSelection({
69
69
  operation: findOperation({
@@ -78,11 +78,11 @@ function transformSelect<Model extends ILlmSchema.Model>(props: {
78
78
 
79
79
  function transformCancel<Model extends ILlmSchema.Model>(props: {
80
80
  operations: Map<string, Map<string, AgenticaOperation<Model>>>;
81
- prompt: IAgenticaPromptJson.ICancel;
82
- }): AgenticaCancelPrompt<Model> {
83
- return createCancelPrompt({
84
- id: props.prompt.id,
85
- selections: props.prompt.selections.map(
81
+ history: IAgenticaHistoryJson.ICancel;
82
+ }): AgenticaCancelHistory<Model> {
83
+ return createCancelHistory({
84
+ id: props.history.id,
85
+ selections: props.history.selections.map(
86
86
  select =>
87
87
  createOperationSelection({
88
88
  operation: findOperation({
@@ -97,33 +97,33 @@ function transformCancel<Model extends ILlmSchema.Model>(props: {
97
97
 
98
98
  function transformExecute<Model extends ILlmSchema.Model>(props: {
99
99
  operations: Map<string, Map<string, AgenticaOperation<Model>>>;
100
- prompt: IAgenticaPromptJson.IExecute;
101
- }): AgenticaExecutePrompt<Model> {
102
- return createExecutePrompt({
103
- id: props.prompt.id,
100
+ history: IAgenticaHistoryJson.IExecute;
101
+ }): AgenticaExecuteHistory<Model> {
102
+ return createExecuteHistory({
103
+ id: props.history.id,
104
104
  operation: findOperation({
105
105
  operations: props.operations,
106
- input: props.prompt.operation,
106
+ input: props.history.operation,
107
107
  }),
108
- arguments: props.prompt.arguments,
108
+ arguments: props.history.arguments,
109
109
  /**
110
110
  * @TODO fix it
111
111
  * The property and value have a type mismatch, but it works.
112
112
  */
113
- value: props.prompt.value as Record<string, unknown>,
113
+ value: props.history.value as Record<string, unknown>,
114
114
  });
115
115
  }
116
116
 
117
117
  function transformDescribe<Model extends ILlmSchema.Model>(props: {
118
118
  operations: Map<string, Map<string, AgenticaOperation<Model>>>;
119
- prompt: IAgenticaPromptJson.IDescribe;
120
- }): AgenticaDescribePrompt<Model> {
121
- return createDescribePrompt({
122
- text: props.prompt.text,
123
- executes: props.prompt.executes.map(next =>
119
+ history: IAgenticaHistoryJson.IDescribe;
120
+ }): AgenticaDescribeHistory<Model> {
121
+ return createDescribeHistory({
122
+ text: props.history.text,
123
+ executes: props.history.executes.map(next =>
124
124
  transformExecute({
125
125
  operations: props.operations,
126
- prompt: next,
126
+ history: next,
127
127
  }),
128
128
  ),
129
129
  });
@@ -1,33 +0,0 @@
1
- import type { ILlmSchema } from "@samchon/openapi";
2
- import type OpenAI from "openai";
3
- import type { AgenticaCancelPrompt } from "../context/AgenticaCancelPrompt";
4
- import type { AgenticaOperation } from "../context/AgenticaOperation";
5
- import type { AgenticaOperationSelection } from "../context/AgenticaOperationSelection";
6
- import type { AgenticaDescribePrompt } from "../prompts/AgenticaDescribePrompt";
7
- import type { AgenticaExecutePrompt } from "../prompts/AgenticaExecutePrompt";
8
- import type { AgenticaPrompt } from "../prompts/AgenticaPrompt";
9
- import type { AgenticaSelectPrompt } from "../prompts/AgenticaSelectPrompt";
10
- import type { AgenticaTextPrompt } from "../prompts/AgenticaTextPrompt";
11
- export declare function decodePrompt<Model extends ILlmSchema.Model>(history: AgenticaPrompt<Model>): OpenAI.ChatCompletionMessageParam[];
12
- export declare function createTextPrompt<Role extends "assistant" | "user" = "assistant" | "user">(props: {
13
- role: Role;
14
- text: string;
15
- }): AgenticaTextPrompt<Role>;
16
- export declare function createDescribePrompt<Model extends ILlmSchema.Model>(props: {
17
- executes: AgenticaExecutePrompt<Model>[];
18
- text: string;
19
- }): AgenticaDescribePrompt<Model>;
20
- export declare function createSelectPrompt<Model extends ILlmSchema.Model>(props: {
21
- id: string;
22
- selections: AgenticaOperationSelection<Model>[];
23
- }): AgenticaSelectPrompt<Model>;
24
- export declare function createCancelPrompt<Model extends ILlmSchema.Model>(props: {
25
- id: string;
26
- selections: AgenticaOperationSelection<Model>[];
27
- }): AgenticaCancelPrompt<Model>;
28
- export declare function createExecutePrompt<Model extends ILlmSchema.Model>(props: {
29
- id: string;
30
- operation: AgenticaOperation<Model>;
31
- arguments: Record<string, any>;
32
- value: unknown;
33
- }): AgenticaExecutePrompt<Model>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/factory/prompts.ts"],"names":[],"mappings":";;AAaA,oCAkFC;AAKD,4CAaC;AAED,oDAcC;AAKD,gDAcC;AAED,gDAcC;AAED,kDAwBC;AAjLD,SAAgB,YAAY,CAAiC,OAA8B;IACzF,6BAA6B;IAC7B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;QACZ,SAAS,EAAE,KAAK,CAAC,SAA2C;QAC5D,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;YACb,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ;YAClC,EAAE,EAAE,KAAK,CAAC,EAAE;YACZ,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE;YACnC,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;SACnB,CAAC;KACH,CAAC;AACJ,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"IAgenticaPromptJson.js","sourceRoot":"","sources":["../../src/json/IAgenticaPromptJson.ts"],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
1
- import type { ILlmSchema } from "@samchon/openapi";
2
- import type { AgenticaOperationSelection } from "../context/AgenticaOperationSelection";
3
- import type { IAgenticaPromptJson } from "../json/IAgenticaPromptJson";
4
- import type { AgenticaPromptBase } from "./AgenticaPromptBase";
5
- export interface AgenticaCancelPrompt<Model extends ILlmSchema.Model> extends AgenticaPromptBase<"cancel", IAgenticaPromptJson.ICancel> {
6
- id: string;
7
- selections: AgenticaOperationSelection<Model>[];
8
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"AgenticaCancelPrompt.js","sourceRoot":"","sources":["../../src/prompts/AgenticaCancelPrompt.ts"],"names":[],"mappings":""}
@@ -1,16 +0,0 @@
1
- import type { ILlmSchema } from "@samchon/openapi";
2
- import type { IAgenticaPromptJson } from "../json/IAgenticaPromptJson";
3
- import type { AgenticaExecutePrompt } from "./AgenticaExecutePrompt";
4
- import type { AgenticaPromptBase } from "./AgenticaPromptBase";
5
- export interface 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
- executes: AgenticaExecutePrompt<Model>[];
12
- /**
13
- * Description text.
14
- */
15
- text: string;
16
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"AgenticaDescribePrompt.js","sourceRoot":"","sources":["../../src/prompts/AgenticaDescribePrompt.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"AgenticaExecutePrompt.js","sourceRoot":"","sources":["../../src/prompts/AgenticaExecutePrompt.ts"],"names":[],"mappings":""}
@@ -1,17 +0,0 @@
1
- import type { ILlmSchema } from "@samchon/openapi";
2
- import type { AgenticaCancelPrompt } from "../context/AgenticaCancelPrompt";
3
- import type { AgenticaDescribePrompt } from "./AgenticaDescribePrompt";
4
- import type { AgenticaExecutePrompt } from "./AgenticaExecutePrompt";
5
- import type { AgenticaSelectPrompt } from "./AgenticaSelectPrompt";
6
- import type { AgenticaTextPrompt } from "./AgenticaTextPrompt";
7
- export type AgenticaPrompt<Model extends ILlmSchema.Model> = AgenticaCancelPrompt<Model> | AgenticaDescribePrompt<Model> | AgenticaExecutePrompt<Model> | AgenticaSelectPrompt<Model> | AgenticaTextPrompt;
8
- export declare namespace AgenticaPrompt {
9
- type Type = AgenticaPrompt<any>["type"];
10
- interface Mapper<Model extends ILlmSchema.Model> {
11
- cancel: AgenticaCancelPrompt<Model>;
12
- describe: AgenticaDescribePrompt<Model>;
13
- execute: AgenticaExecutePrompt<Model>;
14
- select: AgenticaSelectPrompt<Model>;
15
- text: AgenticaTextPrompt;
16
- }
17
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"AgenticaPrompt.js","sourceRoot":"","sources":["../../src/prompts/AgenticaPrompt.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"AgenticaPromptBase.js","sourceRoot":"","sources":["../../src/prompts/AgenticaPromptBase.ts"],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
1
- import type { ILlmSchema } from "@samchon/openapi";
2
- import type { AgenticaOperationSelection } from "../context/AgenticaOperationSelection";
3
- import type { IAgenticaPromptJson } from "../json/IAgenticaPromptJson";
4
- import type { AgenticaPromptBase } from "./AgenticaPromptBase";
5
- export interface AgenticaSelectPrompt<Model extends ILlmSchema.Model> extends AgenticaPromptBase<"select", IAgenticaPromptJson.ISelect> {
6
- id: string;
7
- selections: AgenticaOperationSelection<Model>[];
8
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=AgenticaSelectPrompt.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AgenticaSelectPrompt.js","sourceRoot":"","sources":["../../src/prompts/AgenticaSelectPrompt.ts"],"names":[],"mappings":""}
@@ -1,6 +0,0 @@
1
- import type { IAgenticaPromptJson } from "../json/IAgenticaPromptJson";
2
- import type { AgenticaPromptBase } from "./AgenticaPromptBase";
3
- export interface AgenticaTextPrompt<Role extends "assistant" | "user" = "assistant" | "user"> extends AgenticaPromptBase<"text", IAgenticaPromptJson.IText> {
4
- role: Role;
5
- text: string;
6
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"AgenticaTextPrompt.js","sourceRoot":"","sources":["../../src/prompts/AgenticaTextPrompt.ts"],"names":[],"mappings":""}
@@ -1,13 +0,0 @@
1
- import type { ILlmSchema } from "@samchon/openapi";
2
-
3
- import type { AgenticaOperationSelection } from "../context/AgenticaOperationSelection";
4
- import type { IAgenticaPromptJson } from "../json/IAgenticaPromptJson";
5
-
6
- import type { AgenticaPromptBase } from "./AgenticaPromptBase";
7
-
8
- export interface AgenticaCancelPrompt<
9
- Model extends ILlmSchema.Model,
10
- > extends AgenticaPromptBase<"cancel", IAgenticaPromptJson.ICancel> {
11
- id: string;
12
- selections: AgenticaOperationSelection<Model>[];
13
- }
@@ -1,22 +0,0 @@
1
- import type { ILlmSchema } from "@samchon/openapi";
2
-
3
- import type { IAgenticaPromptJson } from "../json/IAgenticaPromptJson";
4
-
5
- import type { AgenticaExecutePrompt } from "./AgenticaExecutePrompt";
6
- import type { AgenticaPromptBase } from "./AgenticaPromptBase";
7
-
8
- export interface AgenticaDescribePrompt<
9
- Model extends ILlmSchema.Model,
10
- > extends AgenticaPromptBase<"describe", IAgenticaPromptJson.IDescribe> {
11
- /**
12
- * Executions of the LLM function calling.
13
- *
14
- * This prompt describes the return value of them.
15
- */
16
- executes: AgenticaExecutePrompt<Model>[];
17
-
18
- /**
19
- * Description text.
20
- */
21
- text: string;
22
- }
@@ -1,25 +0,0 @@
1
- import type { ILlmSchema } from "@samchon/openapi";
2
-
3
- import type { AgenticaCancelPrompt } from "../context/AgenticaCancelPrompt";
4
-
5
- import type { AgenticaDescribePrompt } from "./AgenticaDescribePrompt";
6
- import type { AgenticaExecutePrompt } from "./AgenticaExecutePrompt";
7
- import type { AgenticaSelectPrompt } from "./AgenticaSelectPrompt";
8
- import type { AgenticaTextPrompt } from "./AgenticaTextPrompt";
9
-
10
- export type AgenticaPrompt<Model extends ILlmSchema.Model> =
11
- | AgenticaCancelPrompt<Model>
12
- | AgenticaDescribePrompt<Model>
13
- | AgenticaExecutePrompt<Model>
14
- | AgenticaSelectPrompt<Model>
15
- | AgenticaTextPrompt;
16
- export namespace AgenticaPrompt {
17
- export type Type = AgenticaPrompt<any>["type"];
18
- export interface Mapper<Model extends ILlmSchema.Model> {
19
- cancel: AgenticaCancelPrompt<Model>;
20
- describe: AgenticaDescribePrompt<Model>;
21
- execute: AgenticaExecutePrompt<Model>;
22
- select: AgenticaSelectPrompt<Model>;
23
- text: AgenticaTextPrompt;
24
- }
25
- }
@@ -1,13 +0,0 @@
1
- import type { ILlmSchema } from "@samchon/openapi";
2
-
3
- import type { AgenticaOperationSelection } from "../context/AgenticaOperationSelection";
4
- import type { IAgenticaPromptJson } from "../json/IAgenticaPromptJson";
5
-
6
- import type { AgenticaPromptBase } from "./AgenticaPromptBase";
7
-
8
- export interface AgenticaSelectPrompt<
9
- Model extends ILlmSchema.Model,
10
- > extends AgenticaPromptBase<"select", IAgenticaPromptJson.ISelect> {
11
- id: string;
12
- selections: AgenticaOperationSelection<Model>[];
13
- }
@@ -1,10 +0,0 @@
1
- import type { IAgenticaPromptJson } from "../json/IAgenticaPromptJson";
2
-
3
- import type { AgenticaPromptBase } from "./AgenticaPromptBase";
4
-
5
- export interface AgenticaTextPrompt<
6
- Role extends "assistant" | "user" = "assistant" | "user",
7
- > extends AgenticaPromptBase<"text", IAgenticaPromptJson.IText> {
8
- role: Role;
9
- text: string;
10
- }