Git Product home page Git Product logo

cognigy-hammer's Introduction

cognigy-hammer

An extension development suite for CognigyAI. Not affiliated with Cognigy or its subsidiaries.

Project seeks to eliminate the need of managing nodes dependencies and establish a standard for better development of CognigyAI extensions.

Live examples

Prerequisites:

  • Linux/macOS
  • Git
  • Node >= 18
  • NPM >= 9

Setup

npm i -g cognigy-hammer

Features

  • CLI to easily create new project, nodes, connections.
  • Nodes types and hierarchy are injected automatically based on directory structure.
  • Connections and Nodes are imported automatically.
  • Helper function for setting the next node.

CLI commands

The following commands should be available after installing the package globally. If they are not, you may need to use npm exec / npx

ch.create-project   # create a new extension project scaffold
ch.create-node      # create a new node in an extension project
ch.delete-node      # delete a node from an extension project
ch.create-connection # create a new connection in an extension project

Standard

Directory structure

  • Nodes are stored in ./src/nodes
  • Connections are stored in ./src/connections
  • Assets used at runtime are stored in ./src/assets

Each node can have N children nodes. The former are stored in a directory located at the same tree level as the parent.

src
├── assets
│   └── extension-map.js
├── connections
│   └── dbs
│       ├── Mongo.ts
│       └── MySQL.ts
└── nodes
    ├── Parent
    │   ├── Child1.ts
    │   ├── Child2
    │   │   └── Child3.ts
    │   └── Child2.ts
    └── Parent.ts

Node rules

  • One parent node can have N child nodes.
  • One parent node must not share its children nodes with other parent nodes. While CognigyAI chart supports this variant and other mixed ones, a custom implementation and/or directory scheme is required from development side for it, which is not in the scope of this package.

In above example, Parent1 and Parent2 cannot share the same Child2.

Demo project

https://github.com/tgbv/cognigy-reddit-explorer

cognigy-hammer's People

Contributors

tgbv avatar

Stargazers

 avatar

Watchers

 avatar

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.