Git Product home page Git Product logo

wit-go's Introduction

wit.ai

GoDoc Go Report Card

This repository is community-maintained. We gladly accept pull requests. Please see the Wit HTTP Reference for all supported endpoints.

Go client for wit.ai HTTP API.

Install

go get -u github.com/wit-ai/wit-go/v2

Usage

package main

import (
	"os"
	"fmt"

	witai "github.com/wit-ai/wit-go/v2"
)

func main() {
	client := witai.NewClient(os.Getenv("WIT_AI_TOKEN"))
	// Use client.SetHTTPClient() to set custom http.Client

	msg, _ := client.Parse(&witai.MessageRequest{
		Query: "hello",
	})
	fmt.Printf("%v", msg)
}

Testing

Both Unit / Integration tests are executed by Github Actions.

Unit tests

go test -race -v

Integration tests

Integration tests are connecting to real Wit.ai API, so you need to provide a valid token:

export WITAI_INTEGRATION_TOKEN=your_secret_token_here
go test -v -tags=integration

License

The license for wit-go can be found in LICENSE file in the root directory of this source tree.

Terms of Use

Our terms of use can be found at https://opensource.facebook.com/legal/terms.

Privacy Policy

Our privacy policy can be found at https://opensource.facebook.com/legal/privacy.

wit-go's People

Contributors

chessai avatar danieloliveira085 avatar jtliao avatar nickylogan avatar patapizza avatar plutov avatar stopachka avatar szrrizvi2 avatar thibaultleouay avatar trynity avatar

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.