見出し画像

【LangChain】英語解説を日本語で読む【2023年4月24日|@Nicholas Renotte】

LangChainの解説です。
公開日:2023年4月24日
※動画を再生してから、インタビューを読むのがオススメです。


Large language models like those that power ChatGPT are taking over software.

ChatGPTのような大規模な言語モデルは、ソフトウェアを支配しています。

Every startup is rapidly moving to get some form of large language model powered machine learning into their stack.

すべてのスタートアップは、大規模な言語モデルを搭載した機械学習を自社のスタックに取り込もうと急速に動いています。

Wolfram Alpha is now plugged into ChatGPT.

Wolfram Alphaは現在、ChatGPTに接続されています。

Khan Academy has their education AI.

カーンアカデミーには教育AIがあります。

Salesforce has Einstein GPT.

SalesforceにはEinstein GPTがあります。

Bloomberg, in fact, took it one step further and fine tune their own GPT model.

Bloombergは、さらに一歩進んで、独自のGPTモデルを微調整しています。

So my question is, why don't we all do it?

では、なぜ私たちはそれをやらないのでしょうか?

I'll explain why in a second, but in this video, I'm actually gonna show you how to build your very own AutoGPT model using a framework that's taking the programming community by storm.

このビデオでは、プログラミングコミュニティで話題のフレームワークを使用して、独自のAutoGPTモデルを構築する方法を実際に紹介します。

So up until now, this has been difficult to do.

これまで、このようなことを行うのは困難でした。

Organizations have needed teams of machine learning engineers to be able to build, train and productionize machine learning models.

機械学習モデルを構築し、訓練し、生産化するためには、組織には機械学習エンジニアのチームが必要でした。

It was too big of an investment for most companies to bother taking on, but now it's not.

ほとんどの企業にとって、それはあまりにも大きな投資であり、わざわざ引き受ける必要はありませんでしたが、今はそうではありません。

And frameworks like LangChain make it dramatically easier to get started.

LangChainのようなフレームワークがあれば、劇的に簡単に始めることができます。

Think of LangChain like Spider-Man with a jet pack.

LangChainは、ジェットパックを装備したスパイダーマンのようなものだと考えてください。

It's super fast and it's connected to the web.

超高速で、ウェブに接続されているのです。

Programmers can use it to leverage large language models from OpenAI, Hugging Face, cohere and more.

プログラマーは、OpenAI、Hugging Face、cohereなどの大規模な言語モデルを活用するために、このシステムを使うことができます。

But where it gets super interesting is it provides the ability to use agents.

しかし、ここからが超面白いのですが、エージェントを使う機能が提供されるのです。

This means you can have your own app reach out to the web or use your own documents inside of your own GPT pipeline.

つまり、独自のアプリをウェブにリーチさせたり、独自のGPTパイプラインの中で独自のドキュメントを使用したりすることができるのです。

There's six key modules in LangChain.

LangChainには、6つの主要なモジュールがあります。

Models, prompts, indexes, memory, chains and agents.

モデル、プロンプト、インデックス、メモリ、チェーン、エージェントです。

Models gives you access to large language models.

モデルズは、大規模な言語モデルへのアクセスを提供します。

Prompts structure your prompts with templates.

プロンプトは、テンプレートでプロンプトを構成します。

Indexes prepare your documents for working with large language models.

Indexesは、大規模な言語モデルで作業するためのドキュメントを準備します。

Memory gives you your LLM chain access to historical inputs kind of like ChatGPT.

Memoryは、ChatGPTのように、LLMチェーンが過去の入力にアクセスできるようにします。

Chains allow you to string it all together and agents allow you tools like accessing Wikipedia or Google search.

チェーンは、すべてをつなぎ合わせることができ、エージェントは、WikipediaやGoogle検索にアクセスするようなツールを提供します。

Now that you know a little bit about the LangChain framework, we're gonna go on ahead and build an application with it with Streamlit and LangChain.

さて、LangChainフレームワークについて少しわかったところで、StreamlitとLangChainを使ってアプリケーションを構築してみることにします。

We're gonna run through a bunch of the modules.

モジュールの多くを実行します。

We'll take it end to end and be able to build an application that allows us to create a YouTube script generator and title.

そして、YouTubeのスクリプトジェネレータとタイトルを作るアプリケーションを作ることができるようになります。

Now in the interest of time, I'm gonna set a 15 minute timer to try to get this information to you as quickly as possible.

さて、時間の都合上、この情報をできるだけ早くお届けするために、15分のタイマーをセットします。

So the first thing that we need to do is create two files.

まず、2つのファイルを作成する必要があります。

So we're gonna create a file called apikey.py and we'll also need to create one called app.py.

apikey.pyというファイルを作成し、app.pyというファイルも作成する必要があります。

So inside of our apikey.py file, we're gonna create a new variable called apikey and I'm gonna set that equal to the apikey that is available inside of OpenAI.

apikey.pyファイルの中に、新しい変数apikeyを作成し、OpenAI内で利用可能なapikeyに設定します。

Now you can use different LLM service providers.

これで、異なるLLMサービスプロバイダを使うことができます。

I'll show you what that looks like a little bit over here.

どのようなものか、この先で少しお見せします。

So if you didn't wanna use the API service, you definitely don't need to.

もしAPIサービスを使いたくなかったら、その必要はありません。

Now inside of our app.py file, we are then going to import that in.

さて、app.pyファイルの中で、これをインポートすることにします。

So I'm gonna run import OS and I'm also gonna bring in the apikey.

import OSを実行し、apikeyも取り込みます。

So from apikey, import apikey.

つまり、apikeyからimport apikeyです。

Now we need to make this available to our OpenAI service.

次に、これを OpenAI サービスで利用できるようにする必要があります。

So to do that, I can run os.environ and then inside of a set of square brackets, I'm going to set a dictionary key.

os.environ を実行し、角括弧の中に辞書キーを設定します。

So OpenAI, OpenAI underscore API underscore key and we are gonna set that equal to this apikey over there.

OpenAI、OpenAI underscore API underscore key、そしてこのapikeyと同じものを設定します。

So we're gonna set it equal to that.

つまり、このキーと同じに設定します。

Beautiful.

美しい。

Now the next thing that we need to do is we need to go ahead and install some dependencies to be able to leverage the lane chain service.

さて、次にやるべきことは、レーンチェーンサービスを活用するために、いくつかの依存関係をインストールすることです。

I'm gonna open up a terminal and then we're gonna run pip install.

