Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
csml-engine
Advanced tools
This package allows you to create CSML chatbots and use them in your own nodejs projects.
CSML is a programming language dedicated to create rich conversational experiences on any chat interface. It helps with defining conversational logic, handling user context, long-term and short-term memory, and integrating with third-party APIs.
For more information about CSML, visit https://csml.dev.
In order to use CSML in your program, you will need a MongoDB database. The credentials are loaded from your environment. Please use the .env.example file in this repository as a reference.
Other environment variables are also available:
DISABLE_SSL_VERIFY=true|false
: by default, CSML does not allow invalid (or self-signed) SSL certificates. By setting this to false, you can accept unsafe SSL certificates. Defaults to true
.ENCRYPTION_SECRET=my_&ncrypti0nS3cr3t!
: any string to use as your own encryption key for storing sensitive data safely. If left empty, data will not be encrypted upon storing in the database. Defaults to none.DEBUG=true|false
: print debug information in console. Defaults to false
.This projects runs on macOS and linux (ubuntu, debian) out of the box, with nodejs 12.x (lts) and 14.x (latest):
npm install csml-engine
Then, in your project:
import csml from 'csml-engine';
// or
const csml = require('csml-engine');
For use on other architectures, you will need to compile the project from source into a native node file compatible with your system:
Then, run the following command:
git clone https://github.com/CSML-by-Clevy/node-csml-engine.git
git submodule update --init --recursive
cd node-csml-engine
npm i
Under native/
you will find a index.node
native node file that you can then easily import in your project like any other module:
import csml from './path/to/index.node';
// or
const csml = require('./path/to/index.node');
Read the documentation to find more informations about the various data formats used in this documentation.
csml.run(Bot, Event);
Returns:
{
"request_id": "ec4f47ec-7c99-4b9c-99df-782956aa2cbc",
"interaction_id": "0b87e25a-f6f4-4617-a10c-a3c725dca3d3",
"client": {
"bot_id": "0d1e4c9a-f51b-41bf-8996-e03d8cd44c87",
"channel_id": "4b229bae-dd10-43b2-877f-7603dc02758d",
"user_id": "some-user-id"
},
"conversation_end": true,
"messages": [
{
"conversation_id": "545f788b-e44d-45ac-a585-93245064ba8d",
"direction": "SEND",
"interaction_order": 0,
"payload": {
"content": {
"text": "Hello"
},
"content_type": "text"
}
}
],
"received_at": "2020-06-09T06:41:37.740Z",
"is_authorized": true
}
csml.validateBot(Bot);
Returns:
{
"valid": false,
"errors": [
{
"message": "Some error message",
"flow": "name of flow",
"step": "name of step",
"line": 123,
"column": 32
}
...
],
"warnings": [
{
"message": "Some warning message",
"flow": "name of flow",
"step": "name of step",
"line": 123,
"column": 32
}
...
]
}
csml.getFlowSteps(flow_content);
csml.getOpenConversation(Client);
Returns:
{
"has_open": true,
"conversation": Conversation
}
csml.closeAllConversations(Client);
FAQs
CSML engine for nodejs
The npm package csml-engine receives a total of 1 weekly downloads. As such, csml-engine popularity was classified as not popular.
We found that csml-engine demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.