@agentica/core 0.9.0 → 0.10.0-dev.20250302

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 (68) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +419 -419
  3. package/lib/Agentica.d.ts +4 -4
  4. package/lib/Agentica.js +7 -7
  5. package/lib/Agentica.js.map +1 -1
  6. package/lib/chatgpt/ChatGptCallFunctionAgent.js +14 -6
  7. package/lib/chatgpt/ChatGptCallFunctionAgent.js.map +1 -1
  8. package/lib/index.d.ts +1 -1
  9. package/lib/index.js +1 -1
  10. package/lib/index.js.map +1 -1
  11. package/lib/index.mjs +10 -5
  12. package/lib/index.mjs.map +1 -1
  13. package/lib/structures/IAgenticaContext.d.ts +1 -1
  14. package/lib/structures/IAgenticaController.d.ts +4 -5
  15. package/lib/structures/IAgenticaEvent.d.ts +3 -3
  16. package/lib/structures/IAgenticaOperation.d.ts +2 -3
  17. package/lib/structures/IAgenticaOperationSelection.d.ts +2 -3
  18. package/lib/structures/IAgenticaPrompt.d.ts +2 -3
  19. package/lib/structures/IAgenticaProps.d.ts +4 -4
  20. package/lib/structures/IAgenticaTokenUsage.d.ts +3 -3
  21. package/lib/structures/{IAgenticaProvider.d.ts → IAgenticaVendor.d.ts} +6 -6
  22. package/lib/structures/{IAgenticaProvider.js → IAgenticaVendor.js} +1 -1
  23. package/lib/structures/IAgenticaVendor.js.map +1 -0
  24. package/package.json +1 -1
  25. package/prompts/cancel.md +4 -4
  26. package/prompts/common.md +2 -2
  27. package/prompts/describe.md +6 -6
  28. package/prompts/execute.md +6 -6
  29. package/prompts/initialize.md +2 -2
  30. package/prompts/select.md +6 -6
  31. package/src/Agentica.ts +323 -323
  32. package/src/chatgpt/ChatGptAgent.ts +75 -75
  33. package/src/chatgpt/ChatGptCallFunctionAgent.ts +464 -448
  34. package/src/chatgpt/ChatGptCancelFunctionAgent.ts +287 -287
  35. package/src/chatgpt/ChatGptDescribeFunctionAgent.ts +52 -52
  36. package/src/chatgpt/ChatGptHistoryDecoder.ts +88 -88
  37. package/src/chatgpt/ChatGptInitializeFunctionAgent.ts +88 -88
  38. package/src/chatgpt/ChatGptSelectFunctionAgent.ts +319 -319
  39. package/src/functional/createHttpLlmApplication.ts +63 -63
  40. package/src/index.ts +19 -19
  41. package/src/internal/AgenticaConstant.ts +4 -4
  42. package/src/internal/AgenticaDefaultPrompt.ts +43 -43
  43. package/src/internal/AgenticaOperationComposer.ts +87 -87
  44. package/src/internal/AgenticaPromptFactory.ts +32 -32
  45. package/src/internal/AgenticaPromptTransformer.ts +86 -86
  46. package/src/internal/AgenticaTokenUsageAggregator.ts +115 -115
  47. package/src/internal/MathUtil.ts +3 -3
  48. package/src/internal/Singleton.ts +22 -22
  49. package/src/internal/__map_take.ts +15 -15
  50. package/src/structures/IAgenticaConfig.ts +123 -123
  51. package/src/structures/IAgenticaContext.ts +129 -129
  52. package/src/structures/IAgenticaController.ts +133 -132
  53. package/src/structures/IAgenticaEvent.ts +229 -229
  54. package/src/structures/IAgenticaExecutor.ts +156 -156
  55. package/src/structures/IAgenticaOperation.ts +63 -64
  56. package/src/structures/IAgenticaOperationCollection.ts +52 -52
  57. package/src/structures/IAgenticaOperationSelection.ts +68 -69
  58. package/src/structures/IAgenticaPrompt.ts +182 -178
  59. package/src/structures/IAgenticaProps.ts +70 -70
  60. package/src/structures/IAgenticaSystemPrompt.ts +124 -124
  61. package/src/structures/IAgenticaTokenUsage.ts +107 -107
  62. package/src/structures/{IAgenticaProvider.ts → IAgenticaVendor.ts} +39 -39
  63. package/src/structures/internal/__IChatCancelFunctionsApplication.ts +23 -23
  64. package/src/structures/internal/__IChatFunctionReference.ts +21 -21
  65. package/src/structures/internal/__IChatInitialApplication.ts +15 -15
  66. package/src/structures/internal/__IChatSelectFunctionsApplication.ts +24 -24
  67. package/src/typings/AgenticaSource.ts +6 -6
  68. package/lib/structures/IAgenticaProvider.js.map +0 -1
@@ -1,24 +1,24 @@
1
- import { __IChatFunctionReference } from "./__IChatFunctionReference";
2
-
3
- export interface __IChatSelectFunctionsApplication {
4
- /**
5
- * Select proper API functions to call.
6
- *
7
- * If you A.I. agent has found some proper API functions to call
8
- * from the conversation with user, please select the API functions
9
- * just by calling this function.
10
- *
11
- * When user wants to call a same function multiply, you A.I. agent must
12
- * list up it multiply in the `functions` property. Otherwise the user has
13
- * requested to call many different functions, you A.I. agent have to assign
14
- * them all into the `functions` property.
15
- *
16
- * Also, if you A.I. agent can't specify a specific function to call due to lack
17
- * of specificity or homogeneity of candidate functions, just assign all of them
18
- * by in the` functions` property` too. Instead, when you A.I. agent can specify
19
- * a specific function to call, the others would be eliminated.
20
- *
21
- * @param props Properties of the function
22
- */
23
- selectFunctions(props: __IChatFunctionReference.IProps): Promise<void>;
24
- }
1
+ import { __IChatFunctionReference } from "./__IChatFunctionReference";
2
+
3
+ export interface __IChatSelectFunctionsApplication {
4
+ /**
5
+ * Select proper API functions to call.
6
+ *
7
+ * If you A.I. agent has found some proper API functions to call
8
+ * from the conversation with user, please select the API functions
9
+ * just by calling this function.
10
+ *
11
+ * When user wants to call a same function multiply, you A.I. agent must
12
+ * list up it multiply in the `functions` property. Otherwise the user has
13
+ * requested to call many different functions, you A.I. agent have to assign
14
+ * them all into the `functions` property.
15
+ *
16
+ * Also, if you A.I. agent can't specify a specific function to call due to lack
17
+ * of specificity or homogeneity of candidate functions, just assign all of them
18
+ * by in the` functions` property` too. Instead, when you A.I. agent can specify
19
+ * a specific function to call, the others would be eliminated.
20
+ *
21
+ * @param props Properties of the function
22
+ */
23
+ selectFunctions(props: __IChatFunctionReference.IProps): Promise<void>;
24
+ }
@@ -1,6 +1,6 @@
1
- export type AgenticaSource =
2
- | "initialize"
3
- | "select"
4
- | "cancel"
5
- | "call"
6
- | "describe";
1
+ export type AgenticaSource =
2
+ | "initialize"
3
+ | "select"
4
+ | "cancel"
5
+ | "call"
6
+ | "describe";
@@ -1 +0,0 @@
1
- {"version":3,"file":"IAgenticaProvider.js","sourceRoot":"","sources":["../../src/structures/IAgenticaProvider.ts"],"names":[],"mappings":""}