Skip to content

Commit 1a37177

Browse files
committed
feat: latest spec fixes
1 parent 16af51e commit 1a37177

3 files changed

Lines changed: 9 additions & 13 deletions

File tree

src/lib/enums/AgentEvents.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,9 @@ export enum AgentEvents {
3939
* { type: "FunctionCallRequest", functions: { id: string; name: string; arguments: string; client_side: boolean}[] }
4040
*/
4141
FunctionCallRequest = "FunctionCallRequest",
42-
/**
43-
* Debug message triggered when the agent is calling a function.
44-
* { type: "FunctionCalling" }
45-
*/
46-
FunctionCalling = "FunctionCalling",
4742
/**
4843
* Triggered when the agent begins streaming an audio response.
44+
* YOU WILL ONLY RECEIVE THIS EVENT IF YOU HAVE ENABLED `experimental` IN YOUR CONFIG.
4945
* { type: "AgentStartedSpeaking", total_latency: number, tts_latency: number, ttt_latency: number }
5046
*/
5147
AgentStartedSpeaking = "AgentStartedSpeaking",

src/lib/types/AgentLiveSchema.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ interface AgentLiveSchema extends Record<string, unknown> {
142142
language_code?: string;
143143
};
144144
endpoint?: {
145-
url?: string;
145+
url: string;
146146
headers?: Record<string, string>;
147147
};
148148
};
@@ -159,10 +159,10 @@ interface AgentLiveSchema extends Record<string, unknown> {
159159
temperature?: number;
160160
};
161161
/**
162-
* Optional ONLY if LLM provider is Deepgram.
162+
* Optional ONLY if LLM provider is OpenAI or Anthropic.
163163
*/
164164
endpoint?: {
165-
url?: string;
165+
url: string;
166166
headers?: Record<string, string>;
167167
};
168168
functions?: {

src/packages/AgentLiveClient.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ export class AgentLiveClient extends AbstractLiveClient {
132132
* Change the speak model.
133133
* @param model - The new model to use.
134134
*/
135-
public updateSpeak(model: SpeakModel): void {
136-
this.send(JSON.stringify({ type: "UpdateSpeak", model }));
135+
public updateSpeak(speakConfig: Exclude<AgentLiveSchema["agent"]["speak"], undefined>): void {
136+
this.send(JSON.stringify({ type: "UpdateSpeak", speak: speakConfig }));
137137
}
138138

139139
/**
@@ -143,10 +143,10 @@ export class AgentLiveClient extends AbstractLiveClient {
143143
* event will be emitted.
144144
* @example "Hold on while I look that up for you."
145145
* @example "Are you still on the line?"
146-
* @param message - The message to speak.
146+
* @param content - The message to speak.
147147
*/
148-
public injectAgentMessage(message: string): void {
149-
this.send(JSON.stringify({ type: "InjectAgentMessage", message }));
148+
public injectAgentMessage(content: string): void {
149+
this.send(JSON.stringify({ type: "InjectAgentMessage", content }));
150150
}
151151

152152
/**

0 commit comments

Comments
 (0)