Skip to content

Commit

Permalink
feat(api): update via SDK Studio
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Mar 25, 2024
1 parent 188c5f4 commit 1e2cbc1
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async function main() {
voice_id: '11labs-Adrian',
});

console.log(agent.voice_id);
console.log(agent.agent_id);
}

main();
Expand Down Expand Up @@ -161,7 +161,7 @@ const { data: agent, response: raw } = await retellSdk.agent
.create({ llm_websocket_url: 'wss://your-websocket-endpoint', voice_id: '11labs-Adrian' })
.withResponse();
console.log(raw.headers.get('X-My-Header'));
console.log(agent.voice_id);
console.log(agent.agent_id);
```

### Making custom/undocumented requests
Expand Down
11 changes: 11 additions & 0 deletions src/resources/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@ export class AgentResource extends APIResource {
}

export interface Agent {
/**
* Unique id of agent.
*/
agent_id: string;

/**
* Last modification timestamp (milliseconds since epoch). Either the time of last
* update or creation if no updates available.
*/
last_modification_timestamp: number;

/**
* The URL we will establish LLM websocket for getting response, usually your
* server. Check out [LLM WebSocket](/api-references/llm-websocket) for more about
Expand Down
17 changes: 17 additions & 0 deletions src/resources/llm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,23 @@ export class LlmResource extends APIResource {
}

export interface Llm {
/**
* Last modification timestamp (milliseconds since epoch). Either the time of last
* update or creation if no updates available.
*/
last_modification_timestamp: number;

/**
* Unique id of Retell LLM.
*/
llm_id: string;

/**
* The LLM Websocket URL constructed from unique id of Retell LLM. Used in agent
* API to create / update agent.
*/
llm_websocket_url: string;

/**
* First utterance said by the agent in the call. If not set, LLM will dynamically
* generate a message. If set to "", agent will wait for user to speak first.
Expand Down

0 comments on commit 1e2cbc1

Please sign in to comment.