#chatbot #interpreter #language #csml

csmlinterpreter

The CSML (Conversational Standard Meta Language) is a Domain-Specific Language developed for creating conversational experiences easily

10 unstable releases (3 breaking)

0.4.0 May 28, 2020
0.3.2 May 4, 2020
0.3.1 Apr 24, 2020
0.2.3 Apr 16, 2020
0.1.1 Mar 19, 2020

#103 in Text processing

Download history 40/week @ 2020-08-10 10/week @ 2020-08-17 11/week @ 2020-08-24 1/week @ 2020-08-31 41/week @ 2020-09-07 1/week @ 2020-09-14 11/week @ 2020-10-19 8/week @ 2020-11-02 1/week @ 2020-11-16

56 downloads per month

Apache-2.0

360KB
10K SLoC

CSML Language

CSML logo

Introduction

The CSML (Conversational Standard Meta Language) is a Domain-Specific Language developed for creating conversational experiences easily.

The purpose of this language is to simplify the creation and maintenance of rich conversational interactions between humans and machines. With a very expressive and text-only syntax, CSML flows are easy to understand, making it easy to deploy and maintain conversational agents. The CSML handles short and long-term memory slots, metadata injection, and connecting to any third party API or injecting arbitrary code in any programming language thanks to its powerful runtime APIs.

By using the CSML language, any developer can integrate arbitrarily complex conversational agents on any channel (Facebook Messenger, Slack, Facebook Workplace, Microsoft Teams, custom webapp, ...) and make any bot available to any end user. The CSML platform comes with a large number of channel integrations that work out of the box, but developers are free to add new custom integrations by using the CSML interfaces.

Functional diagram

diagram

Examples

Hello World

cargo run --example hello_world

Event

cargo run --example event

Metadata

cargo run --example metadata

Memory

cargo run --example memory

Quick Start run it yourself

requires Rust version 1.41.


use std::fs;
use csmlinterpreter::{data::ContextJson, interpret};

fn interpret_flow(flow: &str, step_name: &str) {
    let event = Event::text("hello");
    let context = ContextJson::new();

    dbg!(interpret(
        flow, step_name, context, &event, None
    ));
}

fn main() {
    // add a valid path to a csml file
    let flow = fs::read_to_string("./hello_world.csml").unwrap();

    interpret_flow(&flow, "start");
}

Additional Information

Getting Help

Information

Play with the language

  • Studio - Create and deploy your chatbot in a matter of minutes.

Dependencies

~29MB
~617K SLoC