@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.cjs
CHANGED
|
@@ -629,7 +629,7 @@ const mapVercelPrompt = prompt => {
|
|
|
629
629
|
let serialized = JSON.stringify(inputs);
|
|
630
630
|
let removedCount = 0;
|
|
631
631
|
// We need to keep track of the initial size of the inputs array because we're going to be mutating it
|
|
632
|
-
|
|
632
|
+
const initialSize = inputs.length;
|
|
633
633
|
for (let i = 0; i < initialSize && buffer.Buffer.byteLength(serialized, 'utf8') > MAX_OUTPUT_SIZE; i++) {
|
|
634
634
|
inputs.shift();
|
|
635
635
|
removedCount++;
|