パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v0.1.3

flutter_dialogflow

Dialogflow を簡単に統合でき、Dialogflow v2 をサポートする Flutter パッケージ

30日間ダウンロード
122
いいね数
50
Pub ポイント
40

パッケージをインストール

flutter pub add flutter_dialogflow

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Dialogflow v2 をサポートする Flutter パッケージで、Dialogflow との統合を簡素化します。このパッケージは、Flutter アプリを Dialogflow エージェントに接続することで、自然言語理解と意図認識を実現し、会話型インターフェースの構築を可能にします。Dialogflow の API との通信を処理し、Dialogflow で駆動されるチャットボットとのリアルタイム対話が可能です。クロスプラットフォームでの Flutter アプリケーションにおけるシームレスな利用を目的としており、バックエンドの高度な設定なしに AI による会話を実装する簡単な方法を提供します。モバイルアプリのチャットボット機能に最適です。

用途

  • モバイルアプリへのチャットボットの統合
  • リアルタイムでのユーザー意図検出
  • カスタマーサポートボットの構築
  • 音声またはテキストベースのインタラクションを有効にする
  • AI駆動のバーチャルアシスタントの作成

主な機能

  • Dialogflow v2 をサポートしています
  • Flutter用のシンプルなAPI
  • リアルタイム会話処理
  • クロスプラットフォーム互換性
  • Dialogflowエージェントとの簡単な統合

適している対象

  • チャットボット機能を開発する開発者
  • 自然言語処理を必要とするアプリ
  • AI駆動のインタラクションを備えたモバイルアプリ
  • NLPにDialogflowを使用するチーム
  • 迅速なボット統合が必要なプロジェクト

注意事項

  • Dialogflowエージェントのセットアップが必要です
  • インターネット接続に依存します
  • Dialogflow v2 に制限
  • 組み込みの翻訳サポートなし
  • サービスアカウントキーによる認証

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Dialogflow v1 & v2 for Flutter apps.

Dialogflow

:heart: Star :heart: the repo to support the project. Thanks!

A new Flutter package.

Awesome Tutorials

Thanks for the tutorials!

Installation

  • Add this to your package's pubspec.yaml file:
dependencies:
  flutter_dialogflow: ^0.1.0
  • You can install packages from the command line: with Flutter:
$ flutter packages get
  • Dialogflow v1 Import it Now in your Dart code, you can use:
 import 'package:flutter_dialogflow/flutter_dialogflow.dart';
  • Or Dialogflow v2 Import it Now in your Dart code, you can use:
 import 'package:flutter_dialogflow/dialogflow_v2.dart';

Usage

Dialogflow v1
  • Dialogflow register and create new Agent
  • Copy Api key (Token)
  • Code
  Dialogflow dialogflow = Dialogflow(token: "Your Token");
  AIResponse response = await dialogflow.sendQuery("Your Query");
  • Example
  void Response(query) async {
    Dialogflow dialogflow = Dialogflow(token: "10178f9cb6cf12321asdf4aae75c87cd");
    AIResponse response = await dialogflow.sendQuery(query);
    print(response.getMessageResponse());
  }
Dialogflow v2
  • Dialogflow](https://dialogflow.com/) register and create new Agent
  • Project Setup and Authentication
    • First of all, we need to create a Google Cloud Platform Project using Console Google Cloud
    • Create or select an existing GCP project.
    • From the GCP console, go to APIs and Services and click on credentials.
    • Click on Create credentials and choose Service account key.
    • Select your service account from the dropdown, choose JSON and click Create. This will download the JSON key to your computer. Save it securely.
    • We downloaded a JSON file with all our data.
  • In your project create folder assets(folder name recommended optional)
  • Move file json in your project in folder created
  • open file pubspec.yaml
flutter:
  uses-material-design: true
  assets:
    - assets/your_file_downloaded_google_cloud.json
  • Import dialogflow_v2
import 'package:flutter_dialogflow/dialogflow_v2.dart';
  • Code
  AuthGoogle authGoogle = await AuthGoogle(fileJson: "Asset Your File Json").build();
  // Select Language.ENGLISH or Language.SPANISH or others...
  Dialogflow dialogflow =Dialogflow(authGoogle: authGoogle,language: Language.ENGLISH); 
  AIResponse response = await dialogflow.detectIntent("Your Query");
  • Example
  AuthGoogle authGoogle = await AuthGoogle(fileJson: "assets/your_file_downloaded_google_cloud.json").build();
  Dialogflow dialogflow = Dialogflow(authGoogle: authGoogle,language: Language.ENGLISH);
  AIResponse response = await dialogflow.detectIntent("Hi!!!");
  print(response.getMessage())
  • Or Get List Message type Card
Call function response.getListMessage() 
response List<dynamic>
example 
new CardDialogflow(response.getListMessage()[0]).title
Convert first item in CardDialogflow for worked easy
CardDialogflow have
- title
- subtitle
- imageUri
- List buttonss
    - each button have text and postback
  • Or Setup custom authentication (session)
Get a session id from your backend server after authentication.(Eg: OAuth Token)
Pass the session id a named parameter 'sessionId' to AuthGoogle function.
On the dialogflow fulfillment, access it inside `agent.session` (WebhookClient.session)
and apply your session logic

Example:
  AuthGoogle authGoogle = await AuthGoogle(fileJson: "assets/your_file_downloaded_google_cloud.json", sessionId: "YOUR_CUSTOM_SESSION_ID").build();
  Dialogflow dialogflow = Dialogflow(authGoogle: authGoogle,language: Language.ENGLISH);
  AIResponse response = await dialogflow.detectIntent("Hi!!!");
  print(response.getMessage())

Demo

Dialogflow For Flutter Web

Visit the repository: Flutter Dialogflow Web 🚀

カテゴリー

依存関係

依存関係一覧 2 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。