Skip to content

Commit

Permalink
fixing-retell
Browse files Browse the repository at this point in the history
  • Loading branch information
Shyam-Raghuwanshi committed Nov 4, 2024
1 parent 5b1005f commit 36df800
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion JS/edgechains/arakoodev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"regenerator-runtime": "^0.14.1",
"request": "^2.88.2",
"retell-client-js-sdk": "^2.0.4",
"retell-sdk": "^4.7.0",
"retell-sdk": "^4.9.0",
"retry": "^0.13.1",
"ts-node": "^10.9.2",
"typeorm": "^0.3.20",
Expand Down
7 changes: 4 additions & 3 deletions JS/edgechains/arakoodev/src/ai/src/lib/retell-ai/retell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { AgentCreateParams, AgentResponse } from 'retell-sdk/resources/agent.mjs
import { LlmResponse, LlmCreateParams } from "retell-sdk/resources/llm.mjs";
export class RetellAI {
retellClient: Retell;
llm: null | LlmResponse;
llm: LlmResponse | null;
constructor(apiKey: string) {
this.retellClient = new Retell({
apiKey: apiKey,
Expand All @@ -12,7 +12,8 @@ export class RetellAI {
}

async createAgent(body: AgentCreateParams, options?: Retell.RequestOptions): Promise<AgentResponse> {
const defaultParams = { voice_id: "11labs-Adrian", agent_name: "Ryan", llm_websocket_url: this?.llm?.llm_websocket_url, }
//@ts-ignore
const defaultParams = { voice_id: "11labs-Adrian", agent_name: "Ryan", llm_websocket_url: this?.llm?.llm_websocket_url }
const keys = Object.keys(defaultParams);
for (let i = 0; i < keys.length; i++) {
if (keys[i] in body) {
Expand All @@ -32,4 +33,4 @@ export class RetellAI {
const webCallResponse = await this.retellClient.call.createWebCall({ agent_id });
return webCallResponse.access_token
}
}
}

0 comments on commit 36df800

Please sign in to comment.