@discomedia/utils 1.0.63 → 1.0.65
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-frontend.cjs +41 -5
- package/dist/index-frontend.cjs.map +1 -1
- package/dist/index-frontend.mjs +41 -5
- package/dist/index-frontend.mjs.map +1 -1
- package/dist/index.cjs +320 -208
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +320 -208
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +2 -2
- package/dist/test.js +364 -210
- package/dist/test.js.map +1 -1
- package/dist/types/alpaca-market-data-api.d.ts.map +1 -1
- package/dist/types/alpaca-trading-api.d.ts +8 -1
- package/dist/types/alpaca-trading-api.d.ts.map +1 -1
- package/dist/types/llm-config.d.ts.map +1 -1
- package/dist/types/llm-images.d.ts.map +1 -1
- package/dist/types/llm-openai.d.ts.map +1 -1
- package/dist/types/types/alpaca-types.d.ts +29 -0
- package/dist/types/types/alpaca-types.d.ts.map +1 -1
- package/dist/types/types/llm-types.d.ts +2 -2
- package/dist/types/types/llm-types.d.ts.map +1 -1
- package/dist/types-frontend/alpaca-market-data-api.d.ts.map +1 -1
- package/dist/types-frontend/alpaca-trading-api.d.ts +8 -1
- package/dist/types-frontend/alpaca-trading-api.d.ts.map +1 -1
- package/dist/types-frontend/llm-config.d.ts.map +1 -1
- package/dist/types-frontend/llm-images.d.ts.map +1 -1
- package/dist/types-frontend/llm-openai.d.ts.map +1 -1
- package/dist/types-frontend/types/alpaca-types.d.ts +29 -0
- package/dist/types-frontend/types/alpaca-types.d.ts.map +1 -1
- package/dist/types-frontend/types/llm-types.d.ts +2 -2
- package/dist/types-frontend/types/llm-types.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index-frontend.mjs
CHANGED
|
@@ -5,6 +5,7 @@ function isOpenRouterModel(model) {
|
|
|
5
5
|
const openRouterModels = [
|
|
6
6
|
'openai/gpt-5',
|
|
7
7
|
'openai/gpt-5-mini',
|
|
8
|
+
'openai/gpt-5.4-mini',
|
|
8
9
|
'openai/gpt-5-nano',
|
|
9
10
|
'openai/gpt-5.1',
|
|
10
11
|
'openai/gpt-5.4',
|
|
@@ -260,7 +261,7 @@ const safeJSON = (text) => {
|
|
|
260
261
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
261
262
|
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
262
263
|
|
|
263
|
-
const VERSION = '6.
|
|
264
|
+
const VERSION = '6.32.0'; // x-release-please-version
|
|
264
265
|
|
|
265
266
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
266
267
|
const isRunningInBrowser = () => {
|
|
@@ -3504,7 +3505,7 @@ class Speech extends APIResource {
|
|
|
3504
3505
|
* const speech = await client.audio.speech.create({
|
|
3505
3506
|
* input: 'input',
|
|
3506
3507
|
* model: 'string',
|
|
3507
|
-
* voice: '
|
|
3508
|
+
* voice: 'string',
|
|
3508
3509
|
* });
|
|
3509
3510
|
*
|
|
3510
3511
|
* const content = await speech.blob();
|
|
@@ -6785,7 +6786,7 @@ class Videos extends APIResource {
|
|
|
6785
6786
|
* Create a new video generation job from a prompt and optional reference assets.
|
|
6786
6787
|
*/
|
|
6787
6788
|
create(body, options) {
|
|
6788
|
-
return this._client.post('/videos',
|
|
6789
|
+
return this._client.post('/videos', multipartFormRequestOptions({ body, ...options }, this._client));
|
|
6789
6790
|
}
|
|
6790
6791
|
/**
|
|
6791
6792
|
* Fetch the latest metadata for a generated video.
|
|
@@ -6805,6 +6806,12 @@ class Videos extends APIResource {
|
|
|
6805
6806
|
delete(videoID, options) {
|
|
6806
6807
|
return this._client.delete(path `/videos/${videoID}`, options);
|
|
6807
6808
|
}
|
|
6809
|
+
/**
|
|
6810
|
+
* Create a character from an uploaded video.
|
|
6811
|
+
*/
|
|
6812
|
+
createCharacter(body, options) {
|
|
6813
|
+
return this._client.post('/videos/characters', multipartFormRequestOptions({ body, ...options }, this._client));
|
|
6814
|
+
}
|
|
6808
6815
|
/**
|
|
6809
6816
|
* Download the generated video bytes or a derived preview asset.
|
|
6810
6817
|
*
|
|
@@ -6818,6 +6825,25 @@ class Videos extends APIResource {
|
|
|
6818
6825
|
__binaryResponse: true,
|
|
6819
6826
|
});
|
|
6820
6827
|
}
|
|
6828
|
+
/**
|
|
6829
|
+
* Create a new video generation job by editing a source video or existing
|
|
6830
|
+
* generated video.
|
|
6831
|
+
*/
|
|
6832
|
+
edit(body, options) {
|
|
6833
|
+
return this._client.post('/videos/edits', multipartFormRequestOptions({ body, ...options }, this._client));
|
|
6834
|
+
}
|
|
6835
|
+
/**
|
|
6836
|
+
* Create an extension of a completed video.
|
|
6837
|
+
*/
|
|
6838
|
+
extend(body, options) {
|
|
6839
|
+
return this._client.post('/videos/extensions', multipartFormRequestOptions({ body, ...options }, this._client));
|
|
6840
|
+
}
|
|
6841
|
+
/**
|
|
6842
|
+
* Fetch a character.
|
|
6843
|
+
*/
|
|
6844
|
+
getCharacter(characterID, options) {
|
|
6845
|
+
return this._client.get(path `/videos/characters/${characterID}`, options);
|
|
6846
|
+
}
|
|
6821
6847
|
/**
|
|
6822
6848
|
* Create a remix of a completed video using a refreshed prompt.
|
|
6823
6849
|
*/
|
|
@@ -7099,8 +7125,9 @@ class OpenAI {
|
|
|
7099
7125
|
new URL(path)
|
|
7100
7126
|
: new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
|
|
7101
7127
|
const defaultQuery = this.defaultQuery();
|
|
7102
|
-
|
|
7103
|
-
|
|
7128
|
+
const pathQuery = Object.fromEntries(url.searchParams);
|
|
7129
|
+
if (!isEmptyObj$1(defaultQuery) || !isEmptyObj$1(pathQuery)) {
|
|
7130
|
+
query = { ...pathQuery, ...defaultQuery, ...query };
|
|
7104
7131
|
}
|
|
7105
7132
|
if (typeof query === 'object' && query && !Array.isArray(query)) {
|
|
7106
7133
|
url.search = this.stringifyQuery(query);
|
|
@@ -10320,6 +10347,11 @@ const openAiModelCosts = {
|
|
|
10320
10347
|
cacheHitCost: 0.025 / 1_000_000,
|
|
10321
10348
|
outputCost: 2 / 1_000_000,
|
|
10322
10349
|
},
|
|
10350
|
+
'gpt-5.4-mini': {
|
|
10351
|
+
inputCost: 0.25 / 1_000_000,
|
|
10352
|
+
cacheHitCost: 0.025 / 1_000_000,
|
|
10353
|
+
outputCost: 2 / 1_000_000,
|
|
10354
|
+
},
|
|
10323
10355
|
'gpt-5-nano': {
|
|
10324
10356
|
inputCost: 0.05 / 1_000_000,
|
|
10325
10357
|
cacheHitCost: 0.005 / 1_000_000,
|
|
@@ -10830,6 +10862,7 @@ const isSupportedModel = (model) => {
|
|
|
10830
10862
|
'gpt-4.1-nano',
|
|
10831
10863
|
'gpt-5',
|
|
10832
10864
|
'gpt-5-mini',
|
|
10865
|
+
'gpt-5.4-mini',
|
|
10833
10866
|
'gpt-5-nano',
|
|
10834
10867
|
'gpt-5.1',
|
|
10835
10868
|
'gpt-5.4',
|
|
@@ -10858,6 +10891,7 @@ function supportsTemperature(model) {
|
|
|
10858
10891
|
'o3',
|
|
10859
10892
|
'gpt-5',
|
|
10860
10893
|
'gpt-5-mini',
|
|
10894
|
+
'gpt-5.4-mini',
|
|
10861
10895
|
'gpt-5-nano',
|
|
10862
10896
|
'gpt-5.1',
|
|
10863
10897
|
'gpt-5.4',
|
|
@@ -10887,6 +10921,7 @@ function isGPT5Model(model) {
|
|
|
10887
10921
|
const gpt5Models = [
|
|
10888
10922
|
'gpt-5',
|
|
10889
10923
|
'gpt-5-mini',
|
|
10924
|
+
'gpt-5.4-mini',
|
|
10890
10925
|
'gpt-5-nano',
|
|
10891
10926
|
'gpt-5.1',
|
|
10892
10927
|
'gpt-5.4',
|
|
@@ -11196,6 +11231,7 @@ const MULTIMODAL_VISION_MODELS = new Set([
|
|
|
11196
11231
|
'gpt-4o',
|
|
11197
11232
|
'gpt-5',
|
|
11198
11233
|
'gpt-5-mini',
|
|
11234
|
+
'gpt-5.4-mini',
|
|
11199
11235
|
'gpt-5-nano',
|
|
11200
11236
|
'gpt-5.1',
|
|
11201
11237
|
'gpt-5.4',
|