abc-JYL / NAA

A fake AI make with if and else

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About

Heavily inspired by ChatterBot ( https://github.com/gunthercox/ChatterBot )

Name

N - Not

A - An

A - AI

Try it out

Just run the main.py!

Default it will run with default data.yaml use main.py { yaml or json File } to run alternative Yaml or Json File!

How it is work?

Basicly NAA work like a big if and else statement but use a yaml or json file like a AI Model inside there Triggers and Responds

Files Format

The Json file have three part:

  1. Tag name - Like comment if not there the python code will rasie a error
  2. Triggers - Use for the if statement
  3. Responds - If statement responds

Note: Triggers must be lower case!

For example:

{
    "Tag Name": {
        "Triggers": [
            "triggers"
        ],
        "Responds": [
            "Responds"
        ]
    }
}

Or:

Tag Name:
  Triggers:
    - triggers
  Responds:
   - Responds

Special code:

  1. time - will return the time for the datelibary
  2. link ( Start with "http" or "https" ) - with open the link
  3. code - Need to create a new tag under Responds, which called Code

Note code tag might have security issue

For example:

Tag Name:
  Triggers:
    - triggers
  Responds:
    - code
  Code: |
    print("Hello World")

Why I create this

Answer is:

I'm lazy to learn pytorch!

About

A fake AI make with if and else

License:MIT License


Languages

Language:Python 100.0%