149 lines
5 KiB
Org Mode
149 lines
5 KiB
Org Mode
#+title: Lesson 03 | data types
|
|
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="../../_share/media/css/herk.css" />
|
|
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="../../_share/media/css/org-media-sass/collapsible.css" />
|
|
#+HTML_HEAD: <script src="../../_share/media/js/collapsible.js"></script>
|
|
|
|
* Links
|
|
#+attr_html: :class links
|
|
- [[../toc.org][TOC | Build n8n ai agents 8 hr course]]
|
|
- [[https://www.youtube.com/watch?v=Ey18PDiaAYI][Course Video]]
|
|
|
|
Curr: https://youtu.be/Ey18PDiaAYI?si=7I_ZldvVJP_fuPJy&t=4264
|
|
|
|
*** timestamps
|
|
:PROPERTIES:
|
|
:CUSTOM_ID: timestamp
|
|
:END:
|
|
|
|
#+attr_html: :class playlist
|
|
- [[https://www.youtube.com/watch?v=Ey18PDiaAYI&t=2445s][0:40:45 n8n n8n Data Types]]
|
|
- [[https://www.youtube.com/watch?v=Ey18PDiaAYI&t=2905s][0:48:25 23 Workflow Templates FREE]]
|
|
- [[https://www.youtube.com/watch?v=Ey18PDiaAYI&t=2949s][0:49:09 Step by Step AI Workflows]]
|
|
- [[https://www.youtube.com/watch?v=Ey18PDiaAYI&t=3085s][0:51:25 1) Rag Pipeline and Chatbot]]
|
|
- [[https://www.youtube.com/watch?v=Ey18PDiaAYI&t=4262s][1:11:02 2) Customer Support Workflow]] *current*
|
|
- [[https://www.youtube.com/watch?v=Ey18PDiaAYI&t=4926s][1:22:06 3) LinkedIn Content Creator Workflow]]
|
|
|
|
* Notes
|
|
** set field
|
|
- can also name the fields and data type for each field
|
|
|
|
*** data types
|
|
| data type | symbol | example |
|
|
|-----------+--------+---------------------|
|
|
| String | A | "blah" |
|
|
| Number | # | 50 |
|
|
| Boolean | ✓ | true |
|
|
| Array | ☰ | [1, "one", "three"] |
|
|
| Object | 3d box | {"blah": 33} |
|
|
|
|
** 3 AI workflows
|
|
*** 1. RAG pipeline & chatbot
|
|
**** tools
|
|
- pinecone :: vector database
|
|
- google drive :: data storage
|
|
- google docs ::
|
|
- open router :: lets us connect to ai models like openai's or anthropics
|
|
|
|
*** 2. Customer support
|
|
**** purpose
|
|
- build off prev workflow with pinecone db
|
|
- respond to customer support related emails
|
|
|
|
**** tools
|
|
- pinecone
|
|
- gmail
|
|
- n8n agent
|
|
- open router
|
|
|
|
*** 3. LinkedIn Content Creation
|
|
**** tools
|
|
- tavily :: search the web
|
|
- google sheets :: store content ideas, and write content ideas to it
|
|
|
|
** Workflow #1 - Rag Pipeline and Chatbot
|
|
*** RAG
|
|
- stands for :: retrieval, augmented, generation
|
|
- looks inside database for the answer
|
|
|
|
**** Vector Database
|
|
- multidimensional graph of points
|
|
- vector is placed based on meaning of vector
|
|
- ie, wolf and dog will be close
|
|
- banana, apple will be close
|
|
|
|
**** how it works
|
|
- we have a document
|
|
- break it into chunks
|
|
- run it through an 'embeddings model'
|
|
- this puts the chunks into a vector model
|
|
|
|
**** Query
|
|
- run the query through the embeddings model
|
|
- see where it lands in vectors, grabs back the nearest 4 or 5 vectors and returns it to us
|
|
|
|
*** process
|
|
- our trigger is any changes in folder on google drive
|
|
|
|
*** get Google Drive Credentials
|
|
**** create OAuth credentials
|
|
***** Create New Credentials
|
|
|
|
***** open "open docs" at the top of the dialogue
|
|
- this will take you to https://docs.n8n.io/integrations/builtin/credentials/google/oauth-single-service/?utm_source=n8n_app&utm_medium=credential_settings&utm_campaign=create_new_credentials_modal
|
|
|
|
***** scroll down past "Prerequisites" and click "Create a Google Cloud account https://docs.n8n.io/integrations/builtin/credentials/google/oauth-single-service/?utm_source=n8n_app&utm_medium=credential_settings&utm_campaign=create_new_credentials_modalt"
|
|
|
|
***** create a new account
|
|
1.
|
|
#+attr_html: :width 600
|
|
file:../../_share/media/img/compsci/ai/herk/build_8hr/ch03_e01a.png
|
|
|
|
2. add a new project
|
|
#+attr_html: :width 600
|
|
file:../../_share/media/img/compsci/ai/herk/build_8hr/ch03_e01b.png
|
|
|
|
3. click on new project
|
|
#+attr_html: :width 600
|
|
file:../../_share/media/img/compsci/ai/herk/build_8hr/ch03_e01c.png
|
|
|
|
- select the new project
|
|
|
|
4. go to Enabled API's and services
|
|
1. go to three lines in upper left and side
|
|
2. click on enables API's and Services
|
|
3. in the search bar add "google drive"
|
|
4. enable it
|
|
|
|
5. set up OAuth consent screen
|
|
1. lets google and n8n knkow they have permission to talk to each other
|
|
|
|
#+attr_html: :width 600
|
|
file:../../_share/media/img/compsci/ai/herk/build_8hr/ch03_e01d.png
|
|
|
|
2. click on "Get Started"
|
|
- app name :: build8h-e01-ragchat
|
|
- user support email :: this.ronny@gmail.com
|
|
|
|
3. under Overview - Audience, select External (using gmail account for testing)
|
|
|
|
******* add Test users
|
|
- Audence -> Test users
|
|
|
|
******* Create OAuth client ID
|
|
- Clients -> name
|
|
- build8h-e01-ragchat-web-client-1
|
|
|
|
- add OAuth Redirect URL to Authorized redirect URIs
|
|
|
|
****** OAuth client
|
|
- client ID :: ~212317400169-i0mc8cr74o0vbds6t1ticp2kbbn1ttp1.apps.googleusercontent.com~
|
|
- client secret :: ~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~
|
|
|
|
file:../../_share/data/compsci/ai/herk/client_secret_212317400169-i0mc8cr74o0vbds6t1ticp2kbbn1ttp1.apps.googleusercontent.com.json
|
|
|
|
***** set folder
|
|
- save and exit the config dialog
|
|
- go to google drive trigger, and select the folder
|
|
|
|
*** set up pinecone
|
|
- got to http://pinecone.io
|