Giter VIP home page Giter VIP logo

decision-engine-poc's Introduction

POC to make DAGs for decision routing

This is a POC on how to create DAGs and use that to drive routing decisions

How to build

You can use docker to build and test this locally. See the Makefile for rules

building and running

Use the following commands to build and run docker

make docker-build && make docker-run

Use Ctrl+C to end the container once testing is done

Use this to clean up post-testing

make docker-clean

Sample decision tree

alt text for screen readers

The red arrows are Choice A

The blue is Choice B

and green is Choice C

Endpoints

POST /next

curl --location 'localhost:8080/next' \
--header 'Content-Type: application/json' \
--data '{
   "current_node": "specialty_node",
   "input_kvp": {
       "choice": "a"
   }
}'

which takes in 2 values:

  • current node id
  • key-value pair with whatever inputs we wanna share with the server

the decision of which node to go to would be made using these 2 inputs

Sample Response

next node id: services_node

GET /node/{id}

This endpoint is used to fetch metadata about a specific node. Can be invoked using

curl --location 'localhost:8080/node/specialty_node'

which returns the response:

route: /specialties
Method: GET

Debugging Issues

How to run locally without Docker

make run

How to ensure 8080 port is free

See https://stackoverflow.com/a/36876427/224640

decision-engine-poc's People

Contributors

tomkaith13 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.