ターミナルを開いて、pip installを実行します。

Oh, that's looking a bit weird.

あれ、ちょっと変な感じですね。

Bring that up.

これを表示させます。

Let's clear that.

クリアしましょう。

Oh, we're getting errors already.

あ、もうエラーが出てる。

So pip install, streamlit.

pip install, streamlit.

We also need lane chain.

レーンチェーンも必要です。

The man of the hour.

時の人。

We also need OpenAI, Wikipedia, chroma, db and we also need tick token.

OpenAI、Wikipedia、chroma、db、tick tokenも必要です。

So six different services that we're installing.

つまり、6種類のサービスをインストールすることになります。

So pip install, streamlit, lane chain, OpenAI, Wikipedia, chroma, db and tick token.

pip install, streamlit, lane chain, OpenAI, Wikipedia, chroma, db and tick token.

If we go and run that, that is all of our set of services now installed.

これを実行すると、これですべてのサービスがインストールされました。

Now what we wanna do is we actually wanna bring some of those in.

さて、次は実際にこれらのサービスを導入してみましょう。

So we're gonna import streamlit as st.

Streamlitをstとしてインポートします。

Streamlit is gonna be our application framework that allows us to work with our different services.

Streamlitはアプリケーションフレームワークとなり、さまざまなサービスと連携することができます。

So bring in depths.

では、Depthsを取り込みます。

I'm just gonna separate these out a little bit and then what we wanna do is bring in the OpenAI server.

これを少し分けて、OpenAIサーバを取り込みます。

So we're gonna go from lanechain.llms.

Lanechain.llmsから始めます。

We're going to import OpenAI.

OpenAIをインポートします。

So this is gonna give us the OpenAI service to be able to leverage a large language model.

これで、大規模な言語モデルを活用するためのOpenAIサービスを利用できるようになります。

The next thing that we probably wanna do is start setting up a little bit of our app so we can see what it's gonna look like.

次にやりたいことは、アプリを少しセットアップして、どんな風に見えるかを確認することでしょう。

So first up, we'll create a title.

まず最初に、タイトルを作成します。

So st.title and we are gonna grab some emojis from the lanechain documentation.

st.titleで、lanechainのドキュメントから絵文字をいくつか取ってきます。

And we're gonna say that this is gonna be equal to, instead of a set of strings, YouTube GPT creator.

そして、これは文字列のセットではなく、YouTube GPT creatorと同じになるようにします。

You can probably think of a better title than me.

私より良いタイトルが思いつくでしょう。

We're then going to create a place that we can pass through a prompt to our LLM.

次に、LLMにプロンプトを渡すための場所を作成します。

So to do that, we're going to create a new variable called prompt and we're gonna set that equal to st.textInput.

そのために、promptという新しい変数を作り、st.textInputと等しい値に設定します。

And here we're just gonna include a label.

そして、ここではラベルを含めることにします。

So plug in your prompt.

プロンプトを挿入してください。

Okay, so this is our app framework.

さて、これでアプリのフレームワークができました。

Now, what we should probably do is let's start up our app.

では、アプリを起動してみましょう。

So I'm just gonna clear this.

これをクリアします。

So to start up our app, we can run streamlit run app.py.

アプリを起動するには、streamlit run app.pyを実行してください。

Okay, that is our application.

これが私たちのアプリケーションです。

Looks like it's running, beautiful.

実行されているようで、きれいですね。

So you can see that we've got our title there and we've got our label that allows us to plug in our prompt.

タイトルが表示され、プロンプトを表示するためのラベルが表示されているのがわかります。

Let's move that.

これを動かしてみましょう。

And so if I wanted to, I could pass through a prompt here and say, what is the fastest car in the world?

ここでプロンプトを表示させて、「世界で一番速い車は何ですか?

Right now, it's not gonna do anything because we don't have this hooked up to our LLM.

今はまだ、LLMに接続されていないので、何もできませんが。

So let's go on ahead and now hook it up.

では、さっそく接続してみましょう。

So to do that, what we need to do is we need to create an instance of our OpenAI service.

そのために必要なのは、OpenAIサービスのインスタンスを作成することです。

So let's do that.

では、そうしましょう。

So LLMs.

LLMを作成します。

So we're gonna create a new variable called LLM and set that equal to OpenAI.

LLMという新しい変数を作り、OpenAIと同じ値に設定します。

And to that, we need to pass through a temperature value or keyword argument.

そして、これに温度値やキーワードの引数を渡す必要があります。

And this is gonna dictate how creative or not creative our large language model is gonna be.

これにより、大規模な言語モデルがどれだけ創造的か、創造的でないかを決定することになります。

So we've just created a new instance of that OpenAI service.

OpenAIサービスの新しいインスタンスを作成したところです。

Then we want a way to go and trigger our prompt to our LLM.

次に、LLMにプロンプトをトリガーする方法が必要です。

So we can say if prompt, then what we're gonna do is create a new variable for our response.

プロンプトが表示されたら、応答用の新しい変数を作成することになります。

And we're gonna actually pass through this prompt to this LLM.

そして、このプロンプトを実際にLLMに渡すことになります。

So we're gonna say LLM and then pass through our prompt.

つまり、LLMと言いながら、プロンプトを通過させるのです。

And then we actually need a way to render this back to the screen.

そして、実際にこれを画面にレンダリングする方法が必要です。

So I can do st or write st.write and pass through our response there.

そこで、stまたはst.writeを実行し、そこでレスポンスを渡すことができます。

So this is gonna actually show stuff to the screen if there's a prompt.

これで、プロンプトがあれば、実際に画面に表示されることになります。

Right, so now we can go back to our app.

さて、それではアプリに戻りましょう。

Let's rerun it.

再実行しましょう。

Right now we don't have a prompt.

今はプロンプトが表示されていません。

So nothing's gonna run to the screen.

だから、画面には何も表示されません。

But I could say, what is the fastest car in the world?

しかし、「世界で一番速い車は何ですか」と言うことはできます。

And this should theoretically go to our OpenAPI service.

これは理論上、OpenAPIサービスに送られるはずです。

And take a look, we've got our response.

そして、見てください、応答が返ってきました。

So the fastest car in the world is the Bugatti Chiron Supersport 300 plus with a top speed of 304 miles per hour.

世界最速の車は、ブガッティ・シロン・スーパースポーツ300プラスで、最高速度は時速304マイルです。

We could also say, write me a YouTube video title about deep learning.

