Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Audio Integration in Agent Builder with Dialogflow Messenger

Hi,

I am developing an agent using Agent Builder and I want to integrate it with Dialogflow Messenger.

My goal is to allow users to ask questions to the agent through audio input (speech-to-text). However, I am facing difficulties in activating/inserting the microphone button inside the Messenger pop-up.

I have already found ways to use speech-to-text via API outside the pop-up, but I cannot implement the button inside it.

Is there any way to achieve this audio integration within the Messenger pop-up using Agent Builder?

And another question about Dialogflow CX, when I ask more complex questions, it hits the 8k token limit. I saw that using the agent builder with gemini-1.5-flash, I can increase it up to 1M tokens. However, Dialogflow CX has a maximum limit of 8k tokens. Is there any way to change this value in Dialogflow?

Thanks for the help!

0 8 485
8 REPLIES 8

Hi, @joaovitorAlvesR could you please share an example of the code that you're using for the audio integration?

Regarding the limit of tokens, you must ask to increase the quota with Google Cloud Support.

Hi, @Mizar, I'm using the standard HTML code provided when creating the integration with dialog messenger.

 

<link rel="stylesheet" href="https://www.gstatic.com/dialogflow-console/fast/df-messenger/prod/v1/themes/df-messenger-default.css">
  <script src="https://www.gstatic.com/dialogflow-console/fast/df-messenger/prod/v1/df-messenger.js"></script>
<df-messenger
    oauth-client-id="***"
    project-id="***"
    agent-id="***"
    language-code="pt-br"
    location="global"
    max-query-length="-1"
    allow-feedback="all">
    <df-messenger-chat-bubble
      chat-title="Agente AI"
      allow-fullscreen="always"
      bot-writing-text="Digitando..."
      placeholder-text="Escreva aqui sua duvida..."
    ></df-messenger-chat-bubble>
  </df-messenger>

 

Is the token limit increase only carried out by Support?

@Mizar  Do I need to increase which quota?

@joaovitorAlvesR tokens limit is a parameter that you can't change at that html code, This has to be changed from internal behavior.

So, I recommend you look for support and increase quota for token limit.

Regarding the audio integration, could you please show your code or implementation?

@Mizar  Regarding the audio integration, I managed to resolve it, it's ok. My question now is when I send a "Hello" to the agent, and I look in the logs, the playbook.total_input_tokens_count already reaches a total of more than 5 thousand tokens, and since I only have a limit of 8192 tokens, then a limit error occurs of tokens exceeded.

I feel like there is a very high expenditure of tokens, on less complex questions, how to solve? Would creating Intents, Entity Types, pages and flows help with anything?

@joaovitorAlvesR Well as you can see this is regarding token limit so, your response is bigger than the expected. 

For these values you have to talk to support to increase that quota, due your reaching maximum.

Btw, what whats the issue with your audio integration?

@Mizar  the integration with audio has been completed, this done, my only doubt is about the same tokens from now on.

Hi @joaovitorAlvesR if is not that issue dont worry, thanks you solved the issue.