diff --git a/docs/docs/getting-started/install.mdx b/docs/docs/getting-started/install-langflow.mdx similarity index 100% rename from docs/docs/getting-started/install.mdx rename to docs/docs/getting-started/install-langflow.mdx diff --git a/docs/docs/getting-started/quickstart.mdx b/docs/docs/getting-started/quickstart.mdx new file mode 100644 index 000000000..1caf71077 --- /dev/null +++ b/docs/docs/getting-started/quickstart.mdx @@ -0,0 +1,119 @@ +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"; + +# ⚡️ Quickstart + +This quickstart demonstrates how to install Langflow, run it locally, 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/) + +* [OpenAI API key](https://platform.openai.com) + +## Install Langflow + + + 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. + + +1. To install Langflow, enter the following command in pip or pipx: + +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. + + + If you encounter a problem, see [Possible Installation Issues](/migration/possible-installation-issues). + + +## 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. + +Prompts serve as the inputs to a large language model (LLM), acting as the interface between human instructions and computational tasks. + +By submitting natural language requests in a prompt to an LLM, you can obtain answers, generate text, and solve problems. + +1. From the Langflow dashboard, click **New Project**. +2. Select **Basic Prompting**. +3. The **Basic Prompting** flow is created. + + + +This flow allows you to chat with the **OpenAI** component via a **Prompt** component. +Examine the **Prompt** component. The **Template** field instructs the LLM to `Answer the user as if you were a pirate.` +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**. + +## Run the basic prompting flow + +1. Click the **Run** button. +The **Interaction Panel** opens, where you can converse with your bot. +2. Type a message and press Enter. +The bot responds in a markedly 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. +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. + +## Next steps + +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. + +* [Memory chatbot](/guides/memory-chatbot.mdx) +* [Blog writer](/guides/blog-writer.mdx) +* [Document QA](/guides/document-qa.mdx) + + diff --git a/docs/docs/index.mdx b/docs/docs/index.mdx index 7ee26d0e0..382bd2541 100644 --- a/docs/docs/index.mdx +++ b/docs/docs/index.mdx @@ -5,7 +5,9 @@ import Admonition from "@theme/Admonition"; # 👋 Welcome to Langflow -Langflow is an easy way to build from simple to complex AI applications. It is a low-code platform that allows you to integrate AI into everything you do. +Langflow is a low-code platform that allows you to integrate AI into everything you do. + +Use Langflow's simple but powerful UI to build any AI application you can dream up, from simple to complex. {" "} @@ -20,95 +22,15 @@ Langflow is an easy way to build from simple to complex AI applications. It is a ## 🚀 First steps -## Installation +* [Install Langflow](/getting-started/install) - Install and start a local Langflow server. -Make sure you have **Python 3.10** installed on your system. +* [Quickstart](/getting-started/quickstart) - Install Langflow, create a flow, and run it. -You can install **Langflow** with [pipx](https://pipx.pypa.io/stable/installation/) or with pip. +* [HuggingFace Spaces](/getting-started/huggingface-spaces) - Duplicate the Langflow preview space and try it out before you install. -Pipx can fetch the missing Python version for you, but you can also install it manually. +* [New to LLMs?](/getting-started/new-to-llms) - Learn more about LLMs, prompting, and more at [promptingguide.ai](https://promptingguide.ai). -```bash -# Remember to check if you have Python 3.10 installed -python -m pip install langflow -U -# or -pipx install langflow --python python3.10 --fetch-missing-python -``` - -Or you can install a pre-release version using: - -```bash -python -m pip install langflow --pre --force-reinstall -# or -pipx install langflow --python python3.10 --fetch-missing-python --pip-args="--pre --force-reinstall" -``` - - -

- Please, check out our [Possible Installation Issues - section](/migration/possible-installation-issues) if you encounter any - problems. -

-
- -We recommend using --force-reinstall to ensure you have the latest version of Langflow and its dependencies. - -### ⛓️ Running Langflow - -Langflow can be run in a variety of ways, including using the command-line interface (CLI) or HuggingFace Spaces. - -```bash -python -m langflow run # or langflow --help -``` - -#### 🤗 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. - -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) - -Remember to use a Chromium-based browser for the best experience. You'll be presented with the following screen: - - - -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! - -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. - -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. - -### 🖥️ Command Line Interface (CLI) - -Langflow provides a command-line interface (CLI) for easy management and configuration. - -#### Usage - -You can run the Langflow using the following command: - -```bash -langflow run [OPTIONS] -``` - -Find more information about the available options by running: - -```bash -python -m langflow --help -``` - -## Find out more about 1.0 - - -

- We are currently working on updating the documentation for Langflow 1.0. -

-
+## Learn more about Langflow 1.0 To get you learning more about what's new and why you should be excited about Langflow 1.0, go to [A new chapter for Langflow](/whats-new/a-new-chapter-langflow) and also come back often diff --git a/docs/sidebars.js b/docs/sidebars.js index 625f6ec8a..013d6f116 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -9,7 +9,7 @@ module.exports = { "getting-started/install-langflow", "getting-started/quickstart", "getting-started/huggingface-spaces", - "getting-started/cli", + //"getting-started/cli", "getting-started/new-to-llms", ], }, diff --git a/docs/static/img/quickstart.png b/docs/static/img/quickstart.png new file mode 100644 index 000000000..ff40f436b Binary files /dev/null and b/docs/static/img/quickstart.png differ