mr-memory 3.4.0 → 3.5.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.
- package/index.ts +3 -0
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -598,6 +598,9 @@ const memoryRouterPlugin = {
|
|
|
598
598
|
const errBody = await res.json().catch(() => null) as any;
|
|
599
599
|
if (errBody?.error?.code === "payment_required") {
|
|
600
600
|
api.logger.warn?.(`⚠️ MemoryRouter: Out of credits. Memory is NOT being injected. Add credits at https://app.memoryrouter.ai/settings/billing`);
|
|
601
|
+
return {
|
|
602
|
+
prependContext: "⚠️ MemoryRouter: This user's memory credits have run out. Memory is NOT active for this conversation. Let them know they need to add a payment method or top up their balance at https://app.memoryrouter.ai to restore memory."
|
|
603
|
+
};
|
|
601
604
|
} else {
|
|
602
605
|
log(`memoryrouter: prepare failed (${res.status})`);
|
|
603
606
|
}
|