Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onMessage in React SDK isn't firing #20

Open
rblalock opened this issue Jan 10, 2025 · 3 comments
Open

onMessage in React SDK isn't firing #20

rblalock opened this issue Jan 10, 2025 · 3 comments

Comments

@rblalock
Copy link

Below is the hook call. The other hooks fire correctly

  const conversation = useConversation({
    onConnect: () => {
      console.log("Connected to ElevenLabs voice agent");
      toast({
        title: "Connected",
        description: "Voice agent is ready to chat",
      });
    },
    onDisconnect: () => {
      console.log("Disconnected from ElevenLabs voice agent");
      toast({
        title: "Disconnected",
        description: "Voice agent connection ended",
      });
    },
    onMessage: (message) => {
      console.log("Received message:", message);
    },
    onError: (error) => {
      console.error("Voice agent error:", error);
      toast({
        title: "Error",
        description: "There was an error with the voice agent",
        variant: "destructive",
      });
    },
  });
@simonschmalfeld
Copy link

Did you try using a different model? I had the same problem with Gemini 1.5 Flash, but don't have it with e.g. Gemini 1.5 Pro or others.

@louisjoecodes
Copy link
Collaborator

We're noticing some issues with Gemini specifically around tool calling as well - recommend switching over to gpt4o for the time being!

Also make sure that the Client Events for these messages types (for example agent_response) are active in the Advanced tab in the dashboard.

@logan-jobzmall
Copy link

Having the same issue here. The latency is amazing for Flash, but it does not consistently call client functions. Gemini 1.5 Pro works well but the latency is horrible and it feels like I am waiting for quite a while as well.

We're noticing some issues with Gemini specifically around tool calling as well - recommend switching over to gpt4o for the time being!

Also make sure that the Client Events for these messages types (for example agent_response) are active in the Advanced tab in the dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants