docs: update docs from notion (#2684)

Co-authored-by: lucaseduoli <lucaseduoli@users.noreply.github.com>
This commit is contained in:
github-actions[bot] 2024-07-12 16:36:29 -07:00 • committed by GitHub
commit b731983f31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
51 changed files with 524 additions and 223 deletions

View file

@ -6,16 +6,16 @@ slug: /components-custom-components
Langflow components can be created from within the platform, allowing users to extend the platform's functionality using Python code. They encapsulate are designed to be independent units, reusable across different workflows.
Langflow components can be created from within the platform, allowing users to extend the platform's functionality using Python code. They encapsulate are designed to be independent units, reusable across different workflows.
These components can be easily connected within a language model pipeline, adding freedom and flexibility to what can be included in between user and AI messages.
These components can be easily connected within a language model pipeline, adding freedom and flexibility to what can be included in between user and AI messages.
![](./238089171.png)
Since Langflow operates with Python behind the scenes, you can implement any Python function within a Custom Component. This means you can leverage the power of libraries such as Pandas, Scikit-learn, Numpy, and thousands of packages to create components that handle data processing in unlimited ways.
Since Langflow operates with Python behind the scenes, you can implement any Python function within a Custom Component. This means you can leverage the power of libraries such as Pandas, Scikit-learn, Numpy, and thousands of packages to create components that handle data processing in unlimited ways.
Custom Components are not just about extending functionality; they also streamline the development process. By creating reusable and configurable components, you can enhance the capabilities of Langflow, making it a powerful tool for developing complex workflows.

View file

@ -6,6 +6,15 @@ slug: /components-data
:::info
This page may contain outdated information. It will be updated as soon as possible.
:::
## API Request {#23da589293f74016a1f70d6d7c0fdc55}

View file

@ -6,6 +6,15 @@ slug: /components-embedding-models
:::info
This page may contain outdated information. It will be updated as soon as possible.
:::
## Amazon Bedrock Embeddings {#4ddcfde8c1664e358d3f16d718e944d8}

View file

@ -6,6 +6,15 @@ slug: /components-helpers
:::info
This page may contain outdated information. It will be updated as soon as possible.
:::
## Chat memory {#304dc4a3bea74efb9068093ff18a56ad}

View file

@ -30,9 +30,6 @@ You can find out more about Chat Input and other Inputs [here](/components-io).
### Chat Input {#2a5f02262f364f8fb75bcfa246e7bb26}
---
This component collects user input from the chat.
@ -43,11 +40,14 @@ This component collects user input from the chat.
- **Message:** Specifies the message text. It is a multiline text input.
- **Session ID:** Specifies the session ID of the chat history. If provided, the message will be saved in the Message History.
NOTE
:::note
If `As Data` is `true` and the `Message` is a `Data`, the data of the `Data` will be updated with the `Sender`, `Sender Name`, and `Session ID`.
:::
One significant capability of the Chat Input component is its ability to transform the Playground into a chat window. This feature is particularly valuable for scenarios requiring user input to initiate or influence the flow.
@ -55,9 +55,6 @@ One significant capability of the Chat Input component is its ability to transfo
### Text Input {#260aef3726834896b496b56cdefb6d4a}
---
The **Text Input** component adds an **Input** field on the Playground. This enables you to define parameters while running and testing your flow.
@ -99,9 +96,6 @@ You can find out more about it and the other Outputs [here](/components-io).
### Chat Output {#1edd49b72781432ea29d70acbda4e7e7}
---
This component sends a message to the chat.
@ -112,18 +106,18 @@ This component sends a message to the chat.
- **Session ID:** Specifies the session ID of the chat history. If provided, messages are saved in the Message History.
- **Message:** Specifies the text of the message.
NOTE
:::note
If `As Data` is `true` and the `Message` is a `Data`, the data in the `Data` is updated with the `Sender`, `Sender Name`, and `Session ID`.
:::
### Text Output {#b607000bc0c5402db0433c1a7d734d01}
---
This component displays text data to the user. It is useful when you want to show text without sending it to the chat.

View file

@ -6,6 +6,15 @@ slug: /components-models
:::info
This page may contain outdated information. It will be updated as soon as possible.
:::
## Amazon Bedrock {#3b8ceacef3424234814f95895a25bf43}

View file

@ -6,6 +6,15 @@ slug: /components-prompts
:::info
This page may contain outdated information. It will be updated as soon as possible.
:::
A prompt is the input provided to a language model, consisting of multiple components and can be parameterized using prompt templates. A prompt template offers a reproducible method for generating prompts, enabling easy customization through input variables.
@ -25,6 +34,6 @@ This component creates a prompt template with dynamic variables. This is useful
The `PromptTemplate` component enables users to create prompts and define variables that control how the model is instructed. Users can input a set of variables which the template uses to generate the prompt when a conversation starts.
After defining a variable in the prompt template, it acts as its own component input.
After defining a variable in the prompt template, it acts as its own component input.
- **template:** The template used to format an individual request.

View file

@ -6,6 +6,15 @@ slug: /components-vector-stores
:::info
This page may contain outdated information. It will be updated as soon as possible.
:::
### Astra DB {#453bcf5664154e37a920f1b602bd39da}
@ -298,11 +307,14 @@ Ensure the PostgreSQL server is accessible and configured correctly.
- **Search Kwargs:** Additional search parameters.
- **Pool Threads:** Number of threads.
NOTE
:::info
Ensure the Pinecone API key and environment are correctly configured.
:::
---
@ -381,11 +393,14 @@ Ensure the Pinecone API key and environment are correctly configured.
For detailed documentation, refer to the [Redis Documentation](https://python.langchain.com/docs/integrations/vectorstores/redis).
NOTE
:::info
Ensure the Redis server URL and index name are configured correctly. Provide a schema if no documents are available.
:::
---
@ -425,11 +440,14 @@ Ensure the Redis server URL and index name are configured correctly. Provide a s
- **Supabase URL:** Instance URL.
- **Table Name:** Optional table name.
NOTE
:::info
Ensure the Supabase service key, URL, and table name are properly configured.
:::
---
@ -471,11 +489,14 @@ Ensure the Supabase service key, URL, and table name are properly configured.
For more information, consult the [Vectara Component Documentation](https://python.langchain.com/docs/integrations/vectorstores/vectara).
NOTE
:::info
If inputs or files_url are provided, they will be processed accordingly.
:::
---

View file

@ -9,6 +9,9 @@ slug: /components
## Component {#0323a728d8314767adb907b998036bb4}
---
A component is a single building block within a flow. It consists of inputs, outputs, and parameters that define their functionality. These elements provide a convenient and straightforward way to compose LLM-based applications. Learn more about components and how they work below.

View file

@ -0,0 +1,104 @@
---
title: My Collection
sidebar_position: 3
slug: /365085a8-a90a-43f9-a779-f8769ec7eca1
---
:::info
This page may contain outdated information. It will be updated as soon as possible.
:::
My Collection is a space in Langflow where users can manage, organize, and access their flows and components. Flows and components are displayed as individual cards that provide relevant information.
![](./1289235516.png)
- **Folders**: Users can organize their projects into folders. Default folders include "My Projects" and the ability to create new folders. Hover over a folder to access options to download or delete it.
- **Search Bar** Enables users to quickly search through their flows and components.
- **Select All**: This feature allows users to select all projects displayed on the page for batch actions like moving, deleting, or exporting.
Click on a flow card to open it in Langflow Workspace or use the **Playground Button** for direct access to execute and interact with the flow’s chatbot interface.
## Folders {#776a3866273f4efbbbb2febdfc1baa12}
---
Folders can help you keep your projects organized in Langflow. They help you manage and categorize your work efficiently, making it easier to find and access the resources you need.
![](./1926471667.png)
Multiple projects can be stored in **folders**.
Folders allow you to categorize flows and components into manageable groups. This makes it easier to find and access specific projects quickly.
**My Projects** is a default folder where all new projects and components are initially stored unless specified otherwise. Users can create custom folders to better organize their work according to specific needs.
Hovering over a folder in Langflow provides options to either remove or download the entire folder, allowing you to keep an offline copy or migrate projects between environments
Create new folders with the **New folder** button. One folder can store multiple projects (as the default My Projects folder does).
You can download folders of projects as a single JSON file, and upload files and flows to your folder.
Click the **Trash** icon to delete a folder.
### How to Create Folders {#5ba5abe995c843e4a429e41413f9d539}
1. **Navigate to the Home Screen:**
- Go to your Langflow Home Page (outside of projects).
2. **Create a New Folder:**
- Click on the "New Folder" button
![](./1125619904.png)
- Double-click the new folder created to rename your folder appropriately to reflect its contents.
![](./945175915.png)
3. **Move Files:**
- Drag and drop files into the corresponding folders and subfolders to keep everything organized.
![](./711485342.gif)
### Best Practices for Organizing Folders {#66f23f8e129a48598a7bb4565a508360}
- **Categorize by Project:** Create a main folder for each project, then add projects for different aspects such as research, drafts, and final documents.
- **Use Descriptive Names:** Use clear and descriptive names for your folders to easily identify their contents at a glance.
### Example Structure {#ebe6acad99c24d6f9aaabf18e4a17ff4}
Here's an example of how you might organize folders and subfolders for a Langflow project:
```text
Langflow
├── Research
│ ├── Articles Project
│ ├── Data Project
│ └── Notes Project
└── Documents
├── RAG Project
└── Advanced RAG Project
```

View file

@ -6,7 +6,7 @@ slug: /configuration-api-keys
:::caution
:::info
This page may contain outdated information. It will be updated as soon as possible.
@ -18,7 +18,7 @@ This page may contain outdated information. It will be updated as soon as possib
Langflow provides an API key functionality that allows users to access their individual components and flows without traditional login authentication. The API key is a user-specific token that can be included in the request header or query parameter to authenticate API calls. This documentation outlines how to generate, use, and manage API keys in Langflow.
:::caution
:::info
The default user and password are set using the LANGFLOW_SUPERUSER and LANGFLOW_SUPERUSER_PASSWORD environment variables. The default values are langflow and langflow, respectively.

View file

@ -6,18 +6,25 @@ slug: /configuration-authentication
:::info
This page may contain outdated information. It will be updated as soon as possible.
:::
## Sign Up and Sign In {#f480dac5d2094d75a433de0b8e195641}
> ⚠️ WARNING
> This page may contain outdated information. It will be updated as soon as possible.
>
---
The login functionality in Langflow serves to authenticate users and protect sensitive routes in the application. Starting from version 0.5, Langflow introduces an enhanced login mechanism that is governed by a few environment variables. This allows new secure features.
## Environment variables {#3ed7cae6f5324ba0ac14783cf2a6cc07}
## Environment Variables {#3ed7cae6f5324ba0ac14783cf2a6cc07}
The following environment variables are crucial in configuring the login settings:
@ -37,9 +44,9 @@ langflow run --env-file .env
```
> ℹ︎ INFO
> It is critical not to expose these environment variables in your code repository. Always set them securely in your deployment environment, for example, using Docker secrets, Kubernetes ConfigMaps/Secrets, or dedicated secure environment configuration systems like AWS Secrets Manager.
>
> ℹ︎ INFO
> It is critical not to expose these environment variables in your code repository. Always set them securely in your deployment environment, for example, using Docker secrets, Kubernetes ConfigMaps/Secrets, or dedicated secure environment configuration systems like AWS Secrets Manager.
>
### _`LANGFLOW_AUTO_LOGIN`_ {#8b10059e0fbc44f3bc8ce63fe7692e7e}

View file

@ -6,8 +6,13 @@ slug: /configuration-backend-only
> ⚠️ WARNING
> This page may contain outdated information. It will be updated as soon as possible.
:::info
This page may contain outdated information. It will be updated as soon as possible.
:::
You can run Langflow in `--backend-only` mode to expose your Langflow app as an API, without running the frontend UI.
@ -115,11 +120,11 @@ def run_flow(message: str,
headers = {"x-api-key": api_key}
response = requests.post(api_url, json=payload, headers=headers)
return response.json()
# Setup any tweaks you want to apply to the flow
message = "message"
print(run_flow(message=message, flow_id=FLOW_ID))
```

View file

@ -6,9 +6,13 @@ slug: /configuration-cli
> ⚠️ WARNING
> This page may contain outdated information. It will be updated as soon as possible.
>
:::info
This page may contain outdated information. It will be updated as soon as possible.
:::
Langflow's Command Line Interface (CLI) is a powerful tool that allows you to interact with the Langflow server from the command line. The CLI provides a wide range of commands to help you shape Langflow to your needs.
@ -188,7 +192,6 @@ Create a superuser for Langflow.
langflow superuser
# or
python -m langflow superuser
```

View file

@ -9,6 +9,9 @@ slug: /contributing-community
## 🤖 Join **Langflow** Discord server {#80011e0bda004e83a8012c7ec6eab29a}
---
Join us to ask questions and showcase your projects.
@ -18,38 +21,32 @@ Let's bring together the building blocks of AI integration!
Langflow [Discord](https://discord.gg/EqksyE2EX9) server.
---
## 🐦 Stay tuned for **Langflow** on Twitter {#6a17ba5905ad4f7aa5347af7854779f6}
---
Follow [@langflow_ai](https://twitter.com/langflow_ai) on **Twitter** to get the latest news about **Langflow**.
---
## ⭐️ Star **Langflow** on GitHub {#c903a569934643799bf52b7d1b3514e1}
---
You can "star" **Langflow** in [GitHub](https://github.com/langflow-ai/langflow).
By adding a star, other users will be able to find it more easily and see that it has been already useful for others.
---
## 👀 Watch the GitHub repository for releases {#d0a089ed717742308bd17430e5ae6309}
---
You can "watch" **Langflow** in [GitHub](https://github.com/langflow-ai/langflow). If you select "Watching" instead of "Releases only" you will receive notifications when someone creates a new issue or question. You can also specify that you only want to be notified about new issues, discussions, PRs, etc. so you can try and help them solve those questions.
---
Thanks! 🚀

View file

@ -17,5 +17,8 @@ If you're looking for help with your code, consider posting a question on the [
## Issue labels {#e19eae656c914ce7aedc4f55565cc0bc}
---
[See this page](https://github.com/langflow-ai/langflow/labels) for an overview of the system we use to tag our issues and pull requests.

View file

@ -6,24 +6,34 @@ slug: /contributing-how-to-contribute
👋 Hello there! We welcome contributions from developers of all levels to our open-source project on [GitHub](https://github.com/langflow-ai/langflow). If you'd like to contribute, please check our contributing guidelines and help make Langflow more accessible.
:::info
This page may contain outdated information. It will be updated as soon as possible.
:::
👋 Hello there!
We welcome contributions from developers of all levels to our open-source project on [GitHub](https://github.com/langflow-ai/langflow). If you'd like to contribute, please check our contributing guidelines and help make Langflow more accessible.
As an open-source project in a rapidly developing field, we are extremely open to contributions, whether in the form of a new feature, improved infra, or better documentation.
To contribute to this project, please follow a ["fork and pull request"](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) workflow.
To contribute to this project, please follow a ["fork and pull request"](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) workflow. Please do not try to push directly to this repo unless you are a maintainer.
Please do not try to push directly to this repo unless you are a maintainer.
## Local Development {#0388cc3c758d434d994022863a6bafa9}
---
## Local development {#0388cc3c758d434d994022863a6bafa9}
You can develop Langflow using docker compose, or locally.
@ -42,12 +52,12 @@ This will install the pre-commit hooks, which will run `make format` on every
It is advised to run `make lint` before pushing to the repository.
## Run Locally {#5225c2ef0cd6403c9f6c6bbd888115e0}
---
## Run locally {#5225c2ef0cd6403c9f6c6bbd888115e0}
Langflow can run locally by cloning the repository and installing the dependencies. We recommend using a virtual environment to isolate the dependencies from your system.
@ -68,24 +78,24 @@ And the frontend:
`make frontend`
## Docker Compose {#b07f359414ff4220ac615afc364ee46e}
---
## Docker compose {#b07f359414ff4220ac615afc364ee46e}
The following snippet will run the backend and frontend in separate containers. The frontend will be available at `localhost:3000` and the backend at `localhost:7860`.
`docker compose up --build# ormake dev build=1`
---
## Documentation {#5f34bcaeccdc4489b0c5ee2c4a21354e}
---
The documentation is built using [Docusaurus](https://docusaurus.io/). To run the documentation locally, run the following commands:
@ -104,7 +114,7 @@ The documentation will be available at `localhost:3000` and all the files are
New components are added as objects of the [CustomComponent](https://github.com/langflow-ai/langflow/blob/dev/src/backend/base/langflow/interface/custom/custom_component/custom_component.py) class and any dependencies are added to the [pyproject.toml](https://github.com/langflow-ai/langflow/blob/dev/pyproject.toml#L27) file.
## Add an example component {#8caae106c853465d83183e7f5272e4d8}
### Add an example component {#8caae106c853465d83183e7f5272e4d8}
You have a new document loader called **MyCustomDocumentLoader** and it would look awesome in Langflow.
@ -122,15 +132,24 @@ You have a new document loader called **MyCustomDocumentLoader** and it would
## User Sharing {#34ac32e11f344eab892b94531a21d2c9}
---
You might want to share and test your custom component with others, but don't need it merged into the main source code.
If so, you can share your component on the Langflow store.
1. [Register at the Langflow store](https://www.langflow.store/login/).
2. Undergo pre-validation before receiving an API key.
3. To deploy your amazing component directly to the Langflow store, without it being merged into the main source code, navigate to your flow, and then click **Share**. The share window appears:
![](./683296796.png)

View file

@ -6,19 +6,30 @@ slug: /contributing-telemetry
:::info
This page may contain outdated information. It will be updated as soon as possible.
:::
Our system uses anonymous telemetry to collect essential usage statistics to enhance functionality and user experience. This data helps us identify commonly used features and areas needing improvement, ensuring our development efforts align with what you need.
INFO
:::note
We respect your privacy and are committed to protecting your data. We do not collect any personal information or sensitive data. All telemetry data is anonymized and used solely for improving Langflow.
You can opt-out of telemetry by setting the `LANGFLOW_DO_NOT_TRACK` or `DO_NOT_TRACK` environment variable to `true` before running Langflow. This will disable telemetry data collection.
:::
## Data Collected Includes: {#1734ed50fb4a4a45aaa84185b44527ca}
## Data Collected Includes {#1734ed50fb4a4a45aaa84185b44527ca}
### Run {#2d427dca4f0148ae867997f6789e8bfb}

View file

@ -11,10 +11,19 @@ This guide will help you get LangFlow up and running using Docker and Docker Com
## Prerequisites {#856bb2d98156402bbd1980365b98110c}
---
- Docker
- Docker Compose
## Clone repo and build Docker container {#ba89773aa8b8425b985bfe7ba91c35cc}
## Docker {#55b5d304f2294e47b0dcd3e069cf5e67}
---
### Clone repo and build Docker container {#ba89773aa8b8425b985bfe7ba91c35cc}
1. Clone the LangFlow repository:
@ -32,7 +41,7 @@ This guide will help you get LangFlow up and running using Docker and Docker Com
LangFlow will now be accessible at [http://localhost:7860/](http://localhost:7860/).
## Docker Compose configuration {#02226209cad24185a6ec5b69bd820d0f}
### Docker Compose configuration {#02226209cad24185a6ec5b69bd820d0f}
The Docker Compose configuration spins up two services: `langflow` and `postgres`.
@ -69,7 +78,7 @@ Volumes:
- `langflow-postgres`: This volume is mapped to `/var/lib/postgresql/data` in the container.
## Switch to a specific LangFlow version {#2b3e191ea48f4feab89242433cf012d5}
### Switch to a specific LangFlow version {#2b3e191ea48f4feab89242433cf012d5}
If you want to use a specific version of LangFlow, you can modify the `image` field under the `langflow` service in the Docker Compose file. For example, to use version 1.0-alpha, change `langflowai/langflow:latest` to `langflowai/langflow:1.0-alpha`.

View file

@ -6,22 +6,37 @@ slug: /deployment-gcp
# Deploy on Google Cloud Platform {#4ee01cda736c4f7396936409f23cdb52}
:::info
This page may contain outdated information. It will be updated as soon as possible.
:::
> Warning: This page may contain outdated information. It will be updated as soon as possible.
## Run Langflow from a New Google Cloud Project {#ce729796d7404ccdb627bee47d6a4399}
## Deploy on Google Cloud Platform {#4ee01cda736c4f7396936409f23cdb52}
---
### Run Langflow from a New Google Cloud Project {#ce729796d7404ccdb627bee47d6a4399}
This guide will help you set up a Langflow development VM in a Google Cloud Platform project using Google Cloud Shell.
> Note: When Cloud Shell opens, be sure to select Trust repo. Some gcloud commands might not run in an ephemeral Cloud Shell environment.
:::info
When Cloud Shell opens, be sure to select Trust repo. Some gcloud commands might not run in an ephemeral Cloud Shell environment.
:::
## Standard VM {#245b47b450dd4159a5c56a5124bab84f}
### Standard VM {#245b47b450dd4159a5c56a5124bab84f}
[embed](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/langflow-ai/langflow&working_dir=scripts/gcp&shellonly=true&tutorial=walkthroughtutorial.md)

Some files were not shown because too many files have changed in this diff Show more