見出し画像

【Flowwise】英語解説を日本語で読む【2023年5月26日|@Dave Ebbelaar】

Flowwiseは、ビジュアルなUIビルダーであり、ChatGPTを会社のデータと迅速に統合することができます。LangChainを活用して、大規模な言語モデルアプリを効率的に構築します。著者は、リポジトリのクローン、APIキーの設定、会話型AIモデルの構築など、セットアップに関する手順を提供しています。彼らは、チャットボットのプロトタイプを紹介し、Flowwiseの特徴を強調しています。また、Flowwiseの迅速なプロトタイピングやAI実験における潜在的な利用例と利点についても議論しています。
公開日:2023年5月26日
※動画を再生してから読むのがオススメです。


The burning question that every company has right now is, How do I integrate ChatGPT with my own company data?

現在、すべての企業が抱える焦燥の問いは、「どのようにしてChatGPTを自社のデータと統合すればよいのか?」です。

And I found a way to do that in literally 10 minutes.

そして、私はそれを文字通り10分で行う方法を見つけました。

That's what I will show you in today's video.

それが今日のビデオでお見せするものです。

I'm going to introduce you to Flowwise, a visual UI Builder that lets you build large language model apps in literally minutes.

Flowwiseは、大規模な言語モデルアプリを文字通り数分で構築できるビジュアルUI Builderです。

I'm going to show you how you can set it up, how you can get started, and then we're going to build a conversational AI that can answer questions about your own data.

どのようにセットアップすればいいのか、どのように始めればいいのか、そして、自分のデータに関する質問に答えることができる会話型AIを構築するところまでをお見せします。

So let's get into it.

では、さっそく始めてみましょう。

Alright, so today we're going to look at Flowwise: Build large language model apps easily.

さてさて、今日はFlowwiseについて見ていきましょう: 大規模な言語モデルアプリを簡単に構築できます。

So why is this so awesome?

では、なぜこれがそんなにすごいのか?

Well, first of all, it's open source, meaning we can just download it, load it straight from the GitHub repository, and get started.

まず、オープンソースであること。つまり、ダウンロードしてGitHubのリポジトリから直接読み込むだけで、使い始めることができる。

We can spin it up locally to get a visual Builder just like you're seeing over here.

ローカルで起動すれば、ご覧のようなビジュアルな「Builder」が表示されます。

We can connect building blocks together to create a simple app.

ビルディングブロックをつなげて、シンプルなアプリを作ることができるのです。

The cool thing about this, and why I like this, is that under the hood it's all LangChain.

このアプリのクールなところ、そして私がこのアプリを気に入っている理由は、ボンネットの下がすべてLangChainであることです。

I've been doing quite some experiments with LangChain, and the repository on my GitHub can be found over here (link will be provided in the description). But the really cool thing is that we can use under the hood LangChain, which is extremely powerful in spinning up large language model apps, but now we can do it from a visual Builder.

私はLangChainでかなり実験をしていて、私のGitHubのリポジトリはこちらで見ることができます(リンクは説明の中で提供されます)。しかし、本当にクールなのは、大規模な言語モデルアプリを立ち上げるのに非常に強力なLangChainを、ビジュアルなBuilderから使えるようになったことです。

This will really allow us to prototype large language model apps in a matter of minutes, test their capabilities, and then scale from there.

これにより、大規模な言語モデル・アプリのプロトタイプを数分で作成し、その機能をテストし、そこから拡張することができるようになります。

Now, in order to follow along with this tutorial, you need an OpenAI API key, which is free to set up, but it does require you to fill in a credit card because you will get charged a very small amount for every query that you make.

このチュートリアルに従うには、OpenAI APIキーが必要です。これは無料で設定できますが、クエリを実行するたびにごく少額の課金が発生するため、クレジットカードを記入する必要があります。

You also need a Pinecone API key, which is currently also free to set up and doesn't require a credit card for this tutorial.

また、Pinecone APIキーも必要です。これも現在無料で設定でき、このチュートリアルではクレジットカードは必要ありません。

So, to get started, we are first going to visit the Flowwise GitHub repository and then clone this whole repository.

では、まず始めるために、FlowwiseのGitHubリポジトリにアクセスし、このリポジトリ全体をクローンします。

If you're new to Git, please first look up a tutorial on how to do that.

Gitを使うのが初めてなら、まずその方法についてのチュートリアルを調べてください。

