@economic/agents 0.0.1-alpha.15 → 0.0.1-alpha.17

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/dist/index.d.mts CHANGED
@@ -189,7 +189,7 @@ declare abstract class AIChatAgent<Env extends Cloudflare.Env = Cloudflare.Env>
189
189
  * Older messages beyond this count are summarised into a single system message.
190
190
  * Used as the default when `maxMessagesBeforeCompaction` is not provided to `buildLLMParams`.
191
191
  */
192
- declare const DEFAULT_MAX_MESSAGES_BEFORE_COMPACTION = 30;
192
+ declare const DEFAULT_MAX_MESSAGES_BEFORE_COMPACTION = 15;
193
193
  //#endregion
194
194
  //#region src/types.d.ts
195
195
  /**
package/dist/index.mjs CHANGED
@@ -181,7 +181,7 @@ function filterEphemeralMessages(messages) {
181
181
  * Older messages beyond this count are summarised into a single system message.
182
182
  * Used as the default when `maxMessagesBeforeCompaction` is not provided to `buildLLMParams`.
183
183
  */
184
- const DEFAULT_MAX_MESSAGES_BEFORE_COMPACTION = 30;
184
+ const DEFAULT_MAX_MESSAGES_BEFORE_COMPACTION = 15;
185
185
  const TOOL_RESULT_PREVIEW_CHARS = 200;
186
186
  const SUMMARY_MAX_TOKENS = 4e3;
187
187
  /**
@@ -3888,7 +3888,7 @@ var AIChatAgent = class extends AIChatAgent$1 {
3888
3888
  async buildLLMParams(config) {
3889
3889
  const body = config.options?.body;
3890
3890
  this._userId = typeof body?.userId === "string" ? body.userId : void 0;
3891
- const maxMessagesBeforeCompaction = "maxMessagesBeforeCompaction" in config ? config.maxMessagesBeforeCompaction : 30;
3891
+ const maxMessagesBeforeCompaction = "maxMessagesBeforeCompaction" in config ? config.maxMessagesBeforeCompaction : 15;
3892
3892
  const onFinishWithErrorLogging = async (result) => {
3893
3893
  if (result.finishReason !== "stop" && result.finishReason !== "tool-calls") await this.log("turn error", { finishReason: result.finishReason });
3894
3894
  return config.onFinish?.(result);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@economic/agents",
3
- "version": "0.0.1-alpha.15",
3
+ "version": "0.0.1-alpha.17",
4
4
  "description": "A starter for creating a TypeScript package.",
5
5
  "homepage": "https://github.com/author/library#readme",
6
6
  "bugs": {