また、ディープラーニングに関するYouTube動画のタイトルを書いてくださいということもできます。

All things holding equal, take a look.

万事休す、見てみてください。

Deep learning fundamentals, a crash course.

ディープラーニングの基礎知識、クラッシュコースです。

Let me know if you wanna see a video on that.

そのビデオを見たいなら、教えてください。

Regardless, let's jump back onto our app.

ともあれ、アプリの話に戻りましょう。

So right now, we've had to go and write out this entire prompt.

今、私たちはこのプロンプト全体を書き出す必要がありました。

We don't wanna have to go and do that.

このようなことは避けたいものです。

Specifically, if we want a user directed type application.

特に、ユーザーが直接操作するタイプのアプリケーションを作りたい場合。

We ideally would want them to just pass through a topic and have our application drive what prompts should be written out based on that.

理想的には、ユーザーがトピックを通過するだけで、それに基づいてプロンプトを書き出すようなアプリケーションを作りたいものです。

This is where prompt templates come in.

そこで登場するのが、プロンプトテンプレートです。

So we're gonna jump into our app and we're gonna bring in a prompt template.

そこで、アプリに飛び込んで、プロンプト・テンプレートを持ち込むことにします。

So from langchain.prompts, we are going to import prompt template.

langchain.promptsから、プロンプト・テンプレートをインポートすることにします。

And we're also gonna import a LLM chain as well.

そして、LLMチェーンも同様にインポートすることにします。

So from langchain, so our langchain chain is going to allow us to run our topic through our prompt template and then go and generate output.

Langchainから、Langchainチェーンによって、トピックをプロンプト・テンプレートで実行し、出力を生成することができます。

So we're gonna say from langchain.chains import LLM.

だから、langchain.chainsからLLMをインポートするとします。

No, don't need you Siri, LLM chain.

いや、Siriは必要ない、LLMチェーンだ。

Okay, cool.

オーケー、クールだ。

So that is that now imported.

これで、インポートされたことになります。

So we've gone and written these two lines here.

この2行を書きました。

So then what we wanna do is we wanna create a prompt template and our prompt template is purely gonna take in our topic and it's gonna write us a prompt that almost says write me a YouTube video title and then it's gonna plug in that variable there.

それでは、プロンプトテンプレートを作成したいと思います。このプロンプトテンプレートは、トピックを受け取り、YouTubeのビデオタイトルを作成するように求めるプロンプトを書き、そこに変数を挿入します。

So we don't necessarily need our user to go and write this entire thing going forward.

ですから、この先、必ずしもユーザーが全部書く必要はありません。

So let's go on ahead and create a prompt template.

それでは、プロンプト・テンプレートを作成しましょう。

So we're gonna create a new variable called title template.

タイトルテンプレートという新しい変数を作成します。

I'm gonna say set that equal to prompt template.

この変数にプロンプト・テンプレートと同じ値を設定します。

Then what we need to do is dictate a input variable.

次に必要なのは、入力変数を指示することです。

So our input variable is gonna be equal to a topic.

入力変数には、トピックを指定します。

And we also want to create a template here.

そして、ここにテンプレートを作成します。

So the template is gonna be effectively just a string that we can pass a variable into, almost like string formatting.

テンプレートは、文字列のフォーマットと同じように、変数を渡すことができる文字列です。

So this is gonna be write me, let's actually just grab what we wrote out here.

ここで書いたものをそのまま使ってみましょう。

So let's copy this and plug it in here.

これをコピーして、ここに差し込んでみましょう。

So write me a YouTube video title about, and then we wanna pass through our variable.

YouTubeのビデオのタイトルを書いて、それを変数に渡します。

So we can pass through our topic variable here.

ここでトピック変数を通過させることができます。

This means that when we go and use this prompt template, we only pass through a topic and it is going to prompt format it to that over there with our topic down here.

これは、このプロンプトテンプレートを使用する場合、トピックを渡すだけで、それをここにあるトピックと共にフォーマットするようにプロンプトします。

Now to use this, we're actually gonna use a LLM chain.

さて、これを使うには、実際にLLMチェーンを使用することになります。

So rather than just using the raw LLM, we're actually gonna chain it together.

つまり、生のLLMをただ使うのではなく、実際にチェーンで繋いでいくのです。

So let's create a bit of a comment over here.

では、ここにちょっとしたコメントを作ってみましょう。

So these are gonna be our prompt templates.

これがプロンプトのテンプレートになります。

And then we're gonna create our LLM chain.

そして、LLMのチェーンを作成します。

Actually, this is gonna be our title chain.

実はこれがタイトルチェーンになります。

And we're gonna set that equal to LLM chain, LLM chain.

そして、これをLLMチェーン、LLMチェーンと同じに設定します。

And then to that, what we need to do is we need to pass through our LLM and set that to equal to this LLM.

そして、LLMを通過させて、このLLMと等しい値に設定する必要があります。

So this is being passed through to our LLM chain.

つまり、これはLLMチェーンに渡されるのです。

Then what we wanna do is we wanna set our prompt.

次に、プロンプトを設定します。

So we can say prompt is equal to our title template.

プロンプトはタイトルテンプレートに等しいと言えます。

And then what we can do is rather than running the LLM directly down here, we'll actually grab our title chain and we'll do or pass through, use the run method based on that prompt.

そして、LLMを直接ここで実行する代わりに、タイトルチェーンを取得し、そのプロンプトに基づいてrunメソッドを使用するか、パススルーすることができます。

So what we should effectively get is our prompt topic here.

そうすると、プロンプトのトピックがここに表示されます。

So really what we're doing is we're setting our topic equal to the prompt that we're getting from over here.

つまり、トピックをプロンプトと同じに設定しているのです。

Now, if we go and run this, we should effectively prompt format our topic into this specific prompt.

さて、これを実行すると、トピックがこの特定のプロンプトに効果的にフォーマットされるはずです。

So it should actually be running, write me a YouTube video title about a specific topic.

つまり、「特定のトピックに関するYouTubeビデオのタイトルを書いてください」と実行されるはずです。

I'm gonna move this over to the side because we do get, we can actually set verbose equal to true in here, verbose equal to true.

verboseをtrueに設定することができますので、これを横に移動します。

And you actually see the run chain as it's actually going through and running this.

そして、実際に実行されながら、ランチェーンが表示されます。

So let me zoom out of this so you can see it a little bit better.

もう少しよく見えるように、ズームアウトしてみましょう。