But we are going to copy the link over here, and then we're going to go to your project, and for me, that is the LangChain experiments project that I already have up and running within VSCode.

しかし、ここでリンクをコピーし、それからあなたのプロジェクトに移ります。私の場合、それは既にVSCode内で起動しているLangChain実験プロジェクトです。

Then, what you would do is you would open up a terminal, so you can go to New Terminal over here, and then first of all, check where you want to store the folder.

その後、あなたがやることは、ターミナルを開くことです。だからここで新しいターミナルに移ることができます。そしてまず最初に、フォルダを保存する場所を確認します。

You can see in the top right corner, for me, it is over here, the Flowwise folder.

右上にある、私の場合はFlowwiseのフォルダーです。

So, I already have it, but what you would do is first check, Okay, in which project directory am I?

このフォルダはすでにありますが、まず、「ここはどのプロジェクトディレクトリなのか」を確認します。

You can do this from VSCode or just from the terminal or the command prompt.

これは、VSCodeからでも、ターミナルやコマンドプロンプトからでも可能です。

Then, you do git clone and then type the URL over here, copy-paste it, and then what this will do basically is it will clone the whole folder that you're seeing over here from the repository, so you have it locally on your system.

そして、git cloneを実行し、ここにURLを入力し、コピーペーストします。こうすることで、基本的には、ここに表示されているフォルダ全体をリポジトリからクローンし、システム上にローカルに存在させることができます。

That's step one.

これがステップ1です。

Alright, coming back to the repository, if we scroll down in the readme over here, we can see that we have two ways to start this up.

さて、リポジトリに戻りますが、readmeを下にスクロールすると、これを起動する方法が2つあることがわかります。

We can use npm following the quick start, or we can use Docker.

クイックスタートに従ってnpmを使用するか、Dockerを使用するかです。

If you want to use npm, you need npm installed on your system, which I will link in the description.

npmを使いたい場合は、説明の中でリンクしているnpmをシステムにインストールする必要があります。

But I'm going to use Docker for this, and that requires you to install Docker.

しかし、私はDockerを使うつもりで、そのためにはDockerをインストールする必要があります。

Again, both these tools are free and very simple to install.

繰り返しますが、これらのツールはどちらも無料で、インストールはとても簡単です。

For npm, follow this tutorial.

npmについては、このチュートリアルに従います。

For Docker, just go to docker.com (link will also be in the description) and download and install Docker.

Dockerについては、docker.comにアクセスして(リンクは説明文にもあります)、Dockerをダウンロードしてインストールするだけです。

Make sure it's running.

実行されていることを確認してください。

Open the app after installing it.

インストールしたらアプリを開いてください。

The reason I use Docker is to have more flexibility.

私がDockerを使う理由は、より柔軟性を持たせるためです。

Port 3000 is already in use on my system.

ポート3000は私のシステムですでに使用されています。

With Docker, we can specify the port.

Dockerを使えば、ポートを指定することができる。

To do that, follow along with Docker.

そのために、Dockerに従います。

Go back to fias code and look in the flowwise folder that you cloned.

fias codeに戻り、クローンしたflowwiseフォルダの中を探します。

Open it up.

それを開いてみてください。

There is a Docker folder, and there is an example file called DOT EMV.

Dockerフォルダがあり、そこにDOT EMVというサンプルファイルがあります。

Rename that file to .env and change the port to the one you want to use.

そのファイルを.envにリネームして、ポートを使いたいものに変更します。

You can also leave it at the default of 3000.

デフォルトの3000のままでもOKです。

I'm using another port because it's already in use.

私はすでに使われているので別のポートを使っています。

With the repository cloned and npm or Docker installed, we can start up the application.

リポジトリをクローンし、npmやDockerをインストールした状態で、アプリケーションを立ち上げてみます。

I'm going to follow the Docker example.

Dockerの例に従います。

We are going to run Docker compose up with the -D flag inside the docker folder of the project.

プロジェクトのdockerフォルダ内で、Docker compose upを-Dフラグ付きで実行することにします。

To do that, make sure you are in the terminal in the top-level land chain experiments folder.

そのためには、トップレベルのland chain experimentsフォルダのターミナルにいることを確認します。

Then navigate to flowwise and then Docker.

そして、flowwiseに移動し、Dockerに移動します。

Make sure you are in Docker.

Dockerにいることを確認します。

You should see the docker-compose.yaml file when you run LS.

LSを実行すると、docker-compose.yamlファイルが表示されるはずです。

