[Docs] - Install issues, spaces, and feedback (#1816)

* Address feedback on quickstart and install. 
* Cleanup Huggingface Spaces page, cleanup references to HF Spaces; and
remove lightning (for now).
* Cleanup Common Installation Problems page for easier reading. Could
use more content here.
* "Langflow 1.0 alpha" where appropriate.
This commit is contained in:
Mendon Kissling 2024-05-06 14:41:28 -04:00 committed by GitHub
commit 29925c679e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 89 additions and 99 deletions

View file

@ -5,11 +5,11 @@ import Admonition from "@theme/Admonition";
# 🤗 HuggingFace Spaces
Hugging Face provides a great alternative for running Langflow in their Spaces environment. This means you can run Langflow without any local installation required.
HuggingFace provides a great alternative for running Langflow in their Spaces environment. This means you can run Langflow without any local installation required.
The first step is to go to the [Langflow Space](https://huggingface.co/spaces/Langflow/Langflow?duplicate=true) or [Langflow 1.0 Preview Space](https://huggingface.co/spaces/Langflow/Langflow-Preview?duplicate=true)
In a Chromium-based browser, go to the [Langflow Space](https://huggingface.co/spaces/Langflow/Langflow?duplicate=true) or [Langflow v1.0 alpha Preview Space](https://huggingface.co/spaces/Langflow/Langflow-Preview?duplicate=true).
Remember to use a Chromium-based browser for the best experience. You'll be presented with the following screen:
You'll be presented with the following screen:
<ZoomableImage
alt="Docusaurus themed image"
@ -20,8 +20,19 @@ Remember to use a Chromium-based browser for the best experience. You'll be pres
style={{ width: "100%", margin: "20px auto" }}
/>
From here, just name your Space, define the visibility (Public or Private), and click on `Duplicate Space` to start the installation process. When that is done, 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!
Once you get Langflow running, click on New Project in the top right corner of the screen. Langflow provides a range of example flows to help you get started.
## Run a starter project
To quickly try one of them, open a starter example, set up your API keys and click ⚡ Run, on the bottom right corner of the canvas. This will open up Langflow's Interaction Panel with the chat console, text inputs, and outputs.
Langflow provides a range of example flows to help you get started.
Once you get Langflow running in your Space, click on **New Project** in the top right corner of the screen.
Select a starter project from the list, set up your API keys, and click ⚡ Run. This will open up Langflow's Interaction Panel with the chat console, text inputs, and outputs ready to go.
For more information on the starter projects, see the guides below:
* [Basic prompting](/starter-projects/basic-prompting.mdx)
* [Memory chatbot](/starter-projects/memory-chatbot.mdx)
* [Blog writer](/starter-projects/blog-writer.mdx)
* [Document QA](/starter-projects/document-qa.mdx)

View file

@ -6,27 +6,19 @@ import Admonition from "@theme/Admonition";
# 📦 Install Langflow
<Admonition type="info">
Langflow v1.0 is also available in a [HuggingFace Preview Space](https://huggingface.co/spaces/Langflow/Langflow-Preview?duplicate=true) if you'd rather try it out before installing locally.
Langflow v1.0 alpha is also available in [HuggingFace Spaces](https://huggingface.co/spaces/Langflow/Langflow-Preview?duplicate=true). Try it out or follow the instructions [here](./huggingface-spaces) to install it locally.
</Admonition>
## Prerequisites
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.
Langflow requires the following programs installed on your system.
* [Python 3.10](https://www.python.org/downloads/release/python-3100/)
* [pip](https://pypi.org/project/pip/) or [pipx](https://pipx.pypa.io/stable/installation/)
## Install Langflow
To install Langflow:
pip:
Install Langflow with pip:
```bash
python -m pip install langflow -U
```
pipx:
Install Langflow with pipx:
```bash
pipx install langflow --python python3.10 --fetch-missing-python
```
@ -35,8 +27,6 @@ Pipx can fetch the missing Python version for you with `--fetch-missing-python`,
## Install Langflow pre-release
Use `--force-reinstall` to ensure you have the latest version of Langflow and its dependencies.
To install a pre-release version of Langflow:
pip:
@ -49,9 +39,11 @@ pipx:
pipx install langflow --python python3.10 --fetch-missing-python --pip-args="--pre --force-reinstall"
```
Use `--force-reinstall` to ensure you have the latest version of Langflow and its dependencies.
## Having a problem?
If you encounter a problem, see [Possible Installation Issues](/migration/possible-installation-issues).
If you encounter a problem, see [Common Installation Issues](/migration/possible-installation-issues).
To get help in the Langflow CLI:
@ -66,7 +58,7 @@ python -m langflow --help
python -m langflow run
```
2. Confirm that a local Langflow instance starts by visiting `http://127.0.0.1:7860` in your browser.
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 │
│ │

View file

@ -6,64 +6,21 @@ import Admonition from "@theme/Admonition";
# ⚡️ Quickstart
This quickstart demonstrates how to install Langflow, run it locally, build a basic prompt flow, and modify that prompt for different outcomes.
This guide demonstrates how to build a basic prompt flow and modify that prompt for different outcomes.
## Prerequisites
* [Python 3.10](https://www.python.org/downloads/release/python-3100/)
* [pip](https://pypi.org/project/pip/) or [pipx](https://pipx.pypa.io/stable/installation/)
* [Langflow installed](./install-langflow.mdx)
* [OpenAI API key](https://platform.openai.com)
## Install Langflow
<Admonition type="info">
Langflow v1.0 is also available in a [HuggingFace Preview Space](https://huggingface.co/spaces/Langflow/Langflow-Preview?duplicate=true) if you'd rather try it out before installing locally. This quickstart will run there, too.
Langflow v1.0 alpha is also available in [HuggingFace Spaces](https://huggingface.co/spaces/Langflow/Langflow-Preview?duplicate=true). Try it out or follow the instructions [here](./huggingface-spaces) to install it locally.
</Admonition>
1. To install Langflow, enter the following command in pip or pipx:
## Hello World - Basic Prompting
pip:
```bash
python -m pip install langflow -U
```
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.
2. Start a local Langflow instance with the Langflow CLI:
```bash
langflow run
```
Or start Langflow with Python:
```bash
python -m langflow run
```
Result:
```
│ Welcome to ⛓ Langflow │
│ │
│ Access http://127.0.0.1:7860 │
│ Collaborate, and contribute at our GitHub Repo 🚀 │
```
3. Go to `http://127.0.0.1:7860` and confirm the Langflow UI is available.
<Admonition type="info">
If you encounter a problem, see [Possible Installation Issues](/migration/possible-installation-issues).
</Admonition>
## Create the basic prompting project
Now that you have Langflow installed and running, let us formally welcome you to Langflow!👋
You will use Langflow's prompt tools to issue prompts to the OpenAI LLM.
Let's start with a Prompt component to instruct an OpenAI Model.
Prompts serve as the inputs to a large language model (LLM), acting as the interface between human instructions and computational tasks.
@ -82,7 +39,7 @@ By submitting natural language requests in a prompt to an LLM, you can obtain an
style={{ width: "80%", margin: "20px auto" }}
/>
This flow allows you to chat with the **OpenAI** component via a **Prompt** component.
This flow allows you to chat with the **OpenAI** component via a **Prompt**.
Examine the **Prompt** component. The **Template** field instructs the LLM to `Answer the user as if you were a pirate.`
This should be interesting...
@ -94,9 +51,10 @@ This should be interesting...
## Run the basic prompting flow
1. Click the **Run** button.
The **Interaction Panel** opens, where you can converse with your bot.
The **Interaction Panel** opens, where you can chat with your bot.
2. Type a message and press Enter.
The bot responds in a markedly piratical manner!
And... Ahoy! 🏴‍☠️
The bot responds in a piratical manner!
## Modify the prompt for a different result
@ -110,7 +68,9 @@ The response will be markedly different.
Well done! You've built your first prompt in Langflow. 🎉
By adding Langflow components to this prompt, you can build all sorts of interesting flows.
By adding Langflow components to your flow, you can create all sorts of interesting behaviors.
Here are a couple of examples:
* [Memory chatbot](/starter-projects/memory-chatbot.mdx)
* [Blog writer](/starter-projects/blog-writer.mdx)

View file

@ -5,9 +5,9 @@ import Admonition from "@theme/Admonition";
# 👋 Welcome to Langflow
Langflow is a low-code platform that allows you to integrate AI into everything you do.
Langflow is a new, visual way to build, iterate, and deploy AI applications.
Use Langflow's simple but powerful UI to build any AI application you can dream up, from simple to complex.
Its intuitive interface allows for easy manipulation of AI building blocks, enabling developers to quickly prototype and turn their ideas into powerful, real-world solutions.
{" "}
@ -24,7 +24,7 @@ Use Langflow's simple but powerful UI to build any AI application you can dream
- [Install Langflow](/getting-started/install-langflow) - Install and start a local Langflow server.
- [Quickstart](/getting-started/quickstart) - Install Langflow, create a flow, and run it.
- [Quickstart](/getting-started/quickstart) - Create a flow and run it.
- [HuggingFace Spaces](/getting-started/huggingface-spaces) - Duplicate the Langflow preview space and try it out before you install.

View file

@ -1,15 +1,18 @@
# Possible Installation Issues
# Common Installation Issues
This is a list of possible issues that you may encounter when installing Langflow 1.0 Alpha and how to solve them.
This is a list of possible issues that you may encounter when installing Langflow 1.0 alpha and how to solve them.
## _`No module named 'langflow.__main__'`_
TLDR;
### TL;DR
- Run _`python -m langflow run`_ instead of _`langflow run`_. If that doesn't work, run _`_python -m pip install langflow --pre -U`_ to reinstall langflow.
- If the above doesn't work, run _`python -m pip install langflow --pre -U --force-reinstall`_ to reinstall langflow and its dependencies.
1. Run _`python -m langflow run`_ instead of _`langflow run`_.
2. If that doesn't work, reinstall Langflow with _`_python -m pip install langflow --pre -U`_.
3. If that doesn't work, reinstall Langflow and its dependencies with _`python -m pip install langflow --pre -U --force-reinstall`_.
When you try to run langflow using the command `langflow run`, you may encounter the following error:
### Details
When you try to run Langflow using the command `langflow run`, you may encounter the following error:
```bash
> langflow run
@ -19,22 +22,27 @@ Traceback (most recent call last):
ModuleNotFoundError: No module named 'langflow.__main__'
```
For this error to occur, two scenarios are possible:
There are two possible reasons for this error:
1. You've installed langflow using _`pip install langflow`_ but you already had a previous version of langflow installed in your system.
In this case, you might not be running the correct executable.
To solve this issue, you can run the correct executable by running _`python -m langflow run`_ instead of _`langflow run`_ and if that doesn't work, you can try uninstalling langflow and reinstalling it using _`python -m pip install langflow --pre -U`_.
2. Some version conflicts might have occurred during the installation process. Run _`python -m pip install langflow --pre -U --force-reinstall`_ to reinstall langflow and its dependencies.
1. You've installed Langflow using _`pip install langflow`_ but you already had a previous version of Langflow installed in your system.
In this case, you might be running the wrong executable.
To solve this issue, run the correct executable by running _`python -m langflow run`_ instead of _`langflow run`_.
If that doesn't work, try uninstalling and reinstalling Langflow with _`python -m pip install langflow --pre -U`_.
2. Some version conflicts might have occurred during the installation process.
Run _`python -m pip install langflow --pre -U --force-reinstall`_ to reinstall Langflow and its dependencies.
## _`Something went wrong running migrations. Please, run 'langflow migration --fix'`_
TLDR;
### TL;DR
- Clear the cache by deleting the contents of the cache folder.
This folder can be found at:
This folder can be found at:
- **Linux or WSL2 on Windows**: `home/<username>/.cache/langflow/`
- **MacOS**: `/Users/<username>/Library/Caches/langflow/`
If you wish to retain your files, ensure to back them up before clearing the folder.
### Details
This error can occur during Langflow upgrades when the new version can't override `langflow-pre.db` in `.cache/langflow/`. Clearing the cache removes this file but will also erase your settings.
If you wish to retain your files, back them up before clearing the folder.
This error often occurs when upgrading Langflow, the new version can't override `langflow-pre.db` in `.cache/langflow/`. Clearing the cache removes this file but will also erase your settings.

View file

@ -2,6 +2,7 @@ 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";
# Basic prompting
@ -35,7 +36,11 @@ Result:
│ Collaborate, and contribute at our GitHub Repo 🚀 │
```
Alternatively, go to [HuggingFace Spaces](https://docs.langflow.org/getting-started/hugging-face-spaces) or [Lightning.ai Studio](https://lightning.ai/ogabrielluiz-8j6t8/studios/langflow) for a pre-built Langflow test environment.
<Admonition type="info">
Langflow v1.0 alpha is also available in [HuggingFace Spaces](https://huggingface.co/spaces/Langflow/Langflow-Preview?duplicate=true). Try it out or follow the instructions [here](/getting-started/huggingface-spaces) to install it locally.
</Admonition>
3. Create an [OpenAI API key](https://platform.openai.com).

View file

@ -32,7 +32,11 @@ Result:
│ Collaborate, and contribute at our GitHub Repo 🚀 │
```
Alternatively, go to [HuggingFace Spaces](https://docs.langflow.org/getting-started/hugging-face-spaces) or [Lightning.ai Studio](https://lightning.ai/ogabrielluiz-8j6t8/studios/langflow) for a pre-built Langflow test environment.
<Admonition type="info">
Langflow v1.0 alpha is also available in [HuggingFace Spaces](https://huggingface.co/spaces/Langflow/Langflow-Preview?duplicate=true). Try it out or follow the instructions [here](/getting-started/huggingface-spaces) to install it locally.
</Admonition>
3. Create an [OpenAI API key](https://platform.openai.com).

View file

@ -32,7 +32,11 @@ Result:
│ Collaborate, and contribute at our GitHub Repo 🚀 │
```
Alternatively, go to [HuggingFace Spaces](https://docs.langflow.org/getting-started/hugging-face-spaces) or [Lightning.ai Studio](https://lightning.ai/ogabrielluiz-8j6t8/studios/langflow) for a pre-built Langflow test environment.
<Admonition type="info">
Langflow v1.0 alpha is also available in [HuggingFace Spaces](https://huggingface.co/spaces/Langflow/Langflow-Preview?duplicate=true). Try it out or follow the instructions [here](/getting-started/huggingface-spaces) to install it locally.
</Admonition>
3. Create an [OpenAI API key](https://platform.openai.com).

View file

@ -2,6 +2,7 @@ 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";
# Memory chatbot
@ -31,7 +32,11 @@ Result:
│ Collaborate, and contribute at our GitHub Repo 🚀 │
```
Alternatively, go to [HuggingFace Spaces](https://docs.langflow.org/getting-started/hugging-face-spaces) or [Lightning.ai Studio](https://lightning.ai/ogabrielluiz-8j6t8/studios/langflow) for a pre-built Langflow test environment.
<Admonition type="info">
Langflow v1.0 alpha is also available in [HuggingFace Spaces](https://huggingface.co/spaces/Langflow/Langflow-Preview?duplicate=true). Try it out or follow the instructions [here](/getting-started/huggingface-spaces) to install it locally.
</Admonition>
3. Create an [OpenAI API key](https://platform.openai.com).

View file

@ -28,7 +28,8 @@ module.exports = {
"starter-projects/basic-prompting",
"starter-projects/blog-writer",
"starter-projects/document-qa",
"starter-projects/memory-chatbot"
"starter-projects/memory-chatbot",
"tutorials/rag-with-astradb"
],
},
{