Skip to content

Commit c0fd2ac

Browse files
committedApr 26, 2024·
SDK regeneration
1 parent 5ca7c55 commit c0fd2ac

33 files changed

+169
-55
lines changed
 

‎package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
"node-fetch": "2.7.0",
1818
"qs": "6.11.2",
1919
"ws": "^8.14.2",
20-
"uuid": "9.0.1"
20+
"@types/ws": "^8.5.9",
21+
"uuid": "9.0.1",
22+
"@types/uuid": "9.0.7"
2123
},
2224
"devDependencies": {
2325
"@types/url-join": "4.0.1",
@@ -28,8 +30,6 @@
2830
"ts-jest": "^29.1.1",
2931
"@types/node": "17.0.33",
3032
"prettier": "2.7.1",
31-
"typescript": "4.6.4",
32-
"@types/ws": "^8.5.9",
33-
"@types/uuid": "9.0.7"
33+
"typescript": "4.6.4"
3434
}
3535
}

‎src/Client.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
import * as environments from "./environments";
66
import * as core from "./core";
7-
import { CustomModels } from "./api/resources/customModels/client/Client";
87
import { EmpathicVoice } from "./api/resources/empathicVoice/client/Client";
8+
import { CustomModels } from "./api/resources/customModels/client/Client";
99
import { ExpressionMeasurement } from "./api/resources/expressionMeasurement/client/Client";
1010