Now, run Docker-compose up -D. This will spin up the Docker container and start a local server for the application to run on.

ここで、Docker-compose up -Dを実行します。これでDockerコンテナがスピンアップされ、アプリケーションを実行するためのローカルサーバーが起動します。

Make sure Docker is running in the background.

Dockerがバックグラウンドで動作していることを確認してください。

Download the application first, and then make sure it's running.

まずアプリケーションをダウンロードし、それが起動していることを確認します。

Once it's up and running, open a new tab in the browser and go to localhost, then specify the port you mentioned.

起動したら、ブラウザで新しいタブを開き、localhostにアクセスし、先ほどのポートを指定します。

Now we're inside the application, inside flowwise AI.

これで、アプリケーションの中、flowwise AIの中に入りました。

This is really exciting!

これは本当にエキサイティングです!

I already have two examples here, but I'm going to show you how to build these from scratch.

ここにはすでに2つの例がありますが、これらをゼロから構築する方法をお見せします。

Let's start with the conversational retrieval QA chain.

まず、会話検索QAチェーンから始めましょう。

Go to the marketplace and find that example.

マーケットプレイスで、その例を探してください。

They already have some boilerplates that we can use as a start.

すでにいくつかのボイラープレートが用意されているので、それをスタートとして使うことができます。

Select the one you want.

好きなものを選んでください。

Now we have to fill in some parameters and API keys to get started.

あとは、いくつかのパラメータとAPIキーを入力して、開始することになります。

Save the template and name it.

テンプレートを保存し、名前を付けます。

Now go from left to right and configure each step.

次に、左から右へ進み、各ステップを設定します。

Fill in your OpenAI API key.

OpenAI API キーを入力します。

Find it in the portal at openai.com and paste it in.

openai.comのポータルで探して、貼り付けます。

Next, configure Pinecone.

次に、Pineconeを設定します。

Copy and paste your Pinecone API key and select the environment and index.

Pinecone APIキーをコピーして貼り付け、環境とインデックスを選択します。

Go to the Pinecone console, select create index, and name it.

Pineconeコンソールに移動し、create indexを選択し、名前を付けます。

Specify the correct dimensions, which is the number OpenAI uses in their embeddings.

正しい次元を指定する。これはOpenAIのエンベッディングで使われている数である。

Leave the namespace blank.

名前空間は空白にしておきます。

Save the configuration.

設定を保存します。

Now we have configured the API keys and Pinecone.

これで、APIキーとPineconeの設定は完了です。

We are ready to start chatting with data.

これでデータとのチャットを開始する準備ができました。

Save the configuration.

設定を保存します。

Now upload a file, such as a txt file.

今度は、txtファイルなどのファイルをアップロードします。

Save it again.

もう一度保存してください。

Open the chat interface and ask questions.

チャットインターフェイスを開き、質問をしてみましょう。

Now let's move on to another example, conversational AI.

では、別の例、会話型AIに移りましょう。

It also requires an API key for serp API.

こちらもserp APIのAPIキーが必要です。

Fill in the API keys and configure the tools.

APIキーを記入し、ツールを設定します。

You can see all the available building blocks in the flowwise interface.

flowwiseのインターフェイスで、利用可能なビルディングブロックをすべて確認できます。

Swap out the file loader if you want to use a different file type.

異なるファイルタイプを使用したい場合は、ファイルローダーを入れ替えましょう。

You can experiment with different tools and functionalities.

様々なツールや機能性を試すことができます。

You can even embed the flowwise AI application in HTML or Python code.

HTMLやPythonのコードにflowwise AIアプリケーションを埋め込むこともできます。

For npm, follow this tutorial.

npmについては、このチュートリアルに従います。

For Docker, just go to docker.com.

Dockerの場合は、docker.comにアクセスするだけです。

The link will also be in the description.

リンクは説明文にもあります。

So download and install Docker and make sure that it's running.

そこでDockerをダウンロードしてインストールし、実行されていることを確認します。

So, open the app after installing it.

で、インストールしたらアプリを開いてください。

The reason that I use Docker is to have a little bit more flexibility because Port 3000 is already in use on my system.

Dockerを使う理由は、ポート3000が私のシステムですでに使用されているため、もう少し柔軟性を持たせるためです。

And with this, we can specify the port.

そして、これを使えば、ポートを指定することができます。

So, in order to do that, if you follow along with Docker, we can come back to Fias code.

