phonic 0.32.5 → 0.32.6
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/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/conversations/client/Socket.d.ts +2 -1
- package/dist/cjs/api/resources/conversations/client/Socket.js +4 -0
- package/dist/cjs/api/resources/tts/client/requests/StreamTtsRequest.d.ts +1 -0
- package/dist/cjs/api/resources/tts/client/requests/StreamTtsRequest.js +1 -0
- package/dist/cjs/api/types/UpdateToolsSubsetPayload.d.ts +6 -0
- package/dist/cjs/api/types/UpdateToolsSubsetPayload.js +3 -0
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/conversations/client/Socket.d.mts +2 -1
- package/dist/esm/api/resources/conversations/client/Socket.mjs +4 -0
- package/dist/esm/api/resources/tts/client/requests/StreamTtsRequest.d.mts +1 -0
- package/dist/esm/api/resources/tts/client/requests/StreamTtsRequest.mjs +1 -0
- package/dist/esm/api/types/UpdateToolsSubsetPayload.d.mts +6 -0
- package/dist/esm/api/types/UpdateToolsSubsetPayload.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "phonic",
|
|
46
|
-
"X-Fern-SDK-Version": "0.32.
|
|
47
|
-
"User-Agent": "phonic/0.32.
|
|
46
|
+
"X-Fern-SDK-Version": "0.32.6",
|
|
47
|
+
"User-Agent": "phonic/0.32.6",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -37,6 +37,7 @@ export declare class ConversationsSocket {
|
|
|
37
37
|
sendAudioChunk(message: Phonic.AudioChunkPayload): void;
|
|
38
38
|
sendUpdateSystemPrompt(message: Phonic.UpdateSystemPromptPayload): void;
|
|
39
39
|
sendAddSystemMessage(message: Phonic.AddSystemMessagePayload): void;
|
|
40
|
+
sendUpdateToolsSubset(message: Phonic.UpdateToolsSubsetPayload): void;
|
|
40
41
|
sendSetExternalId(message: Phonic.SetExternalIdPayload): void;
|
|
41
42
|
sendToolCallOutput(message: Phonic.ToolCallOutputPayload): void;
|
|
42
43
|
sendUnmute(message: Phonic.UnmutePayload): void;
|
|
@@ -55,5 +56,5 @@ export declare class ConversationsSocket {
|
|
|
55
56
|
/** Send a binary payload to the websocket. */
|
|
56
57
|
protected sendBinary(payload: ArrayBuffer | Blob | ArrayBufferView): void;
|
|
57
58
|
/** Send a JSON payload to the websocket. */
|
|
58
|
-
protected sendJson(payload: Phonic.ConfigPayload | Phonic.AudioChunkPayload | Phonic.UpdateSystemPromptPayload | Phonic.AddSystemMessagePayload | Phonic.SetExternalIdPayload | Phonic.ToolCallOutputPayload | Phonic.UnmutePayload | Phonic.MutePayload | Phonic.GenerateReplyPayload | Phonic.SayPayload | Phonic.ResetPayload): void;
|
|
59
|
+
protected sendJson(payload: Phonic.ConfigPayload | Phonic.AudioChunkPayload | Phonic.UpdateSystemPromptPayload | Phonic.AddSystemMessagePayload | Phonic.UpdateToolsSubsetPayload | Phonic.SetExternalIdPayload | Phonic.ToolCallOutputPayload | Phonic.UnmutePayload | Phonic.MutePayload | Phonic.GenerateReplyPayload | Phonic.SayPayload | Phonic.ResetPayload): void;
|
|
59
60
|
}
|
|
@@ -106,6 +106,10 @@ class ConversationsSocket {
|
|
|
106
106
|
this.assertSocketIsOpen();
|
|
107
107
|
this.sendJson(message);
|
|
108
108
|
}
|
|
109
|
+
sendUpdateToolsSubset(message) {
|
|
110
|
+
this.assertSocketIsOpen();
|
|
111
|
+
this.sendJson(message);
|
|
112
|
+
}
|
|
109
113
|
sendSetExternalId(message) {
|
|
110
114
|
this.assertSocketIsOpen();
|
|
111
115
|
this.sendJson(message);
|
|
@@ -20,6 +20,7 @@ export declare namespace StreamTtsRequest {
|
|
|
20
20
|
/** The audio format to stream. */
|
|
21
21
|
const OutputFormat: {
|
|
22
22
|
readonly Pcm44100: "pcm_44100";
|
|
23
|
+
readonly Pcm24000: "pcm_24000";
|
|
23
24
|
readonly Pcm16000: "pcm_16000";
|
|
24
25
|
readonly Pcm8000: "pcm_8000";
|
|
25
26
|
readonly Mulaw8000: "mulaw_8000";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type * as Phonic from "../index.js";
|
|
2
|
+
export interface UpdateToolsSubsetPayload {
|
|
3
|
+
type: "update_tools_subset";
|
|
4
|
+
/** Tools available to the assistant. Use a string to reference a pre-defined tool by name, or define an inline WebSocket tool for this conversation. Tool names must be unique. */
|
|
5
|
+
tools: Phonic.ToolDefinition[];
|
|
6
|
+
}
|
|
@@ -66,6 +66,7 @@ export * from "./ToolName.js";
|
|
|
66
66
|
export * from "./ToolParameter.js";
|
|
67
67
|
export * from "./UnmutePayload.js";
|
|
68
68
|
export * from "./UpdateSystemPromptPayload.js";
|
|
69
|
+
export * from "./UpdateToolsSubsetPayload.js";
|
|
69
70
|
export * from "./UserFinishedSpeakingPayload.js";
|
|
70
71
|
export * from "./UserStartedSpeakingPayload.js";
|
|
71
72
|
export * from "./ValidationError.js";
|
|
@@ -82,6 +82,7 @@ __exportStar(require("./ToolName.js"), exports);
|
|
|
82
82
|
__exportStar(require("./ToolParameter.js"), exports);
|
|
83
83
|
__exportStar(require("./UnmutePayload.js"), exports);
|
|
84
84
|
__exportStar(require("./UpdateSystemPromptPayload.js"), exports);
|
|
85
|
+
__exportStar(require("./UpdateToolsSubsetPayload.js"), exports);
|
|
85
86
|
__exportStar(require("./UserFinishedSpeakingPayload.js"), exports);
|
|
86
87
|
__exportStar(require("./UserStartedSpeakingPayload.js"), exports);
|
|
87
88
|
__exportStar(require("./ValidationError.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.32.
|
|
1
|
+
export declare const SDK_VERSION = "0.32.6";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "phonic",
|
|
9
|
-
"X-Fern-SDK-Version": "0.32.
|
|
10
|
-
"User-Agent": "phonic/0.32.
|
|
9
|
+
"X-Fern-SDK-Version": "0.32.6",
|
|
10
|
+
"User-Agent": "phonic/0.32.6",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -37,6 +37,7 @@ export declare class ConversationsSocket {
|
|
|
37
37
|
sendAudioChunk(message: Phonic.AudioChunkPayload): void;
|
|
38
38
|
sendUpdateSystemPrompt(message: Phonic.UpdateSystemPromptPayload): void;
|
|
39
39
|
sendAddSystemMessage(message: Phonic.AddSystemMessagePayload): void;
|
|
40
|
+
sendUpdateToolsSubset(message: Phonic.UpdateToolsSubsetPayload): void;
|
|
40
41
|
sendSetExternalId(message: Phonic.SetExternalIdPayload): void;
|
|
41
42
|
sendToolCallOutput(message: Phonic.ToolCallOutputPayload): void;
|
|
42
43
|
sendUnmute(message: Phonic.UnmutePayload): void;
|
|
@@ -55,5 +56,5 @@ export declare class ConversationsSocket {
|
|
|
55
56
|
/** Send a binary payload to the websocket. */
|
|
56
57
|
protected sendBinary(payload: ArrayBuffer | Blob | ArrayBufferView): void;
|
|
57
58
|
/** Send a JSON payload to the websocket. */
|
|
58
|
-
protected sendJson(payload: Phonic.ConfigPayload | Phonic.AudioChunkPayload | Phonic.UpdateSystemPromptPayload | Phonic.AddSystemMessagePayload | Phonic.SetExternalIdPayload | Phonic.ToolCallOutputPayload | Phonic.UnmutePayload | Phonic.MutePayload | Phonic.GenerateReplyPayload | Phonic.SayPayload | Phonic.ResetPayload): void;
|
|
59
|
+
protected sendJson(payload: Phonic.ConfigPayload | Phonic.AudioChunkPayload | Phonic.UpdateSystemPromptPayload | Phonic.AddSystemMessagePayload | Phonic.UpdateToolsSubsetPayload | Phonic.SetExternalIdPayload | Phonic.ToolCallOutputPayload | Phonic.UnmutePayload | Phonic.MutePayload | Phonic.GenerateReplyPayload | Phonic.SayPayload | Phonic.ResetPayload): void;
|
|
59
60
|
}
|
|
@@ -70,6 +70,10 @@ export class ConversationsSocket {
|
|
|
70
70
|
this.assertSocketIsOpen();
|
|
71
71
|
this.sendJson(message);
|
|
72
72
|
}
|
|
73
|
+
sendUpdateToolsSubset(message) {
|
|
74
|
+
this.assertSocketIsOpen();
|
|
75
|
+
this.sendJson(message);
|
|
76
|
+
}
|
|
73
77
|
sendSetExternalId(message) {
|
|
74
78
|
this.assertSocketIsOpen();
|
|
75
79
|
this.sendJson(message);
|
|
@@ -20,6 +20,7 @@ export declare namespace StreamTtsRequest {
|
|
|
20
20
|
/** The audio format to stream. */
|
|
21
21
|
const OutputFormat: {
|
|
22
22
|
readonly Pcm44100: "pcm_44100";
|
|
23
|
+
readonly Pcm24000: "pcm_24000";
|
|
23
24
|
readonly Pcm16000: "pcm_16000";
|
|
24
25
|
readonly Pcm8000: "pcm_8000";
|
|
25
26
|
readonly Mulaw8000: "mulaw_8000";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type * as Phonic from "../index.mjs";
|
|
2
|
+
export interface UpdateToolsSubsetPayload {
|
|
3
|
+
type: "update_tools_subset";
|
|
4
|
+
/** Tools available to the assistant. Use a string to reference a pre-defined tool by name, or define an inline WebSocket tool for this conversation. Tool names must be unique. */
|
|
5
|
+
tools: Phonic.ToolDefinition[];
|
|
6
|
+
}
|
|
@@ -66,6 +66,7 @@ export * from "./ToolName.mjs";
|
|
|
66
66
|
export * from "./ToolParameter.mjs";
|
|
67
67
|
export * from "./UnmutePayload.mjs";
|
|
68
68
|
export * from "./UpdateSystemPromptPayload.mjs";
|
|
69
|
+
export * from "./UpdateToolsSubsetPayload.mjs";
|
|
69
70
|
export * from "./UserFinishedSpeakingPayload.mjs";
|
|
70
71
|
export * from "./UserStartedSpeakingPayload.mjs";
|
|
71
72
|
export * from "./ValidationError.mjs";
|
|
@@ -66,6 +66,7 @@ export * from "./ToolName.mjs";
|
|
|
66
66
|
export * from "./ToolParameter.mjs";
|
|
67
67
|
export * from "./UnmutePayload.mjs";
|
|
68
68
|
export * from "./UpdateSystemPromptPayload.mjs";
|
|
69
|
+
export * from "./UpdateToolsSubsetPayload.mjs";
|
|
69
70
|
export * from "./UserFinishedSpeakingPayload.mjs";
|
|
70
71
|
export * from "./UserStartedSpeakingPayload.mjs";
|
|
71
72
|
export * from "./ValidationError.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.32.
|
|
1
|
+
export declare const SDK_VERSION = "0.32.6";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.32.
|
|
1
|
+
export const SDK_VERSION = "0.32.6";
|