Giter Club home page Giter Club logo

ai-flow's Introduction

aiflow

Introduction

AI Flow supports tasks in the CrewAI + DAO + Resource Contracts application space;

See also;

Note: this is experimental code - use at your own risk

1 DAO Launcher

The script runs in same directory as the calling code.

POST /dao-launcher/v1/launch  # body = template:DaoTemplate

2 Datasets

AI Flow hooks onto to a Stacks (or Bitcoin) full, pulls any or all blocks of transaction data and flattens the data into classification formatted jsonl files (one per block).

GET /datasets/v1/transactions/:block  # flattens given block
GET /datasets/v1/transactions/latest  # flattens new blocks since last run
GET /datasets/v1/transactions         # flattens new blocks (skips previously flattened blocks)

The classification data has the format;

interface FlattenedStacksTransaction {
  transaction_id: string;
  sender_address:string;
  nonce:number;
  sponsored:boolean;
  fee_rate:number;
  status: string;
  type: string;
  index: number;
  burn_block_time: number;
  parent_burn_block_time: number;
  block_time: number;
  block_height:number;
  post_condition_mode: string;

  recipient_address?: string;
  
  token_transfer_amount?: number;
  token_transfer_memo?: string;

  coinbase_alt_recipient?: string;
  coinbase_data?: string;

  contract_address?: string;
  contract_name?: string;
  function_name?: string;
  function_signature?: string;
  function_args_repr?: string;
  function_args_type?: string;

  smart_contract_clarity_version?:string;
  smart_contract_contract_address?:string;
  smart_contract_contract_name?:string;
  smart_contract_source_code?:string;
}

Development

Services can be run either via rest or cli.

Build

npm install
npm run build

Develop

npm install
npm run dev

Command Line

Note: this isn't yet fully supported but here for future flexibility

npm install
npm run cli -- datasets transactions latest // from current tip height to last saved block
npm run cli -- datasets transactions n // block n
npm run cli -- datasets transactions all // all (skips already flattened blocks)

Mongo

Connects to Mongo Cloud development db instance using environment variables see Environment secton.

Local IP address has to be added to Mongo Cloud allowed network - contact system administrator.

Test

Tests outstanding,

npm run test

Deploy

run deploy script to build / push docker image then on target server run following;

# stag
docker rm -f aiflow_api_production
docker run -d -t -i --network host --name aiflow_api_production -p 6060:6060 -e NODE_ENV='linode-production' mijoco/aiflow_api

ai-flow's People

Contributors

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