@posthog/ai 8.4.0 → 8.4.2
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/anthropic/index.cjs +2 -2
- package/dist/anthropic/index.cjs.map +1 -1
- package/dist/anthropic/index.mjs +2 -2
- package/dist/anthropic/index.mjs.map +1 -1
- package/dist/gemini/index.cjs +2 -2
- package/dist/gemini/index.cjs.map +1 -1
- package/dist/gemini/index.mjs +2 -2
- package/dist/gemini/index.mjs.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/langchain/index.cjs +4 -4
- package/dist/langchain/index.cjs.map +1 -1
- package/dist/langchain/index.mjs +4 -4
- package/dist/langchain/index.mjs.map +1 -1
- package/dist/openai/index.cjs +5 -2
- package/dist/openai/index.cjs.map +1 -1
- package/dist/openai/index.mjs +5 -2
- package/dist/openai/index.mjs.map +1 -1
- package/dist/openai-agents/index.cjs +1 -1
- package/dist/openai-agents/index.cjs.map +1 -1
- package/dist/openai-agents/index.mjs +1 -1
- package/dist/openai-agents/index.mjs.map +1 -1
- package/dist/vercel/index.cjs +2 -2
- package/dist/vercel/index.cjs.map +1 -1
- package/dist/vercel/index.mjs +2 -2
- package/dist/vercel/index.mjs.map +1 -1
- package/package.json +12 -12
package/dist/openai/index.mjs
CHANGED
|
@@ -203,7 +203,7 @@ const getModelParams = params => {
|
|
|
203
203
|
return {};
|
|
204
204
|
}
|
|
205
205
|
const modelParams = {};
|
|
206
|
-
const paramKeys = ['temperature', 'max_tokens', 'max_completion_tokens', 'top_p', 'frequency_penalty', 'presence_penalty', 'n', 'stop', 'stream', 'streaming', 'language', 'response_format', 'timestamp_granularities'];
|
|
206
|
+
const paramKeys = ['temperature', 'max_tokens', 'max_completion_tokens', 'top_p', 'frequency_penalty', 'presence_penalty', 'n', 'stop', 'stream', 'streaming', 'language', 'response_format', 'timestamp_granularities', 'service_tier'];
|
|
207
207
|
for (const key of paramKeys) {
|
|
208
208
|
if (key in params && params[key] !== undefined) {
|
|
209
209
|
modelParams[key] = params[key];
|
|
@@ -530,7 +530,7 @@ function formatOpenAIResponsesInput(input, instructions) {
|
|
|
530
530
|
return messages;
|
|
531
531
|
}
|
|
532
532
|
|
|
533
|
-
var version = "8.4.
|
|
533
|
+
var version = "8.4.2";
|
|
534
534
|
|
|
535
535
|
const DEFAULT_MAX_DEPTH = 3;
|
|
536
536
|
const MAX_STACK_LINES = 20;
|
|
@@ -1390,6 +1390,9 @@ function preserveAPIPromiseHelpers(parentPromise, wrappedPromise) {
|
|
|
1390
1390
|
if (typeof parentPromise.withResponse === 'function') {
|
|
1391
1391
|
apiPromise.withResponse = async () => {
|
|
1392
1392
|
const [response, data] = await Promise.all([parentPromise.withResponse(), wrappedPromise]);
|
|
1393
|
+
// swaps the `data` payload inside the SDK's generic withResponse shape; the compiler
|
|
1394
|
+
// cannot relate the Input- and Output-instantiated conditional types
|
|
1395
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
1393
1396
|
return {
|
|
1394
1397
|
...response,
|
|
1395
1398
|
data
|