Crates.io | csmlinterpreter |
lib.rs | csmlinterpreter |
version | 0.4.0 |
source | src |
created_at | 2020-03-19 14:37:58.959803 |
updated_at | 2020-05-28 07:51:10.084755 |
description | The CSML (Conversational Standard Meta Language) is a Domain-Specific Language developed for creating conversational experiences easily. |
homepage | https://www.csml.dev/ |
repository | https://github.com/CSML-by-Clevy/csml-interpreter |
max_upload_size | |
id | 220433 |
size | 976,738 |
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.
cargo run --example hello_world
cargo run --example event
cargo run --example metadata
cargo run --example memory
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");
}