Code Monkey home page Code Monkey logo

agentconversionutility's People

Contributors

cjhurst avatar

Watchers

 avatar  avatar

agentconversionutility's Issues

Evaluation of current output

{
    "status": "Why must this be a string?",  //This is the status related with the current training status, so this could only take 4 values ["Ready", "Out of Date", "Training", "Error"]. By default every agent imported will have the "Out of Date" status given that never had been trained
    "postFormat": {
        "postFormatPayload": "string"
    },  //Post format shouldn't be imported, you can get rid of this whole object. This is use for formatting the output of the response, there isn't something parallel to this element in other services
    "usePostFormat": true, //given that we removed the postFormat attribute then this should be set to false
    "description": "string", //Mayyyybeee this could be an argument like the agent name
    "language": "en", //I don't know if you took this from the json, if not, en is a good default
    "settings": {}, //You need to use the default settings for an agent. Check the next comment of this issue
    "enableModelsPerDomain": true, //Good default
    "webhook": {
        "webhookPayloadType": "None", 
        "webhookUrl": "string", 
        "webhookPayload": "string", 
        "webhookVerb": "GET"
    }, //This is the same than postFormat. Maybe! you could play some time around to extract the webhook defined in other services like Dialogflow, but I would ask Caleb what he thinks about it
    "domainClassifierThreshold": 0, //A good default would be 0.5
    "extraTrainingData": true, //This should be set to false as default
    "entities": [
        {
            "uiColor": "string", 
            "regex": "string", 
            "entityName": "string", 
            "type": "learned", 
            "examples": [
                {
                    "synonyms": [
                        "string"
                    ], 
                    "value": "string"
                }, 
                {
                    "synonyms": [
                        "string2"
                    ], 
                    "value": "string2"
                }
            ]
        }
    ], //You need to import this values form the training data
    "useWebhook": true, //This should be set to false given that we're not going to import the webhook yet, use true if Caleb says that you should try it
    "agentName": "agent_smith", 
    "domains": [ //I haven't see other systems with the concept of domains so this is new
        {
            "status": "string", //Same that agent status, "Out of Date" by default
            "intents": [ //I was expecting the intents of the file I sent to the conversion tool here
                {
                    "scenario": { //Scenario is how the agent will respond if this scenario happens
                        "slots": [ //Systems like Dialogflow have this element, we should import that, I will explain the attributes of an slot
                            {
                                "isRequired": true, //If the slots must be filled
                                "textPrompts": [
                                    "string" //What the agent should ask if the slot is not filled. In example, if your order a pizza without toppings, then a value here will be "What toppings would you like"
                                ], 
                                "slotName": "string", //The slot name given by the user in other system
                                "isList": true, //If the slot could take the form of a list, like toppings: chicken, mushrooms, and ham
                                "entity": "string" //The entity that is going to fill this slot
                            }
                        ], 
                        "intentResponses": [
                            "string" //These are the responses from the agent, like "Cool, I will prepare your pizza", or, "Hi, how are you?"
                        ], 
                        "scenarioName": "string string" // By default use the same name that was given to the intent
                    }, 
                    "useWebhook": true, //Same behavior than the agent webhook
                    "webhook": {
                        "webhookPayloadType": "None", 
                        "webhookUrl": "string", 
                        "webhookPayload": "string", 
                        "webhookVerb": "GET"
                    }, // Same than agent webhook ask Caleb
                    "intentName": "string", //The intent given by the user in the input file
                    "examples": [ //These are the examples, basically the training data
                        {
                            "entities": [
                                {
                                    "start": 0, 
                                    "extractor": "string", 
                                    "end": 0, 
                                    "value": "string", 
                                    "entity": "string"
                                }
                            ], 
                            "userSays": "string"
                        }, 
                        {
                            "entities": [
                                {
                                    "start": 0, 
                                    "extractor": "string", 
                                    "end": 0, 
                                    "value": "string", 
                                    "entity": "string"
                                }
                            ], 
                            "userSays": "string"
                        }
                    ], 
                    "postFormat": {
                        "postFormatPayload": "string"
                    }, //This shouldn't exists
                    "usePostFormat": true //This should be set to false
                }
            ], 
            "intentThreshold": 0, //0.5 could be a good default
            "lastTraining": "2018-07-10",  //This shouldn't be import, is the date given by the API once it's trained
            "domainName": "string", //You could use a default value given by yourself
            "model": "string",  //This shouldn't be import, is the name of the model given by rasa once it's trained
            "enabled": true, // This is good
            "extraTrainingData": true //By default this should be set to false
        }
    ], 
    "timezone": "string", //Check if there is any timezone setting in other agent. If not, the default should be "UTC"
    "model": "Why must this be a string?",  //This shouldn't be import, is the name of the model given by rasa once it's trained
    "fallbackResponses": [
        "string"
    ], //These are global fallbacks, so, we don't have a way to know how to extract those, unless there exists and specific intent called fallback and you use the responses of that intent, but, I don't know if that's possible, maybe you could check this with Caleb too.
    "lastTraining": "2018-07-10" //This shouldn't be import, is the date given by the API once it's trained
}

Offline conversion

It would be nice if I could have a copy of the converted agent into my local folder where I ran the utility. This because if you don't the API running in the port 7500 that would cause an error and you wouldn't have an output

Requirements?

If you have stuff thats needed beyond the base python libraries, can you please make a requirements.txt with them (and include the command to install them in your setup instructions)

This is what I got when I tried to run:

% git clone https://github.com/cjhurst/AgentConversionUtility.git 
Cloning into 'AgentConversionUtility'...
remote: Counting objects: 98, done.
remote: Compressing objects: 100% (63/63), done.
remote: Total 98 (delta 36), reused 91 (delta 29), pack-reused 0
Unpacking objects: 100% (98/98), done.
% cd AgentConversionUtility 
% python -m agent_data_converter -h
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/Users/milutz/src/python/AgentConversionUtility/agent_data_converter.py", line 1, in <module>
    import training_data as td
  File "training_data/__init__.py", line 8, in <module>
    from training_data.message import Message
  File "training_data/message.py", line 8, in <module>
    from utils import ordered
  File "utils/__init__.py", line 15, in <module>
    import simplejson
ImportError: No module named simplejson

(tryed in both python 2.7 and python 3.7 with same error

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.