そのためには、Dockerについて行けば、Fiasのコードに戻ってこれるわけです。

If you look in the Flowwise folder that you just cloned from the repository, open it up.

先ほどリポジトリからクローンしたFlowwiseのフォルダの中を見て、開いてみてください。

There is a Docker folder, and there is at first a DOT EMV example file.

Dockerフォルダがあり、最初はDOT EMVのサンプルファイルが入っています。

You should rename that file to.EMV and then change the port over here to a port that you want to use.

そのファイルを.EMVにリネームして、こっちのポートを使いたいポートに変更してください。

You can also leave it at the default of like 3000.

デフォルトの3000のままでもかまいません。

Like I've said, I'm going to use another port because it's already in use, alright?

さっきも言ったように、すでに使われているポートだから別のポートを使うんだ、いいね?

And with the repository now cloned and either npm installed or Docker installed, we can start up the application.

リポジトリをクローンし、npmをインストールするかDockerをインストールすれば、アプリケーションを起動することができます。

So I'm gonna follow the Docker example where we are going to run Docker compose up with the flag D inside the Docker folder of the project over here.

ここではDockerの例に従って、プロジェクトのDockerフォルダ内でDocker composeをDフラグ付きで実行することにします。

So how are we going to do that?

では、どのように実行するのでしょうか?

Well, first of all, again, make sure where you are in the terminal.

まず最初に、ターミナルで自分がどこにいるのかを確認します。

So we are now top level in the Landchain Experiments folder, and I'm going to CD first into Flowwise and then into Docker.

Landchain Experimentsフォルダの最上位にいるので、まずFlowwiseにCDを入れ、次にDockerにCDを入れます。

So then make sure you're in Docker.

そして、Dockerにいることを確認してください。

So you can see the docker-compose file over here.

docker-composeファイルがここにあります。

And I remember, I'm doing this on Mac.

私はこれをMacでやっています。

On Windows, this might be a little different to do this, but the principle should be the same.

Windowsの場合は少し違うかもしれませんが、原理は同じです。

You should configure your terminal to be in this folder, and then when you run LS, you should see the docker-compose YAML file.

ターミナルをこのフォルダに設定し、LSを実行するとdocker-composeのYAMLファイルが表示されるはずです。

What we can now do is we can run Docker Compose up -d.

次にできることは、Docker Compose up -dを実行することです。

What this will do is this will spin up the Docker container and start a local server basically for the application to run on.

これでDockerコンテナが起動し、アプリケーションを実行するためのローカルサーバが基本的に起動します。

So as you can see, it's now spinning up the containers.

このように、コンテナをスピンアップすることができます。

And again, make sure that Docker is running.

また、Dockerが起動していることを確認してください。

So download the application first and then make sure it's running in the background.

まずアプリケーションをダウンロードし、バックグラウンドで実行されていることを確認します。

And then what you can do once it's up and running, you can come to the browser, open up a new tab, and then go to localhost.

起動したら、ブラウザで新しいタブを開き、localhostにアクセスしてください。

And then specify the port that you just mentioned.

そして、先ほどのポートを指定します。

And now we're inside the application, where inside Flowwise AI.

これで、Flowwise AIの中にあるアプリケーションの中に入ったことになります。

This is really exciting, right?

これは本当にエキサイティングでしょう?

So I already have two examples over here, but I'm going to show you how to build these from scratch right now, alright?

すでに2つの例がありますが、これからゼロから構築する方法を紹介しますよ。

So let's start off with the conversational retrieval QA chain.

まずは、会話検索のQAチェーンから始めましょう。

Fancy word, but we are going to go to the marketplace, and then we can see that example over here.

派手な言葉ですが、マーケットプレイスに行き、その例をこちらで見ることができます。

So it's very convenient.

とても便利ですね。

They already have some boilerplates that we can use as a start.

すでにいくつかの定型文が用意されているので、まずはそれを使うことができます。

So I'm going to select this one over here.

そこで、これを選択することにします。

We can already see the flow, and now all we have to do basically is fill in some parameters and our API keys, and we can get started.

すでに流れが見えているので、あとは基本的にいくつかのパラメータとAPIキーを入力すれば、すぐに始められます。

So I'm going to say we're going to use this template, and I'm first going to save this, and I'm going to call this document chatbot.

このテンプレートを使って、まずこれを保存し、このドキュメントをチャットボットと呼ぶことにします。

Alright, now we're going to go from left to right and basically say, Hey, this is our text splitter.

