@caretakerai/agent 0.0.20 → 0.0.21-beta.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.
- package/LICENSE +73 -0
- package/dist/agent.js +17 -5
- package/dist/agent.js.map +1 -1
- package/package.json +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
### **CaretakerAI License Agreement**
|
|
2
|
+
|
|
3
|
+
**From Viktor Zhakhalov (zhakhalov@gmail.com)**
|
|
4
|
+
|
|
5
|
+
**Based on Apache License Version 2.0**
|
|
6
|
+
|
|
7
|
+
**Copyright 2024 Viktor Zhakhalov**
|
|
8
|
+
|
|
9
|
+
#### **Terms and Conditions for Use, Reproduction, and Distribution**
|
|
10
|
+
|
|
11
|
+
1. **Definitions:**
|
|
12
|
+
- "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
|
13
|
+
- "Licensor" shall mean Viktor Zhakhalov, the copyright owner that is granting the License.
|
|
14
|
+
- "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
|
15
|
+
- "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
|
16
|
+
- "Object" form shall mean any compiled or executable form of the Source form, including but not limited to binaries, DLLs, or other machine code.
|
|
17
|
+
- "Work" shall mean the work of authorship, known as CaretakerAI, whether in Source or Object form, made available under the License.
|
|
18
|
+
- "Output Data" shall mean all data, text, information, or data, text, information transformation or other content produced or generated by the Work, including but not limited to:
|
|
19
|
+
- Input data transformed into prompts containing text or other forms of media.
|
|
20
|
+
- Text or other media generated by the Large Language Model (LLM) in response to such prompts.
|
|
21
|
+
|
|
22
|
+
2. **Grant of Copyright License:**
|
|
23
|
+
- Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
|
24
|
+
|
|
25
|
+
3. **Grant of Patent License:**
|
|
26
|
+
- Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work.
|
|
27
|
+
|
|
28
|
+
4. **Restrictions:**
|
|
29
|
+
- You may not use the Work or Output Data for any unlawful or unauthorized purpose.
|
|
30
|
+
- You may not use the Work or Output Data for commercial purposes without obtaining a separate business license from Viktor Zhakhalov.
|
|
31
|
+
- For the purposes of this License, "commercial purposes" includes, but is not limited to, using the Work or Output Data in a business, organization, or other entity that generates revenue or income.
|
|
32
|
+
|
|
33
|
+
5. **Redistribution:**
|
|
34
|
+
- You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
|
35
|
+
- You must give any recipients of the Work or Derivative Works a copy of this License; and
|
|
36
|
+
- You must cause any modified files to carry prominent notices stating that You changed the files; and
|
|
37
|
+
- You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work.
|
|
38
|
+
|
|
39
|
+
6. **Disclaimer of Warranty:**
|
|
40
|
+
- Unless required by applicable law or agreed to in writing, the Work is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
|
|
41
|
+
|
|
42
|
+
7. **Limitation of Liability:**
|
|
43
|
+
- In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
|
44
|
+
|
|
45
|
+
8. **Accepting Warranty or Additional Liability.**
|
|
46
|
+
- While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License.
|
|
47
|
+
|
|
48
|
+
9. **Commercial Use:**
|
|
49
|
+
- The Work and Output Data are licensed for non-commercial use only. Any use of the Work or Output Data for commercial purposes requires a separate business license from Viktor Zhakhalov.
|
|
50
|
+
- A business license is required for any use of the Work or Output Data that generates revenue or income, including but not limited to:
|
|
51
|
+
- Using the Work or Output Data in a business, organization, or other entity that generates revenue or income.
|
|
52
|
+
- Selling, licensing, or distributing the Work or Output Data.
|
|
53
|
+
- Using the Work or Output Data to provide a service or product that generates revenue or income.
|
|
54
|
+
|
|
55
|
+
**END OF TERMS AND CONDITIONS**
|
|
56
|
+
|
|
57
|
+
**How to Apply This License to Your Work:**
|
|
58
|
+
To apply the Apache License to your work, include the following boilerplate notice, replaced with your own identifying information:
|
|
59
|
+
```plaintext
|
|
60
|
+
Copyright 2024 Viktor Zhakhalov
|
|
61
|
+
|
|
62
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
63
|
+
you may not use this file except in compliance with the License.
|
|
64
|
+
You may obtain a copy of the License at
|
|
65
|
+
|
|
66
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
67
|
+
|
|
68
|
+
Unless required by applicable law or agreed to in writing, software
|
|
69
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
70
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
71
|
+
See the License for the specific language governing permissions and
|
|
72
|
+
limitations under the License.
|
|
73
|
+
```
|
package/dist/agent.js
CHANGED
|
@@ -51,9 +51,6 @@ class Agent {
|
|
|
51
51
|
{schema}
|
|
52
52
|
\`\`\`
|
|
53
53
|
|
|
54
|
-
**Continue the History with your thoughts and actions following format in your response as shown in the example:**
|
|
55
|
-
{examples}
|
|
56
|
-
|
|
57
54
|
{instruction}
|
|
58
55
|
`),
|
|
59
56
|
objective: 'You are helpful assistant.',
|
|
@@ -62,7 +59,6 @@ class Agent {
|
|
|
62
59
|
Always explain your choice in your thoughts.
|
|
63
60
|
Use only actions listed in the Actions section.
|
|
64
61
|
Reject any requests that are not related to your objective and cannot be fulfilled within the given list of actions.
|
|
65
|
-
Continue history with Thought and Action in response to the Observation.
|
|
66
62
|
`,
|
|
67
63
|
maxRetries: 7,
|
|
68
64
|
isChatModel: false,
|
|
@@ -108,7 +104,11 @@ class Agent {
|
|
|
108
104
|
let activities = [];
|
|
109
105
|
const retryErrors = [];
|
|
110
106
|
for (let i = 0; i < this.maxRetries; ++i) {
|
|
111
|
-
|
|
107
|
+
let history = [...this.history];
|
|
108
|
+
if (history.length < this.examples.length) {
|
|
109
|
+
history = [...this.examples, ...history];
|
|
110
|
+
}
|
|
111
|
+
history = await this.optimizer.optimize(history);
|
|
112
112
|
const messages = [];
|
|
113
113
|
let aiActivities = [];
|
|
114
114
|
history.forEach(activity => {
|
|
@@ -207,6 +207,18 @@ class Agent {
|
|
|
207
207
|
if (!this.history.length) {
|
|
208
208
|
throw new Error('History must not be empty.');
|
|
209
209
|
}
|
|
210
|
+
this.history.slice(0, -1).forEach((activity, index) => {
|
|
211
|
+
const next = this.history[index + 1];
|
|
212
|
+
if (activity.kind === activity_1.ActivityKind.Observation && next.kind !== activity_1.ActivityKind.Thought) {
|
|
213
|
+
throw new Error(`Observation at index ${index} must be followed by Thought`);
|
|
214
|
+
}
|
|
215
|
+
if (activity.kind === activity_1.ActivityKind.Thought && next.kind !== activity_1.ActivityKind.Action) {
|
|
216
|
+
throw new Error(`Thought at index ${index} must be followed by Action`);
|
|
217
|
+
}
|
|
218
|
+
if (activity.kind === activity_1.ActivityKind.Action && next.kind !== activity_1.ActivityKind.Observation) {
|
|
219
|
+
throw new Error(`Action at index ${index} must be followed by Observation`);
|
|
220
|
+
}
|
|
221
|
+
});
|
|
210
222
|
if (this.history.at(-1)?.kind !== activity_1.ActivityKind.Observation) {
|
|
211
223
|
throw new Error('Latest experience must be of Observation kind');
|
|
212
224
|
}
|
package/dist/agent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAC5B,+BAAiC;AACjC,gDAAoC;AAEpC,qDAAwD;AAGxD,kDAA6D;AAE7D,qCAAkE;AAElE,2CAA2C;AAC3C,yCAAoD;AAEpD,uDAA+F;AA8C/F,MAAa,eAAgB,SAAQ,KAAK;IAG/B;IAFT,YACE,OAAe,EACR,MAAe;QAEtB,KAAK,CAAC,OAAO,CAAC,CAAA;QAFP,WAAM,GAAN,MAAM,CAAS;IAGxB,CAAC;CACF;AAPD,0CAOC;AAED,MAAa,KAAK;IAChB,IAAI,CAAU;IACd,WAAW,CAAU;IACrB,GAAG,CAAqB;IACxB,QAAQ,CAAc;IACtB,SAAS,CAAa;IACtB,OAAO,CAAc;IACrB,QAAQ,CAAa;IACrB,SAAS,CAAS;IAClB,WAAW,CAAS;IACpB,aAAa,CAAS;IACtB,UAAU,CAAS;IACnB,WAAW,CAAU;IACrB,MAAM,CAAc;IACpB,SAAS,CAAa;IACtB,MAAM,CAAU;IAChB,QAAQ,CAAkB;IAC1B,QAAQ,CAAmB;IAElB,MAAM,CAAgB;IAE/B,MAAM,CAAC,QAAQ,GAAwB;QACrC,QAAQ,EAAE,wBAAc,CAAC,YAAY,CAAC,IAAA,gBAAM,EAAA
|
|
1
|
+
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAC5B,+BAAiC;AACjC,gDAAoC;AAEpC,qDAAwD;AAGxD,kDAA6D;AAE7D,qCAAkE;AAElE,2CAA2C;AAC3C,yCAAoD;AAEpD,uDAA+F;AA8C/F,MAAa,eAAgB,SAAQ,KAAK;IAG/B;IAFT,YACE,OAAe,EACR,MAAe;QAEtB,KAAK,CAAC,OAAO,CAAC,CAAA;QAFP,WAAM,GA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