Master LangChain with No-Code tools Flowise and LangFlow

1. LangChain Basics, and Why LangChain is Awesome!

1. Welcome to the LangChain Masterclass!

2. Introduction to LangChain






2. LangChain UI Tools Flowise and LangFlow

1. Flowise Installation and Basics

npm install -g flowise
pnpm install -g flowise
npx flowise start
npx flowise start --FLOWISE_USERNAME=user --FLOWISE_PASSWORD=1234

云端部署 railway.app

render.com

2. LangFlow Installation and Basics


https://railway.app/template/Emy2sU?referralCode=63H2w2

点击右上角代码图标

pip install langflow

python -m langflow
# or
langflow

3. Prompts and Prompt Templates

1. A Simple Chat GPT Clone

langflow
右下角按钮点击, 进入聊天

2. Prompt Templates

Write in the style of shakespeare: {user_input}

https://flowgpt.com/ 网站寻找prompt模板, 用到自己的项目中

不同的模型

temperature指定模型的随机性

其他设置

3. Multi-Input Prompt Templates

You are a helpful assistant that translates {input_language} to {output_language}

langflow

4. Chat Prompt Template


chat prompt template:
You are a helpful assistant that translates {input_language} to {output_language}
based on the following human message {text}

prompt template:
You are a helpful assistant that translates {input_language} to {output_language}

5. Few Shot Prompt Templates


prompt template:
English Phrase: {english}\rPirates Phrase: {pirates}\n
或者:
English Phrase: {english}\nPirates Phrase: {pirates}\n

few shot prompt template:
examples:
[
{“english”:”Hello”, “pirates”:”Ahoy”},
{“english”:”Goodbye”, “pirates”:”Avast”},
{“english”:”Yes”, “pirates”:”Aye”},
{“english”:”No”, “pirates”:”Nay”},
{“english”:”I don’t know”, “pirates”:”I don’t rightly know”}
]
prefix:
You are a helpful assistant that translates english to pirate language.
suffix:
English Phrase: {input}\nPirate Phrase:
example seperator: \n\n

4. Chains

1. Simple LLM Chain

2. Conversation Chain


  目录