Skip to content

Commit

Permalink
Update eleven-labs setup README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lostviolinist authored Dec 9, 2024
1 parent d0bc8d0 commit 26be151
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions typescript/examples/eleven-labs/conversational-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This example uses the ElevenLabs base project described [here](https://elevenlabs.io/docs/conversational-ai/guides/conversational-ai-guide-nextjs) and follows the steps to add client tool calling described [here](https://elevenlabs.io/docs/conversational-ai/customization/client-tools).

https://github.com/user-attachments/assets/67c7f2d2-0b6a-4e0a-b24b-423e35a94c69
https://github.com/user-attachments/assets/2a53b2af-eefe-46c7-a3d4-9441eefe0f81

## Setup

Expand All @@ -11,12 +11,15 @@ https://github.com/user-attachments/assets/67c7f2d2-0b6a-4e0a-b24b-423e35a94c69
```
cp .example.env .env
```
`NEXT_PUBLIC_ELEVEN_LABS_AGENT_ID` - create an agent [here](https://elevenlabs.io/app/conversational-ai), and copy agent ID

2. Create an ElevenLabs agent and get the agent ID. You can follow this guide: https://elevenlabs.io/docs/conversational-ai/docs/agent-setup
`NEXT_PUBLIC_SEPOLIA_RPC_URL` - create your first app on [Alchemy](https://dashboard.alchemy.com/apps), and go to the Networks tab to copy Ethereum Sepolia API key

3. Set the `NEXT_PUBLIC_ELEVEN_LABS_AGENT_ID` environment variable with the agent ID.
`NEXT_PUBLIC_COINGECKO_API_KEY` - create your demo account API key on the Coingecko developer [dashboard](https://www.coingecko.com/en/developers/dashboard)

4. ElevenLabs requires you to register each tool manually through the ElevenLabs dashboard. To make it easier, we've added a `logTools` option to the `getOnChainTools` function. This will log the tools with their respective descriptions and parameters to the console.
2. Run `pnpm install` on the root directory (/goat). Then, go to the /conversational-agent directory to run `pnpm install && build`. After a successful build, run the app with `pnpm dev`, connect your wallet, and start the conversation!

**Note**: ElevenLabs requires you to register each tool manually through the ElevenLabs dashboard. To make it easier, we've added a `logTools` option to the `getOnChainTools` function. This will log the tools with their respective descriptions and parameters to the console.

```typescript
const tools = await getOnChainTools({
Expand All @@ -26,5 +29,17 @@ const tools = await getOnChainTools({
},
});
```
When you load the site, the console logs each tool that is called, which you would need to add into your agent's dashboard as a `client tool`. The logs will look something like this:

```
get_eth_balance
Description: This tool returns the ETH balance of an EVM wallet.
Parameters:
- address (optional) (string): The address to get the balance of, defaults to the address of the wallet
```
Add it in the Eleven Labs Agent console like so:

5. Run the app with `pnpm dev`, connect your wallet, and start the conversation!
<img width="576" alt="Screenshot 2024-12-09 at 6 04 09 PM" src="https://github.com/user-attachments/assets/3e713bc4-9830-4487-b9f8-515cfe050d7a">

0 comments on commit 26be151

Please sign in to comment.