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

How to specify Dialogflow cx agent's environment in Nodejs?

Hello!

I've been looking for a way in which the agent's environment could be specified when using nodejs.

I noticed the environment is specified in the simulator's answer as "Version"

Marjorie_Tapia_0-1706037661916.png

we tried what is specified in here, but it was not sucessful

Marjorie_Tapia_1-1706037806779.png

any help will be really appreciated

1 1 105
1 REPLY 1

Can you try this answer from SO:


const client = new dialogflow.v2beta1.SessionsClient({});

const sessionPath = client.environmentSessionPath(project, environment, user, session);

// The text query request.
const request = {
  session: sessionPath,
  queryInput: {
    text: {
      text: 'hello'
    }
  }
};