Skip to content

Commit 5987192

Browse files
authored
fix: remove directory imports (#255)
1 parent 110f0e7 commit 5987192

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

packages/embed/src/lib/embed-messages.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@
3131
└───────────────────────────┘
3232
*/
3333
import { type Hume } from 'hume';
34-
import * as serializers from 'hume/serialization';
34+
import {
35+
AssistantMessage,
36+
UserMessage,
37+
} from 'hume/serialization/resources/empathicVoice/index.js';
3538
import { z } from 'zod';
3639

3740
import { AuthStrategySchema } from './auth';
@@ -130,13 +133,11 @@ export const FrameToClientActionSchema = z.union([
130133
payload: z.custom<
131134
Hume.empathicVoice.UserMessage | Hume.empathicVoice.AssistantMessage
132135
>((val) => {
133-
const userMessageParseResponse =
134-
serializers.empathicVoice.UserMessage.parse(val);
136+
const userMessageParseResponse = UserMessage.parse(val);
135137
if (userMessageParseResponse.ok) {
136138
return true;
137139
}
138-
const assistantMessageParseResponse =
139-
serializers.empathicVoice.AssistantMessage.parse(val);
140+
const assistantMessageParseResponse = AssistantMessage.parse(val);
140141
if (assistantMessageParseResponse.ok) {
141142
return true;
142143
}

packages/react/src/lib/messages.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { type Hume } from 'hume';
2-
import * as serializers from 'hume/serialization';
2+
import { SubscribeEvent } from 'hume/serialization/resources/empathicVoice/index.js';
33

44
import { type AudioMessage, parseAudioMessage } from './audio-message';
55
import {
@@ -58,7 +58,7 @@ export const parseMessageData = async (
5858
};
5959
}
6060

61-
const parseResponse = serializers.empathicVoice.SubscribeEvent.parse(data);
61+
const parseResponse = SubscribeEvent.parse(data);
6262

6363
if (!parseResponse.ok) {
6464
return {

0 commit comments

Comments
 (0)