• Stars
    star
    13
  • Rank 1,512,713 (Top 30 %)
  • Language
    Crystal
  • License
    MIT License
  • Created over 8 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Crystal SDK for wit.ai

wit-crystal

Crystal SDK for Wit.ai.

Supports Wit.ai API version 20160526. Runs on Crystal >= 0.17.2.

Installation

Add this to your application's shard.yml:

dependencies:
  wit:
    github: spalladino/wit-crystal

Examples

Understand

A query to the /message endpoint can be issued by running:

crystal examples/understand.cr <access-token> In Buenos Aires
> Extracted entities from 'In Buenos Aires'
>  location=[{"confidence" => 0.957859, "type" => "value", "value" => "Buenos Aires", "suggested" => true}]

Context

Shows how using a context changes how message entities are understood, by processing message Last week both with and without a reference time.

crystal examples/context.cr <access-token>
> Understanding message 'Last week'
>  Without context:  2016-05-09T00:00:00.000-07:00
>  Ref 2012-03-08:   2012-02-27T00:00:00.000Z

Quickstart

The code for the quickstart weather application can be executed by running:

crystal examples/quickstart.cr <access-token>

Usage

wit-crystal provides a Wit::App class with the following methods:

  • message - the Wit message API
  • converse - the low-level Wit converse API
  • run_actions - a higher-level method to the Wit converse API
  • interactive - starts an interactive conversation with your bot

Refer to the examples folder for sample usage.

TODOs

  • Generate and upload documentation
  • Add more specs using webmock or similar tool

Acknowledgements

  • The Wit.ai team for building such an awesome tool
  • The developers of the Ruby SDK for Wit.ai, on which this library is heavily inspired

Contributors

  • spalladino Santiago Palladino - creator, maintainer

More Repositories

1

zkp-tests

Playing with zero-knowledge proof languages
Solidity
90
star
2

sample-contract-deploy-pipeline

Sample hardhat project with a smart contract deployment pipeline
TypeScript
62
star
3

flashbots-unstake-and-transfer

Outdated | Fork of searcher-sponsored-tx to unstake and transfer tokens from a compromised account
Solidity
60
star
4

ethereum-upgrade-storage-free

Proof of concept for a delegatecall proxy upgrade pattern without storage usage
Solidity
53
star
5

ethereum-samples

Code samples for the Ethereum for web developers book
JavaScript
42
star
6

reorg-tester

Testing Ethereum reorgs in a private geth network
TypeScript
27
star
7

hardhat-noir

An unofficial Hardhat plugin for working with circuits written in Noir
Solidity
12
star
8

coursera-image-processing

Gists from Coursera image processing course from Duke University
Python
9
star
9

blockchain-crystal

Experiments on the bitcoin blockchain using Crystal
Crystal
8
star
10

cryptopals

Solutions to Matasano Crypto Challenges
Crystal
7
star
11

github-minter-bot

Proof of concept for a Github App that responds to commands in issues comments to mint NFT tokens. Uses OpenZeppelin Defender.
TypeScript
7
star
12

defender-serverless-proof-of-concept

Proof of concept for a serverless plugin for Defender
JavaScript
6
star
13

mgviz-dc

Mass gathering visualizations from EpiHack Rio 2015 using dc.js
JavaScript
6
star
14

crystal-ruby_exts

Writing ruby extensions in Crystal
Crystal
5
star
15

workshop-defender-meta-txs

Code for Defender Workshop on meta-transactions
JavaScript
5
star
16

openzeppelin-defender-hardhat-example

Example usage of the @openzeppelin/defender-hardhat plugin for proposing a contract upgrade via Defender
JavaScript
5
star
17

defender-keep3r-demo

Demo on running a keep3r from a Defender autotask
Solidity
4
star
18

bivo

Bivo
Ruby
4
star
19

solc-rs

Really simple Rust CLI wrapper for solc
Rust
3
star
20

openzeppelin-sdk-upgrade-struct-example

Sample project on upgrading structs in smart contracts using the OpenZeppelin SDK
JavaScript
3
star
21

pcp

Master thesis on a branch-and-cut algorithm for the partitioned colouring problem
Python
2
star
22

sam-rest-test

Testing SAM for building a RESTful API on AWS API Gateway
TypeScript
2
star
23

solidity-underhanded

Solidity underhanded contest submissions
JavaScript
1
star
24

bash-cheat-sheet

Bash cheat sheet in markdown from ggiraldez, juanedi and mgarciaisaia great presentation at Manas
CSS
1
star
25

s3-url-minifier

S3 based URL minifier built in Vue.js
Vue
1
star
26

sample-indexer

Sample project for indexing Transfer events of an ERC20 and create a list of holders
JavaScript
1
star
27

docker-demo

Test repository for Dockerising a Rails app
Ruby
1
star
28

cryesql

Port of yesql to Crystal
Crystal
1
star
29

amplify-restful-test

Tests for a RESTful API using Amplify
TypeScript
1
star
30

knockout_forms-rails-example

Example application for KnockoutForms::Rails
Ruby
1
star
31

sample-single-use-addresses

Sample project on creating single-use addresses.
JavaScript
1
star
32

crystal-facebook_bot

Crystal shard for building Facebook Messenger Bots
Crystal
1
star
33

algoritmos-gcba

Curso de capacitación de Algoritmos y Estructuras de Datos para docentes de Escuelas Técnicas con especialidad Computación. Dictado para el CePA del GCBA, por Leandro Radusky y Santiago Palladino.
TeX
1
star
34

mvam-chatbot-spike

Spike for a telegram chatbot for WFP mVAM food collection surveys
Ruby
1
star