搜索插件、代码仓与 APP 分类

插件详情v0.0.2

wit_ai

一个简单的 Flutter 和 Dart 客户端,用于与您的 Wit.ai 应用通信

近 30 天下载
17
喜欢数
6
Pub 分数
40

安装插件

flutter pub add wit_ai

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个轻量级的 Flutter 和 Dart 客户端,可实现与 Wit.ai 的无缝集成,使应用程序能够使用 Wit.ai 的自然语言处理功能。它简化了将用户输入发送到 Wit.ai 应用并接收结构化响应的过程,非常适合语音或文本交互式对话界面。该包支持基本的 API 通信,无需深入了解 HTTP 请求或身份验证处理。专为希望以最少设置将智能、AI 驱动的交互添加到其 Flutter 应用程序的开发者设计。

适合场景

  • 语音命令处理
  • 应用中的自然语言理解
  • 聊天机器人集成
  • 用户意图识别
  • 实时对话分析
  • 智能助手功能

主要特点

  • 简单 API 包装器
  • 无缝集成 Wit.ai
  • 支持文本和语音输入
  • 最小配置要求
  • 实时响应解析
  • 干净、可读的代码结构

适合对象

  • 开发聊天机器人
  • 使用 Wit.ai 进行自然语言理解的团队
  • 需要语音交互的Flutter应用
  • 专注于对话式人工智能的项目
  • 初创公司正在开发人工智能功能的原型

使用建议

  • 需要一个 Wit.ai 应用和访问令牌
  • 仅限 Wit.ai 的特定 NLU 模型
  • 无离线支持
  • 依赖外部API的可用性
  • 可能需要额外的错误处理来应对网络问题
  • 不适用于超出自然语言理解的复杂AI工作流

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

wit_ai

This is a simple client that makes API requests to your Wit.ai app.

Wit.ai is an NLP tool for developers. It makes it easy for developers to build applications and devices that you can talk or text to.

Currently this package supports the "message" feature of Wit.ai. If you would like more features, please open a ticket with the enhancement label.

Usage

Using this client is very simple. Start by importing the package into your class

import 'package:wit_ai/wit_ai.dart';

Next, create a Wit object with your access token:

final wit = Wit(accessToken: ACCESS_TOKEN_HERE);

NOTE: The access token can be found in the Settings tab on your wit.ai console. It should be titled Client Access Token.

message()

The message method takes a String input to send to your Wit app. It returns a dynamic object.

final wit = Wit(accessToken: ACCESS_TOKEN_HERE); // New Wit object

dynamic response = await wit.message("Hello");

The message method returns a JSON decoded response, so you can call a specific key directly without a hassle.

Example of a response from Wit:

{
    "msg_id" : "dd526480-5784-43fa-a0f9-a3587fadc95d",
    "_text" : "temperature",
    "stats" : {
      "total_time" : 185
    },
    "entities" : {
      "intent" : [ {
        "confidence" : 0.6081958281101719,
        "value" : "temperature_get"
      }, {
        "confidence" : 0.3918041718898281,
        "value" : "temperature_set"
      } ]
    }
  }

Getting entities from the response:

print(response['entities']);

Flutter

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

所属分类

依赖

依赖清单 1 项

源码仓库

使用此插件的项目

暂无相关数据。