さて、左から右へ進み、基本的に「これはテキストの分割です」と言います。

So if you remember from the previous tutorial that I did on LangChain, this is how you chunk documents and allow it to feed it to the AI without surpassing the token limit.

前回のLangChainのチュートリアルを覚えている方は、このようにドキュメントをチャンクして、トークン制限を超えないようにAIに送り込むことができます。

Here we can upload a txt file in this case, so that is also already in place.

ここではtxtファイルをアップロードすることができるので、これもすでに用意されている。

And now we have two OpenAI blocks over here: one for the chat and one for the embeddings to convert the data, the text, to a vector that we can use to perform similarity search.

そして今、私たちはここに二つのOpenAIブロックを持っています:一つはチャット用、もう一つはデータ、テキストを私たちが類似性検索を行うために使用できるベクトルに変換するためのものです。

So the step that we now have to do is first fill in your OpenAI API key.

それでは、まずOpenAIのAPIキーを入力する必要があります。

You can find your OpenAI API key in the portal at openai.com, and then you just paste it in here.

OpenAI APIキーはopenai.comのポータルで見つけることができます。

Now, next, we have to configure Pinecone.

次に、Pineconeを設定する必要があります。

And for this, you are going to copy and paste, first of all, your Pinecone API key.

まず、PineconeのAPIキーをコピーして貼り付けます。

Provide us put that in here.

これをここに貼り付けます。

And then we have to select an environment and also an index.

そして、環境とインデックスを選択する必要があります。

So in order to do that, you are going to go back to the Pinecone console.

そのためには、Pineconeのコンソールに戻ってください。

You go to indexes, then select create index, and you can name this whatever you want.

インデックスを作成し、好きな名前をつけることができます。

As you can see, I already have a test index that I'm going to use for this.

ご覧のように、すでにテスト用のインデックスがあるので、これを使用します。

And then, so it's the name, and then the important thing is that we need to specify the correct dimensions, and that is the number over here.

そして、名前です。重要なのは、正しい寸法を指定することで、それはこちらの数字です。

And that is because that is the number that OpenAI uses within their embeddings that we are going to use.

これは、OpenAIのエンベッディングで使用する数値だからで、これから使用します。

So specify that number over here, and then just select create index.

この数字を指定して、インデックスを作成するを選択します。

And as you can see, we're on the starter plan, no costs, it's just seven days of storage, so make sure to create that.

ご覧のように、私たちはスターター・プランで、コストはかからず、7日間のストレージだけなので、必ず作成してください。

And then what we have to do is we have to copy the environment.

それから、環境をコピーする必要があります。

So as you can see, I'm in Asia South East GCP, put that into the environment over here, and then also specify your index over here, which is test in my case.

ご覧の通り、私はAsia South East GCPにいます。それをここにある環境に入れ、そしてテストケースのように、ここにあなたのインデックスを指定します。

Namespace is not required, I'm not sure what that is forward, but we can leave it blank.

Namespaceは必須ではありません、何のためにあるのかわかりませんが、空白のままでも構いません。

Alright, so now we have configured the API Keys, we have configured Pinecone, and now we are basically ready to start chatting with data.

これでAPIキーの設定とPineconeの設定が完了し、データとのチャットを開始する準備ができました。

So make sure to save this, so we have our document chatbot, and now the final thing that we have to do is upload a file.

保存して、ドキュメントチャットボットを作成します。そして、最後にファイルをアップロードします。

So I've prepared a simple txt file, which is literally just the readme of the Landchain experiments getter repository that I've created, and we are going to import that.

Landchain実験ゲッターリポジトリのreadmeと呼ばれる簡単なtxtファイルを用意しましたので、これをインポートします。

So you can see we now have the txt file, save it again, and now watch the magic happen.

txtファイルができたので、それを保存して、魔法が起こるのを見ましょう。

We can open up the chat interface over here, and then can ask, What is this doc about?

チャット・インターフェースを開き、「このドキュメントは何について書かれていますか?

And here we go, This doc is about Landchain, a comprehensive framework designed for developing applications powered by large language models.

このドキュメントはLandchainに関するもので、大規模な言語モデルによって駆動されるアプリケーションを開発するために設計された包括的なフレームワークです。

And boom, we created a chatbot that can answer questions about your own data in under 10 minutes.

そして、10分以内に自分のデータに関する質問に答えることができるチャットボットを作成しました。

And actually, what's going on behind the scenes is pretty interesting.