1111
export declare namespace HumeClient {
@@ -25,18 +25,18 @@ export declare namespace HumeClient {
2525
export class HumeClient {
2626
constructor(protected readonly _options: HumeClient.Options = {}) {}
2727

28-
protected _customModels: CustomModels | undefined;
29-
30-
public get customModels(): CustomModels {
31-
return (this._customModels ??= new CustomModels(this._options));
32-
}
33-
3428
protected _empathicVoice: EmpathicVoice | undefined;
3529

3630
public get empathicVoice(): EmpathicVoice {
3731
return (this._empathicVoice ??= new EmpathicVoice(this._options));
3832
}
3933

34+
protected _customModels: CustomModels | undefined;
35+
36+
public get customModels(): CustomModels {
37+
return (this._customModels ??= new CustomModels(this._options));
38+
}
39+
4040
protected _expressionMeasurement: ExpressionMeasurement | undefined;
4141

4242
public get expressionMeasurement(): ExpressionMeasurement {

‎src/api/resources/empathicVoice/resources/chat/types/PublishEvent.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ import * as Hume from "../../../../..";
77
export type PublishEvent =
88
| Hume.empathicVoice.AudioInput
99
| Hume.empathicVoice.SessionSettings
10-
| Hume.empathicVoice.TextInput
11-
| Hume.empathicVoice.TtsInput;
10+
| Hume.empathicVoice.UserInput
11+
| Hume.empathicVoice.AssistantInput;

‎src/api/resources/empathicVoice/types/AssistantEnd.ts

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
* This file was auto-generated by Fern from our API Definition.
33
*/
44

5+
/**
6+
* When provided, the output is an assistant end message.
7+
*/
58
export interface AssistantEnd {
9+
customSessionId?: string;
610
type: "assistant_end";
711
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
5+
/**
6+
* When provided, the input is spoken by EVI.
7+
*/
8+
export interface AssistantInput {
9+
customSessionId?: string;
10+
/** Text to be synthesized. */
11+
text: string;
12+
type: "assistant_input";
13+
}

‎src/api/resources/empathicVoice/types/AssistantMessage.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@
44

55
import * as Hume from "../../..";
66

7+
/**
8+
* When provided, the output is an assistant message.
9+
*/
710
export interface AssistantMessage {
8-
/** Indicates if this message was constructed from a TtsInput message. */
9-
fromTts: boolean;
11+
customSessionId?: string;
12+
/** Indicates if this message was constructed from a text input message. */
13+
fromText: boolean;
1014
/** ID of the assistant message. */
1115
id?: string;
1216
/** Transcript of the message. */

‎src/api/resources/empathicVoice/types/AudioInput.ts

+4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
* This file was auto-generated by Fern from our API Definition.
33
*/
44

5+
/**
6+
* When provided, the input is audio.
7+
*/
58
export interface AudioInput {
9+
customSessionId?: string;
610
/** Base64 encoded audio input. */
711
data: string;
812
type: "audio_input";

‎src/api/resources/empathicVoice/types/AudioOutput.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22
* This file was auto-generated by Fern from our API Definition.
33
*/
44

5+
/**
6+
* When provided, the output is audio.
7+
*/
58
export interface AudioOutput {
6-
/** Base64 encoded Linear16 PCM output. */
9+
customSessionId?: string;
10+
/** Base64 encoded audio output. */
711
data: string;
812
/** ID of the audio output. */
913
id: string;

‎src/api/resources/empathicVoice/types/Error_.ts

+4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22
* This file was auto-generated by Fern from our API Definition.
33
*/
44

5+
/**
6+
* When provided, the output is an error message.
7+
*/
58
export interface Error_ {
69
/** Error code. */
710
code: string;
11+
customSessionId?: string;
812
/** Error message. */
913
message: string;
1014
/** Error slug. */

‎src/api/resources/empathicVoice/types/SessionSettings.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@
44

55
import * as Hume from "../../..";
66

7+
/**
8+
* Settings for this chat session.
9+
*/
710
export interface SessionSettings {
11+
customSessionId?: string;
812
audio?: Hume.empathicVoice.AudioConfiguration;
913
languageModelApiKey?: string;
10-
type?: "session_settings";
14+
systemPrompt?: string;
15+
type: "session_settings";
1116
}

‎src/api/resources/empathicVoice/types/TextInput.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,5 @@
33
*/
44

55
export interface TextInput {
6-
/** Text to insert into the conversation. */
7-
text: string;
8-
type: "user_input";
6+
type?: "text_input";
97
}

‎src/api/resources/empathicVoice/types/TtsInput.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,5 @@
33
*/
44

55
export interface TtsInput {
6-
/** Text to be synthesized. */
7-
text: string;
8-
type: "assistant_input";
6+
type?: "tts";
97
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
5+
/**
6+
* User text to insert into the conversation.
7+
*/
8+
export interface UserInput {
9+
customSessionId?: string;
10+
/** User text to insert into the conversation. */
11+
text: string;
12+
type: "user_input";
13+
}

‎src/api/resources/empathicVoice/types/UserInterruption.ts

+4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
* This file was auto-generated by Fern from our API Definition.
33
*/
44

5+
/**
6+
* When provided, the output is an interruption.
7+
*/
58
export interface UserInterruption {
9+
customSessionId?: string;
610
time: number;
711
type: "user_interruption";
812
}

‎src/api/resources/empathicVoice/types/UserMessage.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@
44

55
import * as Hume from "../../..";
66

7+
/**
8+
* When provided, the output is a user message.
9+
*/
710
export interface UserMessage {
11+
customSessionId?: string;
812
/** Indicates if this message was constructed from a text input message. */
913
fromText: boolean;
1014
/** Transcript of the message. */
1115
message: Hume.empathicVoice.ChatMessage;
1216
/** Inference model results. */
1317
models: Hume.empathicVoice.Inference;
14-
/** Segments of the user message. */
15-
serializedSegments: Record<string, unknown>[];
1618
/** Start and End time of user message. */
1719
time: Hume.empathicVoice.MillisecondInterval;
1820
type: "user_message";

‎src/api/resources/empathicVoice/types/index.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export * from "./ReturnChatWithPagedEvents";
2121
export * from "./ReturnActiveChatCount";
2222
export * from "./ReturnActiveChatCountPerTag";
2323
export * from "./AssistantEnd";
24+
export * from "./AssistantInput";
2425
export * from "./AssistantMessage";
2526
export * from "./AudioConfiguration";
2627
export * from "./AudioInput";
@@ -34,8 +35,9 @@ export * from "./MillisecondInterval";
3435
export * from "./ProsodyInference";
3536
export * from "./Role";
3637
export * from "./SessionSettings";
37-
export * from "./TextInput";
38-
export * from "./TtsInput";
38+
export * from "./UserInput";
3939
export * from "./UserInterruption";
4040
export * from "./UserMessage";
41+
export * from "./TtsInput";
42+
export * from "./TextInput";
4143
export * from "./FunctionCallResponseInput";

‎src/api/resources/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export * as customModels from "./customModels";
21
export * as empathicVoice from "./empathicVoice";
2+
export * as customModels from "./customModels";
33
export * as expressionMeasurement from "./expressionMeasurement";

‎src/serialization/resources/empathicVoice/resources/chat/types/PublishEvent.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ import * as Hume from "../../../../../../api";
77
import * as core from "../../../../../../core";
88
import { AudioInput } from "../../../types/AudioInput";
99
import { SessionSettings } from "../../../types/SessionSettings";
10-
import { TextInput } from "../../../types/TextInput";
11-
import { TtsInput } from "../../../types/TtsInput";
10+
import { UserInput } from "../../../types/UserInput";
11+
import { AssistantInput } from "../../../types/AssistantInput";
1212

1313
export const PublishEvent: core.serialization.Schema<
1414
serializers.empathicVoice.PublishEvent.Raw,
1515
Hume.empathicVoice.PublishEvent
16-
> = core.serialization.undiscriminatedUnion([AudioInput, SessionSettings, TextInput, TtsInput]);
16+
> = core.serialization.undiscriminatedUnion([AudioInput, SessionSettings, UserInput, AssistantInput]);
1717

1818
export declare namespace PublishEvent {
19-
type Raw = AudioInput.Raw | SessionSettings.Raw | TextInput.Raw | TtsInput.Raw;
19+
type Raw = AudioInput.Raw | SessionSettings.Raw | UserInput.Raw | AssistantInput.Raw;
2020
}

‎src/serialization/resources/empathicVoice/types/AssistantEnd.ts

+2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ export const AssistantEnd: core.serialization.ObjectSchema<
1010
serializers.empathicVoice.AssistantEnd.Raw,
1111
Hume.empathicVoice.AssistantEnd
1212
> = core.serialization.object({
13+
customSessionId: core.serialization.property("custom_session_id", core.serialization.string().optional()),
1314
type: core.serialization.stringLiteral("assistant_end"),
1415
});
1516

1617
export declare namespace AssistantEnd {
1718
interface Raw {
19+
custom_session_id?: string | null;
1820
type: "assistant_end";
1921
}
2022
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
5+
import * as serializers from "../../..";
6+
import * as Hume from "../../../../api";
7+
import * as core from "../../../../core";
8+
9+
export const AssistantInput: core.serialization.ObjectSchema<
10+
serializers.empathicVoice.AssistantInput.Raw,
11+
Hume.empathicVoice.AssistantInput
12+
> = core.serialization.object({
13+
customSessionId: core.serialization.property("custom_session_id", core.serialization.string().optional()),
14+
text: core.serialization.string(),
15+
type: core.serialization.stringLiteral("assistant_input"),
16+
});
17+
18+
export declare namespace AssistantInput {
19+
interface Raw {
20+
custom_session_id?: string | null;
21+
text: string;
22+
type: "assistant_input";
23+
}
24+
}

‎src/serialization/resources/empathicVoice/types/AssistantMessage.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ export const AssistantMessage: core.serialization.ObjectSchema<
1212
serializers.empathicVoice.AssistantMessage.Raw,
1313
Hume.empathicVoice.AssistantMessage
1414
> = core.serialization.object({
15-
fromTts: core.serialization.property("from_tts", core.serialization.boolean()),
15+
customSessionId: core.serialization.property("custom_session_id", core.serialization.string().optional()),
16+
fromText: core.serialization.property("from_text", core.serialization.boolean()),
1617
id: core.serialization.string().optional(),
1718
message: ChatMessage,
1819
models: Inference,
@@ -21,7 +22,8 @@ export const AssistantMessage: core.serialization.ObjectSchema<
2122

2223
export declare namespace AssistantMessage {
2324
interface Raw {
24-
from_tts: boolean;
25+
custom_session_id?: string | null;
26+
from_text: boolean;
2527
id?: string | null;
2628
message: ChatMessage.Raw;
2729
models: Inference.Raw;

‎src/serialization/resources/empathicVoice/types/AudioInput.ts

+2
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ export const AudioInput: core.serialization.ObjectSchema<
1010
serializers.empathicVoice.AudioInput.Raw,
1111
Hume.empathicVoice.AudioInput
1212
> = core.serialization.object({
13+
customSessionId: core.serialization.property("custom_session_id", core.serialization.string().optional()),
1314
data: core.serialization.string(),
1415
type: core.serialization.stringLiteral("audio_input"),
1516
});
1617

1718
export declare namespace AudioInput {
1819
interface Raw {
20+
custom_session_id?: string | null;
1921
data: string;
2022
type: "audio_input";
2123
}

‎src/serialization/resources/empathicVoice/types/AudioOutput.ts

+2
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ export const AudioOutput: core.serialization.ObjectSchema<
1010
serializers.empathicVoice.AudioOutput.Raw,
1111
Hume.empathicVoice.AudioOutput
1212
> = core.serialization.object({
13+
customSessionId: core.serialization.property("custom_session_id", core.serialization.string().optional()),
1314
data: core.serialization.string(),
1415
id: core.serialization.string(),
1516
type: core.serialization.stringLiteral("audio_output"),
1617
});
1718

1819
export declare namespace AudioOutput {
1920
interface Raw {
21+
custom_session_id?: string | null;
2022
data: string;
2123
id: string;
2224
type: "audio_output";

‎src/serialization/resources/empathicVoice/types/Error_.ts

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import * as core from "../../../../core";
99
export const Error_: core.serialization.ObjectSchema<serializers.empathicVoice.Error_.Raw, Hume.empathicVoice.Error_> =
1010
core.serialization.object({
1111
code: core.serialization.string(),
12+
customSessionId: core.serialization.property("custom_session_id", core.serialization.string().optional()),
1213
message: core.serialization.string(),
1314
slug: core.serialization.string(),
1415
type: core.serialization.stringLiteral("error"),
@@ -17,6 +18,7 @@ export const Error_: core.serialization.ObjectSchema<serializers.empathicVoice.E
1718
export declare namespace Error_ {
1819
interface Raw {
1920
code: string;
21+
custom_session_id?: string | null;
2022
message: string;
2123
slug: string;
2224
type: "error";

‎src/serialization/resources/empathicVoice/types/SessionSettings.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,19 @@ export const SessionSettings: core.serialization.ObjectSchema<
1111
serializers.empathicVoice.SessionSettings.Raw,
1212
Hume.empathicVoice.SessionSettings
1313
> = core.serialization.object({
14+
customSessionId: core.serialization.property("custom_session_id", core.serialization.string().optional()),
1415
audio: AudioConfiguration.optional(),
1516
languageModelApiKey: core.serialization.property("language_model_api_key", core.serialization.string().optional()),
16-
type: core.serialization.stringLiteral("session_settings").optional(),
17+
systemPrompt: core.serialization.property("system_prompt", core.serialization.string().optional()),
18+
type: core.serialization.stringLiteral("session_settings"),
1719
});
1820

1921
export declare namespace SessionSettings {
2022
interface Raw {
23+
custom_session_id?: string | null;
2124
audio?: AudioConfiguration.Raw | null;
2225
language_model_api_key?: string | null;
23-
type?: "session_settings" | null;
26+
system_prompt?: string | null;
27+
type: "session_settings";
2428
}
2529
}

0 commit comments

Comments
 (0)
Please sign in to comment.