Merge remote-tracking branch 'origin/dev' into two_edges
This commit is contained in:
parent
3d82417068
commit
4c87f7662c
283 changed files with 11734 additions and 9297 deletions
|
|
@ -280,9 +280,3 @@ To see options for your project, in the upper left corner of the canvas, select
|
|||
**Export** - Download your current project to your local machine as a `.json` file.
|
||||
|
||||
**Undo** or **Redo** - Undo or redo your last action.
|
||||
|
||||
import ThemedImage from "@theme/ThemedImage";
|
||||
import useBaseUrl from "@docusaurus/useBaseUrl";
|
||||
import ZoomableImage from "/src/theme/ZoomableImage.js";
|
||||
import ReactPlayer from "react-player";
|
||||
import Admonition from "@theme/Admonition";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import ThemedImage from '@theme/ThemedImage';
|
||||
import useBaseUrl from '@docusaurus/useBaseUrl';
|
||||
import ZoomableImage from '/src/theme/ZoomableImage.js';
|
||||
import ReactPlayer from 'react-player';
|
||||
import ThemedImage from "@theme/ThemedImage";
|
||||
import useBaseUrl from "@docusaurus/useBaseUrl";
|
||||
import ZoomableImage from "/src/theme/ZoomableImage.js";
|
||||
import ReactPlayer from "react-player";
|
||||
|
||||
# 🖥️ Flows, components, collections, and projects
|
||||
|
||||
|
|
@ -17,10 +17,4 @@ A [project](#project) can be a component or a flow. Projects are saved as part o
|
|||
|
||||
For example, the **OpenAI LLM** is a **component** of the **Basic prompting** flow, and the **flow** is stored in a **collection**.
|
||||
|
||||
|
||||
|
||||
## Component
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,33 +6,40 @@ import Admonition from "@theme/Admonition";
|
|||
# 📦 Install Langflow
|
||||
|
||||
<Admonition type="info">
|
||||
Langflow v1.0 alpha is also available in HuggingFace Spaces. [Clone the space using this link](https://huggingface.co/spaces/Langflow/Langflow-Preview?duplicate=true), to create your own Langflow workspace in minutes.
|
||||
Langflow v1.0 alpha is also available in HuggingFace Spaces. [Clone the space
|
||||
using this
|
||||
link](https://huggingface.co/spaces/Langflow/Langflow-Preview?duplicate=true),
|
||||
to create your own Langflow workspace in minutes.
|
||||
</Admonition>
|
||||
|
||||
Langflow requires [Python >=3.10](https://www.python.org/downloads/release/python-3100/) and [pip](https://pypi.org/project/pip/) or [pipx](https://pipx.pypa.io/stable/installation/) to be installed on your system.
|
||||
|
||||
Install Langflow with pip:
|
||||
|
||||
```bash
|
||||
python -m pip install langflow -U
|
||||
```
|
||||
|
||||
Install Langflow with pipx:
|
||||
|
||||
```bash
|
||||
pipx install langflow --python python3.10 --fetch-missing-python
|
||||
```
|
||||
Pipx can fetch the missing Python version for you with `--fetch-missing-python`, but you can also install the Python version manually.
|
||||
|
||||
Pipx can fetch the missing Python version for you with `--fetch-missing-python`, but you can also install the Python version manually.
|
||||
|
||||
## Install Langflow pre-release
|
||||
|
||||
To install a pre-release version of Langflow:
|
||||
|
||||
pip:
|
||||
|
||||
```bash
|
||||
python -m pip install langflow --pre --force-reinstall
|
||||
```
|
||||
|
||||
pipx:
|
||||
|
||||
```bash
|
||||
pipx install langflow --python python3.10 --fetch-missing-python --pip-args="--pre --force-reinstall"
|
||||
```
|
||||
|
|
@ -52,11 +59,13 @@ python -m langflow --help
|
|||
## ⛓️ Run Langflow
|
||||
|
||||
1. To run Langflow, enter the following command.
|
||||
|
||||
```bash
|
||||
python -m langflow run
|
||||
```
|
||||
|
||||
2. Confirm that a local Langflow instance starts by visiting `http://127.0.0.1:7860` in a Chromium-based browser.
|
||||
|
||||
```bash
|
||||
│ Welcome to ⛓ Langflow │
|
||||
│ │
|
||||
|
|
@ -83,4 +92,4 @@ You'll be presented with the following screen:
|
|||
style={{ width: "100%", margin: "20px auto" }}
|
||||
/>
|
||||
|
||||
Name your Space, define the visibility (Public or Private), and click on **Duplicate Space** to start the installation process. When installation is finished, you'll be redirected to the Space's main page to start using Langflow right away!
|
||||
Name your Space, define the visibility (Public or Private), and click on **Duplicate Space** to start the installation process. When installation is finished, you'll be redirected to the Space's main page to start using Langflow right away!
|
||||
|
|
|
|||
|
|
@ -10,12 +10,15 @@ This guide demonstrates how to build a basic prompt flow and modify that prompt
|
|||
|
||||
## Prerequisites
|
||||
|
||||
* [Langflow installed and running](./install-langflow.mdx)
|
||||
- [Langflow installed and running](./install-langflow.mdx)
|
||||
|
||||
* [OpenAI API key](https://platform.openai.com)
|
||||
- [OpenAI API key](https://platform.openai.com)
|
||||
|
||||
<Admonition type="info">
|
||||
Langflow v1.0 alpha is also available in HuggingFace Spaces. [Clone the space using this link](https://huggingface.co/spaces/Langflow/Langflow-Preview?duplicate=true) to create your own Langflow workspace in minutes.
|
||||
Langflow v1.0 alpha is also available in HuggingFace Spaces. [Clone the space
|
||||
using this
|
||||
link](https://huggingface.co/spaces/Langflow/Langflow-Preview?duplicate=true)
|
||||
to create your own Langflow workspace in minutes.
|
||||
</Admonition>
|
||||
|
||||
## Hello World - Basic Prompting
|
||||
|
|
@ -44,25 +47,25 @@ Examine the **Prompt** component. The **Template** field instructs the LLM to `A
|
|||
This should be interesting...
|
||||
|
||||
4. To create an environment variable for the **OpenAI** component, in the **OpenAI API Key** field, click the **Globe** button, and then click **Add New Variable**.
|
||||
1. In the **Variable Name** field, enter `openai_api_key`.
|
||||
2. In the **Value** field, paste your OpenAI API Key (`sk-...`).
|
||||
3. Click **Save Variable**.
|
||||
1. In the **Variable Name** field, enter `openai_api_key`.
|
||||
2. In the **Value** field, paste your OpenAI API Key (`sk-...`).
|
||||
3. Click **Save Variable**.
|
||||
|
||||
## Run the basic prompting flow
|
||||
|
||||
1. Click the **Run** button.
|
||||
The **Interaction Panel** opens, where you can chat with your bot.
|
||||
The **Interaction Panel** opens, where you can chat with your bot.
|
||||
2. Type a message and press Enter.
|
||||
And... Ahoy! 🏴☠️
|
||||
The bot responds in a piratical manner!
|
||||
And... Ahoy! 🏴☠️
|
||||
The bot responds in a piratical manner!
|
||||
|
||||
## Modify the prompt for a different result
|
||||
|
||||
1. To modify your prompt results, in the **Prompt** template, click the **Template** field.
|
||||
The **Edit Prompt** window opens.
|
||||
The **Edit Prompt** window opens.
|
||||
2. Change `Answer the user as if you were a pirate` to a different character, perhaps `Answer the user as if you were Harold Abelson.`
|
||||
3. Run the basic prompting flow again.
|
||||
The response will be markedly different.
|
||||
The response will be markedly different.
|
||||
|
||||
## Next steps
|
||||
|
||||
|
|
@ -72,8 +75,6 @@ By adding Langflow components to your flow, you can create all sorts of interest
|
|||
|
||||
Here are a couple of examples:
|
||||
|
||||
* [Memory chatbot](/starter-projects/memory-chatbot.mdx)
|
||||
* [Blog writer](/starter-projects/blog-writer.mdx)
|
||||
* [Document QA](/starter-projects/document-qa.mdx)
|
||||
|
||||
|
||||
- [Memory chatbot](/starter-projects/memory-chatbot.mdx)
|
||||
- [Blog writer](/starter-projects/blog-writer.mdx)
|
||||
- [Document QA](/starter-projects/document-qa.mdx)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue