@posthog/ai 4.3.2 → 4.4.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/CHANGELOG.md +4 -0
- package/lib/anthropic/index.d.ts +1 -4163
- package/lib/index.cjs +1 -1
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.ts +1 -4163
- package/lib/index.mjs +1 -1
- package/lib/index.mjs.map +1 -1
- package/lib/langchain/index.d.ts +1 -4163
- package/lib/openai/index.d.ts +1 -4163
- package/lib/vercel/index.cjs +1 -1
- package/lib/vercel/index.cjs.map +1 -1
- package/lib/vercel/index.d.ts +1 -4163
- package/lib/vercel/index.mjs +1 -1
- package/lib/vercel/index.mjs.map +1 -1
- package/package.json +4 -1
- package/src/vercel/middleware.ts +1 -1
- package/tsconfig.json +0 -1
package/lib/index.mjs
CHANGED
|
@@ -602,7 +602,7 @@ const mapVercelPrompt = prompt => {
|
|
|
602
602
|
let serialized = JSON.stringify(inputs);
|
|
603
603
|
let removedCount = 0;
|
|
604
604
|
// We need to keep track of the initial size of the inputs array because we're going to be mutating it
|
|
605
|
-
|
|
605
|
+
const initialSize = inputs.length;
|
|
606
606
|
for (let i = 0; i < initialSize && Buffer.byteLength(serialized, 'utf8') > MAX_OUTPUT_SIZE; i++) {
|
|
607
607
|
inputs.shift();
|
|
608
608
|
removedCount++;
|