docs: rename getting-started folder and add redirects (#4813)

* feat: add docusaurus preset for OpenAPI integration

* feat: integrate OpenAPI plugins into Docusaurus configuration

* plugins

* feat: define custom sidebar structure for documentation

* fix-folder-name-and-redirect
This commit is contained in:
Mendon Kissling 2024-11-25 15:26:58 -05:00 • committed by GitHub
commit 1b3785ee95
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 16626 additions and 116 deletions

View file

@ -0,0 +1 @@
{"position":1, "label":"Get Started"}

View file

@ -0,0 +1,115 @@
---
title: Install Langflow
sidebar_position: 1
slug: /get-started-installation
---
You can deploy Langflow either locally or as a hosted service with [**Datastax Langflow**](#datastax-langflow).
## Install Langflow locally
Install Langflow locally with [pip](https://pypi.org/project/pip/) or [pipx](https://pipx.pypa.io/stable/installation/).
### Prerequisites
* [Python 3.10 to 3.12](https://www.python.org/downloads/release/python-3100/) installed
* [pip](https://pypi.org/project/pip/) or [pipx](https://pipx.pypa.io/stable/installation/) installed
* Before installing Langflow, we recommend creating a virtual environment to isolate your Python dependencies with [venv](https://docs.python.org/3/library/venv.html) or [conda](https://anaconda.org/anaconda/conda)
### Install Langflow with pip or pipx
Install Langflow with pip:
```bash
python -m pip install langflow
```
Install Langflow with pipx using the Python 3.10 executable:
```bash
pipx install langflow --python python3.10
```
## 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.
Now that Langflow is running, follow the [Quickstart](/get-started-quickstart) to create your first flow.
## Manage Langflow versions
To upgrade Langflow to the latest version, use the pip upgrade command.
```bash
python -m pip install langflow -U
```
To install a specific version of the Langflow package, add the required version to the command.
```bash
python -m pip install langflow==1.1
```
To reinstall Langflow and all of its dependencies, add the `--force-reinstall` flag to the command.
```bash
python -m pip install langflow --force-reinstall
```
## DataStax Langflow {#datastax-langflow}
**DataStax Langflow** is a hosted version of Langflow integrated with [Astra DB](https://www.datastax.com/products/datastax-astra). Be up and running in minutes with no installation or setup required. [Sign up for free](https://astra.datastax.com/signup?type=langflow).
## Common installation issues
This is a list of possible issues that you may encounter when installing and running Langflow.
### No `langflow.__main__` module
When you try to run Langflow with the command `langflow run`, you encounter the following error:
```bash
> No module named 'langflow.__main__'
```
1. Run `python -m langflow run` instead of `langflow run`.
2. If that doesn't work, reinstall the latest Langflow version with `python -m pip install langflow -U`.
3. If that doesn't work, reinstall Langflow and its dependencies with `python -m pip install langflow --pre -U --force-reinstall`.
### Langflow runTraceback
When you try to run Langflow using the command `langflow run`, you encounter the following error:
```bash
> langflow runTraceback (most recent call last): File ".../langflow", line 5, in <module> from langflow.__main__ import mainModuleNotFoundError: No module named 'langflow.__main__'
```
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 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
```bash
> Something went wrong running migrations. Please, run 'langflow migration --fix'
```
Clear the cache by deleting the contents of the cache folder.
This folder can be found at:
- **Linux or WSL2 on Windows**: `home/<username>/.cache/langflow/`
- **MacOS**: `/Users/<username>/Library/Caches/langflow/`
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 also erases your settings.
If you wish to retain your files, back them up before clearing the folder.

View file

@ -0,0 +1,77 @@
---
title: Quickstart
sidebar_position: 2
slug: /get-started-quickstart
---
## Prerequisites {#b5f154a3a1d242c7bdf57acf0a552732}
* [Python 3.10 to 3.12](https://www.python.org/downloads/release/python-3100/) installed
* [pip](https://pypi.org/project/pip/) or [pipx](https://pipx.pypa.io/stable/installation/) installed
* Before installing Langflow, we recommend creating a virtual environment to isolate your Python dependencies with [venv](https://docs.python.org/3/library/venv.html) or [conda](https://anaconda.org/anaconda/conda)
## Create the basic prompting flow
1. From the Langflow dashboard, click **New Flow**.
2. Select **Basic Prompting**.
3. The **Basic Prompting** flow is created.
![](/img/starter-flow-basic-prompting.png)
This flow allows you to chat with the **OpenAI** component through the **Prompt** component.
4. To examine the flow's **Prompt** component, click on the **Template** field of the **Prompt** component.
```plain
Answer the user as if you were a pirate.
User: {user_input}
Answer:
```
The **Template** instructs the LLM to accept `{user_input}` and `Answer the user as if you were a pirate.`.
5. 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**.
## Run the Basic Prompting flow {#ef0e8283bfb646f99bbb825462d8cbab}
1. To open the **Playground** pane, click **Playground**.
This is where you can interact with your AI.
2. Type a message and press Enter. The bot should respond in a markedly piratical manner!
## Modify the prompt for a different result {#dcea9df0cd51434db76717c78b1e9a94}
1. To modify your prompt results, in the **Prompt** template, click the **Template** field. 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 Hermione Granger.`
3. Run the workflow again. The response will be very different.
## Next steps {#63b6db6cb571489c86b3ae89051f1a4f}
---
Well done! You've built your first prompt in Langflow. 🎉
By dragging Langflow components to your workspace, you can create all sorts of interesting behaviors. Here are a couple of examples:
- [Memory Chatbot](/starter-projects-memory-chatbot)
- [Blog Writer](/starter-projects-blog-writer)
- [Document QA](/starter-projects-document-qa)

View file

@ -0,0 +1,40 @@
---
title: Welcome to Langflow
sidebar_position: 0
slug: /
---
Langflow is a new, visual framework for building multi-agent and RAG applications. It is open-source, Python-powered, fully customizable, and LLM and vector store agnostic.
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.
Langflow empowers developers to rapidly prototype and build AI applications with its user-friendly interface and powerful features. Whether you're a seasoned AI developer or just starting out, Langflow provides the tools you need to bring your AI ideas to life.
## Visual flow builder
Langflow is an intuitive visual flow builder. This drag-and-drop interface allows developers to create complex AI workflows without writing extensive code. You can easily connect different components, such as prompts, language models, and data sources, to build sophisticated AI applications.
![Langflow in action](/img/playground-response.png)
## Use cases
Langflow can be used for a wide range of AI applications, including:
* [Craft intelligent chatbots](/starter-projects-memory-chatbot)
* [Build document analysis systems](/starter-projects-document-qa)
* [Generate compelling content](/starter-projects-blog-writer)
* [Orchestrate multi-agent applications](/starter-projects-simple-agent)
## Community and support
Join Langflow's vibrant community of developers and AI enthusiasts. See the following resources to join discussions, share your projects, and get support:
* [Contribute to Langflow](contributing-how-to-contribute)
* [Langflow Discord Server](https://discord.gg/EqksyE2EX9)
* [@langflow_ai](https://twitter.com/langflow_ai) 
## Get started with Langflow
- [Install Langflow](/get-started-installation)
- [Quickstart](/get-started-quickstart)