New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

df-cheatcodes

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

df-cheatcodes

``` tl:dr; So easy it'll make you feel like you're cheating at dialogflow ```

latest
npmnpm
Version
0.5.7
Version published
Maintainers
1
Created
Source
tl:dr; So easy it'll make you feel like you're cheating at dialogflow

df-cheats

Note: For the very impatient, go here: quickstart.md

Overview

df-cheatcodes is a library exposing useful aliases, shortcuts, functionality/sugar that can help teams quickly produce a rich browser-based conversational experience that they can put in front of real users for feedback & improvement. See below features.

Ex. Rich components the fast & easy way (notice no imports)

richcomponents

Ex. "$hortcut Cheats" to quickly jump around your conversational interface & expose rich functionality. (Think of these as similiar to deep links but here it's deep linking to functionality of your intelligent agent)

shortcut

Plus a bunch of other stuff (helpers for working with API, frontend, external templates, random responses, retrieve/set data, etc)

Where to start?

Other Components

df-starter-kit

Fully-loaded DialogFlow "starter" project with an agent, fulfillment template, and a frontend that renders rich components. Also has various ergonomic features to speed development like live-reload, types, tunneling, easy deploy/bundling to a web server or optimized for cloud functions

df-frontend-vue

A fun "retro" DialogFlow frontend interface that can render rich components with many conversational design & debugging tools. A "bundled" version is included with starter kit, this one you can edit or skin however you need

df-cheatcodes-base

Most helpful for "frontend" tasks and transacating with DialogFlow APIs. Makes it easy to send plaintext, events, and requestdata

Functionality

aogCheat

Collection of helpers to augment the actions-on-google library and make working with rich components, contexts, data, 3rd-party APIs, and other tasks faster & easier

apiCheat

Helpful items for transacting with the API, can optionally transform gRPC <> JSON for event, request data as required

shortcutCheat

A trick to expose 'shareable' (copy/paste, links) points of your conversation-- useful for debugging and for users who aren't interested in a 'chat'

requestCheat

Various helpers to help simplify building requests

endpointCheat

Add this so your server routes can handle DialogFlow requests (events, text, requestdata, etc) from a frontend or other services

Ex. Easy server (could certainly be repurposed into a Cloud Function)

import express from "express";
import bodyParser from "body-parser";
import { endPointCheat } from "df-cheatcodes";

// Initialize simple server
const app = express();
app.use(bodyParser.json());

// Prep credentials + config
import { project_id, client_email, private_key } from "./service-account.json";
const credentials = { project_id, client_email, private_key };

// all optional
const config = {
  transformgrpc: false, // convert JSON to protostruct for requestData, event parameters, protostruct to JSON for responses
  optimizeResponse: false, // combine webhookPayload + fulfillmentMessages
};

app.post("/chat", endpointCheat(credentials, config));

Libraries

df-cheatcodes provides cheats using actions-on-google ^2.12.0 & dialogflow ^1.2.0 as peerDependencies.

License

This repo uses types & concepts from actions-on-google which itself is under apache license. At time of writing, it seemed that clearest/simplest thing to do is match that license in a notice-- accordingly, this repo conforms to the Apache 2.0 license

Keywords

Intelligent Agents

FAQs

Package last updated on 19 Jul 2020

Did you know?

Socket

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