そして実は、その裏で起こっていることは、かなり興味深いものです。

It's using Landchain, but in a very accessible way, as you can see.

Landchainを使っているのですが、ご覧の通り、非常にわかりやすい方法になっています。

But the cool thing about this, at least what I find really cool, is that, like you see, we can really use this for rapid prototyping.

しかし、この製品の素晴らしいところは、少なくとも私が本当に素晴らしいと思うところは、ご覧のように、これをラピッドプロトタイピングに使えるということなのです。

So I wouldn't be confident creating a full application with this, but that's just because I don't really know exactly what's going on under the hood.

ですから、これで完全なアプリケーションを作る自信はありませんが、それはボンネットの中で何が起こっているのかよくわからないからです。

But I know that we are using building blocks that are accessible within Landchain, and in that way connecting OpenAI with the embeddings and Pinecone.

しかし、Landchainの中でアクセス可能なビルディングブロックを使い、OpenAIとエンベッディングやPineconeを結びつけていることは知っています。

And now we have an experiment over here that we can test and validate, and then move forward.

これで実験ができたので、テストと検証を行い、前に進むことができます。

Alright, and now in this example, we are using a text file, as you can see over here.

さて、この例では、テキストファイルを使用しています。

But the cool thing about Flowwise is that we can very easily click on the plus over here and see all the available building blocks that we can use.

しかし、Flowwiseの素晴らしいところは、このプラスマークをクリックすると、使用可能なすべてのビルディングブロックを簡単に見ることができることです。

And if we come to the document loaders over here, we can see that we can load CSV, docx, Geto, Pages, Json files.

ドキュメントローダーでは、CSV、docx、Geto、Pages、Jsonのファイルを読み込むことができます。

We can link it to Notion, PDF files, so you can very easily swap out this, let's say, so this is not a text file, let's just delete it, say, Hey, we want to do PDF, drag it in here, connect the dots.

例えば、これはテキストファイルではありませんから、これを削除して、「PDFにしたいんだけど」といって、ここにドラッグして、点と点を結ぶだけです。

So this is the text splitter, and then the document over here, boom, we can now upload the PDF, and now again, this is all functionality that's already possible in LangChain, but you might not have been aware of that already.

これがテキストスプリッターで、そしてこっちのドキュメント、ドーン、これでPDFをアップロードすることができます。さて、これはすべてLangChainですでに可能な機能ですが、皆さんはすでにご存知なかったかもしれません。

So if you go to the LangChain documentation, you can see the document loaders, and here you can basically see most of the document loaders that are also integrated within Flowwise right now.

LangChainのドキュメントを見ると、ドキュメントローダーが紹介されていますが、ここにはFlowwiseに統合されているドキュメントローダーがほとんど紹介されています。

So the cool thing is, hey, if this works, you can just go to LangChain and see like, Hey, what, how do we load the PDFs?

もしこれがうまくいけば、LangChainにアクセスして、「PDFをどうやって読み込むか?

and then create it using custom code so you fully understand it.

そして、カスタムコードを使ってそれを作成し、完全に理解することができます。

That's really how I see Flowwise right now.

これが、今のFlowwiseのイメージです。

Let me quickly show you another cool example.

もう1つのクールな例をお見せしましょう。

So let's go to the Conversational AI, and this is another example that you can pick from the marketplace, and I haven't changed anything about this.

これはマーケットプレイスから選ぶことができる別の例で、私は何も変えていません。

I've just built in the API keys, and this also requires SERP API, which is a tool that you can use to search the internet, so you need an API key for that.

APIキーを組み込んだだけです。これにはSERP APIも必要で、これはインターネット検索に使えるツールなので、そのためのAPIキーが必要です。

I also believe that it's free, but here you can see we have a conversational agent, and we can say, Hey, these are the tools that they can use: calculator and access to the internet.

また、これが無料だと思いますが、ここでは会話型エージェントがあります。そして私たちは言えます、「これが彼らが使えるツールです:計算機とインターネットのアクセス」。

Then we have a chat model, OpenAI, and then we also have memory.

そして、OpenAIというチャットモデルがあり、さらにメモリがあります。

So this conversational agent must remember the conversation, basically.

この会話エージェントは、基本的に会話を覚えていなければなりません。

So if you say something and then two prompts later, it should still remember what you said in the first place.

つまり、あなたが何かを言った後、2回プロンプトが出たとしても、最初にあなたが何を言ったかを覚えている必要があります。