So let's actually go on ahead and bring this over to this side.

では、実際に先に進んで、これをこちら側に持ってきてみましょう。

So now if we get rid of that and just change it to just our topic or deep learning, when we go and run this now, we should effectively see the chain run.

このトピックを削除して、ディープラーニングのトピックだけに変更すれば、今これを実行すると、チェーンが効果的に実行されるのがわかるはずです。

So let's go and refresh, we've got an error, key error, input variables.

リフレッシュしてみると、エラーが出ています。

What has happened there?

何が起こったのでしょうか?

It's probably input variables.

おそらく入力変数でしょう。

Change that over there.

そこを変えてみてください。

Let's go and rerun this.

再実行しましょう。

That looks like it's running successfully.

正常に実行されているように見えます。

So you can see down there, I don't know if you can see it's a little bit small, but you can see it's actually entering a new LLM chain.

下の方に、ちょっと小さいですが、新しいLLMチェーンが入力されているのがわかると思います。

And you can see that this is the prompt after formatting.

そして、これがフォーマット後のプロンプトであることがお分かりいただけると思います。

So write me a YouTube video title about deep learning.

ディープラーニングに関するYouTubeビデオのタイトルを書いてください。

So it's actually gone and prompt format it.

このように、実際にプロンプトが表示され、フォーマットされました。

It's taken our raw topic and passed it through to our prompt template.

このように、生のトピックをプロンプトテンプレートに渡しています。

This is the advantage of using prompt templates because they simplify stuff an absolute ton.

このように、プロンプト・テンプレートを使うことで、非常にシンプルになります。

But for now, we've only got a prompt title or a YouTube title being generated.

しかし、今はまだプロンプトのタイトルとYouTubeのタイトルしか生成されていません。

We want a script as well.

スクリプトも必要です。

It doesn't just stop there.

これだけでは終わりません。

We want to take this a little bit further.

もう一歩踏み込みたい。

Well, this is where chains come truly in handy.

そこで便利なのがチェーンです。

So right now we're just using a single chain.

今、私たちは1つのチェーンを使用しているだけです。

We're using an LLM chain.

LLMチェーンを使っているのです。

Well, what we can actually do is we can chain a bunch of these together.

しかし、実際にできることは、このようなチェーンをいくつもつなげることです。

So we can sequentially bring them together to be able to do a bunch of stuff.

つまり、これらを順次組み合わせて、さまざまなことができるようになるのです。

So from our LLM chain module over here, we're also going to import simple sequential chain.

そこで、LLMチェーン・モジュールから、シンプルなシーケンシャル・チェーンをインポートすることにしました。

And this is going to allow us to stack a bunch of these together to be able to generate multiple outputs.

これを使えば、複数の出力を生成するために、これらを積み重ねることができるようになります。

But we'll come back to that in a second, multiple outputs, important to note.

でも、これについてはまた後ほど説明します。

So we're actually going to create another prompt template.

では、実際に別のプロンプト・テンプレートを作成します。

And this next prompt template is all going to be to do with actually generating a YouTube script, not just a title.

次のプロンプトテンプレートは、タイトルだけでなく、YouTubeスクリプトを実際に生成するためのものです。

So we'll copy this template that we've got over here, which is currently title template.

このテンプレートをコピーして、タイトルテンプレートにします。

And we're going to convert this to script template.

このテンプレートをスクリプトテンプレートに変換します。

The input to our script template is going to be our YouTube title.

スクリプトテンプレートの入力は、YouTubeのタイトルになります。

So our input variable over here is actually going to be our title.

つまり、入力変数にはタイトルが入ります。

Zoom out, it's a little bit too zoomed in for me.

ズームアウトしてください、ちょっと拡大しすぎですね。

And then our template is going to be, write me a YouTube video script based on this title.

そして、テンプレートは、このタイトルに基づいてYouTubeビデオのスクリプトを作成する、というものです。

And we'll say title.

タイトルを入力します。

And then we're actually going to pass through this title variable into our prompt template.

そして、このtitle変数をプロンプトテンプレートに渡します。

Do you see how these prompt templates can really come in handy?

プロンプト・テンプレートがいかに便利か、おわかりいただけたでしょうか。

Because it means that you've already got the prompt kind of formatted.

なぜなら、プロンプトの書式がすでに決まっているからです。

You just need to pass through the context specific variables.

あとは、文脈に応じた変数を渡すだけです。

Makes your life a ton easier, particularly when you've got to work with a bunch of documents, which we'll come to later on.

特に、後で説明するように、たくさんのドキュメントを扱う必要がある場合、作業が非常に楽になります。

Okay, so that is our script template now done.

さて、これでスクリプトのテンプレートは完成しました。

Now, what we need to do is we need to create another chain, but this chain is going to be for our script chain.

さて、次は別のチェーンを作成する必要がありますが、このチェーンはスクリプトチェーン用にします。

So we're going to copy our title chain down here, and we're going to create or convert this to be a script chain.

タイトルチェーンをここにコピーして、これをスクリプトチェーンに作成または変換します。

How are we doing for time?

時間はどうなっているのでしょうか?

Four minutes left.

あと4分です。

Oh, wow, we're not going to make this.

ああ、すごい、これは作れないね。

To our script chain, we're going to grab our script template, and we're going to set that as our prompt down here.

スクリプト・チェーンに、スクリプト・テンプレートを取り込み、それをプロンプトとして設定します。

So you can see that we've now got two chains.

これで2つのチェーンができたことがわかります。

So we've actually got two templates.

テンプレートも2つあります。

So we've got a title champ.

タイトルチャンプを用意しました。

So we've got a title template, and we've got a script template, and we've now got a title chain and a script chain.

タイトルテンプレートとスクリプトテンプレートがあり、これでタイトルチェーンとスクリプトチェーンができました。

Now we need some way to join these chains together, because right now they're just operating independently.

この2つのチェーンは、それぞれ独立して動作しています。

One is not going to interact with the other.

一方が他方と相互作用することはありません。

This is where that simple sequential chain comes in that we brought in up here.

そこで、先ほど紹介したシンプルなシーケンシャル・チェーンの出番です。

So we're going to copy that over, and we're going to create a new instance of our sequential chain.

そこで、これをコピーして、シーケンシャル・チェーンの新しいインスタンスを作成します。

So I'm going to say sequential chain and set that equal to simple sequential chain.

そこで、シーケンシャル・チェーンと言い、シンプル・シーケンシャル・チェーンと同じに設定します。

