Coder Social home page Coder Social logo

aichaos / rivescript Goto Github PK

View Code? Open in Web Editor NEW
19.0 4.0 4.0 56 KB

RiveScript is a scripting language for authoring chatbots.

Home Page: https://www.rivescript.com/

License: MIT License

rivescript artificial-intelligence ai aiml bot bots chatbot chatbots alice eliza

rivescript's People

Contributors

kirsle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rivescript's Issues

[Question] Topic Timeout?

I have a chatbot running, and I have programming that allows a user to start a troubleshooting session, and each step is a topic. The problem is they may go away, and then come back hours later and try to ask the chatbot another question -- but they're stuck inside the topic they left on which may be a few days ago. Is there a way to time out a topic? So that ten minutes later it goes back to topic=random?

RiveScript Monolithic Version Control

RiveScript may be able to benefit from having a monolithic version control repository rather than having one repo per implementation (Perl, Python, JavaScript, Go and Java). It could also encompass and make obsolete the other closely related repos: rivescript-wd and rsts.

High Level Rationale

This would involve a temporary disruption for third party contributors as the repos get rearranged and all the implementations are migrated into the common aichaos/rivescript repo. But the benefits gained from having a common repository for all implementations may include:

  • Adding a new feature to RiveScript as a whole can be made easier. For example, if I'm adding a new command to the language, I can have all 5 implementations get the update simultaneously with one GitHub pull request.

    The current state of affairs is that I would have to sit down all at once, clone all 5 repositories and deal with the overhead of making the changes and pull requests separately for each version. This is such an obstacle that I haven't added a new global feature to RiveScript in quite a while, because I don't want the published module versions to diverge from each other for any length of time.

  • Unit tests can be consolidated and kept in sync across all versions. Currently, each implementation has their own copies of unit test fixtures in their own repo so that Travis CI can run tests on push, and there is also the aichaos/rsts project which provides YAML test fixtures for the RiveScript language itself.

    Currently a lot of the YAML fixtures in rsts are duplicated from the tests in the individual implementations. And currently a lot of the implementations fail the RSTS test suite due to random little quirks in their implementations (for example, the exact wording they use for error messages).

    A mono-repo could bring the YAML fixtures from RSTS into the repo and all the unit tests can become RSTS tests, so that they are all kept in sync at all times and it will be easier to iron out their little quirks to all behave identically. And it's friendly for Travis CI which can still run automated unit tests.

  • I can make more use of GitHub features like Projects and Wikis. Currently most of the repos don't have wikis enabled until I have a repo-specific need for them (i.e., for the JavaScript version to document the Async issues that come up frequently in that project).

    If all the RiveScript implementations are merged together into the aichaos/rivescript project, the existing RiveScript Community Wiki can be merged with the random odd pages from the projects' own wikis.

Impact

Impact on Contributors

Having a single repo containing 5 different programming language implementations may deter contributions from developers who are only familiar with a subset of those languages: if they fix or change a behavior, the unit tests might pass for the language they modified but fail for the ones they didn't.

This may be somewhat alleviated by using the Git Flow workflow and have the master branch be the "production ready" one where all unit tests are passing and all builds are stable.

All pull requests would instead be directed at the develop branch which is allowed to fail tests from time to time. So if a contributor fixes the JavaScript implementation and breaks the other four, those can be patched by others (or me) later before the next production-ready merge to master can be done.

Impact on Implementations

The Perl, Python, Java and JavaScript implementations shouldn't be affected too much, as their GitHub URLs aren't very important in those languages. Their links on e.g. npm and PyPI would just be updated to point to the mono-repo.

The Go version would need to get a new module name, since Go ties the GitHub source address to the module's name by default. Options may include:

import (
    // The old (current) import path
    "github.com/aichaos/rivescript-go"

    // The new GitHub import path
    "github.com/aichaos/rivescript/go"

    // Could also make use of vanity import URLs...
    // but the gopkg.in one looks ugly IMHO.
    "gopkg.in/aichaos/rivescript/go.v1"

    // A self hosted vanity URL but it would require me to maintain the
    // URL and make sure it doesn't go down, or it will break `go get`
    "rivescript.com/go"

    // I could use GitHub Pages to remove the burden of self hosting
    // a vanity URL though; the Go version can have "/rivescript" because
    // no other language uses these kinds of import paths.
    "aichaos.github.io/rivescript"
)

On a bright note: I've been struggling with the code layout in rivescript-go because I don't like a large number of Go source files cluttering up the root of the repo alongside the meta files like README.md, Changes.md and .travis.yml; as such I kept the majority of the source code (with the tons of unit tests) under a src/ subdirectory and created a wrapper API in the root of the repo instead.

If the Go source for RiveScript were kept at aichaos/rivescript/go, then the /go directory can replace the src one and all the Go source files can be kept in a sane place together. The root of the repo, having nothing to do with the Go specific implementation, can contain only meta files and no program code at all.

This would simplify the Go API as much as I've been wanting.

Impact on Travis CI

The root of the repo could probably add a Makefile for Travis CI to use which would handle the necessary logic to run through the unit tests on each implementation.

[Question] Using current trigger on redirection

Hi,

So, i have a question, i need to use the trigger value on a reply and i don't know how can i do this.

+ [*]portugal[*]
- {topic=countries}{@all_trigger_value}   ----> /*** Here is the problem, how can i send this to match portugal trigger of countris?  ***/

+ *
- Lets talk about countries

< topic countries
    + [*]portugal[*]
    - Portugal is the best
> topic

Ty

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.