Otherwise, it's a pretty stupid conversational AI.

そうでなければ、かなり愚かな会話AIになってしまいます。

That is what we do with buffer memory.

これがバッファメモリの役割です。

So the cool thing that we can do over here is let's open up another chat, and we can say something like, Hey, who's Dave Eblar and how many subscribers does he have?

ここで私たちができる面白いことは、別のチャットを開き、「ねえ、デイブ・エブラーって誰?彼の購読者数はどれくらい?」と聞くことができます。

So this is not something that would come up if you ask that to ChatGPT.

というように、ChatGPTに質問しても出てこないようなことです。

So right now, what's happening behind the scenes is this chat agent is first of all analyzing this question basically and then determining, Hey, do I need any tools to gather this information?

今、舞台裏で起きていることは、このチャットエージェントがまずこの質問を分析し、「この情報を収集するために何かツールが必要か」と判断していることです。

And as you can see, here's the result.

そして、ご覧のように、これがその結果です。

Dave Eblar is a freelance data scientist with 13.4k subscribers and 42 three videos on his YouTube channel.

Dave Eblarはフリーランスのデータサイエンティストで、13.4kのチャンネル登録者、42本の動画をYouTubeで公開しています。

So let's quickly see how accurate that is.

では早速、その正確性を見てみましょう。

I'm currently at 13.7, but the 43 videos is correct.

現在13.7人ですが、43本の動画は正しいです。

So I'm not entirely sure where it's getting these numbers from, but it's definitely connected to the internet.

どこからこの数字を取得しているのかは全く分かりませんが、インターネットに接続されていることは間違いありません。

And now the next cool thing that we can do, since this is a conversational agent, it has memory and it also has a tool like a calculator, we could say like, Hey, what is that subscriber count multiplied by four?

次に私たちができる面白いことについて説明します。これは会話型エージェントで、記憶機能を持ち、計算機能のようなツールも持っています。たとえば、「その購読者数を4倍したら何になるか?」と聞くことができます。

So we don't reference the number, we just ask it, so it should remember, Hey, this is the subscribers, alright, boom, there's the answer.

このように、数字を参照せず、ただ質問するだけなので、「これが購読者数です。

Now let's quickly check this because I've been fooled by these calculators before in one of my previous videos.

では、早速確認してみましょう。以前、あるビデオでこの計算機に騙されたことがあるからです。

So, let's take the 13.4 times 4.

では、13.4×4で計算してみましょう。

Boom, spot on.

ドキッ、ぴったりだ。

Okay, that is correct.

よし、これで正解だ。

And so, now you basically have a really cool sandbox that you can play around with and just experiment with all of the tools.

これで、あなたは基本的に、すべてのツールを使って遊ぶことができる、とてもクールなサンドボックスを手に入れたことになります。

So, if I come in here, there are even more tools.

この中に入れば、さらに多くのツールがあります。

So, you can read file API requests, web browsing, write files.

ファイルのAPIリクエストの読み取り、ウェブブラウジング、ファイルの書き込みができます。

There's a lot of stuff in here that you can just chain together in this visual build folder and then play around with it.

このビジュアル・ビルド・フォルダーで、いろいろなものをつなげて、遊んでみることができます。

Alright, now the last thing that I want to show you, and that's also pretty cool, is you can click on this embed button over here.

さて、最後に紹介するのは、この埋め込みボタンをクリックすることで、かなりクールなものになります。

So, here's a simple embed using HTML, but what I'm more interested in right now is Python.

これはHTMLを使った簡単な埋め込みですが、私が今興味を持っているのはPythonです。

So, what you can do is you can come over here and just create a simple Python file, and that's what I did already over here.

ここで、簡単なPythonファイルを作成することができるのですが、私はすでにここで作成しました。

So, in the Flowwise folder, I created a simple Source folder and put in a connect.pi over here, and you can see I just copy and paste everything that is in here and then played around with the queries.

Flowwiseフォルダの中に、シンプルなSourceフォルダを作成し、connect.piを置きました。そしてここにある全てをコピー&ペーストし、クエリで遊びました。

So, what I can do is I spin up this interactive session over here and then run the query.

このインタラクティブ・セッションを立ち上げて、クエリーを実行します。

So, who is Dave Abelar and how many subscribers does he have?

Dave Abelarとは誰で、購読者は何人いるのか?

So, let's do this now.

では、これを実行してみましょう。

