Coder Social home page Coder Social logo

Comments (6)

babujipa avatar babujipa commented on May 30, 2024

I have seen this happening when the agent is created thru api. You may do one of the two below as a work around:
Option 1. Open the intent that is returning empty parameters and just save the intent once. Agent will start the training and after a few seconds will complete training

Option 2: Make the parameter mandatory (especially if you are creating the intent/agent thru api call) in the Action and Parameter session while creating the intent

from python-dialogflow.

nnegrey avatar nnegrey commented on May 30, 2024

This appears to be answered, if not, please feel free to re-open.

Thanks! :)

from python-dialogflow.

nmud19 avatar nmud19 commented on May 30, 2024

I have seen this happening when the agent is created thru api. You may do one of the two below as a work around:
Option 1. Open the intent that is returning empty parameters and just save the intent once. Agent will start the training and after a few seconds will complete training

Option 2: Make the parameter mandatory (especially if you are creating the intent/agent thru api call) in the Action and Parameter session while creating the intent

@babujipa thanks, option 1 seems to work. Is there any workaround that can be done through code though ?

from python-dialogflow.

babujipa avatar babujipa commented on May 30, 2024

Yes. If you are generating the intent thru code , make that parameter mandatory and it will work

from python-dialogflow.

nmud19 avatar nmud19 commented on May 30, 2024

@babujipa Could you please give me pointers on how to make parameter mandatory through code, I couldn't find any example. Do we do it through the intent call itself ?

This is my intent creation call
dialogflow_v2.types.Intent( display_name=display_name, training_phrases=training_phrases, messages=[message])

I see that this has a parameter called "parameters".
parameters: Optional. The collection of parameters associated with the intent.
I tried inserting a dictionary here but it has some protobuf error. Is this the correct direction ?

from python-dialogflow.

babujipa avatar babujipa commented on May 30, 2024

You may have modify the code below to fit into your program

############################
name = intent.name
myintent = intents_client.get_intent(name,intent_view=dialogflow.enums.IntentView.INTENT_VIEW_FULL)
myintent.Parameter.mandatory = True
lang='en'
response = intents_client.update_intent(myintent, lang)
###########################

from python-dialogflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.