Skip to content

Commit 15bcdbf

Browse files
committed
update: readme + cloud function slim down
1 parent e480581 commit 15bcdbf

File tree

3 files changed

+20
-35
lines changed

3 files changed

+20
-35
lines changed

README.md

+7-11
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1-
# Angular Chatbot with DialogFlow
21

3-
Watch the [angular chatbot screencast](https://angularfirebase.com/lessons/chatbot-in-angular-with-dialogflow-api-ai/)
2+
[![Slack](https://firebasestorage.googleapis.com/v0/b/firestarter-96e46.appspot.com/o/assets%2Fslack-badge.svg?alt=media&token=3e68acef-3e00-4925-9710-e11cee5923e4)](https://join.slack.com/angularfirebase/shared_invite/MjA2NTgxMTI0MTk2LTE0OTg4NTQ4MDAtMjhhZDIzMjc0Mg)
43

5-
![](https://firebasestorage.googleapis.com/v0/b/firestarter-96e46.appspot.com/o/assets%2Fdialogflow-angular-demo.gif?alt=media&token=9fbecf3f-1174-4e84-9c73-6ddfe2d55807)
4+
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
65

7-
## Usage
6+
# AngularChatbot
87

9-
First, create an agent on DialogFlow.
8+
Status: Pre-alpha
109

11-
- git clone
12-
- create `/src/environments/environment.ts` with your API client token
13-
- npm install
14-
- ng serve
10+
A Dialogflow chatbot with profound knowledge of the Angular Framework.
1511

12+
## Contribute?
1613

17-
18-
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.4.9.
14+
Join the slack team and check into the #chatbot-dev channel if you want to help make it better.

functions/index.js

+4-15
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const functions = require('firebase-functions');
22

3-
const admin = require('firebase-admin');
4-
admin.initializeApp(functions.config().firebase);
3+
// const admin = require('firebase-admin');
4+
// admin.initializeApp(functions.config().firebase);
55

66

77
exports.dialogflowFirebaseFulfillment = functions.https.onRequest((req, res) => {
@@ -20,21 +20,10 @@ exports.dialogflowFirebaseFulfillment = functions.https.onRequest((req, res) =>
2020
const requestSource = (req.body.originalRequest) ? req.body.originalRequest.source : undefined;
2121

2222

23-
// Firestore database
24-
const db = admin.firestore()
25-
26-
2723
const actionHandlers = {
2824

29-
'phone.update': () => {
30-
const userRef = db.collection('users').doc('test-user');
31-
const phoneNumber = parameters['phone-number'];
32-
33-
userRef.update({ phone: phoneNumber }).then(() => {
34-
35-
const data = formatResponse('No problem. Phone number is updated in Firestore!')
36-
res.json(data)
37-
})
25+
'learn.component': () => {
26+
// todo
3827

3928
},
4029
'default': () => {

package-lock.json

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)