Skip to content

Commit 460557d

Browse files
committed
chore: simplify tools.
1 parent 3262fd7 commit 460557d

File tree

2 files changed

+9
-11
lines changed
  • examples/conversational-ai/react-native/elevenlabs-conversational-ai-expo-react-native

2 files changed

+9
-11
lines changed

examples/conversational-ai/react-native/elevenlabs-conversational-ai-expo-react-native/App.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,18 @@ import type {
1515
ConversationEvent,
1616
Role,
1717
} from "@elevenlabs/react-native";
18-
import tools from "./utils/tools";
18+
import {
19+
get_battery_level,
20+
change_brightness,
21+
flash_screen,
22+
} from "./utils/tools";
1923

2024
const ConversationScreen = () => {
2125
const conversation = useConversation({
2226
clientTools: {
23-
get_battery_level: tools.get_battery_level,
24-
change_brightness: tools.change_brightness,
25-
flash_screen: tools.flash_screen,
27+
get_battery_level,
28+
change_brightness,
29+
flash_screen,
2630
},
2731
onConnect: ({ conversationId }: { conversationId: string }) => {
2832
console.log("✅ Connected to conversation", conversationId);

examples/conversational-ai/react-native/elevenlabs-conversational-ai-expo-react-native/utils/tools.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,4 @@ const flash_screen = () => {
2424
return "Successfully flashed the screen.";
2525
};
2626

27-
const tools = {
28-
get_battery_level,
29-
change_brightness,
30-
flash_screen,
31-
};
32-
33-
export default tools;
27+
export { get_battery_level, change_brightness, flash_screen };

0 commit comments

Comments
 (0)