What I've changed is I added a simple print statement, so it will also output the result, and boom, there we go.

単純なprint文を追加して、結果も出力するようにしました。

They have bliers of freelance data scientist.

フリーランスのデータサイエンティストであることがわかります。

We have the same answer right now, and one good thing to note, and this took me some time to figure out, is how to deal with the memory key and the input key from the buffer memory.

私たちは今、同じ答えを持っています。そして注意すべき1つの良いこと、そして私が理解するのに時間がかかったのは、バッファメモリからのメモリキーと入力キーの扱い方です。

So, Flowwise is very new, and if you come to the repository over here, you can see documentation like coming soon.

Flowwiseは非常に新しいもので、こっちのリポジトリに来れば、coming soonのようなドキュメントを見ることができるわけです。

So, that is currently a drawback, I would say, of using Flowwise AI, especially if you want to integrate it into your own applications like this.

ですから、それが現状では、Flowwise AIを使う、特にこのように自分のアプリケーションに組み込みたい場合の欠点と言えると思います。

Then there is not much documentation available right now.

それから、今はあまりドキュメントがありません。

So, I figured if you just copy and paste this example, it won't take the memory into consideration.

そこで、この例をコピー&ペーストするだけでは、メモリが考慮されないと考えました。

But if you just add the memory key and the input key, similar to like you do in LangChain but like this, then it works.

しかし、メモリキーと入力キーを追加するだけで、LangChainでやっているのと同じように、このように動作します。

So, now if we, for example, do the same request, say like, Hey, what's the subscriber count multiplied by four?

では、例えば同じように、「加入者数を4倍した値はいくらですか?

So, this is a good test to make sure that it has access to the previous message.

これは、前のメッセージにアクセスできることを確認するための良いテストです。

And as you can see, we get the same result here again.

ご覧のように、ここでも同じ結果が得られます。

So, now this is, of course, on a local server, but you can just as well deploy this to a real server and turn this into a real endpoint, basically, that you can interact with.

もちろん、これはローカル・サーバー上のものですが、これを実際のサーバーに配備して、実際のエンドポイントにすることも可能です(基本的には対話が可能です)。

And that is something that I did in my previous video where I showed you how to deploy AI apps to the cloud using Azure.

これは、前回のビデオで、Azureを使ってAIアプリをクラウドに展開する方法を紹介したものです。

So, if you're interested in that, go check out that previous video.

ご興味のある方は、前回のビデオをご覧ください。

So, that's Flowwise in a nutshell.

以上、Flowwiseを簡単に説明しました。

Really awesome piece of software, and huge shout out to the creators for creating this in such a short time frame and also making it open source.

本当に素晴らしいソフトウェアで、これを短期間で作成し、オープンソースにしたクリエイターに大きな賛辞を送ります。

So, we can all play around with this.

そして、オープンソースにしたことで、私たちはこのソフトウェアで遊ぶことができます。

I think this is very exciting, and like I've said, how this will fit into my stack and into my workflow will be to quickly test and evaluate ideas for rapid prototyping.

これはとてもエキサイティングだと思います。そして、私がこれまでに言ったように、これが私のスタックと私のワークフローにどのように適合するかは、アイデアを迅速にテストして評価し、迅速なプロトタイピングを行うためになります。

So, I'm currently doing a lot of AI projects for clients that I work with, and this tool will definitely help me to quickly test and evaluate ideas.

現在、私はクライアントのために多くのAIプロジェクトを行っていますが、このツールは間違いなくアイデアを素早くテストし評価するのに役立ちます。

Like I said, I'm not going to build like full end-to-end applications based on this, but just test individual components and then build it on my own using Lane chain.

ただ、このツールを使ってエンドツーエンドのアプリケーションを作るのではなく、個々のコンポーネントをテストし、レーンチェーンを使って自分自身で構築するつもりです。

That's really where I see flow-wise right now, at least for my workflow.

これが、少なくとも私のワークフローの流れです。

And now, if you are interested in how you can sell AI services to clients as a freelancer, then check out the first link in the description.

そして、もしあなたがフリーランサーとしてAIサービスをクライアントに販売する方法に興味があるなら、説明文の最初のリンクをチェックしてみてください。

That's it for this video.

このビデオはこれでおしまいです。

Please like this video and subscribe to the channel, and then I'll see you in the next one.

このビデオに「いいね!」とチャンネル登録をお願いします。

この記事が気に入ったらサポートをしてみませんか?