There's one positional argument that we need to set to our simple sequential chain, and that is the chains positional argument.

単純なシーケンシャル・チェーンに設定する位置引数が1つあり、それがchains位置引数です。

And that is just a list of all of these sequential chains.

これは、すべてのシーケンシャル・チェーンのリストです。

Order is really important here.

ここでは、順序がとても重要です。

So we're going to basically specify that run this chain first, then run the next chain, or run a specific LLM chain first, then run the next chain.

つまり、最初にこのチェーンを実行し、次に次のチェーンを実行する、あるいは特定のLLMチェーンを最初に実行し、次に次のチェーンを実行するというように、基本的に指定することになります。

So the first chain that we want to run is our title chain, which is going to generate our video title.

まず最初に実行するのはタイトルチェーンで、ビデオのタイトルを生成します。

And then the output of our title chain is going to get passed to our script chain.

そして、タイトルチェーンの出力はスクリプトチェーンに渡されます。

It's a simple sequential chain.

単純なシーケンシャル・チェーンです。

One output goes to the next chain.

1つの出力が次のチェーンに渡されます。

Now we can make this a little bit more sophisticated, which we'll do in a sec, but I'll come back to that and I'll show you why that's important.

しかし、もう少し洗練されたものにすることも可能で、それは後ほど説明します。

So to our chains, we're then going to grab our script chain, and that's going to be the second one.

チェーンにスクリプトチェーンを追加し、2つ目のチェーンにします。

And we're also going to specify verbose equal true.

そして、verboseをtrueに指定します。

So you can see that what we've gone and done now is now we've got two templates, we've got two chains, and we've also got a simple sequential chain that chains them all together.

これで、2つのテンプレート、2つのチェーンができました。また、それらをすべてまとめる単純な順序チェーンもあります。

Wow, how many times have I said chain?

うわー、何回チェーンって言ったんだろう?

So let's grab this sequential chain, and then we are going to run sequential chain.run, and we're going to be passing through our topic to that sequential chain.

では、この順序チェーンを取得し、sequential chain.runを実行し、トピックをその順序チェーンに渡します。

So this should effectively now run the title chain, generate the output, then pass the title to the script chain and generate the script.

これで、タイトルチェーンが実行され、出力が生成され、タイトルをスクリプトチェーンに渡してスクリプトが生成されるはずです。

So let's make sure we can see the terminal because this is going to get interesting.

では、これから面白くなりそうなので、ターミナルを表示できるようにしておきましょう。

So if we now go and refresh our app, it should go and automatically run the chain.

アプリを更新すると、自動的にこのチェーンが実行されるはずです。

That's the first one, write me a YouTube video title about deep learning, and then all things holding equal.

これが最初のもので、ディープラーニングに関するYouTubeビデオのタイトルを書いてくれ、そして万事休す。

Have we saved this?

これは保存されましたか?

We have not saved it, let's save it.

保存していません。保存しましょう。

All right, let's open up our terminal again.

よし、もう一度ターミナルを開いてみよう。

Let's rerun.

再実行しましょう。

Missing some keys, input.

キーがない、入力がない

Oh no, we've got an error.

いやはや、エラーが出てしまいました。

If you're enjoying this video and you'd like to learn a little bit more about Python for machine learning, deep learning, and data science, head on over to go.coursesfromnick.com forward slash python where you can take my entire tech fundamentals course from scratch for free.

もしこのビデオがお気に入りで、Pythonを機械学習、ディープラーニング、データサイエンスに使用する方法についてもう少し学びたいと思うなら、go.coursesfromnick.com forward slash pythonにアクセスして、私のテック基礎コースを無料で始めてみてください。

It takes you completely from the ground up and gets you started and ready for machine learning, deep learning, and data science.

このコースでは、機械学習、深層学習、データサイエンスに必要な知識を一から学べるようになっています。

Back to the video.

ビデオに戻ります。

My bad, I realized I don't need Topic over here.

申し訳ありません、トピックは必要ないと気づきました。

Let's get rid of that.

それを取り除きましょう。

Beautiful.

美しい。

Let's jump back over to our app.

アプリに戻りましょう。

Let's rerun.

再実行しましょう。

Open up the terminal.

ターミナルを開きましょう。

Take a look.

見てみてください。

It's obviously going to take a while because it's actually generating now.

今、実際に生成しているので、明らかに時間がかかりそうです。

And take a look.

そして、見てください。

So it's actually going to run our sequential chain.

実際にシーケンシャル・チェーンが実行されます。

So you can see the first chain that it's going to run is generating the title.

最初に実行されるチェーンはタイトルの生成であることがわかります。

And that's a title.

これはタイトルです。

And then that title is going to be passed through to our next chain.

そして、そのタイトルは次のチェーンに渡されます。

So if we now go and take a look, so this is our script, which is actually going to be run based on deep learning.

このスクリプトは、ディープラーニングに基づいて実行されます。

How awesome is that?

なんて素晴らしいんでしょう。

Now, take a look, right?

さて、見てみましょう。

So this is only outputting the script itself.

これはスクリプトそのものを出力しているに過ぎません。

It's not actually outputting the title.

タイトルを出力しているわけではありません。

So this is where the simple sequential chain kind of fails a little bit because it's only going to output.

出力するだけなので、単純なシーケンシャル・チェーンが少し失敗しているところです。

Let's minimize that terminal.

その端末を最小化しましょう。

It's only going to output the last output of the sequential chain.

出力されるのは、シーケンシャル・チェーンの最後の出力だけです。

If we wanted to go and generate or grab multiple outputs, then it gets a little bit trickier.

もし、複数の出力を生成したり、取得したりしたいのであれば、少し厄介になります。

So we're out of time anyway, but I wanted to keep taking this further and show you just how powerful this is.

いずれにしても時間切れですが、このままさらに進めて、これがどれほど強力なものかをお見せしたいと思います。

So you saw that we use the simple sequential chain, but keep in mind that this will only output the last output.

単純なシーケンシャル・チェーンを使っていますが、これは最後の出力だけを出力することに留意してください。

What we can do is we can actually sub this out for sequential chain, which is going to allow us to get multiple sets of outputs.

これを逐次連鎖に置き換えると、複数の出力セットを得ることができるようになります。

What we do need to do though, is we need to specify output keys from each of our different title chains and script chains.

ただし、タイトルチェーンとスクリプトチェーンのそれぞれから出力キーを指定する必要があります。

So what we can say is that our title chain is going to output, or the output key is going to be the title.

つまり、タイトルチェーンが出力する、あるいは出力キーがタイトルになる、ということです。

So we're just going to update that chain.

だから、そのチェーンを更新するだけです。

And we also need to update our script chain.

そして、スクリプト・チェーンも更新する必要があります。

So the output key there is going to be the script.

こちらは出力キーがscriptになります。

What we can then do is swap out our sequential or simple sequential chain for our sequential chain.

次に、シーケンシャル・チェーンとシンプル・シーケンシャル・チェーンを入れ替えることができます。

And then we're going to specify that our input keys or our input variables to our sequential chain are going to be purely the topic.

そして、シーケンシャル・チェーンへの入力キーや入力変数を、純粋にトピックに指定します。

Let me word wrap this so you can see it a little bit better.

もう少し見やすくするために、言葉で説明します。

So the input is going to be the topic and our output variables are going to be multiple output variables.

つまり、入力はトピックで、出力変数は複数の出力変数になります。

So what we're going to be doing is we're going to be outputting our title and we're going to be outputting our script.

つまり、これから行うのは、タイトルを出力し、スクリプトを出力することです。

So this should allow us to grab multiple outputs from our sequential chain rather than just getting the single one.

これで、シーケンシャル・チェーンから1つの出力だけでなく、複数の出力を取得することができるようになります。

This is where I find the API a little bit weird because you can't just use run here.

ここで、APIがちょっと変だと思うのは、ここで単にrunを使うことができないことです。

You actually need to go and use a or pass through a dictionary and our dictionary is going to take in topic as a key as well as our prompt.

実際にはaを使うか、辞書を通す必要があります。この辞書には、キーとしてtopic、そしてプロンプトが入ります。

So there's is a little bit of nuance when it comes to using each of the different types of chains.

このように、さまざまなタイプのチェーンを使い分けるには、ちょっとしたニュアンスが必要なのです。

So now what we're going to be doing is we should effectively be able to get our title out as well as our script.

これで、タイトルとスクリプトを効果的に表示することができるようになりました。

Now, what we need to do though is when we go and write it to be able to grab each one of these keys from our response variable, what we're going to do is we're going to grab our title and we'll also write out our script.

ただし、これからレスポンス変数の各キーを取得できるようにするために、タイトルを取得し、スクリプトも書き出します。

So this should allow us to access both of those variables separately.

これで、両方の変数に別々にアクセスできるようになるはずです。

So we're going to grab the title and the script separately over there.

そこで、タイトルとスクリプトを別々に取得することにします。

So you should be able to see that there.

そうすると、このように表示されるはずです。

Okay, what we now need to do, just make sure our code is saved.

さて、あとはコードが保存されていることを確認するだけです。

Let's jump back into our application, throw the terminal on this side so we can see it and let's rerun.

アプリケーションに戻り、こちら側にターミナルを投げて見えるようにし、再実行しましょう。

You can see we've got our prompt formatting happening down there.

プロンプトの書式設定が行われているのがわかると思います。

So Beginner's Guide to Deep Learning and Introduction to Neural Networks.

ディープラーニング入門」と「ニューラルネットワーク入門」ですね。

Then all things holding equal should write out our title as well as our script.

次に、タイトルとスクリプトを書き出します。

Take a look, there is our title.

見てください、これが私たちのタイトルです。

So Beginner's Guide to Deep Learning, Introduction to Neural Networks and then right down here, we've got our script separately.

ディープラーニング入門、ニューラルネットワーク入門、そしてこの下にスクリプトがあります。

So now you're able to get multiple different sets of outputs.

これで、複数の異なる出力セットを得ることができるようになりました。

Now a big part of what makes ChatJPT cool is its ability to incorporate memory.

ChatJPTがクールなのは、記憶を取り入れることができる点です。

It knows what's happened previously.

過去に何が起こったかを知ることができるのです。

So far we haven't brought in memory into our lane chain app, but let's do that.

これまでのところ、レーンチェーンアプリにメモリを組み込んでいませんでしたが、それをやってみましょう。

Now, in order to add memory to our application, we're going to access another lane chain cloud.

さて、アプリケーションにメモリを追加するために、別のレーンチェーンクラウドにアクセスすることにします。

So from a lane chain.memory, we are going to be importing conversation buffer memory, which is over there.

つまり、lane chain.memoryから、向こう側にある会話バッファのメモリをインポートすることになります。

What we then need to do is create an instance of this.

そして、このインスタンスを作成する必要があります。

Now we're going to be using the memory class, but we're not actually going to be using it for prompting.

さて、これからmemoryクラスを使いますが、実際にはプロンプティングに使うわけではありません。

We're purely going to be using it for storing the history.

純粋に履歴を保存するために使うのです。

If you're building a chat-based application, this would come in handy a ton.

チャットベースのアプリケーションを作成する場合、これは非常に便利なものです。

So we can create a new variable called memory and set that equal to conversation buffer memory.

そこで、memoryという新しい変数を作成し、これを会話バッファのメモリと等しく設定します。

And then we need to go and set two values.

そして、2つの値を設定する必要があります。

We're going to set our input key and we're also going to store our memory key.

入力キーを設定し、メモリキーを保存します。

So our input key is going to be equal to our topic.

入力キーはトピックと同じにします。

And this is going to be deep learning at the moment.

そして、これは現時点ではディープラーニングになる予定です。

And our memory key will be our chat history.

そしてメモリーキーはチャット履歴になります。

Now, what we can do is pass this memory value or memory class to both of our LLM chains.

さて、このメモリ値やメモリクラスをLLMチェーンの両方に渡すことができます。

We're going to break this out once we go and start adding some tools.

このあたりは、ツールを追加していく中で明らかにしていく予定です。

So stay tuned for that.

楽しみにしていてください。

Then we're going to add that to our script chain as well.

次に、それをスクリプト・チェーンに追加します。

And then what we actually want to do is we want to render this back to the screen so we can actually see our memory.

そして、実際にやりたいことは、これをスクリーンにレンダリングして、メモリを実際に確認することです。

So right down here under our prompt, where we've been doing both of our writes, we're going to use a streamlit expander.

そこで、プロンプトのすぐ下にある、書き込みを行った場所に、Streamlitエクスパンダを使用します。

So we'll say with st.expander and then the title for our expander will be message history.

st.expanderとし、expanderのタイトルをメッセージ履歴とします。

And what we'll do is we'll put in an info box.

そして、情報ボックスを設置します。

So st.info and we're going to pass through our memory dot buffer value.

st.infoとし、メモリドットバッファの値を渡します。

So now if we go and rerun, we should get an expander which is almost like an accordion.

これで再実行すると、アコーディオンのようなエクスパンダが表示されるはずです。

And then inside of that, we're going to get an info box which stores our memory which is coming from each of our chains.

そしてその中に、それぞれのチェーンから送られてくるメモリを格納する情報ボックスができます。

So we've created our buffer and we've passed it to our chains and we're now writing it out to our expander.

バッファを作成し、それをチェーンに渡して、エキスパンダーに書き出しました。

So if we now go and refresh our app.

では、アプリを更新してみましょう。

So right now there's nothing below.

今、下には何もない状態です。

If we go and rerun it, just by hitting R on the keyboard.

キーボードのRを押して再実行します。

We scroll on down, take a look.

下にスクロールして見てください。

We've now got our message history.

メッセージの履歴が表示されました。

So if we go and open that up, you can see that we've now got our output.

これを開くと、出力が表示されているのがわかると思います。

Now this is the one thing that I don't necessarily like about it.

ただ、これは私が必ずしも好きではない点です。

So right now, because I'm maybe using the incorrect class or a class that maybe is not ideal for sequential classes, you can see that our input right over here is deep learning and that AI is outputting in the title.

現在のところ、私はおそらく順序付けられたクラスに最適でないクラスを使用しているため、ここでの入力はディープラーニングであり、AIはタイトルに出力しています。

If anyone knows how to do this a little bit better, let me know in the description below.

もしどなたか、これをもう少しうまくやる方法をご存じでしたら、下の説明文に書いて教えてください。

Because right over here, you can see that it's taking the topic again and we're outputting AI.

というのも、こちらの右側では、またトピックを取っていて、AIを出力しているのがわかります。

There might be a way to output the title, but we're going to break this out in terms of two separate classes.

タイトルを出力する方法もあるかもしれませんが、2つの別々のクラスという観点で、これを分割することにします。

So you'll be able to see that once we get onto tools.

ツールに入れば、それがわかると思います。

Now there's one thing that makes LangChain really, really interesting.

さて、LangChainが本当に面白いのは、1つだけあります。

It's ability to leverage tools.

それは、ツールを活用する能力です。

All right, so the next thing that we need to do is add some tools.

さて、次に必要なのはツールを追加することです。

So we're on the home stretch, so stick with me here.

これからが本番です、お付き合いください。

So we're going to take this step-by-step.

では、順を追って説明します。

First thing that we need to do is go to langchain.utils.

まず最初に、langchain.utilsに行く必要があります。

Wow, that was hard for me to type.

わあ、入力しにくかった。

LangChain utilities, oh wow.

LangChainユーティリティ、すごいな。

We're going to import the Wikipedia API wrapper.

Wikipedia API wrapperをインポートします。

Perfect, so this is going to allow us to make API calls to the Wikipedia API.

これでWikipedia APIへのAPIコールができるようになります。

What we then need to do is we need to update our prompt template.

次に必要なのは、プロンプト・テンプレートを更新することです。

So our prompt template is no longer only going to take in a title.

プロンプト・テンプレートは、もはやタイトルだけを取り込むのではありません。

We're going to take in some Wikipedia research as well.

Wikipediaの調査結果も取り込むことになります。

So what we'll be able to do is we'll be able to prompt with Wikipedia as a backup.

つまり、Wikipediaをバックアップとしてプロンプトを表示することができるようになります。

So right now our current prompt is saying, write me a YouTube video script based on the title.

今、私たちが使っているプロンプトは、「タイトルに基づいてYouTubeビデオのスクリプトを書いてください」というものです。

But what we could also do is say, but also while leveraging this Wikipedia research.

しかし、ウィキペディアのリサーチを活用しながら、こう言うこともできるのです。

Wikipedia research.

ウィキペディアの研究。

And we could pass through that variable.

そして、その変数を通過させることができます。

So we could say Wikipedia research over here.

つまり、「Wikipediaリサーチ」と言えばいいのです。

Copy that, paste that into there.

それをコピーして、そこにペーストします。

Beautiful, so we've now gone and brought in our Wikipedia API wrapper.

これでWikipedia APIラッパーを導入することができました。

We've now gone and updated our prompt.

プロンプトも更新されました。

The next thing that we need to do is we need to break out our memory.

次に必要なのは、メモリを取り出すことです。

So we're actually going to have a title memory.

タイトルのメモリーを用意します。

And we'll also, I don't like WordRap at the moment.

また、WordRapはいまのところ好きではありません。

Let me zoom out a little bit.

少しズームアウトしてみます。

So we'll have a title memory and we're also going to have script memory.

タイトルメモリと、スクリプトメモリがあります。

And our input key for our script memory is going to be our title, which is going to come out of there.

スクリプトメモリの入力キーは、タイトルになります。

And our input key for our title is going to be our topic.

そして、タイトルの入力キーは、トピックになります。

Okay, cool.

なるほど、なるほど。

So what we can then do is we need to update each one of these.

では、次に各項目を更新します。

So our title memory is going to go, my head is probably covering that.

タイトルのメモリは、おそらく私の頭がそれを覆っているのでしょう。

Let me make sure, let's bring this up a bit.

念のため、もう少し上に持ってきてみましょう。

Our title memory is going to go to our title chain.

タイトル・メモリはタイトル・チェーンに移動します。

All this code is going to be available via GitHub as well guys.

このコードはすべてGitHubで公開されます。

So let me just, we probably should put WordRap.

だから、WordRapと書いておくことにしよう。

And our script memory is going to go to our script chain.

そしてスクリプト・メモリはスクリプト・チェインに移動します。

So that's looking good.

これで、いい感じです。

And then what we actually need to do is we actually need to get rid of our sequential chain.

そして、実際に必要なのは、シーケンシャル・チェーンを取り除くことです。

I know it's served us well, but we're done with it now.

今までよく働いてくれたけど、もういいや。

So that means that we've now got two LLM chains that are running independently.

つまり、2つのLLMチェーンが独立して稼働していることになります。

The next thing that we need to do is bring in our Wikipedia API wrapper, create a new instance of that.

次に必要なのは、Wikipedia APIラッパーを導入して、その新しいインスタンスを作成することです。

So I'm going to call it Wiki.

Wikiと呼ぶことにします。

And what's going to happen now is we pass through our topic to our title chain.

そして、トピックをタイトルチェーンに渡します。

It'll generate a title.

タイトルが生成されます。

We'll then take that title and the Wikipedia research and we're going to pass it through to our script chain.

そして、そのタイトルとWikipediaの調査結果をスクリプトチェーンに渡します。

So what we're going to do now is we're no longer actually going to run the sequential chain.

つまり、これから行うのは、実際にシーケンシャル・チェーンを実行することではありません。

We're going to be running three separate calls.

3つの別々の呼び出しを実行することになります。

So our title is now going to go back to our title chain.

つまり、タイトルはタイトルチェーンに戻ることになります。

And that is going to take in our topic, which is going to be equal to our prompt.

そして、トピックを受け取り、プロンプトと同じ値にします。

And then we'll pass our title to our, what we'll actually do is we'll do our Wikipedia research and that's going to use the Wikipedia API wrapper.

そしてタイトルをWikipediaに渡しますが、Wikipedia APIラッパーを使用します。

So what we'll do is we'll pass our prompt to that as well.

そこで、プロンプトも同様に渡します。

And then the last thing that we want to do is generate our script.

そして最後に、スクリプトを生成します。

And our script is going to take in two inputs now.

このスクリプトは2つの入力を受け取ります。

So script chain, a script chain is going to take in, remember right up here, it's going to take in a title and the Wikipedia research.

スクリプト・チェーンは、タイトルとウィキペディアの調査結果を入力します。

So the title is going to come from up there.

つまり、タイトルはあそこから入ってきます。

So title will be equal to title and our Wikipedia research.

つまり、タイトルはタイトルとウィキペディアで調べたものと同じになります。

What's the key code?

キーコードは何ですか?

It should be full, the full value of Wikipedia research.

ウィキペディアの調査結果をフルに反映させる必要があります。

So it should look like that.

つまり、このようになります。

So now we'll get our title, we'll get our Wiki research and we'll get our script.

これで、タイトルとWikiリサーチ、そしてスクリプトを取得することができました。

We also need to update our buffer because we've got two memory buffers now.

また、バッファを更新する必要があります。メモリバッファが2つになったからです。

So let's create another expander.

そこで、もう1つのエキスパンダーを作成しましょう。

So we're going to have the title history and that's going to come from the title memory buffer.

タイトルの履歴はタイトルメモリバッファから取得することになります。

And then we're going to have our script history, which is going to come from our script memory buffer.

そして、スクリプト履歴はスクリプトメモリバッファから取得することになります。

Perfect.

完璧です。

And what we'll do is we'll add another expander for our Wikipedia research.

そして、ウィキペディアの研究のために、もう1つエキスパンダーを追加します。

So right down here is we'll go, Wikipedia research is going to be over here.

この下にあるWikipedia Researchはここに置くことにします。

And we're going to say, do what do we, let's just output the full Wikipedia research over there.

そして、どうするかというと、Wikipediaの全文をあそこに出力するのです。

Perfect.

完璧です。

And over here, what we need to do is change this.

そしてこちらでは、これを変更する必要があります。

So this is going, we're just going to write out the title from over there and we're going to write out the script from over there.

これは、向こうのタイトルを書き出して、向こうのスクリプトを書き出すだけです。

So adding tools breaks it up a little bit.

だから、ツールを追加することで、ちょっとずつ崩していくんです。

I know it's a little bit unfortunate because we've built it all up, but that's the easiest way that I've found to do it based on the documentation.

せっかく作り上げたのに、ちょっと残念ですが、これが私が見つけたドキュメントに基づく一番簡単な方法です。

It is continuously evolving.

それは常に進化し続けています。

So all things holding equal, we should now be able to go and run this.

というわけで、万全を期すなら、これで実行できるはずです。

Let's give it a crack.

試してみましょう。

So if we go to our app, let's refresh.

アプリにアクセスして、更新してみましょう。

We've got an unexpected error.

予期せぬエラーが発生しました。

So inside of our title chain, let's get rid of the keyword topic.

タイトルチェーンの中で、トピックというキーワードを削除してみましょう。

So over here, let's just remove this.

ここで、これを削除してください。

We should also be running it.

また、これを実行する必要があります。

So title chain.run, script chain.run.

title chain.run、script chain.runを実行します。

Go and refresh.

リフレッシュしてください。

Take a look, doesn't look like we've got any errors yet.

見てみてください、まだエラーは出ていないようです。

So take a look.

では、見てみましょう。

So we've got our script being output.

スクリプトが出力されていますね。

We've also got our video script being output.

また、ビデオスクリプトも出力されています。

Now, if we go to our title history, we can see the human has passed through deep learning and the AI is responding with that.

タイトルの履歴を見ると、人間がディープラーニングを通過し、AIがそれに応えていることがわかります。

We go to our script history, the human is passing through the title and the video script is now being output.

スクリプトの履歴を見ると、人間がタイトルを通過し、ビデオスクリプトが出力されていることがわかります。

So that's a much better way of using the memory, particularly when you have multiple inputs.

このように、特に複数の入力がある場合に、メモリをより有効に活用することができます。

We can also see the Wikipedia research.

また、ウィキペディアの調査も見ることができます。

Take a look, it's bringing up deep reinforcement.

Wikipediaの研究を見てください。

It's bringing in a South Park episodes.

サウスパークのエピソードも出てきます。

Have we incorporated anything to do with South Park?

サウスパークに関連するものを取り入れたことがあったでしょうか?

I think it did previously.

以前はそうだったと思います。

But in our particular case, that is our video script now done.

しかし、私たちの場合、これはビデオスクリプトが完成したものです。

And that is the LangChain crash course now done as well.

そして、LangChainのクラッシュコースも完成しました。

There's only one thing that I didn't really cover in here and that's indexes.

ただ1つだけ、ここでカバーしきれなかったことがあり、それはインデックスです。

But if you'd like to see a video on that, do let me know in the comments below.

でも、もしそれに関するビデオを見たいなら、下のコメント欄で教えてください。

I'll catch you in the next one.

次回のビデオでご紹介します。

So what did you think?

さて、いかがでしたでしょうか?

What are you gonna build with LangChain?

LangChainを使って何を作ろうと思っていますか?

If you'd like to see me build a machine learning model from scratch that allows you to do exercise-based detection, take a look here.

もし、私が運動ベースの検出を可能にする機械学習モデルをゼロから構築するのを見たいのであれば、こちらを見てください。


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