@runappsai/sdk 0.6.9 → 0.6.10
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/README.md +11 -3
- package/dist/audio.d.ts +4 -4
- package/dist/audio.d.ts.map +1 -1
- package/dist/chat.d.ts +8 -1
- package/dist/chat.d.ts.map +1 -1
- package/dist/chat.js.map +1 -1
- package/dist/image.d.ts +6 -6
- package/dist/image.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/sdk.umd.js +1 -1
- package/dist/sdk.umd.js.map +1 -1
- package/dist/video.d.ts +4 -4
- package/dist/video.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/audio.ts +4 -4
- package/src/chat.ts +9 -1
- package/src/image.ts +6 -6
- package/src/index.ts +1 -0
- package/src/video.ts +4 -4
package/dist/video.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Transport } from "./transport.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { PromptInput } from "./chat.js";
|
|
3
3
|
import type { Usage } from "./types.js";
|
|
4
4
|
import type { SDKEvents } from "./events.js";
|
|
5
5
|
/**
|
|
@@ -10,9 +10,9 @@ import type { SDKEvents } from "./events.js";
|
|
|
10
10
|
* forces off.
|
|
11
11
|
*/
|
|
12
12
|
export interface VideoGenerateParams {
|
|
13
|
-
/** The prompt text,
|
|
14
|
-
*
|
|
15
|
-
prompt: string |
|
|
13
|
+
/** The prompt text, a private prompt `{ id, vars }`, or a list of
|
|
14
|
+
* those and texts joined in order (see `PromptInput`). */
|
|
15
|
+
prompt: string | PromptInput;
|
|
16
16
|
aspect_ratio?: string;
|
|
17
17
|
duration?: number;
|
|
18
18
|
resolution?: string;
|
package/dist/video.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../src/video.ts"],"names":[],"mappings":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,WAAW;IAC1B,0BAA0B;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,qBAAa,YAAY;IAErB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADN,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,SAAS;IAGpC;;;;;;;kEAO8D;IACxD,QAAQ,CACZ,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,mBAAmB,EAC3B,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GAC9B,OAAO,CAAC,SAAS,CAAC;IAarB,0CAA0C;IACpC,SAAS,CACb,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GAC9B,OAAO,CAAC,WAAW,CAAC;IAOvB;;;OAGG;IACG,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,WAAW,CAAC;IAWxE,yDAAyD;IACnD,UAAU,CACd,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GAC9B,OAAO,CAAC;QAAE,IAAI,EAAE,UAAU,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;CAMtD"}
|
package/package.json
CHANGED
package/src/audio.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Transport } from "./transport.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { PromptInput } from "./chat.js";
|
|
3
3
|
import type { Usage } from "./types.js";
|
|
4
4
|
import type { SDKEvents } from "./events.js";
|
|
5
5
|
import { wrapEvents } from "./event-wrap.js";
|
|
@@ -18,9 +18,9 @@ import { decodeMediaUrl } from "./media.js";
|
|
|
18
18
|
/* ------------------------------------------------------------------ */
|
|
19
19
|
|
|
20
20
|
export interface SpeechParams {
|
|
21
|
-
/** The text to speak,
|
|
22
|
-
*
|
|
23
|
-
input: string |
|
|
21
|
+
/** The text to speak, a private prompt `{ id, vars }`, or a list of
|
|
22
|
+
* those and texts joined in order (see `PromptInput`). */
|
|
23
|
+
input: string | PromptInput;
|
|
24
24
|
/** Named voice id (`alloy`, `nova`, …; provider-dependent). Omit
|
|
25
25
|
* when supplying `reference_audio_url` for zero-shot voice
|
|
26
26
|
* cloning — the cloned timbre overrides any named voice. */
|
package/src/chat.ts
CHANGED
|
@@ -81,6 +81,14 @@ export interface PromptRef {
|
|
|
81
81
|
template?: string;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
/**
|
|
85
|
+
* What a prompt field takes: one reference, or a list of references and
|
|
86
|
+
* plain texts joined in order by a blank line — a private style guide
|
|
87
|
+
* followed by the user's own words, or a persona and a rules prompt kept
|
|
88
|
+
* as two files. At most 16 parts.
|
|
89
|
+
*/
|
|
90
|
+
export type PromptInput = PromptRef | Array<PromptRef | string>;
|
|
91
|
+
|
|
84
92
|
/** Typed constants for {@link ServerToolName} so you get autocomplete. */
|
|
85
93
|
export const ServerTools = {
|
|
86
94
|
WebSearch: "web_search",
|
|
@@ -126,7 +134,7 @@ export interface ChatCompletionParams {
|
|
|
126
134
|
* local dev server, before a bundle exists; the gateway accepts it
|
|
127
135
|
* only from the app's creator.
|
|
128
136
|
*/
|
|
129
|
-
prompt?:
|
|
137
|
+
prompt?: PromptInput;
|
|
130
138
|
/** Pass-through for provider-specific knobs. */
|
|
131
139
|
[extra: string]: unknown;
|
|
132
140
|
}
|
package/src/image.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Transport } from "./transport.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { PromptInput } from "./chat.js";
|
|
3
3
|
import type { Usage } from "./types.js";
|
|
4
4
|
import type { SDKEvents } from "./events.js";
|
|
5
5
|
import { wrapEvents } from "./event-wrap.js";
|
|
@@ -14,9 +14,9 @@ import { wrapEvents } from "./event-wrap.js";
|
|
|
14
14
|
* the three is set, the gateway / upstream applies its own default.
|
|
15
15
|
*/
|
|
16
16
|
export interface ImageGenerateParams {
|
|
17
|
-
/** The prompt text,
|
|
18
|
-
*
|
|
19
|
-
prompt: string |
|
|
17
|
+
/** The prompt text, a private prompt `{ id, vars }`, or a list of
|
|
18
|
+
* those and texts joined in order (see `PromptInput`). */
|
|
19
|
+
prompt: string | PromptInput;
|
|
20
20
|
/** Legacy explicit "WxH" override. Prefer `resolution` +
|
|
21
21
|
* `aspect_ratio` for new code. */
|
|
22
22
|
size?: string;
|
|
@@ -124,8 +124,8 @@ export interface ImageFileInput {
|
|
|
124
124
|
export interface ImageEditParams {
|
|
125
125
|
image: ImageFileInput;
|
|
126
126
|
mask?: ImageFileInput;
|
|
127
|
-
/** The prompt text,
|
|
128
|
-
prompt: string |
|
|
127
|
+
/** The prompt text, a private prompt `{ id, vars }`, or a list. */
|
|
128
|
+
prompt: string | PromptInput;
|
|
129
129
|
size?: string;
|
|
130
130
|
n?: number;
|
|
131
131
|
user?: string;
|
package/src/index.ts
CHANGED
package/src/video.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Transport } from "./transport.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { PromptInput } from "./chat.js";
|
|
3
3
|
import type { Usage } from "./types.js";
|
|
4
4
|
import type { SDKEvents } from "./events.js";
|
|
5
5
|
import { wrapEvents } from "./event-wrap.js";
|
|
@@ -16,9 +16,9 @@ import { wrapEvents } from "./event-wrap.js";
|
|
|
16
16
|
* forces off.
|
|
17
17
|
*/
|
|
18
18
|
export interface VideoGenerateParams {
|
|
19
|
-
/** The prompt text,
|
|
20
|
-
*
|
|
21
|
-
prompt: string |
|
|
19
|
+
/** The prompt text, a private prompt `{ id, vars }`, or a list of
|
|
20
|
+
* those and texts joined in order (see `PromptInput`). */
|
|
21
|
+
prompt: string | PromptInput;
|
|
22
22
|
aspect_ratio?: string;
|
|
23
23
|
duration?: number;
|
|
24
24
|
resolution?: string;
|