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

deploy dialogflow CX agent to appengine python

Hi there !

I've used the tutorial to deploy the agent on appEngine using Go (https://cloud.google.com/dialogflow/cx/docs/tutorials/deploy/host?hl=en), but I would love to obtain the same sample in python - can anyone point me to a relevant resource if available ?

Thanks !!

Solved Solved
1 3 581
1 ACCEPTED SOLUTION

This an example code of Go to python for your reference:

import os
import logging
from flask import Flask, request, render_template

app = Flask(__name)

@app.route('/')
def index():
return render_template('index.html')

if __name__ == '__main__':
port = int(os.environ.get("PORT", 8080))
logging.basicConfig(level=logging.INFO)
app.run(host='0.0.0.0', port=port)


You might also want to go through this documentation about "Building a Python 3 App on App Engine".

View solution in original post

3 REPLIES 3

not sure if it will help,

Here you have an updated example in Golang for webhook: https://github.com/xavidop/dialogflow-cx-webhook-go

To host your agent, you can use the built-in integration, it is faster and cheaper, because you do not need appengine: https://cloud.google.com/dialogflow/cx/docs/concept/integration/dialogflow-messenger

Xavi

This an example code of Go to python for your reference:

import os
import logging
from flask import Flask, request, render_template

app = Flask(__name)

@app.route('/')
def index():
return render_template('index.html')

if __name__ == '__main__':
port = int(os.environ.get("PORT", 8080))
logging.basicConfig(level=logging.INFO)
app.run(host='0.0.0.0', port=port)


You might also want to go through this documentation about "Building a Python 3 App on App Engine".

exactly what I needed, thanks a lot !!