Socket
Socket
Sign inDemoInstall

ng-dialog-flow

Package Overview
Dependencies
5
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ng-dialog-flow

#### Dialogflow is an enterprise-grade NLU platform that makes it easy for developers to design and integrate conversational user interfaces into mobile apps, web applications, devices, and bots.


Version published
Weekly downloads
0
Maintainers
1
Install size
131 kB
Created
Weekly downloads
 

Readme

Source

Installation

Dialogflow is an enterprise-grade NLU platform that makes it easy for developers to design and integrate conversational user interfaces into mobile apps, web applications, devices, and bots.
'ng-dialog-flow' an Angular / Ionic library for DialogFlow . Powered by DialogFlow .You will need an Access Token from DialogFlow to access the full function of this machine learning/natural language processing library.

GitHub licenseBuild Status Maintenancesaythanks

npm install ng-dialog-flow

yarn add ng-dialog-flow

Usage

Import Main Module


import { NgDialogFlowModule,NgDialogFlowService} from 'ng-dialog-flow';


@NgModule({
 declarations: [
   //....
   ],
  imports: [
   //...
    NgDialogFlowModule.forRoot({token:'xxxxxxxxxxx'})
  ],
  providers: [NgDialogFlowService],
  bootstrap: [AppComponent]
  })

Add to service


import { Injectable } from '@angular/core';
import { NgDialogFlowService } from 'ng-dialog-flow';

@Injectable({
providedIn: 'root'
})
export class AppService {

constructor(private service: NgDialogFlowService) { }

ask(mess: string) {
 return  this.service.askQuestion(mess).subscribe(res=>{
console.log(res);
 });

   }

}




More

askQuestion

Request parameters:
  • message
  • timezone
  • sessionid
  • lang

Response object

 export interface Message {
	platform: string;
	textToSpeech: string;
	type: string;
}

export interface Fulfillment {
	messages: Message[];
	speech: string;
}

export interface Metadata {
	intentId: string;
	intentName: string;
	webhookForSlotFillingUsed: string;
	webhookUsed: string;
}

export interface Parameter {
	fruit: string[];
}

export interface Result {
	action: string;
	actionIncomplete: boolean;
	contexts: string[];
	fulfillment: Fulfillment;
	metadata: Metadata;
	parameters: Parameter;
	resolvedQuery: string;
	score: number;
	source: string;
}

export interface Statu {
	code: number;
	errorType: string;
}

export interface RootObject {
	id: string;
	lang: string;
	result: Result;
	sessionId: string;
	status: Statu;
	timestamp: string;
}

Contributing

Please feel free to fork this package and contribute by submitting a pull request to enhance the functionalities.Repo name ng-dialog-flow .

How can I thank you?

Don't forget to follow me on twitter !

Thanks! Ajani Eniola Solomon.

Keywords

FAQs

Last updated on 20 Oct 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc