Closed dongho204 closed 1 year ago
AI Persona chatbots are one of the most
popular and lucrative opportunities in
the AI chatbot space right now and best
of all you don't have to be a developer
to build these Bots either using tools
like flow wise we can create a virtual
copy of a celebrity or influencer that
can be used as a personal assistant or
coach in this video we will create a
Persona chat bot of Mr Beast that we can
use to get instant and personalized
advice on content creation and ground gr
a YouTube channel we will set up flow
wise from scratch and I will show you
step by step how to create your very own
AI Persona chatbot let's get started in
order to install flow wise you will need
the following go over to this website
and download and install git for your
operating system then go over to this
website and install the LTS version of
node as well after installing git and
node go over to the flow wise repository
on GitHub on this page click on on code
then copy this URL then create a new
folder on your machine and open the
command prompt on Windows you can open
the command prompt by clicking on the
address bar and typing CMD and then
press enter now in the command prompt
type get clone and then paste in that
URL and press enter this will now
download flow wise to your machine next
we need to open the flow wise folder in
the command prom I'll do that by
entering CD flow wise and pressing enter
alternatively you could simply open the
flow wise folder and again run the CMD
command in the address bar now we need
to install the dependencies for flow
wise we can do that by typing yarn
install and then pressing enter if you
get an error message stating that yarn
is not a valid command then you can
install yarn on your machine by running
this command npm install D- Global yarn
and that should result olve that error
after installation is complete we just
have to run one more command and that is
yarn build and this will take a minute
to complete after build is complete we
can now finally go ahead and start flow
wise to start flow wise going forward
simply open the command prompt in this
flow wise folder and run yarn start we
can now run flow wise in our browser by
going to Local Host Port 3000 and you
should be presented with a dashboard
like this now that we have flow wise up
and running we need to start preparing
our data for our personal chatbot there
are many ways to Source this information
whether it's from blogs articles
podcasts or YouTube videos for this
example I'm simply going to search for
Mr Beast advice videos on YouTube and
here we can find a video that is a
compilation of Mr Beast advice videos so
what we need to do is to download the
transcript of this video and we will add
that transcript to the knowledge base of
our chatbot to download the transcript
of any YouTube video Simply copy the URL
and then go over to YouTube
transcript.com and paste in that URL and
then click on go we will now have access
to the full transcript of that video so
to copy this text click on copy entire
transcript then create a new folder on
your machine for storing these
transcript files and then create a new
text file and paste in the transcript
text and let's go ahead and save this
file we can then simply repeat this
process for all other sources I'll go
ahead and grab one more video let's use
this one over here I'll simply copy the
URL head over to YouTube transcript by
in that URL and hit go let's copy this
transcript let's create a new text file
paste in the transcript and let's save
this file for this demo I'll stick with
these two files only but you can go
ahead and add as many files as you want
want now let's go back to flow wise and
let's create our first chat flow let's
click on add new and let's save our chat
flow I'll call mine AI beast and let's
save this we now need to add a note that
will allow us to chat to an AI model
which also has access to a knowledge
base so for this I'll click on nodes
then I'll click on chains and within
chains let's add the conversational
retrieval QA chain like so now let's
attach an AI model to this chain we can
do that by clicking on nodes then let's
open chat models and within chat models
let's add the chat open AI model like so
and then let's attach our model to our
chain like so for the model let's change
the temperature to 0.4 we'll come back
to the credentials in a second next
let's add a vector store retriever if
you would like to learn more about
vector stores then please have a look at
this video in this series but I'll also
briefly explain these in this video to
add a vector store let's click on nodes
then go to Vector stores and let's
simply add the inmemory vector store
effectively the vector store is a
database and the contents of those text
files will be stored in this database so
when we interact with our chat bot this
chain will look up the information from
this database let's con connect our
inmemory Vector store to the chain like
so we're not going to spend any time on
the memory node in this video the vector
store requires two inputs the documents
like our text files as well as the
embeddings embeddings can be quite a
tricky concept but effectively the text
files that we load into this Vector
store first need to be converted to
embeddings so to specify the embeddings
model click on nodes open embeddings and
add the open AI embeddings note to the
canvas and let's go ahead and connect
this embeddings note to the vector store
the embeddings note also requires
credentials but we will come back to
that in a second now finally let's load
our document loader let's click on nodes
then under document loaders go to folder
with files and add that to the canvas
and let's connect this note to the
vector store as well now we need to
specify the path to our text files so
let's go over to that folder and let's
copy this address and just a quick side
note this folder can contain different
file types it does not all have to be
text files you are welcome to mix it
with text files PDFs and Word Documents
and in flow wise let's paste in that
address there is one more note that I
would like to add to this and that is
the text splitter so instead of
uploading the entire content of each
file we will split that content content
into chunks that is a bit more
manageable for the AI to process let's
click on nodes then click on text
Splitters and let's add the recursive
character text splitter and let's
connect this to our document uploader
let's leave the chunk size as 1,000 but
let's add a chunk overlap of 200 so
zooming out we now have a view like this
first we've added a document loader and
specified the folder containing our
documents so this note will load all of
those documents and then pass those
documents over to this node the contents
of those documents will then be
converted into embeddings using this
node and then stored in the vector store
so when we interact with our bot the
chatbot will try and find the answer to
the question in this Vector store and
then return a response all that's left
to do now is to add our open AI
credentials to get your open credentials
go to platform. open.com create your
account then click on personal view API
keys and you will be presented with this
screen click on create new secret key
give your key a name and click on create
secret key and go ahead and copy that
key then go back to flow wise save your
chat flow and click on back then click
on credentials then click on ADD
credential and search for open AI API
and paste in your API key also give this
a name I'll just call it open Ai and
click on ADD then go back to your chat
flows click on your chat flow and let's
add these credentials let's start with
the chat open AI node under connect
credentials click on the drop down and
select open AI then go to the open AI
embedding node click on the drop- down
and also select open AI we should now be
ready to test out this bot let's click
on Save and then click on this little
chat bubble on the top right this will
open up up your chat window Let's test
this by sending a message like hello the
first time you run this it does take a
second because the document loader is
first processing your documents and
adding it to the vector store after that
the chat responses should be quite quick
and we do get a response back from the
bot saying I don't know the answer which
is fine because it can't find an answer
for hello from the vector store but at
least we are getting response back from
our bot now let's fix this let's close
the chat window and let's tweak the
personality of this chatbot we can do
this by clicking on additional
parameters and now we can provide a
system message and this is how we can
control the personality of our chatbot
in order to get this chatbot to mimic Mr
Beast I'm going to enter the following
prompt you are Jimmy Donaldson also
known as Mr Beast a YouTuber and content
creator I'm not going to read the entire
thing in order to save time but you can
be as specific as you want at this stage
as this will great L affect the
responses from the bot effectively I'm
just describing the personality of Mr
Beast what is important here though is
this section answer the user's questions
as if you are Mr Beast so that will
force the AI to respond in the first
person and only answer questions found
in the context in other words only
provide an answer if the answer was
found in the vector store if you don't
know the answer then respond with
something like I have no idea or could
you rephrase that do not make up your
own answers if you don't know the answer
let's go ahead and close this and let's
save this jat let's try this again and
let's say hello so we're getting a
message saying hello how can I assist
you today let's do this let's ask who
are you and now the B is saying it's
Jimmy also known as Mr Beast let's ask
it a few questions like how can I
improve my thumbnails and it's giving us
a very useful answer indeed and this is
information that was provided in those
YouTube videos let's ask it something
like what is your worst video and this
is a very Mr Beast type of answer I hope
you found this useful adding more
content to this bot is just greatly
going to improve the type of answers
that I get back if you enjoy this
content then please like this video And
subscribe to my Channel please let me
know in the comments below who you plan
to clone as an AI Persona I'll see you
in the next one bye-bye
[youtube] Extracting URL: https://www.youtube.com/watch?v=QUGrcABPCFM
[youtube] QUGrcABPCFM: Downloading webpage
[youtube] QUGrcABPCFM: Downloading ios player API JSON
[youtube] QUGrcABPCFM: Downloading android player API JSON
[youtube] QUGrcABPCFM: Downloading m3u8 information
[info] QUGrcABPCFM: Downloading 1 format(s): 22
[info] There are no subtitles for the requested languages
[youtube] Extracting URL: https://www.youtube.com/watch?v=QUGrcABPCFM
[youtube] QUGrcABPCFM: Downloading webpage
[youtube] QUGrcABPCFM: Downloading ios player API JSON
[youtube] QUGrcABPCFM: Downloading android player API JSON
[youtube] QUGrcABPCFM: Downloading m3u8 information
[info] QUGrcABPCFM: Downloading subtitles: en
[info] QUGrcABPCFM: Downloading 1 format(s): 22
[info] Writing video subtitles to: Build AI Persona Chatbots using Flowise AI [QUGrcABPCFM].en.ttml
[download] Destination: Build AI Persona Chatbots using Flowise AI [QUGrcABPCFM].en.ttml
[download] 1.00KiB at Unknown B/s (00:00:00)
[download] 3.00KiB at 2.87MiB/s (00:00:00)
[download] 7.00KiB at 616.30KiB/s (00:00:00)
[download] 15.00KiB at 552.81KiB/s (00:00:00)
[download] 26.48KiB at 366.24KiB/s (00:00:00)
[download] 100% of 26.48KiB in 00:00:00 at 86.84KiB/s
너무 좋아요ㅎㅎ
URL
https://www.youtube.com/watch?v=QUGrcABPCFM