iris-agent

A extensible conversational agent for data science tasks

  • 所有者: Ejhfast/iris-agent
  • 平台:
  • 許可證:
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

Iris: A Conversational Agent for Data Science

interface

Read more about the system in this article.

Command DSL

You can add commands to Iris using an in-editor GUI or work directly with the Python DSL. For example:

from iris import state_types as t
from iris import IrisCommand

class GenerateArray(IrisCommand):
    # what iris will call the command + how it will appear in a hint
    title = "generate a random array of {n} numbers"
    
    # give an example for iris to recognize the command
    examples = ["generate numpy array of size {n}"]
    
    # type annotations for each command argument, to help Iris collect missing values from a user
    argument_types = {"n":t.Int("Please enter size of array:")}
    
    # core logic of the command
    def command(self, n):
        import numpy
        return numpy.random.randint(100, size=n)
        
    # wrap the output of a command to display to user
    # by default this will be an identity function
    # each element of the list defines a separate chat bubble
    def explanation(self, result):
        return ["Here are the numbers", result]

Installation guide

Warning! The current version of Iris is an alpha release. We are still adding many new commands to the system and fixing bugs. A production-ready beta release will be out later this summer. Use at your own risk!

These are instructions to install and run Iris in debugging mode. A self-contained Electron app for OSX will be released later this summer.

You will first need to install anaconda. (Make sure to run source ~/.bash_profile after you have installed Anaconda, if it is not appearing in your path.)

Install and run the Python components:

cd iris-agent/backend
# create new conda env called iris with necessary packages
conda create --name iris --file packages.txt
# enter the conda env
source activate iris
# install the remaining pip packages
pip install -r requirements.txt
cd app/
# run the backend application
python app.py

Install and run the Javascript components. If you do not already have webpack, run npm install webpack -g:

cd iris-agent
npm install
# build JS app with webpack (can also run webpack --watch in seperate command window)
webpack
# start electron (this will open the application automatically)
npm start

Both the backend and frontend must be running for Iris to work!

Tests

To verify the backend is working:

cd iris-agent/backend/test
python test.py

主要指標

概覽
名稱與所有者Ejhfast/iris-agent
主編程語言TeX
編程語言JavaScript (語言數: 10)
平台
許可證
所有者活动
創建於2017-06-23 17:45:29
推送於2017-11-26 07:39:56
最后一次提交2017-11-25 23:39:55
發布數0
用户参与
星數123
關注者數15
派生數21
提交數76
已啟用問題?
問題數22
打開的問題數12
拉請求數1
打開的拉請求數0
關閉的拉請求數0
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?