diff --git a/.devcontainer/demo/README.md b/.devcontainer/demo/README.md
index d0ad14f9e..0a828a009 100644
--- a/.devcontainer/demo/README.md
+++ b/.devcontainer/demo/README.md
@@ -1,6 +1,6 @@
-# LangFlow Demo Codespace Readme
+# Langflow Demo Codespace Readme
-These instructions will walk you through the process of running a LangFlow demo via GitHub Codespaces.
+These instructions will walk you through the process of running a Langflow demo via GitHub Codespaces.
## Setup
diff --git a/.env.example b/.env.example
new file mode 100644
index 000000000..6c6d2f667
--- /dev/null
+++ b/.env.example
@@ -0,0 +1,47 @@
+# Description: Example of .env file
+# Usage: Copy this file to .env and change the values
+# according to your needs
+# Do not commit .env file to git
+# Do not change .env.example file
+
+# Database URL
+# Postgres example: LANGFLOW_DATABASE_URL=postgresql://postgres:postgres@localhost:5432/langflow
+# SQLite example:
+LANGFLOW_DATABASE_URL=sqlite:///./langflow.db
+
+# Cache type
+LANGFLOW_LANGCHAIN_CACHE=SQLiteCache
+
+# Server host
+# Example: LANGFLOW_HOST=127.0.0.1
+LANGFLOW_HOST=
+
+# Worker processes
+# Example: LANGFLOW_WORKERS=1
+LANGFLOW_WORKERS=
+
+# Server port
+# Example: LANGFLOW_PORT=7860
+LANGFLOW_PORT=
+
+# Logging level
+# Example: LANGFLOW_LOG_LEVEL=critical
+LANGFLOW_LOG_LEVEL=
+
+# Path to the log file
+# Example: LANGFLOW_LOG_FILE=logs/langflow.log
+LANGFLOW_LOG_FILE=
+
+# Path to the frontend directory containing build files
+# Example: LANGFLOW_FRONTEND_PATH=/path/to/frontend/build/files
+LANGFLOW_FRONTEND_PATH=
+
+# Whether to open the browser after starting the server
+# Values: true, false
+# Example: LANGFLOW_OPEN_BROWSER=true
+LANGFLOW_OPEN_BROWSER=
+
+# Whether to remove API keys from the projects saved in the database
+# Values: true, false
+# Example: LANGFLOW_REMOVE_API_KEYS=false
+LANGFLOW_REMOVE_API_KEYS=
diff --git a/.githooks/pre-commit b/.githooks/pre-commit
old mode 100644
new mode 100755
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
new file mode 100644
index 000000000..b480496ef
--- /dev/null
+++ b/.github/workflows/codeql.yml
@@ -0,0 +1,66 @@
+name: "CodeQL"
+
+on:
+ push:
+ branches: [ 'dev', 'main' ]
+ pull_request:
+ # The branches below must be a subset of the branches above
+ branches: [ 'dev' ]
+ schedule:
+ - cron: '17 2 * * 1'
+
+jobs:
+ analyze:
+ name: Analyze
+ runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
+ timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
+ permissions:
+ actions: read
+ contents: read
+ security-events: write
+
+ strategy:
+ fail-fast: false
+ matrix:
+ language: [ 'python', 'javascript' ]
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
+ # Use only 'java' to analyze code written in Java, Kotlin or both
+ # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
+ # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+
+ # Initializes the CodeQL tools for scanning.
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v2
+ with:
+ languages: ${{ matrix.language }}
+ # If you wish to specify custom queries, you can do so here or in a config file.
+ # By default, queries listed here will override any specified in a config file.
+ # Prefix the list here with "+" to use these queries and those in the config file.
+
+ # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
+ # queries: security-extended,security-and-quality
+
+
+ # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
+ # If this step fails, then you should remove it and run the build manually (see below)
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@v2
+
+ # โน๏ธ Command-line programs to run using the OS shell.
+ # ๐ See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
+
+ # If the Autobuild fails above, remove it and uncomment the following three lines.
+ # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
+
+ # - run: |
+ # echo "Run, Build Application using script"
+ # ./location_of_script_within_repo/buildscript.sh
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v2
+ with:
+ category: "/language:${{matrix.language}}"
diff --git a/.github/workflows/deploy_gh-pages.yml b/.github/workflows/deploy_gh-pages.yml
new file mode 100644
index 000000000..ffb52f941
--- /dev/null
+++ b/.github/workflows/deploy_gh-pages.yml
@@ -0,0 +1,39 @@
+name: Deploy to GitHub Pages
+
+on:
+ push:
+ branches:
+ - main
+ # Review gh actions docs if you want to further define triggers, paths, etc
+ # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
+
+jobs:
+ deploy:
+ name: Deploy to GitHub Pages
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-node@v3
+ with:
+ node-version: 18
+ cache: npm
+ cache-dependency-path: ./docs/package-lock.json
+
+ - name: Install dependencies
+ run: cd docs && npm install
+ - name: Build website
+ run: cd docs && npm run build
+
+ # Popular action to deploy to GitHub Pages:
+ # Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
+ - name: Deploy to GitHub Pages
+ uses: peaceiris/actions-gh-pages@v3
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ # Build output to publish to the `gh-pages` branch:
+ publish_dir: ./docs/build
+ # The following lines assign commit authorship to the official
+ # GH-Actions bot for deploys to `gh-pages` branch:
+ # https://github.com/actions/checkout/issues/13#issuecomment-724415212
+ # The GH actions bot is used by default if you didn't specify the two fields.
+ # You can swap them out with your own user credentials.
diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml
new file mode 100644
index 000000000..1b46e48b8
--- /dev/null
+++ b/.github/workflows/pre-release.yml
@@ -0,0 +1,49 @@
+name: pre-release
+
+on:
+ pull_request:
+ types:
+ - closed
+ branches:
+ - dev
+ paths:
+ - "pyproject.toml"
+
+env:
+ POETRY_VERSION: "1.5.1"
+
+jobs:
+ if_release:
+ if: |
+ ${{ github.event.pull_request.merged == true }}
+ && ${{ contains(github.event.pull_request.labels.*.name, 'pre-release') }}
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - name: Install poetry
+ run: pipx install poetry==$POETRY_VERSION
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v4
+ with:
+ python-version: "3.10"
+ cache: "poetry"
+ - name: Build project for distribution
+ run: make build
+ - name: Check Version
+ id: check-version
+ run: |
+ echo version=$(poetry version --short) >> $GITHUB_OUTPUT
+ - name: Create Release
+ uses: ncipollo/release-action@v1
+ with:
+ artifacts: "dist/*"
+ token: ${{ secrets.GITHUB_TOKEN }}
+ draft: false
+ generateReleaseNotes: true
+ tag: v${{ steps.check-version.outputs.version }}
+ commit: main
+ - name: Publish to PyPI
+ env:
+ POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
+ run: |
+ poetry publish
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 2d5284ad3..12f72f5f8 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -10,7 +10,7 @@ on:
- "pyproject.toml"
env:
- POETRY_VERSION: "1.4.0"
+ POETRY_VERSION: "1.5.1"
jobs:
if_release:
diff --git a/.gitignore b/.gitignore
index 36af35fa2..3b6cfebbf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
+# This is to avoid Opencommit hook from getting pushed
+prepare-commit-msg
# Logs
logs
*.log
@@ -242,3 +244,12 @@ dmypy.json
# Poetry
.testenv/*
langflow.db
+
+
+.githooks/prepare-commit-msg
+.langchain.db
+
+# docusaurus
+.docusaurus/
+
+/tmp/*
diff --git a/.readthedocs.yaml b/.readthedocs.yaml
new file mode 100644
index 000000000..82dfe1f85
--- /dev/null
+++ b/.readthedocs.yaml
@@ -0,0 +1,31 @@
+# Read the Docs configuration file for Sphinx projects
+# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
+
+# Required
+version: 2
+
+# Set the OS, Python version and other tools you might need
+build:
+ os: ubuntu-22.04
+ tools:
+ python: "3.11"
+ # You can also specify other tool versions:
+ # nodejs: "19"
+ # rust: "1.64"
+ # golang: "1.19"
+
+# Build documentation in the "docs/" directory with Sphinx
+sphinx:
+ configuration: docs/conf.py
+
+# Optionally build your docs in additional formats such as PDF and ePub
+# formats:
+# - pdf
+# - epub
+
+# Optional but recommended, declare the Python requirements required
+# to build your documentation
+# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
+# python:
+# install:
+# - requirements: docs/requirements.txt
\ No newline at end of file
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 3b458aa81..e09e76cc8 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -6,7 +6,8 @@
"request": "launch",
"module": "uvicorn",
"args": [
- "langflow.main:app",
+ "--factory",
+ "langflow.main:create_app",
"--port",
"7860",
"--reload",
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 001417643..da7ec1977 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,6 +1,6 @@
-# Contributing to LangFlow
+# Contributing to Langflow
-Hello there! We appreciate your interest in contributing to LangFlow.
+Hello there! We appreciate your interest in contributing to Langflow.
As an open-source project in a rapidly developing field, we are extremely open
to contributions, whether it be in the form of a new feature, improved infra, or better documentation.
@@ -9,7 +9,7 @@ Please do not try to push directly to this repo unless you are a maintainer.
## ๐บ๏ธContributing Guidelines
-### ๐ฉGitHub Issues
+## ๐ฉGitHub Issues
Our [issues](https://github.com/logspace-ai/langflow/issues) page is kept up to date
with bugs, improvements, and feature requests. There is a taxonomy of labels to help
@@ -33,18 +33,19 @@ so that more people can benefit from it.
[collapses the content](https://developer.mozilla.org/en/docs/Web/HTML/Element/details)
so it only becomes visible on click, making the issue easier to read and follow.
-### Issue labels
+## Issue labels
[See this page](https://github.com/logspace-ai/langflow/labels) for an overview of
the system we use to tag our issues and pull requests.
+## Local development
-### Local development
-You can develop LangFlow using docker compose, or locally.
+You can develop Langflow using docker compose, or locally.
We provide a .vscode/launch.json file for debugging the backend in VSCode, which is a lot faster than using docker compose.
Setting up hooks:
+
```bash
make init
```
@@ -53,30 +54,46 @@ This will install the pre-commit hooks, which will run `make format` on every co
It is advised to run `make lint` before pushing to the repository.
-#### **Locally**
-Run locally by cloning the repository and installing the dependencies. We recommend using a virtual environment to isolate the dependencies from your system.
+## Run locally
+
+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.
Before you start, make sure you have the following installed:
- - Poetry (>=1.4)
- - Node.js
-For the backend, you will need to install the dependencies and start the development server.
+- Poetry (>=1.4)
+- Node.js
+
+Then, in the root folder, install the dependencies and start the development server for the backend:
+
```bash
-make install_backend
make backend
```
-For the frontend, you will need to install the dependencies and start the development server.
+
+And the frontend:
+
```bash
make frontend
```
+## Docker compose
+
+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**
-This will run the backend and frontend in separate containers. The frontend will be available at `localhost:3000` and the backend at `localhost:7860`.
```bash
docker compose up --build
# or
make dev build=1
```
+## Documentation
+The documentation is built using [Docusaurus](https://docusaurus.io/). To run the documentation locally, run the following commands:
+
+```bash
+cd docs
+npm install
+npm run start
+```
+
+The documentation will be available at `localhost:3000` and all the files are located in the `docs/docs` folder.
+Once you are done with your changes, you can create a Pull Request to the `main` branch.
diff --git a/GCP_DEPLOYMENT.md b/GCP_DEPLOYMENT.md
index 36c81e19f..e00e9b1f8 100644
--- a/GCP_DEPLOYMENT.md
+++ b/GCP_DEPLOYMENT.md
@@ -13,7 +13,7 @@ This script sets up a Debian-based VM with the Langflow package, Nginx, and the
## Spot/Preemptible Instance
-[](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/genome21/langflow&working_dir=scripts&shellonly=true&tutorial=walkthroughtutorial_spot.md)
+[](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/logspace-ai/langflow&working_dir=scripts&shellonly=true&tutorial=walkthroughtutorial_spot.md)
When running as a [spot (preemptible) instance](https://cloud.google.com/compute/docs/instances/preemptible), the code and VM will behave the same way as in a regular instance, executing the startup script to configure the environment, install necessary dependencies, and run the Langflow application. However, **due to the nature of spot instances, the VM may be terminated at any time if Google Cloud needs to reclaim the resources**. This makes spot instances suitable for fault-tolerant, stateless, or interruptible workloads that can handle unexpected terminations and restarts.
diff --git a/Makefile b/Makefile
index 6c1989ee1..ff540da0d 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,8 @@ all: help
init:
@echo 'Installing pre-commit hooks'
git config core.hooksPath .githooks
+ @echo 'Making pre-commit hook executable'
+ chmod +x .githooks/pre-commit
@echo 'Installing backend dependencies'
make install_backend
@echo 'Installing frontend dependencies'
@@ -44,13 +46,18 @@ install_backend:
backend:
make install_backend
- poetry run uvicorn langflow.main:app --port 7860 --reload --log-level debug
+ poetry run uvicorn --factory src.backend.langflow.main:create_app --port 7860 --reload --log-level debug
build_and_run:
echo 'Removing dist folder'
rm -rf dist
make build && poetry run pip install dist/*.tar.gz && poetry run langflow
+build_and_install:
+ echo 'Removing dist folder'
+ rm -rf dist
+ make build && poetry run pip install dist/*.tar.gz
+
build_frontend:
cd src/frontend && CI='' npm run build
cp -r src/frontend/build src/backend/langflow/frontend
diff --git a/README.md b/README.md
index 130d59ee6..dcd91e075 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-# โ๏ธ LangFlow
+# โ๏ธ Langflow
~ An effortless way to experiment and prototype [LangChain](https://github.com/hwchase17/langchain) pipelines ~
@@ -14,36 +14,120 @@
-
-
+
+
-
-## ๐ฆ Installation
+# Table of Contents
+
+- [โ๏ธ Langflow](#๏ธ-langflow)
+- [Table of Contents](#table-of-contents)
+- [๐ฆ Installation](#-installation)
+ - [Locally](#locally)
+ - [HuggingFace Spaces](#huggingface-spaces)
+- [๐ฅ๏ธ Command Line Interface (CLI)](#๏ธ-command-line-interface-cli)
+ - [Usage](#usage)
+ - [Environment Variables](#environment-variables)
+- [Deployment](#deployment)
+ - [Deploy Langflow on Google Cloud Platform](#deploy-langflow-on-google-cloud-platform)
+ - [Deploy Langflow on Jina AI Cloud](#deploy-langflow-on-jina-ai-cloud)
+ - [API Usage](#api-usage)
+ - [Deploy on Railway](#deploy-on-railway)
+ - [Deploy on Render](#deploy-on-render)
+- [๐จ Creating Flows](#-creating-flows)
+- [๐ Contributing](#-contributing)
+- [๐ License](#-license)
+
+# ๐ฆ Installation
+
### Locally
-You can install LangFlow from pip:
+
+You can install Langflow from pip:
```shell
+# This installs the package without dependencies for local models
pip install langflow
```
+To use local models (e.g llama-cpp-python) run:
+
+```shell
+pip install langflow[local]
+```
+
+This will install the following dependencies:
+
+- [CTransformers](https://github.com/marella/ctransformers)
+- [llama-cpp-python](https://github.com/abetlen/llama-cpp-python)
+- [sentence-transformers](https://github.com/UKPLab/sentence-transformers)
+
+You can still use models from projects like LocalAI
+
Next, run:
```shell
python -m langflow
```
+
or
+
```shell
-langflow
+langflow # or langflow --help
```
-### Deploy Langflow on Google Cloud Platform
+### HuggingFace Spaces
+
+You can also check it out on [HuggingFace Spaces](https://huggingface.co/spaces/Logspace/Langflow) and run it in your browser! You can even clone it and have your own copy of Langflow to play with.
+
+# ๐ฅ๏ธ 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:
+
+```shell
+langflow [OPTIONS]
+```
+
+Each option is detailed below:
+
+- `--help`: Displays all available options.
+- `--host`: Defines the host to bind the server to. Can be set using the `LANGFLOW_HOST` environment variable. The default is `127.0.0.1`.
+- `--workers`: Sets the number of worker processes. Can be set using the `LANGFLOW_WORKERS` environment variable. The default is `1`.
+- `--timeout`: Sets the worker timeout in seconds. The default is `60`.
+- `--port`: Sets the port to listen on. Can be set using the `LANGFLOW_PORT` environment variable. The default is `7860`.
+- `--config`: Defines the path to the configuration file. The default is `config.yaml`.
+- `--env-file`: Specifies the path to the .env file containing environment variables. The default is `.env`.
+- `--log-level`: Defines the logging level. Can be set using the `LANGFLOW_LOG_LEVEL` environment variable. The default is `critical`.
+- `--components-path`: Specifies the path to the directory containing custom components. Can be set using the `LANGFLOW_COMPONENTS_PATH` environment variable. The default is `langflow/components`.
+- `--log-file`: Specifies the path to the log file. Can be set using the `LANGFLOW_LOG_FILE` environment variable. The default is `logs/langflow.log`.
+- `--cache`: Selects the type of cache to use. Options are `InMemoryCache` and `SQLiteCache`. Can be set using the `LANGFLOW_LANGCHAIN_CACHE` environment variable. The default is `SQLiteCache`.
+- `--jcloud/--no-jcloud`: Toggles the option to deploy on Jina AI Cloud. The default is `no-jcloud`.
+- `--dev/--no-dev`: Toggles the development mode. The default is `no-dev`.
+- `--database-url`: Sets the database URL to connect to. If not provided, a local SQLite database will be used. Can be set using the `LANGFLOW_DATABASE_URL` environment variable.
+- `--path`: Specifies the path to the frontend directory containing build files. This option is for development purposes only. Can be set using the `LANGFLOW_FRONTEND_PATH` environment variable.
+- `--open-browser/--no-open-browser`: Toggles the option to open the browser after starting the server. Can be set using the `LANGFLOW_OPEN_BROWSER` environment variable. The default is `open-browser`.
+- `--remove-api-keys/--no-remove-api-keys`: Toggles the option to remove API keys from the projects saved in the database. Can be set using the `LANGFLOW_REMOVE_API_KEYS` environment variable. The default is `no-remove-api-keys`.
+- `--install-completion [bash|zsh|fish|powershell|pwsh]`: Installs completion for the specified shell.
+- `--show-completion [bash|zsh|fish|powershell|pwsh]`: Shows completion for the specified shell, allowing you to copy it or customize the installation.
+
+### Environment Variables
+
+You can configure many of the CLI options using environment variables. These can be exported in your operating system or added to a `.env` file and loaded using the `--env-file` option.
+
+A sample `.env` file named `.env.example` is included with the project. Copy this file to a new file named `.env` and replace the example values with your actual settings. If you're setting values in both your OS and the `.env` file, the `.env` settings will take precedence.
+
+# Deployment
+
+## Deploy Langflow on Google Cloud Platform
Follow our step-by-step guide to deploy Langflow on Google Cloud Platform (GCP) using Google Cloud Shell. The guide is available in the [**Langflow in Google Cloud Platform**](GCP_DEPLOYMENT.md) document.
@@ -51,16 +135,17 @@ Alternatively, click the **"Open in Cloud Shell"** button below to launch Google
[](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/logspace-ai/langflow&working_dir=scripts&shellonly=true&tutorial=walkthroughtutorial_spot.md)
-
-### Deploy Langflow on [Jina AI Cloud](https://github.com/jina-ai/langchain-serve)
+## Deploy Langflow on [Jina AI Cloud](https://github.com/jina-ai/langchain-serve)
Langflow integrates with langchain-serve to provide a one-command deployment to Jina AI Cloud.
-Start by installing `langchain-serve` with
+Start by installing `langchain-serve` with
```bash
+pip install langflow[deploy]
+# or
pip install -U langchain-serve
-```
+```
Then, run:
@@ -77,33 +162,33 @@ langflow --jcloud
Show complete (example) output
- ```text
- ๐ Deploying Langflow server on Jina AI Cloud
- โญโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ Flow is available! โโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
- โ โ
- โ ID langflow-e3dd8820ec โ
- โ Gateway (Websocket) wss://langflow-e3dd8820ec.wolf.jina.ai โ
- โ Dashboard https://dashboard.wolf.jina.ai/flow/e3dd8820ec โ
- โ โ
- โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
- โญโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
- โ App ID โ langflow-e3dd8820ec โ
- โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
- โ Phase โ Serving โ
- โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
- โ Endpoint โ wss://langflow-e3dd8820ec.wolf.jina.ai โ
- โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
- โ App logs โ dashboards.wolf.jina.ai โ
- โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
- โ Swagger UI โ https://langflow-e3dd8820ec.wolf.jina.ai/docs โ
- โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
- โ OpenAPI JSON โ https://langflow-e3dd8820ec.wolf.jina.ai/openapi.json โ
- โฐโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
+```text
+ ๐ Deploying Langflow server on Jina AI Cloud
+ โญโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ Flow is available! โโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
+ โ โ
+ โ ID langflow-e3dd8820ec โ
+ โ Gateway (Websocket) wss://langflow-e3dd8820ec.wolf.jina.ai โ
+ โ Dashboard https://dashboard.wolf.jina.ai/flow/e3dd8820ec โ
+ โ โ
+ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
+ โญโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
+ โ App ID โ langflow-e3dd8820ec โ
+ โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
+ โ Phase โ Serving โ
+ โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
+ โ Endpoint โ wss://langflow-e3dd8820ec.wolf.jina.ai โ
+ โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
+ โ App logs โ dashboards.wolf.jina.ai โ
+ โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
+ โ Swagger UI โ https://langflow-e3dd8820ec.wolf.jina.ai/docs โ
+ โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
+ โ OpenAPI JSON โ https://langflow-e3dd8820ec.wolf.jina.ai/openapi.json โ
+ โฐโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
- ๐ Langflow server successfully deployed on Jina AI Cloud ๐
- ๐ Click on the link to open the server (please allow ~1-2 minutes for the server to startup): https://langflow-e3dd8820ec.wolf.jina.ai/
- ๐ Read more about managing the server: https://github.com/jina-ai/langchain-serve
- ```
+ ๐ Langflow server successfully deployed on Jina AI Cloud ๐
+ ๐ Click on the link to open the server (please allow ~1-2 minutes for the server to startup): https://langflow-e3dd8820ec.wolf.jina.ai/
+ ๐ Read more about managing the server: https://github.com/jina-ai/langchain-serve
+```
@@ -114,41 +199,64 @@ You can use Langflow directly on your browser, or use the API endpoints on Jina
Show API usage (with python)
- ```python
- import json
- import requests
+```python
+import requests
- FLOW_PATH = "Time_traveller.json"
+BASE_API_URL = "https://langflow-e3dd8820ec.wolf.jina.ai/api/v1/predict"
+FLOW_ID = "864c4f98-2e59-468b-8e13-79cd8da07468"
+# You can tweak the flow by adding a tweaks dictionary
+# e.g {"OpenAI-XXXXX": {"model_name": "gpt-4"}}
+TWEAKS = {
+"ChatOpenAI-g4jEr": {},
+"ConversationChain-UidfJ": {}
+}
- # HOST = 'http://localhost:7860'
- HOST = 'https://langflow-f1ed20e309.wolf.jina.ai'
- API_URL = f'{HOST}/predict'
+def run_flow(message: str, flow_id: str, tweaks: dict = None) -> dict:
+ """
+ Run a flow with a given message and optional tweaks.
- def predict(message):
- with open(FLOW_PATH, "r") as f:
- json_data = json.load(f)
- payload = {'exported_flow': json_data, 'message': message}
- response = requests.post(API_URL, json=payload)
- return response.json()
+ :param message: The message to send to the flow
+ :param flow_id: The ID of the flow to run
+ :param tweaks: Optional tweaks to customize the flow
+ :return: The JSON response from the flow
+ """
+ api_url = f"{BASE_API_URL}/{flow_id}"
+ payload = {"message": message}
- predict('Take me to 1920s Bangalore')
- ```
+ if tweaks:
+ payload["tweaks"] = tweaks
- ```json
- {
- "result": "Great choice! Bangalore in the 1920s was a vibrant city with a rich cultural and political scene. Here are some suggestions for things to see and do:\n\n1. Visit the Bangalore Palace - built in 1887, this stunning palace is a perfect example of Tudor-style architecture. It was home to the Maharaja of Mysore and is now open to the public.\n\n2. Attend a performance at the Ravindra Kalakshetra - this cultural center was built in the 1920s and is still a popular venue for music and dance performances.\n\n3. Explore the neighborhoods of Basavanagudi and Malleswaram - both of these areas have retained much of their old-world charm and are great places to walk around and soak up the atmosphere.\n\n4. Check out the Bangalore Club - founded in 1868, this exclusive social club was a favorite haunt of the British expat community in the 1920s.\n\n5. Attend a meeting of the Indian National Congress - founded in 1885, the INC was a major force in the Indian independence movement and held many meetings and rallies in Bangalore in the 1920s.\n\nHope you enjoy your trip to 1920s Bangalore!"
- }
- ```
+ response = requests.post(api_url, json=payload)
+ return response.json()
+
+# Setup any tweaks you want to apply to the flow
+print(run_flow("Your message", flow_id=FLOW_ID, tweaks=TWEAKS))
+```
+
+```json
+{
+ "result": "Great choice! Bangalore in the 1920s was a vibrant city with a rich cultural and political scene. Here are some suggestions for things to see and do:\n\n1. Visit the Bangalore Palace - built in 1887, this stunning palace is a perfect example of Tudor-style architecture. It was home to the Maharaja of Mysore and is now open to the public.\n\n2. Attend a performance at the Ravindra Kalakshetra - this cultural center was built in the 1920s and is still a popular venue for music and dance performances.\n\n3. Explore the neighborhoods of Basavanagudi and Malleswaram - both of these areas have retained much of their old-world charm and are great places to walk around and soak up the atmosphere.\n\n4. Check out the Bangalore Club - founded in 1868, this exclusive social club was a favorite haunt of the British expat community in the 1920s.\n\n5. Attend a meeting of the Indian National Congress - founded in 1885, the INC was a major force in the Indian independence movement and held many meetings and rallies in Bangalore in the 1920s.\n\nHope you enjoy your trip to 1920s Bangalore!"
+}
+```
> Read more about resource customization, cost, and management of Langflow apps on Jina AI Cloud in the **[langchain-serve](https://github.com/jina-ai/langchain-serve)** repository.
+## Deploy on Railway
-## ๐จ Creating Flows
+[](https://railway.app/template/Emy2sU?referralCode=MnPSdg)
-Creating flows with LangFlow is easy. Simply drag sidebar components onto the canvas and connect them together to create your pipeline. LangFlow provides a range of [LangChain components](https://langchain.readthedocs.io/en/latest/reference.html) to choose from, including LLMs, prompt serializers, agents, and chains.
+## Deploy on Render
+
+
+
+
+
+# ๐จ Creating Flows
+
+Creating flows with Langflow is easy. Simply drag sidebar components onto the canvas and connect them together to create your pipeline. Langflow provides a range of [LangChain components](https://langchain.readthedocs.io/en/latest/reference.html) to choose from, including LLMs, prompt serializers, agents, and chains.
Explore by editing prompt parameters, link chains and agents, track an agent's thought process, and export your flow.
@@ -161,18 +269,20 @@ from langflow import load_flow_from_json
flow = load_flow_from_json("path/to/flow.json")
# Now you can use it like any chain
-flow("Hey, have you heard of LangFlow?")
+flow("Hey, have you heard of Langflow?")
```
+# ๐ Contributing
-## ๐ Contributing
+We welcome contributions from developers of all levels to our open-source project on GitHub. If you'd like to contribute, please check our [contributing guidelines](./CONTRIBUTING.md) and help make Langflow more accessible.
-We welcome contributions from developers of all levels to our open-source project on GitHub. If you'd like to contribute, please check our [contributing guidelines](./CONTRIBUTING.md) and help make LangFlow more accessible.
+Join our [Discord](https://discord.com/invite/EqksyE2EX9) server to ask questions, make suggestions and showcase your projects! ๐ฆพ
+
+
[](https://star-history.com/#logspace-ai/langflow&Date)
+# ๐ License
-## ๐ License
-
-LangFlow is released under the MIT License. See the LICENSE file for details.
+Langflow is released under the MIT License. See the LICENSE file for details.
diff --git a/docs/README.md b/docs/README.md
new file mode 100644
index 000000000..aaba2fa1e
--- /dev/null
+++ b/docs/README.md
@@ -0,0 +1,41 @@
+# Website
+
+This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
+
+### Installation
+
+```
+$ yarn
+```
+
+### Local Development
+
+```
+$ yarn start
+```
+
+This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
+
+### Build
+
+```
+$ yarn build
+```
+
+This command generates static content into the `build` directory and can be served using any static contents hosting service.
+
+### Deployment
+
+Using SSH:
+
+```
+$ USE_SSH=true yarn deploy
+```
+
+Not using SSH:
+
+```
+$ GIT_USER= yarn deploy
+```
+
+If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
diff --git a/docs/babel.config.js b/docs/babel.config.js
new file mode 100644
index 000000000..e00595dae
--- /dev/null
+++ b/docs/babel.config.js
@@ -0,0 +1,3 @@
+module.exports = {
+ presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
+};
diff --git a/docs/docs/components/agents.mdx b/docs/docs/components/agents.mdx
new file mode 100644
index 000000000..c9d88f331
--- /dev/null
+++ b/docs/docs/components/agents.mdx
@@ -0,0 +1,91 @@
+import Admonition from '@theme/Admonition';
+
+# Agents
+
+
+
+ We appreciate your understanding as we polish our documentation โ it may contain some rough edges. Share your feedback or report issues to help us improve! ๐ ๏ธ๐
+
+
+
+
+Agents are components that use reasoning to make decisions and take actions, designed to autonomously perform tasks or provide services with some degree of โfreedomโ (or agency). They combine the power of LLM chaining processes with access to external tools such as APIs to interact with applications and accomplish tasks.
+
+---
+
+### AgentInitializer
+
+The `AgentInitializer` component is a quick way to construct a zero-shot agent from a language model (LLM) and tools.
+
+**Params**
+
+- **LLM:** Language Model to use in the `AgentInitializer`.
+- **Memory:** Used to add memory functionality to an agent. It allows the agent to store and retrieve information from previous conversations.
+- **Tools:** Tools that the agent will have access to.
+- **Agent:** The type of agent to be instantiated. Current supported: `zero-shot-react-description`, `react-docstore`, `self-ask-with-search,conversational-react-description` and `openai-functions`.
+
+---
+
+### CSVAgent
+
+A `CSVAgent` is an agent that is designed to interact with CSV (Comma-Separated Values) files. CSV files are a common format for storing tabular data, where each row represents a record and each column represents a field. The CSV agent can perform various tasks, such as reading and writing CSV files, processing the data, and generating tables. It can extract information from the CSV file, manipulate the data, and perform operations like filtering, sorting, and aggregating.
+
+**Params**
+
+- **LLM:** Language Model to use in the `CSVAgent`.
+- **path:** The file path to the CSV data.
+
+---
+
+### JSONAgent
+
+The `JSONAgent` deals with JSON (JavaScript Object Notation) data. Similar to the CSVAgent, it works with a language model (LLM) and a toolkit designed for JSON manipulation. This agent can iteratively explore a JSON blob to find the information needed to answer the user's question. It can list keys, get values, and navigate through the structure of the JSON object.
+
+**Params**
+
+- **LLM:** Language Model to use in the `JSONAgent`.
+- **Toolkit:** Toolkit that the agent will have access to.
+
+---
+
+### SQLAgent
+
+A `SQLAgent` is an agent that is designed to interact with SQL databases. It is capable of performing various tasks, such as querying the database, retrieving data, and executing SQL statements. The agent can provide information about the structure of the database, including the tables and their schemas. It can also perform operations like inserting, updating, and deleting data in the database. The SQL agent is a helpful tool for managing and working with SQL databases efficiently.
+
+**Params**
+
+- **LLM:** Language Model to use in the `SQLAgent`.
+- **database_uri:** A string representing the connection URI for the SQL database.
+
+---
+
+### VectorStoreAgent
+
+The `VectorStoreAgent` is designed to work with a vector store โ a data structure used for storing and querying vector-based representations of data. The `VectorStoreAgent` can query the vector store to find relevant information based on user inputs.
+
+**Params**
+
+- **LLM:** Language Model to use in the `VectorStoreAgent`.
+- **Vector Store Info:** `VectorStoreInfo` to use in the `VectorStoreAgent`.
+
+---
+
+### VectorStoreRouterAgent
+
+The `VectorStoreRouterAgent` is a custom agent that takes a vector store router as input. It is typically used when thereโs a need to retrieve information from multiple vector stores. These can be connected through a `VectorStoreRouterToolkit` and sent over to the `VectorStoreRouterAgent`. An agent configured with multiple vector stores can route queries to the appropriate store based on the context.
+
+**Params**
+
+- **LLM:** Language Model to use in the `VectorStoreRouterAgent`.
+- **Vector Store Router Toolkit:** `VectorStoreRouterToolkit` to use in the `VectorStoreRouterAgent`.
+
+---
+
+### ZeroShotAgent
+
+The `ZeroShotAgent` is an agent that uses the ReAct framework to determine which tool to use based solely on the tool's description. It can be configured with any number of tools and requires a description for each tool. The agent is designed to be the most general-purpose action agent. It uses an `LLMChain` to determine which actions to take and in what order.
+
+**Params**
+
+- **Allowed Tools:** Tools that the agent will have access to.
+- **LLM Chain:** LLM Chain to be used by the agent.
\ No newline at end of file
diff --git a/docs/docs/components/chains.mdx b/docs/docs/components/chains.mdx
new file mode 100644
index 000000000..a79c4a97a
--- /dev/null
+++ b/docs/docs/components/chains.mdx
@@ -0,0 +1,148 @@
+import ThemedImage from "@theme/ThemedImage";
+import useBaseUrl from "@docusaurus/useBaseUrl";
+import ZoomableImage from "/src/theme/ZoomableImage.js";
+import Admonition from "@theme/Admonition";
+
+# Chains
+
+
+
+ We appreciate your understanding as we polish our documentation โ it may
+ contain some rough edges. Share your feedback or report issues to help us
+ improve! ๐ ๏ธ๐
+
+
+
+Chains, in the context of language models, refer to a series of calls made to a language model. It allows for the output of one call to be used as the input for another call. Different types of chains allow for different levels of complexity. Chains are useful for creating pipelines and executing specific scenarios.
+
+---
+
+### CombineDocsChain
+
+The `CombineDocsChain` incorporates methods to combine or aggregate loaded documents for question-answering functionality.
+
+
+
+Works as a proxy of LangChainโs [documents](https://python.langchain.com/docs/modules/chains/document/) chains generated by the `load_qa_chain` function.
+
+
+
+**Params**
+
+- **LLM:** Language Model to use in the chain.
+- **chain_type:** The chain type to be used. Each one of them applies a different โcombination strategyโ.
+
+ - **stuff**: The stuff [documents](https://python.langchain.com/docs/modules/chains/document/stuff) chain (โstuff" as in "to stuff" or "to fill") is the most straightforward of _the_ document chains. It takes a list of documents, inserts them all into a prompt, and passes that prompt to an LLM. This chain is well-suited for applications where documents are small and only a few are passed in for most calls.
+ - **map_reduce**: The map-reduce [documents](https://python.langchain.com/docs/modules/chains/document/map_reduce) chain first applies an LLM chain to each document individually (the Map step), treating the chain output as a new document. It then passes all the new documents to a separate combined documents chain to get a single output (the Reduce step). It can optionally first compress or collapse the mapped documents to make sure that they fit in the combined documents chain (which will often pass them to an LLM). This compression step is performed recursively if necessary.
+ - **map_rerank**: The map re-rank [documents](https://python.langchain.com/docs/modules/chains/document/map_rerank) chain runs an initial prompt on each document that not only tries to complete a task but also gives a score for how certain it is in its answer. The highest-scoring response is returned.
+ - **refine**: The refine [documents](https://python.langchain.com/docs/modules/chains/document/refine) chain constructs a response by looping over the input documents and iteratively updating its answer. For each document, it passes all non-document inputs, the current document, and the latest intermediate answer to an LLM chain to get a new answer.
+
+ Since the Refine chain only passes a single document to the LLM at a time, it is well-suited for tasks that require analyzing more documents than can fit in the model's context. The obvious tradeoff is that this chain will make far more LLM calls than, for example, the Stuff documents chain. There are also certain tasks that are difficult to accomplish iteratively. For example, the Refine chain can perform poorly when documents frequently cross-reference one another or when a task requires detailed information from many documents.
+
+---
+
+### ConversationChain
+
+The `ConversationChain` is a straightforward chain for interactive conversations with a language model, making it ideal for chatbots or virtual assistants. It allows for dynamic conversations, question-answering, and complex dialogues.
+
+**Params**
+
+- **LLM:** Language Model to use in the chain.
+- **Memory:** Default memory store.
+- **input_key:** Used to specify the key under which the user input will be stored in the conversation memory. It allows you to provide the user's input to the chain for processing and generating a response.
+- **output_key:** Used to specify the key under which the generated response will be stored in the conversation memory. It allows you to retrieve the response using the specified key.
+- **verbose:** This parameter is used to control the level of detail in the output of the chain. When set to True, it will print out some internal states of the chain while it is being run, which can be helpful for debugging and understanding the chain's behavior. If set to False, it will suppress the verbose output โ defaults to `False`.
+
+---
+
+### ConversationalRetrievalChain
+
+The `ConversationalRetrievalChain` extracts information and provides answers by combining document search and question-answering abilities.
+
+
+
+A retriever is a component that finds documents based on a query. It doesn't store the documents themselves, but it returns the ones that match the query.
+
+
+
+**Params**
+
+- **LLM:** Language Model to use in the chain.
+- **Memory:** Default memory store.
+- **Retriever:** The retriever used to fetch relevant documents.
+- **chain_type:** The chain type to be used. Each one of them applies a different โcombination strategyโ.
+
+ - **stuff**: The stuff [documents](https://python.langchain.com/docs/modules/chains/document/stuff) chain (โstuff" as in "to stuff" or "to fill") is the most straightforward of _the_ document chains. It takes a list of documents, inserts them all into a prompt, and passes that prompt to an LLM. This chain is well-suited for applications where documents are small and only a few are passed in for most calls.
+ - **map_reduce**: The map-reduce [documents](https://python.langchain.com/docs/modules/chains/document/map_reduce) chain first applies an LLM chain to each document individually (the Map step), treating the chain output as a new document. It then passes all the new documents to a separate combined documents chain to get a single output (the Reduce step). It can optionally first compress or collapse the mapped documents to make sure that they fit in the combined documents chain (which will often pass them to an LLM). This compression step is performed recursively if necessary.
+ - **map_rerank**: The map re-rank [documents](https://python.langchain.com/docs/modules/chains/document/map_rerank) chain runs an initial prompt on each document that not only tries to complete a task but also gives a score for how certain it is in its answer. The highest-scoring response is returned.
+ - **refine**: The refine [documents](https://python.langchain.com/docs/modules/chains/document/refine) chain constructs a response by looping over the input documents and iteratively updating its answer. For each document, it passes all non-document inputs, the current document, and the latest intermediate answer to an LLM chain to get a new answer.
+
+ Since the Refine chain only passes a single document to the LLM at a time, it is well-suited for tasks that require analyzing more documents than can fit in the model's context. The obvious tradeoff is that this chain will make far more LLM calls than, for example, the Stuff documents chain. There are also certain tasks that are difficult to accomplish iteratively. For example, the Refine chain can perform poorly when documents frequently cross-reference one another or when a task requires detailed information from many documents.
+
+- **return_source_documents:** Used to specify whether or not to include the source documents that were used to answer the question in the output. When set to `True`, source documents will be included in the output along with the generated answer. This can be useful for providing additional context or references to the user โ defaults to `True`.
+- **verbose:** Whether or not to run in verbose mode. In verbose mode, intermediate logs will be printed to the console โ defaults to `False`.
+
+---
+
+### LLMChain
+
+The `LLMChain` is a straightforward chain that adds functionality around language models. It combines a prompt template with a language model. To use it, create input variables to format the prompt template. The formatted prompt is then sent to the language model, and the generated output is returned as the result of the `LLMChain`.
+
+**Params**
+
+- **LLM:** Language Model to use in the chain.
+- **Memory:** Default memory store.
+- **Prompt**: Prompt template object to use in the chain.
+- **output_key:** This parameter is used to specify which key in the LLM output dictionary should be returned as the final output. By default, the `LLMChain` returns both the input and output key values โ defaults to `text`.
+- **verbose:** Whether or not to run in verbose mode. In verbose mode, intermediate logs will be printed to the console โ defaults to `False`.
+
+---
+
+### LLMMathChain
+
+The `LLMMathChain` combines a language model (LLM) and a math calculation component. It allows the user to input math problems and get the corresponding solutions.
+
+The `LLMMathChain` works by using the language model with an `LLMChain` to understand the input math problem and generate a math expression. It then passes this expression to the math component, which evaluates it and returns the result.
+
+**Params**
+
+- **LLM:** Language Model to use in the chain.
+- **LLMChain:** LLM Chain to use in the chain.
+- **Memory:** Default memory store.
+- **input_key:** Used to specify the input value for the mathematical calculation. It allows you to provide the specific values or variables that you want to use in the calculation โ defaults to `question`.
+- **output_key:** Used to specify the key under which the output of the mathematical calculation will be stored. It allows you to retrieve the result of the calculation using the specified key โ defaults to `answer`.
+- **verbose:** Whether or not to run in verbose mode. In verbose mode, intermediate logs will be printed to the console โ defaults to `False`.
+
+---
+
+### RetrievalQA
+
+`RetrievalQA` is a chain used to find relevant documents or information to answer a given query. The retriever is responsible for returning the relevant documents based on the query, and the QA component then extracts the answer from those documents. The retrieval QA system combines the capabilities of both the retriever and the QA component to provide accurate and relevant answers to user queries.
+
+
+
+A retriever is a component that finds documents based on a query. It doesn't store the documents themselves, but it returns the ones that match the query.
+
+
+
+**Params**
+
+- **Combine Documents Chain:** Chain to use to combine the documents.
+- **Memory:** Default memory store.
+- **Retriever:** The retriever used to fetch relevant documents.
+- **input_key:** This parameter is used to specify the key in the input data that contains the question. It is used to retrieve the question from the input data and pass it to the question-answering model for generating the answer โ defaults to `query`.
+- **output_key:** This parameter is used to specify the key in the output data where the generated answer will be stored. It is used to retrieve the answer from the output data after the question-answering model has generated it โ defaults to `result`.
+- **return_source_documents:** Used to specify whether or not to include the source documents that were used to answer the question in the output. When set to `True`, source documents will be included in the output along with the generated answer. This can be useful for providing additional context or references to the user โ defaults to `True`.
+- **verbose:** Whether or not to run in verbose mode. In verbose mode, intermediate logs will be printed to the console โ defaults to `False`.
+
+---
+
+### SQLDatabaseChain
+
+The `SQLDatabaseChain` finds answers to questions using a SQL database. It works by using the language model to understand the SQL query and generate the corresponding SQL code. It then passes the SQL code to the SQL database component, which executes the query on the database and returns the result.
+
+**Params**
+
+- **Db:** SQL Database to connect to.
+- **LLM:** Language Model to use in the chain.
+- **Prompt:** Prompt template to translate natural language to SQL.
diff --git a/docs/docs/components/custom.mdx b/docs/docs/components/custom.mdx
new file mode 100644
index 000000000..ffa747c1b
--- /dev/null
+++ b/docs/docs/components/custom.mdx
@@ -0,0 +1,92 @@
+import Admonition from "@theme/Admonition";
+
+# Custom Components
+
+Used to create a custom component, a special type of Langflow component that allows users to extend the functionality of the platform by creating their own reusable and configurable components from a Python script.
+
+To use a custom component, follow these steps:
+
+- Create a class that inherits from _`langflow.CustomComponent`_ and contains a _`build`_ method.
+- Use arguments with [Type Annotations (or Type Hints)](https://docs.python.org/3/library/typing.html) of the _`build`_ method to create component fields.
+- If applicable, use the _`build_config`_ method to customize how these fields look and behave.
+
+
+
+For an in-depth explanation of custom components, their rules, and applications, make sure to read [Custom Component guidelines](../guidelines/custom-component).
+
+
+
+**Params**
+
+- **Code:** The Python code to define the component.
+
+## The CustomComponent Class
+
+The CustomComponent class serves as the foundation for creating custom components. By inheriting this class, users can create new, configurable components, tailored to their specific requirements.
+
+**Methods**
+
+- **build**: This method is required within a Custom Component class. It defines the component's functionality and specifies how it processes input data to produce output data. This method is called when the component is built (i.e., when you click the _Build_ โก button in the canvas).
+
+ The type annotations of the _`build`_ instance method are used to create the fields of the component.
+
+ | Supported Types |
+ | --------------------------------------------------------- |
+ | _`str`_, _`int`_, _`float`_, _`bool`_, _`list`_, _`dict`_ |
+ | _`langchain.chains.base.Chain`_ |
+ | _`langchain.PromptTemplate`_ |
+ | _`langchain.llms.base.BaseLLM`_ |
+ | _`langchain.Tool`_ |
+ | _`langchain.document_loaders.base.BaseLoader`_ |
+ | _`langchain.schema.Document`_ |
+ | _`langchain.text_splitters.TextSplitter`_ |
+ | _`langchain.vectorstores.base.VectorStore`_ |
+ | _`langchain.embeddings.base.Embeddings`_ |
+ | _`langchain.schema.BaseRetriever`_ |
+
+
+ Unlike Langchain types, base Python types do not add a
+ [handle](../guidelines/components) to the field by default. To add handles,
+ use the _`input_types`_ key in the _`build_config`_ method.
+
+
+- **build_config**: Used to define the configuration fields of the component (if applicable). It should always return a dictionary with specific keys representing the field names and corresponding configurations. This method is called when the code is processed (i.e., when you click _Check and Save_ in the code editor). It must follow the format described below:
+
+ - Top-level keys are field names.
+ - Their values are also of type _`dict`_. They specify the behavior of the generated fields.
+
+ Below are the available keys used to configure component fields:
+
+ | Key | Description |
+ | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+ | _`field_type: str`_ | The type of the field (can be any of the types supported by the _`build`_ method). |
+ | _`is_list: bool`_ | If the field can be a list of values, meaning that the user can manually add more inputs to the same field. |
+ | _`options: List[str]`_ | When defined, the field becomes a dropdown menu where a list of strings defines the options to be displayed. If the _`value`_ attribute is set to one of the options, that option becomes default. For this parameter to work, _`field_type`_ should invariably be _`str`_. |
+ | _`multiline: bool`_ | Defines if a string field opens a text editor. Useful for longer texts. |
+ | _`input_types: List[str]`_ | Used when you want a _`str`_ field to have connectable handles. |
+ | _`display_name: str`_ | Defines the name of the field. |
+ | _`advanced: bool`_ | Hide the field in the canvas view (displayed component settings only). Useful when a field is for advanced users. |
+ | _`password: bool`_ | To mask the input text. Useful to hide sensitive text (e.g. API keys). |
+ | _`required: bool`_ | Makes the field required. |
+ | _`info: str`_ | Adds a tooltip to the field. |
+ | _`file_types: List[str]`_ | This is a requirement if the _`field_type`_ is _file_. Defines which file types will be accepted. For example, _json_, _yaml_ or _yml_. |
+
+- The CustomComponent class also provides helpful methods for specific tasks (e.g., to load and use other flows from the Langflow platform):
+
+ | Method Name | Description |
+ | -------------- | ------------------------------------------------------------------- |
+ | _`list_flows`_ | Returns a list of Flow objects with an _`id`_ and a _`name`_. |
+ | _`get_flow`_ | Returns a Flow object. Parameters are _`flow_name`_ or _`flow_id`_. |
+ | _`load_flow`_ | Loads a flow from a given _`id`_. |
+
+- Useful attributes:
+
+ | Attribute Name | Description |
+ | -------------- | ----------------------------------------------------------------------------- |
+ | _`repr_value`_ | Displays the value it receives in the _`build`_ method. Useful for debugging. |
+
+
+
+ Check out the [FlowRunner](../examples/flow-runner) example to understand how to call a flow from a custom component.
+
+
diff --git a/docs/docs/components/embeddings.mdx b/docs/docs/components/embeddings.mdx
new file mode 100644
index 000000000..644d91fee
--- /dev/null
+++ b/docs/docs/components/embeddings.mdx
@@ -0,0 +1,75 @@
+import Admonition from '@theme/Admonition';
+
+# Embeddings
+
+
+
+ We appreciate your understanding as we polish our documentation โ it may contain some rough edges. Share your feedback or report issues to help us improve! ๐ ๏ธ๐
+
+
+
+Embeddings are vector representations of text that capture the semantic meaning of the text. They are created using text embedding models and allow us to think about the text in a vector space, enabling us to perform tasks like semantic search, where we look for pieces of text that are most similar in the vector space.
+
+---
+
+### CohereEmbeddings
+
+Used to load [Cohereโs](https://cohere.com/) embedding models.
+
+**Params**
+
+- **cohere_api_key:** Holds the API key required to authenticate with the Cohere service.
+
+- **model:** The language model used for embedding text documents and performing queries โdefaults to `embed-english-v2.0`.
+
+- **truncate:** Used to specify whether or not to truncate the input text. Truncation is useful when dealing with long texts that exceed the model's maximum input length. By truncating the text, the user can ensure that it fits within the model's constraints.
+
+---
+
+### HuggingFaceEmbeddings
+
+Used to load [HuggingFaceโs](https://huggingface.co) embedding models.
+
+**Params**
+
+- **cache_folder:** Used to specify the folder where the embeddings will be cached. When embeddings are computed for a text, they can be stored in the cache folder so that they can be reused later without the need to recompute them. This can improve the performance of the application by avoiding redundant computations.
+
+- **encode_kwargs:** Used to pass additional keyword arguments to the encoding method of the underlying HuggingFace model. These keyword arguments can be used to customize the encoding process, such as specifying the maximum length of the input sequence or enabling truncation or padding.
+
+- **model_kwargs:** Used to customize the behavior of the model, such as specifying the model architecture, the tokenizer, or any other model-specific configuration options. By using `model_kwargs`, the user can configure the HuggingFace model according to specific needs and preferences.
+
+- **model_name:** Used to specify the name or identifier of the HuggingFace model that will be used for generating embeddings. It allows users to choose a specific pre-trained model from the Hugging Face model hub โ defaults to `sentence-transformers/all-mpnet-base-v2`.
+
+---
+
+### OpenAIEmbeddings
+
+Used to load [OpenAIโs](https://openai.com/) embedding models.
+
+**Params**
+
+- **chunk_size:** Determines the maximum size of each chunk of text that is processed for embedding. If any of the incoming text chunks exceeds `chunk_size` characters, it will be split into multiple chunks of size `chunk_size` or less before being embedded โ defaults to `1000`.
+
+- **deployment:** Used to specify the deployment name or identifier of the text embedding model. It allows the user to choose a specific deployment of the model to use for embedding. When the deployment is provided, this can be useful when the user has multiple deployments of the same model with different configurations or versions โ defaults to `text-embedding-ada-002`.
+
+- **embedding_ctx_length:** This parameter determines the maximum context length for the text embedding model. It specifies the number of tokens that the model considers when generating embeddings for a piece of text โ defaults to `8191` (this means that the model will consider up to 8191 tokens when generating embeddings).
+
+- **max_retries:** Determines the maximum number of times to retry a request if the model provider returns an error from their API โ defaults to `6`.
+
+- **model:** Defines which pre-trained text embedding model to use โ defaults to `text-embedding-ada-002`.
+
+- **openai_api_base:** Refers to the base URL for the Azure OpenAI resource. It is used to configure the API to connect to the Azure OpenAI service. The base URL can be found in the Azure portal under the user Azure OpenAI resource.
+
+- **openai_api_key:** Is used to authenticate and authorize access to the OpenAI service.
+
+- **openai_api_type:** Is used to specify the type of OpenAI API being used, either the regular OpenAI API or the Azure OpenAI API. This parameter allows the `OpenAIEmbeddings` class to connect to the appropriate API service.
+
+- **openai_api_version:** Is used to specify the version of the OpenAI API being used. This parameter allows the `OpenAIEmbeddings` class to connect to the appropriate version of the OpenAI API service.
+
+- **openai_organization:** Is used to specify the organization associated with the OpenAI API key. If not provided, the default organization associated with the API key will be used.
+
+- **openai_proxy:** Proxy enables better budgeting and cost management for making OpenAI API calls, including more transparency into pricing.
+
+- **request_timeout:** Used to specify the maximum amount of time, in milliseconds, to wait for a response from the OpenAI API when generating embeddings for a given text.
+
+- **tiktoken_model_name:** Used to count the number of tokens in documents to constrain them to be under a certain limit. By default, when set to None, this will be the same as the embedding model name.
diff --git a/docs/docs/components/llms.mdx b/docs/docs/components/llms.mdx
new file mode 100644
index 000000000..ccca8fdd4
--- /dev/null
+++ b/docs/docs/components/llms.mdx
@@ -0,0 +1,198 @@
+import Admonition from '@theme/Admonition';
+
+# LLMs
+
+
+
+ We appreciate your understanding as we polish our documentation โ it may contain some rough edges. Share your feedback or report issues to help us improve! ๐ ๏ธ๐
+
+
+
+An LLM stands for Large Language Model. It is a core component of Langflow and provides a standard interface for interacting with different LLMs from various providers such as OpenAI, Cohere, and HuggingFace. LLMs are used widely throughout Langflow, including in chains and agents. They can be used to generate text based on a given prompt (or input).
+
+---
+
+### Anthropic
+
+Wrapper around Anthropic's large language models. Find out more at [Anthropic](https://www.anthropic.com).
+
+- **anthropic_api_key:** Used to authenticate and authorize access to the Anthropic API.
+
+- **anthropic_api_url:** Specifies the URL of the Anthropic API to connect to.
+
+- **temperature:** Tunes the degree of randomness in text generations. Should be a non-negative value.
+
+---
+
+### ChatAnthropic
+
+Wrapper around Anthropic's large language model used for chat-based interactions. Find out more at [Anthropic](https://www.anthropic.com).
+
+- **anthropic_api_key:** Used to authenticate and authorize access to the Anthropic API.
+
+- **anthropic_api_url:** Specifies the URL of the Anthropic API to connect to.
+
+- **temperature:** Tunes the degree of randomness in text generations. Should be a non-negative value.
+
+---
+
+### CTransformers
+
+The `CTransformers` component provides access to the Transformer models implemented in C/C++ using theย [GGML](https://github.com/ggerganov/ggml)ย library.
+
+:::info
+Make sure to have the `ctransformers` python package installed. Learn more about installation, supported models, and usage [here](https://github.com/marella/ctransformers).
+:::
+
+**config:** Configuration for the Transformer models. Check out [config](https://github.com/marella/ctransformers#config). Defaults to:
+
+```
+{
+
+"top_k": 40,
+
+"top_p": 0.95,
+
+"temperature": 0.8,
+
+"repetition_penalty": 1.1,
+
+"last_n_tokens": 64,
+
+"seed": -1,
+
+"max_new_tokens": 256,
+
+"stop": null,
+
+"stream": false,
+
+"reset": true,
+
+"batch_size": 8,
+
+"threads": -1,
+
+"context_length": -1,
+
+"gpu_layers": 0
+
+}
+```
+
+**model:** The path to a model file or directory or the name of a Hugging Face Hub model repo.
+
+**model_file:** The name of the model file in the repo or directory.
+
+**model_type:** Transformer model to be used. Learn more [here](https://github.com/marella/ctransformers).
+
+---
+
+### ChatOpenAI
+
+Wrapper around [OpenAI's](https://openai.com) chat large language models. This component supports some of the LLMs (Large Language Models) available by OpenAI and is used for tasks such as chatbots, Generative Question-Answering (GQA), and summarization.
+
+- **max_tokens:** The maximum number of tokens to generate in the completion. `-1` returns as many tokens as possible, given the prompt and the model's maximal context size โ defaults to `256`.
+- **model_kwargs:** Holds any model parameters valid for creating non-specified calls.
+- **model_name:** Defines the OpenAI chat model to be used.
+- **openai_api_base:** Used to specify the base URL for the OpenAI API. It is typically set to the API endpoint provided by the OpenAI service.
+- **openai_api_key:** Key used to authenticate and access the OpenAI API.
+- **temperature:** Tunes the degree of randomness in text generations. Should be a non-negative value โ defaults to `0.7`.
+
+---
+
+### Cohere
+
+Wrapper around [Cohere's](https://cohere.com) large language models.
+
+- **cohere_api_key:** Holds the API key required to authenticate with the Cohere service.
+- **max_tokens:** Maximum number of tokens to predict per generation โ defaults to `256`.
+- **temperature:** Tunes the degree of randomness in text generations. Should be a non-negative value โ defaults to `0.75`.
+
+---
+
+### HuggingFaceHub
+
+Wrapper around [HuggingFace](https://www.huggingface.co/models) models.
+
+:::info
+The HuggingFace Hub is an online platform that hosts over 120k models, 20k datasets, and 50k demo apps, all of which are open-source and publicly available. Discover more at [HuggingFace](http://www.huggingface.co).
+:::
+
+- **huggingfacehub_api_token:** Token needed to authenticate the API.
+- **model_kwargs:** Keyword arguments to pass to the model.
+- **repo_id:** Model name to use โ defaults to `gpt2`.
+- **task:** Task to call the model with. Should be a task that returns `generated_text` or `summary_text`.
+
+---
+
+### LlamaCpp
+
+The `LlamaCpp` component provides access to the `llama.cpp` models.
+
+:::info
+Make sure to have the `llama.cpp` python package installed. Learn more about installation, supported models, and usage [here](https://github.com/ggerganov/llama.cpp).
+:::
+
+- **echo:** Whether to echo the prompt โ defaults to `False`.
+- **f16_kv:** Use half-precision for key/value cache โ defaults to `True`.
+- **last_n_tokens_size:** The number of tokens to look back at when applying the repeat_penalty. Defaults to `64`.
+- **logits_all:** Return logits for all tokens, not just the last token Defaults to `False`.
+- **logprobs:** The number of logprobs to return. If None, no logprobs are returned.
+- **lora_base:** The path to the Llama LoRA base model.
+- **lora_path:** The path to the Llama LoRA. If None, no LoRa is loaded.
+- **max_tokens:** The maximum number of tokens to generate. Defaults to `256`.
+- **model_path:** The path to the Llama model file.
+- **n_batch:** Number of tokens to process in parallel. Should be a number between 1 and n_ctx. Defaults to `8`.
+- **n_ctx:** Token context window. Defaults to `512`.
+- **n_gpu_layers:** Number of layers to be loaded into GPU memory. Default None.
+- **n_parts:**Number of parts to split the model into. If -1, the number of parts is automatically determined. Defaults to `-1`.
+- **n_threads:** Number of threads to use. If None, the number of threads is automatically determined.
+- **repeat_penalty:** The penalty to apply to repeated tokens. Defaults to `1.1`.
+- **seed:** Seed. If -1, a random seed is used. Defaults to `-1`.
+- **stop:** A list of strings to stop generation when encountered.
+- **streaming:** Whether to stream the results, token by token. Defaults to `True`.
+- **suffix:** A suffix to append to the generated text. If None, no suffix is appended.
+- **tags:** Tags to add to the run trace.
+- **temperature:** The temperature to use for sampling. Defaults to `0.8`.
+- **top_k:** The top-k value to use for sampling. Defaults to `40`.
+- **top_p:** The top-p value to use for sampling. Defaults to `0.95`.
+- **use_mlock:** Force the system to keep the model in RAM. Defaults to `False`.
+- **use_mmap:** Whether to keep the model loaded in RAM. Defaults to `True`.
+- **verbose:** This parameter is used to control the level of detail in the output of the chain. When set to True, it will print out some internal states of the chain while it is being run, which can help debug and understand the chain's behavior. If set to False, it will suppress the verbose output. Defaults to `False`.
+- **vocab_only:** Only load the vocabulary, no weights. Defaults to `False`.
+
+---
+
+### OpenAI
+
+Wrapper around [OpenAI's](https://openai.com) large language models.
+
+- **max_tokens:** The maximum number of tokens to generate in the completion. `-1` returns as many tokens as possible, given the prompt and the model's maximal context size โ defaults to `256`.
+- **model_kwargs:** Holds any model parameters valid for creating non-specified calls.
+- **model_name:** Defines the OpenAI model to be used.
+- **openai_api_base:** Used to specify the base URL for the OpenAI API. It is typically set to the API endpoint provided by the OpenAI service.
+- **openai_api_key:** Key used to authenticate and access the OpenAI API.
+- **temperature:** Tunes the degree of randomness in text generations. Should be a non-negative value โ defaults to `0.7`.
+
+---
+
+### VertexAI
+
+Wrapper around [Google Vertex AI](https://cloud.google.com/vertex-ai) large language models.
+
+:::info
+Vertex AI is a cloud computing platform offered by Google Cloud Platform (GCP). It provides access, management, and development of applications and services through global data centers. To use Vertex AI PaLM, you need to have the [google-cloud-aiplatform](https://pypi.org/project/google-cloud-aiplatform/) Python package installed and credentials configured for your environment.
+:::
+
+- **credentials:** The default custom credentials (google.auth.credentials.Credentials) to use.
+- **location:** The default location to use when making API calls โ defaults to `us-central1`.
+- **max_output_tokens:** Token limit determines the maximum amount of text output from one prompt โ defaults to `128`.
+- **model_name:** The name of the Vertex AI large language model โ defaults to `text-bison`.
+- **project:** The default GCP project to use when making Vertex API calls.
+- **request_parallelism:** The amount of parallelism allowed for requests issued to VertexAI models โ defaults to `5`.
+- **temperature:** Tunes the degree of randomness in text generations. Should be a non-negative value โ defaults to `0`.
+- **top_k:** How the model selects tokens for output, the next token is selected from โ defaults to `40`.
+- **top_p:** Tokens are selected from most probable to least until the sum of their โ defaults to `0.95`.
+- **tuned_model_name:** The name of a tuned model. If provided, model_name is ignored.
+- **verbose:** This parameter is used to control the level of detail in the output of the chain. When set to True, it will print out some internal states of the chain while it is being run, which can help debug and understand the chain's behavior. If set to False, it will suppress the verbose output โ defaults to `False`.
\ No newline at end of file
diff --git a/docs/docs/components/loaders.mdx b/docs/docs/components/loaders.mdx
new file mode 100644
index 000000000..b7f2d11fb
--- /dev/null
+++ b/docs/docs/components/loaders.mdx
@@ -0,0 +1,10 @@
+import Admonition from '@theme/Admonition';
+
+# Loaders
+
+
+
+ We appreciate your understanding as we polish our documentation โ it may contain some rough edges. Share your feedback or report issues to help us improve! ๐ ๏ธ๐
+
+
+
diff --git a/docs/docs/components/memories.mdx b/docs/docs/components/memories.mdx
new file mode 100644
index 000000000..3bf9a957c
--- /dev/null
+++ b/docs/docs/components/memories.mdx
@@ -0,0 +1,108 @@
+import Admonition from '@theme/Admonition';
+
+# Memories
+
+
+
+ We appreciate your understanding as we polish our documentation โ it may contain some rough edges. Share your feedback or report issues to help us improve! ๐ ๏ธ๐
+
+
+
+Memory is a concept in chat-based applications that allows the system to remember previous interactions. It helps in maintaining the context of the conversation and enables the system to understand new messages in relation to past messages.
+
+---
+
+### ConversationBufferMemory
+
+The `ConversationBufferMemory` component is a type of memory system that plainly stores the last few inputs and outputs of a conversation.
+
+**Params**
+
+ - **input_key:** Used to specify the key under which the user input will be stored in the conversation memory. It allows you to provide the user's input to the chain for processing and generating a response.
+- **memory_key:** Specifies the prompt variable name where the memory will store and retrieve the chat messages. It allows for the preservation of the conversation history throughout the interaction with the language model โ defaults to `chat_history`.
+- **output_key:** Used to specify the key under which the generated response will be stored in the conversation memory. It allows you to retrieve the response using the specified key.
+- **return_messages:** Determines whether the history should be returned as a string or as a list of messages. If `return_messages` is set to True, the history will be returned as a list of messages. If `return_messages` is set to False or not specified, the history will be returned as a string. The default is `False`.
+
+---
+
+### ConversationBufferWindowMemory
+
+`ConversationBufferWindowMemory` is a variation of the `ConversationBufferMemory` that maintains a list of the recent interactions in a conversation. It only keeps the last K interactions in memory, which can be useful for maintaining a sliding window of the most recent interactions without letting the buffer get too large.
+
+**Params**
+
+- **input_key:** Used to specify the keys in the memory object where the input messages should be stored. It allows for the retrieval and manipulation of input messages.
+- **memory_key:** Specifies the prompt variable name where the memory will store and retrieve the chat messages. It allows for the preservation of the conversation history throughout the interaction with the language model. Defaults to `chat_history`.
+- **k:** Used to specify the number of interactions or messages that should be stored in the conversation buffer. It determines the size of the sliding window that keeps track of the most recent interactions.
+- **output_key:** Used to specify the key under which the generated response will be stored in the conversation memory. It allows you to retrieve the response using the specified key.
+- **return_messages:** Determines whether the history should be returned as a string or as a list of messages. If `return_messages` is set to True, the history will be returned as a list of messages. If `return_messages` is set to False or not specified, the history will be returned as a string. The default is `False`.
+
+---
+
+### ConversationEntityMemory
+
+The `ConversationEntityMemory` component incorporates intricate memory structures, specifically a key-value store, for entities referenced in a conversation. This facilitates the storage and retrieval of information related to entities that have been mentioned throughout the conversation.
+
+**Params**
+
+- **Entity Store:** Structure that stores information about specific entities mentioned in a conversation.
+- **LLM:** Language Model to use in the `ConversationEntityMemory`.
+- **chat_history_key:** Specify a unique identifier for the chat history data associated with a particular entity. This allows for organizing and accessing the chat history data for each entity within the conversation entity memory. Defaults to `history`
+- **input_key:** Used to specify the keys in the memory object where the input messages should be stored. It allows for the retrieval and manipulation of input messages.
+- **k:** Refers to the number of entities that can be stored in the memory. It determines the maximum number of entities that can be stored and retrieved from the memory object. Defaults to `10`
+- **output_key:** Used to specify the key under which the generated response will be stored in the conversation memory. It allows you to retrieve the response using the specified key.
+- **return_messages:** Determines whether the history should be returned as a string or as a list of messages. If `return_messages` is set to True, the history will be returned as a list of messages. If `return_messages` is set to False or not specified, the history will be returned as a string. The default is `False`.
+
+---
+
+### ConversationKGMemory
+
+`ConversationKGMemory` is a type of memory that uses a knowledge graph to recreate memory. It allows the extraction of entities and knowledge triplets from a new message, using previous messages as context.
+
+**Params**
+
+- **LLM:** Language Model to use in the `ConversationKGMemory`.
+- **input_key:** Used to specify the keys in the memory object where the input messages should be stored. It allows for the retrieval and manipulation of input messages.
+- **k:** Represents the number of previous conversation turns that will be stored in the memory. By setting "k" to 2, it means that the memory will retain the previous 2 conversation turns, allowing the model to access and utilize the information from those turns during the conversation. Defaults to `10`
+- **memory_key:** Specifies the prompt variable name where the memory will store and retrieve the chat messages. It allows for the preservation of the conversation history throughout the interaction with the language model. Defaults to `chat_history`.
+- **output_key:** Used to specify the key under which the generated response will be stored in the conversation memory. It allows you to retrieve the response using the specified key.
+- **return_messages:** Determines whether the history should be returned as a string or as a list of messages. If `return_messages` is set to True, the history will be returned as a list of messages. If `return_messages` is set to False or not specified, the history will be returned as a string. The default is `False`.
+
+---
+
+### ConversationSummaryMemory
+
+The `ConversationSummaryMemory` is a memory component that creates a summary of the conversation over time. It condenses information from the conversation and stores the current summary in memory. It is particularly useful for longer conversations where keeping the entire message history in the prompt would take up too many tokens.
+
+**Params**
+
+- **LLM:** Language Model to use in the `ConversationSummaryMemory`.
+- **input_key:** Used to specify the keys in the memory object where the input messages should be stored. It allows for the retrieval and manipulation of input messages.
+- **memory_key:** Specifies the prompt variable name where the memory will store and retrieve the chat messages. It allows for the preservation of the conversation history throughout the interaction with the language model. Defaults to `chat_history`.
+- **output_key:** Used to specify the key under which the generated response will be stored in the conversation memory. It allows you to retrieve the response using the specified key.
+- **return_messages:** Determines whether the history should be returned as a string or as a list of messages. If `return_messages` is set to True, the history will be returned as a list of messages. If `return_messages` is set to False or not specified, the history will be returned as a string. The default is `False`.
+
+---
+
+### PostgresChatMessageHistory
+
+The `PostgresChatMessageHistory` is a memory component that allows for the storage and retrieval of chat message history using a PostgreSQL database. The connection to the PostgreSQL database is established using a connection string, which includes the necessary authentication and database information.
+
+**Params**
+
+- **connection_string:** Refers to a string that contains the necessary information to establish a connection to a PostgreSQL database. The `connection_string` typically includes details such as the username, password, host, port, and database name required to connect to the PostgreSQL database. Defaults to `postgresql://postgres:mypassword@localhost/chat_history`
+- **session_id:** It is a unique identifier that is used to associate chat message history with a specific session or conversation.
+- **table_name:** Refers to the name of the table in the PostgreSQL database where the chat message history will be stored. Defaults to `message_store`
+
+---
+
+### VectorRetrieverMemory
+
+The `VectorRetrieverMemory` is a memory component that allows for the retrieval of vectors based on a given query. It is used to perform vector-based searches and retrievals.
+
+**Params**
+
+- **Retriever:** The retriever used to fetch documents.
+- **input_key:** Used to specify the keys in the memory object where the input messages should be stored. It allows for the retrieval and manipulation of input messages.
+- **memory_key:** Specifies the prompt variable name where the memory will store and retrieve the chat messages. It allows for the preservation of the conversation history throughout the interaction with the language model โ defaults to `chat_history`.
+- **return_messages:** Determines whether the history should be returned as a string or as a list of messages. If `return_messages` is set to True, the history will be returned as a list of messages. If `return_messages` is set to False or not specified, the history will be returned as a string โ defaults to `False`.
\ No newline at end of file
diff --git a/docs/docs/components/prompts.mdx b/docs/docs/components/prompts.mdx
new file mode 100644
index 000000000..4256e091a
--- /dev/null
+++ b/docs/docs/components/prompts.mdx
@@ -0,0 +1,27 @@
+import Admonition from "@theme/Admonition";
+
+# Prompts
+
+
+
+ We appreciate your understanding as we polish our documentation โ it may
+ contain some rough edges. Share your feedback or report issues to help us
+ improve! ๐ ๏ธ๐
+
+
+
+A prompt refers to the input given to a language model. It is constructed from multiple components and can be parametrized using prompt templates. A prompt template is a reproducible way to generate prompts and allow for easy customization through input variables.
+
+---
+
+### PromptTemplate
+
+The `PromptTemplate` component allows users to create prompts and define variables that provide control over instructing the model. The template can take in a set of variables from the end user and generates the prompt once the conversation is initiated.
+
+
+ Once a variable is defined in the prompt template, it becomes a component
+ input of its own. Check out [Prompt
+ Customization](../guidelines/prompt-customization.mdx) to learn more.
+
+
+- **template:** Template used to format an individual request.
diff --git a/docs/docs/components/retrievers.mdx b/docs/docs/components/retrievers.mdx
new file mode 100644
index 000000000..bc5ec74c1
--- /dev/null
+++ b/docs/docs/components/retrievers.mdx
@@ -0,0 +1,24 @@
+import Admonition from '@theme/Admonition';
+
+# Retrievers
+
+
+
+ We appreciate your understanding as we polish our documentation โ it may contain some rough edges. Share your feedback or report issues to help us improve! ๐ ๏ธ๐
+
+
+
+A retriever is an interface that returns documents given an unstructured query. It is more general than a vector store and does not need to be able to store documents, only to return or retrieve them.
+
+---
+
+### MultiQueryRetriever
+
+The `MultiQueryRetriever` component automates the process of generating multiple queries, retrieves relevant documents for each query, and combines the results to provide a more extensive and diverse set of potentially relevant documents. This approach enhances the effectiveness of the retrieval process and helps overcome the limitations of traditional distance-based retrieval methods.
+
+**Params**
+
+- **LLM:** Language Model to use in the `MultiQueryRetriever`.
+- **Prompt:** Prompt to represent a schema for an LLM.
+- **Retriever:** The retriever used to fetch documents.
+- **parser_key:** This parameter is used to specify the key or attribute name of the parsed output that will be used for retrieval. It determines how the results from the language model are split into a list of queries. Defaults to `lines`, which means that the output from the language model will be split into a list of lines of text. This allows the retriever to retrieve relevant documents based on each line of text separately.
diff --git a/docs/docs/components/text-splitters.mdx b/docs/docs/components/text-splitters.mdx
new file mode 100644
index 000000000..6c91cc1a0
--- /dev/null
+++ b/docs/docs/components/text-splitters.mdx
@@ -0,0 +1,49 @@
+import Admonition from '@theme/Admonition';
+
+# Text Splitters
+
+
+
+ We appreciate your understanding as we polish our documentation โ it may contain some rough edges. Share your feedback or report issues to help us improve! ๐ ๏ธ๐
+
+
+
+A text splitter is a tool that divides a document or text into smaller chunks or segments. It is used to break down large texts into more manageable pieces for analysis or processing.
+
+---
+
+### CharacterTextSplitter
+
+The `CharacterTextSplitter` is used to split a long text into smaller chunks based on a specified character. It splits the text by trying to keep paragraphs, sentences, and words together as long as possible, as these are semantically related pieces of text.
+
+**Params**
+
+- **Documents:** Input documents to split.
+
+- **chunk_overlap:** Determines the number of characters that overlap between consecutive chunks when splitting text. It specifies how much of the previous chunk should be included in the next chunk.
+
+ For example, if the `chunk_overlap` is set to 20 and the `chunk_size` is set to 100, the splitter will create chunks of 100 characters each, but the last 20 characters of each chunk will overlap with the first 20 characters of the next chunk. This allows for a smoother transition between chunks and ensures that no information is lost โ defaults to `200`.
+
+- **chunk_size:** Determines the maximum number of characters in each chunk when splitting a text. It specifies the size or length of each chunk.
+
+ For example, if the chunk_size is set to 100, the splitter will create chunks of 100 characters each. If the text is longer than 100 characters, it will be divided into multiple chunks of equal size, except for the last chunk, which may be smaller if there are remaining characters โdefaults to `1000`.
+
+- **separator:** Specifies the character that will be used to split the text into chunks โ defaults to `.`
+
+---
+
+### RecursiveCharacterTextSplitter
+
+Theย `RecursiveCharacterTextSplitter`ย splits the text by trying to keep paragraphs, sentences, and words together as long as possible, similar to theย `CharacterTextSplitter`. However, it also recursively splits the text into smaller chunks if the chunk size exceeds a specified threshold.
+
+**Params**
+
+- **Documents:** Input documents to split.
+
+- **chunk_overlap:** Determines the number of characters that overlap between consecutive chunks when splitting text. It specifies how much of the previous chunk should be included in the next chunk.
+
+- **chunk_size:** Determines the maximum number of characters in each chunk when splitting a text. It specifies the size or length of each chunk.
+
+- **separator_type:** The parameter allows the user to split the code with multiple language support. It supports various languages such as Text, Ruby, Python, Solidity, Java, and more. Defaults to `Text`.
+
+- **separators:** The `separators` in RecursiveCharacterTextSplitter are the characters used to split the text into chunks. The text splitter tries to create chunks based on splitting on the first character in the list of `separators`. If any chunks are too large, it moves on to the next character in the list and continues splitting. Defaults to `.`
\ No newline at end of file
diff --git a/docs/docs/components/toolkits.mdx b/docs/docs/components/toolkits.mdx
new file mode 100644
index 000000000..ea6758aee
--- /dev/null
+++ b/docs/docs/components/toolkits.mdx
@@ -0,0 +1,9 @@
+import Admonition from '@theme/Admonition';
+
+# Toolkits
+
+
+
+ We appreciate your understanding as we polish our documentation โ it may contain some rough edges. Share your feedback or report issues to help us improve! ๐ ๏ธ๐
+
+
\ No newline at end of file
diff --git a/docs/docs/components/tools.mdx b/docs/docs/components/tools.mdx
new file mode 100644
index 000000000..76ce93a01
--- /dev/null
+++ b/docs/docs/components/tools.mdx
@@ -0,0 +1,9 @@
+import Admonition from '@theme/Admonition';
+
+# Tools
+
+
+
+ We appreciate your understanding as we polish our documentation โ it may contain some rough edges. Share your feedback or report issues to help us improve! ๐ ๏ธ๐
+
+
\ No newline at end of file
diff --git a/docs/docs/components/utilities.mdx b/docs/docs/components/utilities.mdx
new file mode 100644
index 000000000..f510990ce
--- /dev/null
+++ b/docs/docs/components/utilities.mdx
@@ -0,0 +1,10 @@
+import Admonition from '@theme/Admonition';
+
+# Utilities
+
+
+
+ We appreciate your understanding as we polish our documentation โ it may contain some rough edges. Share your feedback or report issues to help us improve! ๐ ๏ธ๐
+
+ We appreciate your understanding as we polish our documentation โ it may contain some rough edges. Share your feedback or report issues to help us improve! ๐ ๏ธ๐
+
+
\ No newline at end of file
diff --git a/docs/docs/components/wrappers.mdx b/docs/docs/components/wrappers.mdx
new file mode 100644
index 000000000..4b1251b60
--- /dev/null
+++ b/docs/docs/components/wrappers.mdx
@@ -0,0 +1,20 @@
+import Admonition from '@theme/Admonition';
+
+# Wrappers
+
+
+
+ We appreciate your understanding as we polish our documentation โ it may contain some rough edges. Share your feedback or report issues to help us improve! ๐ ๏ธ๐
+
+
+
+
+### TextRequestsWrapper
+
+This component is designed to work with the Python Requests module, which is a popular tool for making web requests. Used to fetch data from a particular website.
+
+**Params**
+
+- **header:** specifies the headers to be included in the HTTP request. Defaults to `{'Authorization': 'Bearer '}`.
+
+ Headers are key-value pairs that provide additional information about the request or the client making the request. They can be used to send authentication credentials, specify the content type of the request, set cookies, and more. They allow the client and the server to communicate additional information beyond the basic request.
\ No newline at end of file
diff --git a/docs/docs/contributing/community.md b/docs/docs/contributing/community.md
new file mode 100644
index 000000000..fb18b1172
--- /dev/null
+++ b/docs/docs/contributing/community.md
@@ -0,0 +1,38 @@
+# Community
+
+## ๐ค Join **Langflow** Discord server
+
+ Join us to ask questions and showcase your projects.
+
+ Let's bring together the building blocks of AI integration!
+
+ Langflow [Discord](https://discord.gg/EqksyE2EX9) server.
+
+---
+
+## ๐ฆ Stay tunned for **Langflow** on Twitter
+
+Follow [@logspace_ai](https://twitter.com/logspace_ai) on **Twitter** to get the latest news about **Langflow**.
+
+---
+## โญ๏ธ Star **Langflow** on GitHub
+
+You can "star" **Langflow** in [GitHub](https://github.com/logspace-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
+
+You can "watch" **Langflow** in [GitHub](https://github.com/logspace-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.
+
+
+Then you can try and help them solve those questions.
+
+---
+
+Thanks! ๐
\ No newline at end of file
diff --git a/docs/docs/contributing/github-issues.md b/docs/docs/contributing/github-issues.md
new file mode 100644
index 000000000..41cc674e1
--- /dev/null
+++ b/docs/docs/contributing/github-issues.md
@@ -0,0 +1,27 @@
+# GitHub Issues
+
+Our [issues](https://github.com/logspace-ai/langflow/issues) page is kept up to date
+with bugs, improvements, and feature requests. There is a taxonomy of labels to help
+with sorting and discovery of issues of interest.
+
+If you're looking for help with your code, consider posting a question on the
+[GitHub Discussions board](https://github.com/logspace-ai/langflow/discussions). Please
+understand that we won't be able to provide individual support via email. We
+also believe that help is much more valuable if it's **shared publicly**,
+so that more people can benefit from it.
+
+- **Describing your issue:** Try to provide as many details as possible. What
+ exactly goes wrong? _How_ is it failing? Is there an error?
+ "XY doesn't work" usually isn't that helpful for tracking down problems. Always
+ remember to include the code you ran and if possible, extract only the relevant
+ parts and don't just dump your entire script. This will make it easier for us to
+ reproduce the error.
+
+- **Sharing long blocks of code or logs:** If you need to include long code,
+ logs or tracebacks, you can wrap them in `` and ``. This
+ [collapses the content](https://developer.mozilla.org/en/docs/Web/HTML/Element/details) so it only becomes visible on click, making the issue easier to read and follow.
+
+
+## Issue labels
+
+[See this page](https://github.com/logspace-ai/langflow/labels) for an overview of the system we use to tag our issues and pull requests.
\ No newline at end of file
diff --git a/docs/docs/contributing/how-contribute.md b/docs/docs/contributing/how-contribute.md
new file mode 100644
index 000000000..53b430496
--- /dev/null
+++ b/docs/docs/contributing/how-contribute.md
@@ -0,0 +1,77 @@
+# How to contribute?
+
+๐ Hello there! We welcome contributions from developers of all levels to our open-source project on [GitHub](https://github.com/logspace-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.
+
+Please do not try to push directly to this repo unless you are a maintainer.
+
+---
+## Local development
+
+You can develop Langflow using docker compose, or locally.
+
+We provide a .vscode/launch.json file for debugging the backend in VSCode, which is a lot faster than using docker compose.
+
+Setting up hooks:
+```bash
+make init
+```
+
+This will install the pre-commit hooks, which will run `make format` on every commit.
+
+It is advised to run `make lint` before pushing to the repository.
+
+---
+
+## Run locally
+
+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.
+
+Before you start, make sure you have the following installed:
+
+- Poetry (>=1.4)
+- Node.js
+
+Then, in the root folder, install the dependencies and start the development server for the backend:
+
+```bash
+make backend
+```
+
+And the frontend:
+
+```bash
+make frontend
+```
+
+
+---
+
+## Docker compose
+
+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`.
+
+```bash
+docker compose up --build
+# or
+make dev build=1
+```
+
+---
+
+## Documentation
+
+The documentation is built using [Docusaurus](https://docusaurus.io/). To run the documentation locally, run the following commands:
+
+```bash
+cd docs
+npm install
+npm run start
+```
+
+The documentation will be available at `localhost:3000` and all the files are located in the `docs/docs` folder.
+Once you are done with your changes, you can create a Pull Request to the `main` branch.
diff --git a/docs/docs/deployment/gcp-deployment.md b/docs/docs/deployment/gcp-deployment.md
new file mode 100644
index 000000000..771550f24
--- /dev/null
+++ b/docs/docs/deployment/gcp-deployment.md
@@ -0,0 +1,35 @@
+# Deploy on Google Cloud Platform
+
+## Run Langflow from a New Google Cloud Project
+
+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.
+:::
+
+
+## Standard VM
+[](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/logspace-ai/langflow&working_dir=scripts&shellonly=true&tutorial=walkthroughtutorial.md)
+
+This script sets up a Debian-based VM with the Langflow package, Nginx, and the necessary configurations to run the Langflow Dev environment.
+
+---
+
+## Spot/Preemptible Instance
+
+[](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/genome21/langflow&working_dir=scripts&shellonly=true&tutorial=walkthroughtutorial_spot.md)
+
+When running as a [spot (preemptible) instance](https://cloud.google.com/compute/docs/instances/preemptible), the code and VM will behave the same way as in a regular instance, executing the startup script to configure the environment, install necessary dependencies, and run the Langflow application. However, **due to the nature of spot instances, the VM may be terminated at any time if Google Cloud needs to reclaim the resources**. This makes spot instances suitable for fault-tolerant, stateless, or interruptible workloads that can handle unexpected terminations and restarts.
+
+---
+
+## Pricing (approximate)
+> For a more accurate breakdown of costs, please use the [**GCP Pricing Calculator**](https://cloud.google.com/products/calculator)
+
+
+| Component | Regular Cost (Hourly) | Regular Cost (Monthly) | Spot/Preemptible Cost (Hourly) | Spot/Preemptible Cost (Monthly) | Notes |
+| -------------- | --------------------- | ---------------------- | ------------------------------ | ------------------------------- | ----- |
+| 100 GB Disk | - | $10/month | - | $10/month | Disk cost remains the same for both regular and Spot/Preemptible VMs |
+| VM (n1-standard-4) | $0.15/hr | ~$108/month | ~$0.04/hr | ~$29/month | The VM cost can be significantly reduced using a Spot/Preemptible instance |
+| **Total** | **$0.15/hr** | **~$118/month** | **~$0.04/hr** | **~$39/month** | Total costs for running the VM and disk 24/7 for an entire month |
diff --git a/docs/docs/deployment/jina-deployment.md b/docs/docs/deployment/jina-deployment.md
new file mode 100644
index 000000000..bf9df051d
--- /dev/null
+++ b/docs/docs/deployment/jina-deployment.md
@@ -0,0 +1,101 @@
+# Deploy on Jina AI Cloud
+
+Langflow integrates with langchain-serve to provide a one-command deployment to [Jina AI Cloud](https://github.com/jina-ai/langchain-serve).
+
+Start by installing `langchain-serve` with
+
+```bash
+pip install -U langchain-serve
+```
+
+Then, run:
+
+```bash
+langflow --jcloud
+```
+
+```text
+๐ Langflow server successfully deployed on Jina AI Cloud ๐
+๐ Click on the link to open the server (please allow ~1-2 minutes for the server to startup): https://.wolf.jina.ai/
+๐ Read more about managing the server: https://github.com/jina-ai/langchain-serve
+```
+
+**Complete (example) output:**
+
+```text
+ ๐ Deploying Langflow server on Jina AI Cloud
+ โญโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ Flow is available! โโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
+ โ โ
+ โ ID langflow-e3dd8820ec โ
+ โ Gateway (Websocket) wss://langflow-e3dd8820ec.wolf.jina.ai โ
+ โ Dashboard https://dashboard.wolf.jina.ai/flow/e3dd8820ec โ
+ โ โ
+ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
+ โญโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
+ โ App ID โ langflow-e3dd8820ec โ
+ โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
+ โ Phase โ Serving โ
+ โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
+ โ Endpoint โ wss://langflow-e3dd8820ec.wolf.jina.ai โ
+ โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
+ โ App logs โ dashboards.wolf.jina.ai โ
+ โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
+ โ Swagger UI โ https://langflow-e3dd8820ec.wolf.jina.ai/docs โ
+ โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
+ โ OpenAPI JSON โ https://langflow-e3dd8820ec.wolf.jina.ai/openapi.json โ
+ โฐโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
+
+ ๐ Langflow server successfully deployed on Jina AI Cloud ๐
+ ๐ Click on the link to open the server (please allow ~1-2 minutes for the server to startup): https://langflow-e3dd8820ec.wolf.jina.ai/
+ ๐ Read more about managing the server: https://github.com/jina-ai/langchain-serve
+ ```
+## API Usage (with python)
+
+You can use Langflow directly on your browser or the API endpoints on Jina AI Cloud to interact with the server.
+
+```python
+import requests
+
+BASE_API_URL = "https://langflow-e3dd8820ec.wolf.jina.ai/api/v1/predict"
+FLOW_ID = "864c4f98-2e59-468b-8e13-79cd8da07468"
+# You can tweak the flow by adding a tweaks dictionary
+# e.g {"OpenAI-XXXXX": {"model_name": "gpt-4"}}
+TWEAKS = {
+"ChatOpenAI-g4jEr": {},
+"ConversationChain-UidfJ": {}
+}
+
+def run_flow(message: str, flow_id: str, tweaks: dict = None) -> dict:
+ """
+ Run a flow with a given message and optional tweaks.
+
+ :param message: The message to send to the flow
+ :param flow_id: The ID of the flow to run
+ :param tweaks: Optional tweaks to customize the flow
+ :return: The JSON response from the flow
+ """
+ api_url = f"{BASE_API_URL}/{flow_id}"
+
+ payload = {"message": message}
+
+ if tweaks:
+ payload["tweaks"] = tweaks
+
+ response = requests.post(api_url, json=payload)
+ return response.json()
+
+# Setup any tweaks you want to apply to the flow
+print(run_flow("Your message", flow_id=FLOW_ID, tweaks=TWEAKS))
+ ```
+
+ ```json
+{
+ "result": "Great choice! Bangalore in the 1920s was a vibrant city with a rich cultural and political scene. Here are some suggestions for things to see and do:\n\n1. Visit the Bangalore Palace - built in 1887, this stunning palace is a perfect example of Tudor-style architecture. It was home to the Maharaja of Mysore and is now open to the public.\n\n2. Attend a performance at the Ravindra Kalakshetra - this cultural center was built in the 1920s and is still a popular venue for music and dance performances.\n\n3. Explore the neighborhoods of Basavanagudi and Malleswaram - both of these areas have retained much of their old-world charm and are great places to walk around and soak up the atmosphere.\n\n4. Check out the Bangalore Club - founded in 1868, this exclusive social club was a favorite haunt of the British expat community in the 1920s.\n\n5. Attend a meeting of the Indian National Congress - founded in 1885, the INC was a major force in the Indian independence movement and held many meetings and rallies in Bangalore in the 1920s.\n\nHope you enjoy your trip to 1920s Bangalore!"
+}
+ ```
+
+:::info
+
+Read more about resource customization, cost, and management of Langflow apps on Jina AI Cloud in the **[langchain-serve](https://github.com/jina-ai/langchain-serve)** repository.
+
+:::
\ No newline at end of file
diff --git a/docs/docs/examples/buffer-memory.mdx b/docs/docs/examples/buffer-memory.mdx
new file mode 100644
index 000000000..d34649991
--- /dev/null
+++ b/docs/docs/examples/buffer-memory.mdx
@@ -0,0 +1,28 @@
+import Admonition from "@theme/Admonition";
+
+# Buffer Memory
+
+For certain applications, retaining past interactions is crucial. For that, chains and agents may accept a memory component as one of their input parameters. The `ConversationBufferMemory` component is one of them. It stores messages and extracts them into variables.
+
+## โ๏ธ Langflow Example
+
+import ThemedImage from "@theme/ThemedImage";
+import useBaseUrl from "@docusaurus/useBaseUrl";
+import ZoomableImage from "/src/theme/ZoomableImage.js";
+
+
+
+#### Download Flow
+
+
+
+- [`ConversationBufferMemory`](https://python.langchain.com/docs/modules/memory/how_to/buffer)
+- [`ConversationChain`](https://python.langchain.com/docs/modules/chains/)
+- [`ChatOpenAI`](https://python.langchain.com/docs/modules/model_io/models/chat/integrations/openai)
+
+
diff --git a/docs/docs/examples/conversation-chain.mdx b/docs/docs/examples/conversation-chain.mdx
new file mode 100644
index 000000000..db3181881
--- /dev/null
+++ b/docs/docs/examples/conversation-chain.mdx
@@ -0,0 +1,33 @@
+import Admonition from "@theme/Admonition";
+
+# Conversation Chain
+
+This example shows how to instantiate a simple `ConversationChain` component using a Language Model (LLM). Once the Node Status turns green ๐ข, the chat will be ready to take in user messages. Here, we used `ChatOpenAI` to act as the required LLM input, but you can use any LLM for this purpose.
+
+
+
+Make sure to always get the API key from the provider.
+
+
+
+## โ๏ธ Langflow Example
+
+import ThemedImage from "@theme/ThemedImage";
+import useBaseUrl from "@docusaurus/useBaseUrl";
+import ZoomableImage from "/src/theme/ZoomableImage.js";
+
+
+
+#### Download Flow
+
+
+
+- [`ConversationChain`](https://python.langchain.com/docs/modules/chains/)
+- [`ChatOpenAI`](https://python.langchain.com/docs/modules/model_io/models/chat/integrations/openai)
+
+
diff --git a/docs/docs/examples/csv-loader.mdx b/docs/docs/examples/csv-loader.mdx
new file mode 100644
index 000000000..c59dfc1e7
--- /dev/null
+++ b/docs/docs/examples/csv-loader.mdx
@@ -0,0 +1,50 @@
+import Admonition from "@theme/Admonition";
+
+# CSV Loader
+
+The `VectoStoreAgent` component retrieves information from one or more vector stores. This example shows a `VectoStoreAgent` connected to a CSV file through the `Chroma` vector store. Process description:
+
+- The `CSVLoader` loads a CSV file into a list of documents.
+- The extracted data is then processed by the `CharacterTextSplitter`, which splits the text into small, meaningful chunks (usually sentences).
+- These chunks feed the `Chroma` vector store, which converts them into vectors and stores them for fast indexing.
+- Finally, the agent accesses the information of the vector store through the `VectorStoreInfo` tool.
+
+
+ The vector store is used for efficient semantic search, while
+ `VectorStoreInfo` carries information about it, such as its name and
+ description. Embeddings are a way to represent words, phrases, or any entities
+ in a vector space. Learn more about them
+ [here](https://platform.openai.com/docs/guides/embeddings/what-are-embeddings).
+
+
+
+ Once you build this flow, ask questions about the data in the chat interface
+ (e.g., number of rows or columns).
+
+
+## โ๏ธ Langflow Example
+
+import ThemedImage from "@theme/ThemedImage";
+import useBaseUrl from "@docusaurus/useBaseUrl";
+import ZoomableImage from "/src/theme/ZoomableImage.js";
+
+
+
+#### Download Flow
+
+
+
+- [`CSVLoader`](https://python.langchain.com/docs/modules/data_connection/document_loaders/integrations/csv)
+- [`CharacterTextSplitter`](https://python.langchain.com/docs/modules/data_connection/document_transformers/text_splitters/character_text_splitter)
+- [`OpenAIEmbedding`](https://python.langchain.com/docs/modules/data_connection/text_embedding/integrations/openai)
+- [`Chroma`](https://python.langchain.com/docs/modules/data_connection/vectorstores/integrations/chroma)
+- [`VectorStoreInfo`](https://python.langchain.com/docs/modules/data_connection/vectorstores/)
+- [`OpenAI`](https://python.langchain.com/docs/modules/model_io/models/llms/integrations/openai)
+- [`VectorStoreAgent`](https://python.langchain.com/docs/modules/agents/toolkits/vectorstore)
+
+
diff --git a/docs/docs/examples/flow-runner.mdx b/docs/docs/examples/flow-runner.mdx
new file mode 100644
index 000000000..c496cd745
--- /dev/null
+++ b/docs/docs/examples/flow-runner.mdx
@@ -0,0 +1,365 @@
+---
+description: Custom Components
+hide_table_of_contents: true
+---
+
+import ZoomableImage from "/src/theme/ZoomableImage.js";
+import Admonition from "@theme/Admonition";
+
+# FlowRunner Component
+
+The CustomComponent class allows us to create components that interact with Langflow itself. In this example, we will make a component that runs other flows available in "My Collection".
+
+
+
+We will cover how to:
+
+- List Collection flows using the _`list_flows`_ method.
+- Load a flow using the _`load_flow`_ method.
+- Configure a dropdown input field using the _`options`_ parameter.
+
+
+
+Example Code
+
+```python
+from langflow import CustomComponent
+from langchain.schema import Document
+
+class FlowRunner(CustomComponent):
+ display_name = "Flow Runner"
+ description = "Run other flows using a document as input."
+
+ def build_config(self):
+ flows = self.list_flows()
+ flow_names = [f.name for f in flows]
+ return {"flow_name": {"options": flow_names,
+ "display_name": "Flow Name",
+ },
+ "document": {"display_name": "Document"}
+ }
+
+
+ def build(self, flow_name: str, document: Document) -> Document:
+ # List the flows
+ flows = self.list_flows()
+ # Get the flow that matches the selected name
+ # You can also get the flow by id
+ # using self.get_flow(flow_id=flow_id)
+ tweaks = {}
+ flow = self.get_flow(flow_name=flow_name, tweaks=tweaks)
+ # Get the page_content from the document
+ if document and isinstance(document, list):
+ document = document[0]
+ page_content = document.page_content
+ # Use it in the flow
+ result = flow(page_content)
+ return Document(page_content=str(result))
+
+```
+
+
+
+
+
+```python
+from langflow import CustomComponent
+
+
+class MyComponent(CustomComponent):
+ display_name = "Custom Component"
+ description = "This is a custom component"
+
+ def build_config(self):
+ ...
+
+ def build(self):
+ ...
+
+```
+
+The typical structure of a Custom Component is composed of _`display_name`_ and _`description`_ attributes, _`build`_ and _`build_config`_ methods.
+
+---
+
+```python
+from langflow import CustomComponent
+
+
+# focus
+class FlowRunner(CustomComponent):
+ # focus
+ display_name = "Flow Runner"
+ # focus
+ description = "Run other flows"
+
+ def build_config(self):
+ ...
+
+ def build(self):
+ ...
+
+```
+
+Let's start by defining our component's _`display_name`_ and _`description`_.
+
+---
+
+```python
+from langflow import CustomComponent
+# focus
+from langchain.schema import Document
+
+
+class FlowRunner(CustomComponent):
+ display_name = "Flow Runner"
+ description = "Run other flows using a document as input."
+
+ def build_config(self):
+ ...
+
+ def build(self):
+ ...
+
+```
+
+Second, we will import _`Document`_ from the [_langchain.schema_](https://docs.langchain.com/docs/components/schema/) module. This will be the return type of the _`build`_ method.
+
+---
+
+```python
+from langflow import CustomComponent
+# focus
+from langchain.schema import Document
+
+
+class FlowRunner(CustomComponent):
+ display_name = "Flow Runner"
+ description = "Run other flows using a document as input."
+
+ def build_config(self):
+ ...
+
+ # focus
+ def build(self, flow_name: str, document: Document) -> Document:
+ ...
+
+```
+
+Now, let's add the [parameters](focus://11[20:55]) and the [return type](focus://11[60:69]) to the _`build`_ method. The parameters added are:
+
+- _`flow_name`_ is the name of the flow we want to run.
+- _`document`_ is the input document to be passed to that flow.
+ - Since _`Document`_ is a Langchain type, it will add an input [handle](../guidelines/components) to the component ([see more](../components/custom)).
+
+---
+
+```python focus=13:14
+from langflow import CustomComponent
+from langchain.schema import Document
+
+
+class FlowRunner(CustomComponent):
+ display_name = "Flow Runner"
+ description = "Run other flows using a document as input."
+
+ def build_config(self):
+ ...
+
+ def build(self, flow_name: str, document: Document) -> Document:
+ # List the flows
+ flows = self.list_flows()
+
+```
+
+We can now start writing the _`build`_ method. Let's list available flows in "My Collection" using the _`list_flows`_ method.
+
+---
+
+```python focus=15:18
+from langflow import CustomComponent
+from langchain.schema import Document
+
+
+class FlowRunner(CustomComponent):
+ display_name = "Flow Runner"
+ description = "Run other flows using a document as input."
+
+ def build_config(self):
+ ...
+
+ def build(self, flow_name: str, document: Document) -> Document:
+ # List the flows
+ flows = self.list_flows()
+ # Get the flow that matches the selected name
+ # You can also get the flow by id
+ # using self.get_flow(flow_id=flow_id)
+ tweaks = {}
+ flow = self.get_flow(flow_name=flow_name, tweaks=tweaks)
+
+```
+
+And retrieve a flow that matches the selected name (we'll make a dropdown input field for the user to choose among flow names).
+
+
+ From version 0.4.0, names are unique, which was not the case in previous
+ versions. This might lead to unexpected results if using flows with the same
+ name.
+
+
+---
+
+```python
+from langflow import CustomComponent
+from langchain.schema import Document
+
+
+class FlowRunner(CustomComponent):
+ display_name = "Flow Runner"
+ description = "Run other flows using a document as input."
+
+ def build_config(self):
+ ...
+
+ def build(self, flow_name: str, document: Document) -> Document:
+ # List the flows
+ flows = self.list_flows()
+ # Get the flow that matches the selected name
+ # You can also get the flow by id
+ # using self.get_flow(flow_id=flow_id)
+ tweaks = {}
+ flow = self.get_flow(flow_name=flow_name, tweaks=tweaks)
+
+
+```
+
+You can load this flow using _`get_flow`_ and set a _`tweaks`_ dictionary to customize it. Find more about tweaks in our [features guidelines](../guidelines/features#code).
+
+---
+
+```python
+from langflow import CustomComponent
+from langchain.schema import Document
+
+
+class FlowRunner(CustomComponent):
+ display_name = "Flow Runner"
+ description = "Run other flows using a document as input."
+
+ def build_config(self):
+ ...
+
+ def build(self, flow_name: str, document: Document) -> Document:
+ # List the flows
+ flows = self.list_flows()
+ # Get the flow that matches the selected name
+ # You can also get the flow by id
+ # using self.get_flow(flow_id=flow_id)
+ tweaks = {}
+ flow = self.get_flow(flow_name=flow_name, tweaks=tweaks)
+ # Get the page_content from the document
+ if document and isinstance(document, list):
+ document = document[0]
+ page_content = document.page_content
+ # Use it in the flow
+ result = flow(page_content)
+ return Document(page_content=str(result))
+```
+
+We are using a _`Document`_ as input because it is a straightforward way to pass text data in Langflow (specifically because you can connect it to many [loaders](../components/loaders)).
+Generally, a flow will take a string or a dictionary as input because that's what LangChain components expect.
+In case you are passing a dictionary, you need to build it according to the needs of the flow you are using.
+
+The content of a document can be extracted using the _`page_content`_ attribute, which is a string, and passed as an argument to the selected flow.
+
+---
+
+```python focus=9:16
+from langflow import CustomComponent
+from langchain.schema import Document
+
+
+class FlowRunner(CustomComponent):
+ display_name = "Flow Runner"
+ description = "Run other flows using a document as input."
+
+ def build_config(self):
+ flows = self.list_flows()
+ flow_names = [f.name for f in flows]
+ return {"flow_name": {"options": flow_names,
+ "display_name": "Flow Name",
+ },
+ "document": {"display_name": "Document"}
+ }
+
+ def build(self, flow_name: str, document: Document) -> Document:
+ # List the flows
+ flows = self.list_flows()
+ # Get the flow that matches the selected name
+ # You can also get the flow by id
+ # using self.get_flow(flow_id=flow_id)
+ tweaks = {}
+ flow = self.get_flow(flow_name=flow_name, tweaks=tweaks)
+ # Get the page_content from the document
+ if document and isinstance(document, list):
+ document = document[0]
+ page_content = document.page_content
+ # Use it in the flow
+ result = flow(page_content)
+ return Document(page_content=str(result))
+```
+
+Finally, we can add field customizations through the _`build_config`_ method. Here we added the _`options`_ key to make the _`flow_name`_ field a dropdown menu. Check out the [custom component reference](../components/custom) for a list of available keys.
+
+
+ Make sure that the field type is _`str`_ and _`options`_ values are strings.
+
+
+
+
+Done! This is what our script and custom component looks like:
+
+
+
+
+
+
+
+
diff --git a/docs/docs/examples/how-upload-examples.mdx b/docs/docs/examples/how-upload-examples.mdx
new file mode 100644
index 000000000..2b1a2b06c
--- /dev/null
+++ b/docs/docs/examples/how-upload-examples.mdx
@@ -0,0 +1,27 @@
+import ThemedImage from "@theme/ThemedImage";
+import useBaseUrl from "@docusaurus/useBaseUrl";
+import ZoomableImage from "/src/theme/ZoomableImage.js";
+
+# ๐ How to Upload Examples?
+
+We welcome all examples that can help our community learn and explore Langflow's capabilities.
+Langflow Examples is a repository on [GitHub](https://github.com/logspace-ai/langflow_examples) that contains examples of flows that people can use for inspiration and learning.
+
+{" "}
+
+
+To upload examples, please follow these steps:
+
+1. **Create a Flow:** First, create a flow using Langflow. You can use any of the available templates or create a new flow from scratch.
+
+2. **Export the Flow:** Once you have created a flow, export it as a JSON file. Make sure to give your file a descriptive name and include a brief description of what it does.
+
+3. **Submit a Pull Request:** Finally, submit a pull request (PR) to the examples repo. Make sure to include your JSON file in the PR.
+
+If your example uses any third-party libraries or packages, please include them in your PR and make sure that your example follows the [**โ๏ธ Langflow Code Of Conduct**](https://github.com/logspace-ai/langflow/blob/dev/CODE_OF_CONDUCT.md).
diff --git a/docs/docs/examples/midjourney-prompt-chain.mdx b/docs/docs/examples/midjourney-prompt-chain.mdx
new file mode 100644
index 000000000..c79bb0b27
--- /dev/null
+++ b/docs/docs/examples/midjourney-prompt-chain.mdx
@@ -0,0 +1,45 @@
+import Admonition from "@theme/Admonition";
+
+# MidJourney Prompt Chain
+
+The `MidJourneyPromptChain` can be used to generate imaginative and detailed MidJourney prompts.
+
+For example, type something like:
+
+```bash
+Dragon
+```
+
+And get a response such as:
+
+```text
+Imagine a mysterious forest, the trees are tall and ancient, their branches reaching up to the sky. Through the darkness, a dragon emerges from the shadows, its scales shimmering in the moonlight. Its wingspan is immense, and its eyes glow with a fierce intensity. It is a majestic and powerful creature, one that commands both respect and fear.
+```
+
+
+ Notice that the `ConversationSummaryMemory` stores a summary of the
+ conversation over time. Try using it to create better prompts as the
+ conversation goes on.
+
+
+## โ๏ธ Langflow Example
+
+import ThemedImage from "@theme/ThemedImage";
+import useBaseUrl from "@docusaurus/useBaseUrl";
+import ZoomableImage from "/src/theme/ZoomableImage.js";
+
+
+
+#### Download Flow
+
+
+
+- [`OpenAI`](https://python.langchain.com/docs/modules/model_io/models/llms/integrations/openai)
+- [`ConversationSummaryMemory`](https://python.langchain.com/docs/modules/memory/how_to/summary)
+
+
diff --git a/docs/docs/examples/multiple-vectorstores.mdx b/docs/docs/examples/multiple-vectorstores.mdx
new file mode 100644
index 000000000..0c9f11c4c
--- /dev/null
+++ b/docs/docs/examples/multiple-vectorstores.mdx
@@ -0,0 +1,57 @@
+import Admonition from "@theme/Admonition";
+
+# Multiple Vector Stores
+
+The example below shows an agent operating with two vector stores built upon different data sources.
+
+The `TextLoader` loads a TXT file, while the `WebBaseLoader` pulls text from webpages into a document format to accessed downstream. The `Chroma` vector stores are created analogous to what we have demonstrated in our [CSV Loader](/examples/csv-loader.mdx) example. Finally, the `VectorStoreRouterAgent` constructs an agent that routes between the vector stores.
+
+
+ Get the TXT file used
+ [here](https://github.com/hwchase17/chat-your-data/blob/master/state_of_the_union.txt).
+
+
+URL used by the `WebBaseLoader`:
+
+```text
+https://pt.wikipedia.org/wiki/Harry_Potter
+```
+
+
+ When you build the flow, request information about one of the sources. The
+ agent should be able to use the correct source to generate a response.
+
+
+
+ Learn more about Multiple Vector Stores
+ [here](https://python.langchain.com/docs/modules/agents/toolkits/vectorstore?highlight=Multiple%20Vector%20Stores#multiple-vectorstores).
+
+
+## โ๏ธ Langflow Example
+
+import ThemedImage from "@theme/ThemedImage";
+import useBaseUrl from "@docusaurus/useBaseUrl";
+import ZoomableImage from "/src/theme/ZoomableImage.js";
+
+
+
+#### Download Flow
+
+
+
+- [`WebBaseLoader`](https://python.langchain.com/docs/modules/data_connection/document_loaders/integrations/web_base)
+- [`TextLoader`](https://python.langchain.com/docs/modules/data_connection/document_loaders/integrations/unstructured_file)
+- [`CharacterTextSplitter`](https://python.langchain.com/docs/modules/data_connection/document_transformers/text_splitters/character_text_splitter)
+- [`OpenAIEmbedding`](https://python.langchain.com/docs/modules/data_connection/text_embedding/integrations/openai)
+- [`Chroma`](https://python.langchain.com/docs/modules/data_connection/vectorstores/integrations/chroma)
+- [`VectorStoreInfo`](https://python.langchain.com/docs/modules/data_connection/vectorstores/)
+- [`OpenAI`](https://python.langchain.com/docs/modules/model_io/models/llms/integrations/openai)
+- [`VectorStoreRouterToolkit`](https://python.langchain.com/docs/modules/agents/toolkits/vectorstore)
+- [`VectorStoreRouterAgent`](https://python.langchain.com/docs/modules/agents/toolkits/vectorstore)
+
+
diff --git a/docs/docs/examples/python-function.mdx b/docs/docs/examples/python-function.mdx
new file mode 100644
index 000000000..f537075c6
--- /dev/null
+++ b/docs/docs/examples/python-function.mdx
@@ -0,0 +1,55 @@
+import Admonition from "@theme/Admonition";
+
+# Python Function
+
+Langflow allows you to create a customized tool using the `PythonFunction` connected to a `Tool` component. In this example, Regex is used in Python to validate a pattern.
+
+```python
+import re
+
+def is_brazilian_zipcode(zipcode: str) -> bool:
+ pattern = r"\d{5}-?\d{3}"
+
+ # Check if the zip code matches the pattern
+ if re.match(pattern, zipcode):
+ return True
+
+ return False
+```
+
+
+ When a tool is called, it is often desirable to have its output returned
+ directly to the user. You can do this by setting the **return_direct** flag
+ for a tool to be True.
+
+
+The `AgentInitializer` component is a quick way to construct an agent from the model and tools.
+
+
+ The `PythonFunction` is a custom component that uses the LangChain ๐ฆ๐ tool
+ decorator. Learn more about it
+ [here](https://python.langchain.com/docs/modules/agents/tools/how_to/custom_tools).
+
+
+## โ๏ธ Langflow Example
+
+import ThemedImage from "@theme/ThemedImage";
+import useBaseUrl from "@docusaurus/useBaseUrl";
+import ZoomableImage from "/src/theme/ZoomableImage.js";
+
+
+
+#### Download Flow
+
+
+
+- [`PythonFunctionTool`](https://python.langchain.com/docs/modules/agents/tools/how_to/custom_tools)
+- [`ChatOpenAI`](https://python.langchain.com/docs/modules/model_io/models/chat/integrations/openai)
+- [`AgentInitializer`](https://python.langchain.com/docs/modules/agents/)
+
+
diff --git a/docs/docs/examples/serp-api-tool.mdx b/docs/docs/examples/serp-api-tool.mdx
new file mode 100644
index 000000000..60e55791a
--- /dev/null
+++ b/docs/docs/examples/serp-api-tool.mdx
@@ -0,0 +1,51 @@
+import Admonition from "@theme/Admonition";
+
+# Serp API Tool
+
+The [Serp API](https://serpapi.com/) (Search Engine Results Page) allows developers to scrape results from search engines such as Google, Bing and Yahoo, and can be used as in Langflow through the `Search` component.
+
+
+ To use the Serp API, you first need to sign up [Serp
+ API](https://serpapi.com/) for an API key on the provider's website.
+
+
+Here, the `ZeroShotPrompt` component specifies a prompt template for the `ZeroShotAgent`. Set a _Prefix_ and _Suffix_ with rules for the agent to obey. In the example, we used default templates.
+
+The `LLMChain` is a simple chain that takes in a prompt template, formats it with the user input, and returns the response from an LLM.
+
+
+ In this example, we used [`ChatOpenAI`](https://platform.openai.com/) as the
+ LLM, but feel free to experiment with other Language Models!
+
+
+The `ZeroShotAgent` takes the `LLMChain` and the `Search` tool as inputs, using the tool to find information when necessary.
+
+
+ Learn more about the Serp API
+ [here](https://python.langchain.com/docs/modules/agents/tools/integrations/serpapi).
+
+
+## โ๏ธ Langflow Example
+
+import ThemedImage from "@theme/ThemedImage";
+import useBaseUrl from "@docusaurus/useBaseUrl";
+import ZoomableImage from "/src/theme/ZoomableImage.js";
+
+
+
+#### Download Flow
+
+
+
+- [`ZeroShotPrompt`](https://python.langchain.com/docs/modules/model_io/prompts/prompt_templates/)
+- [`OpenAI`](https://python.langchain.com/docs/modules/model_io/models/llms/integrations/openai)
+- [`LLMChain`](https://python.langchain.com/docs/modules/chains/foundational/llm_chain)
+- [`Search`](https://python.langchain.com/docs/modules/agents/tools/integrations/serpapi)
+- [`ZeroShotAgent`](https://python.langchain.com/docs/modules/agents/how_to/custom_mrkl_agent)
+
+
diff --git a/docs/docs/getting-started/creating-flows.mdx b/docs/docs/getting-started/creating-flows.mdx
new file mode 100644
index 000000000..b09951f42
--- /dev/null
+++ b/docs/docs/getting-started/creating-flows.mdx
@@ -0,0 +1,37 @@
+import ThemedImage from "@theme/ThemedImage";
+import useBaseUrl from "@docusaurus/useBaseUrl";
+import ZoomableImage from "/src/theme/ZoomableImage.js";
+import ReactPlayer from "react-player";
+
+# ๐จ Creating Flows
+
+## Compose
+
+Creating flows with Langflow is easy. Drag sidebar components onto the canvas and connect them together to create your pipeline. Langflow provides a range of [LangChain components](https://python.langchain.com/docs/modules/) to choose from, including LLMs, prompt serializers, agents, and chains.
+
+
+
+## Fork
+
+The easiest way to start with Langflow is by forking a **community example**. Forking an example stores a copy in your project collection, allowing you to edit and save the modified version as a new flow.
+
+
+
+
+
+## Build
+
+Building a flow means validating if the components have prerequisites fulfilled and are properly instantiated. When a chat message is sent, the flow will run for the first time, executing the pipeline.
+
+
+
+
diff --git a/docs/docs/getting-started/hugging-face-spaces.mdx b/docs/docs/getting-started/hugging-face-spaces.mdx
new file mode 100644
index 000000000..acc4bb8d5
--- /dev/null
+++ b/docs/docs/getting-started/hugging-face-spaces.mdx
@@ -0,0 +1,19 @@
+# ๐ค HuggingFace Spaces
+
+A fully featured version of Langflow can be accessed via HuggingFace spaces with no installation required.
+
+import ThemedImage from "@theme/ThemedImage";
+import useBaseUrl from "@docusaurus/useBaseUrl";
+import ZoomableImage from "/src/theme/ZoomableImage.js";
+
+{" "}
+
+
+
+Check out Langflow on [HuggingFace Spaces](https://huggingface.co/spaces/Logspace/Langflow).
diff --git a/docs/docs/getting-started/installation.md b/docs/docs/getting-started/installation.md
new file mode 100644
index 000000000..c3ad54239
--- /dev/null
+++ b/docs/docs/getting-started/installation.md
@@ -0,0 +1,15 @@
+# ๐ฆ How to install?
+
+## Installation
+
+You can install Langflow from pip:
+
+```bash
+pip install langflow
+```
+
+Next, run:
+
+```bash
+langflow
+```
\ No newline at end of file
diff --git a/docs/docs/guidelines/chat-interface.mdx b/docs/docs/guidelines/chat-interface.mdx
new file mode 100644
index 000000000..0ac23dc8a
--- /dev/null
+++ b/docs/docs/guidelines/chat-interface.mdx
@@ -0,0 +1,52 @@
+import ThemedImage from "@theme/ThemedImage";
+import useBaseUrl from "@docusaurus/useBaseUrl";
+import ZoomableImage from "/src/theme/ZoomableImage.js";
+import ReactPlayer from "react-player";
+
+# Chat Interface
+
+Langflowโs chat interface provides a user-friendly experience and functionality to interact with the model and customize the prompt. The sidebar brings options that allow users to view and edit pre-defined prompt variables. This feature facilitates quick experimentation by enabling the modification of variable values right in the chat.
+
+{" "}
+
+
+
+Notice that editing variables in the chat interface take place temporarily and wonโt change their original value in the components once the chat is closed.
+
+{" "}
+
+
+
+To view the complete prompt in its original, structured format, click the "Display Prompt" option. This feature lets you see the prompt exactly as it entered the model.
+
+{" "}
+
+
+In the chat interface, you can redefine which variable should be interpreted as the chat input. This gives you control over these inputs and allows dynamic and creative interactions.
+
+{" "}
+
diff --git a/docs/docs/guidelines/chat-widget.mdx b/docs/docs/guidelines/chat-widget.mdx
new file mode 100644
index 000000000..7f6737fea
--- /dev/null
+++ b/docs/docs/guidelines/chat-widget.mdx
@@ -0,0 +1,209 @@
+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";
+
+# Chat Widget
+
+
+ The Langflow Chat Widget is a powerful web component that enables
+ communication with a Langflow project. This widget allows for a chat interface
+ embedding, allowing the integration of Langflow into web applications
+ effortlessly.
+
+
+## Features
+
+๐ **Seamless Integration:** Easily integrate the Langflow Chat Widget into your website or web application with just a few lines of JavaScript.
+
+๐ **Interactive Chat Interface:** Engage your users with a user-friendly conversation, powered by Langflow's advanced language understanding capabilities.
+
+๐๏ธ **Customizable Styling:** Customize the appearance of the chat widget to match your application's design and branding.
+
+๐ **Multilingual Support:** Communicate with users in multiple languages, opening up your application to a global audience.
+
+---
+
+## Usage
+
+
+ You can get the HTML code embedded with the chat by clicking the Code button
+ at the Sidebar after building a flow.
+
+
+{" "}
+
+
+
+
+ Clicking the Chat Widget HTML tab, you'll get the code to be inserted. Read
+ below to learn how to use it with HTML, React and Angular.
+
+
+{" "}
+
+
+
+---
+
+### HTML
+
+The Chat Widget can be embedded into any HTML page, inside a _``_ tag, as demonstrated in the video below.
+
+
+
+
+
+---
+
+### React
+
+To embed the Chat Widget using React, you'll need to insert this _`
+```
+
+Then, declare your Web Component and encapsulate it in a React component.
+
+```jsx
+declare global {
+ namespace JSX {
+ interface IntrinsicElements {
+ "langflow-chat": any;
+ }
+ }
+}
+
+export default function ChatWidget({ className }) {
+ return (
+
+
+
+ );
+}
+```
+
+Finally, you can place the component anywhere in your code to display the Chat Widget.
+
+---
+
+### Angular
+
+To use it in Angular, first add this _`
+```
+
+When you use a custom web component in an Angular template, the Angular compiler might show a warning when it doesn't recognize the custom elements by default. To suppress this warning, add _`CUSTOM_ELEMENTS_SCHEMA`_ to the module's _`@NgModule.schemas`_.
+
+- Open the module file (it typically ends with _.module.ts_) where you'd add the _`langflow-chat`_ web component.
+- Import _`CUSTOM_ELEMENTS_SCHEMA`_ at the top of the file:
+
+```ts
+import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from "@angular/core";
+```
+
+- Add _`CUSTOM_ELEMENTS_SCHEMA`_ to the 'schemas' array inside the '@NgModule' decorator:
+
+```ts
+@NgModule({
+ declarations: [
+ // ... Other components and directives ...
+ ],
+ imports: [
+ // ... Other imported modules ...
+ ],
+ schemas: [CUSTOM_ELEMENTS_SCHEMA], // Add the CUSTOM_ELEMENTS_SCHEMA here
+})
+export class YourModule {}
+```
+
+In your Angular project, find the component belonging to the module where _`CUSTOM_ELEMENTS_SCHEMA`_ was added.
+
+- Inside the template, add the _`langflow-chat`_ tag to include the Chat Widget in your component's view:
+
+```jsx
+
+```
+
+
+
+
+ _`CUSTOM_ELEMENTS_SCHEMA`_ is a built-in schema that allows Angular to
+ recognize custom elements.
+
+
+ Adding _`CUSTOM_ELEMENTS_SCHEMA`_ tells Angular to allow custom elements
+ in your templates, and it will suppress the warning related to unknown
+ elements like _`langflow-chat`_.
+
+
+ Notice that you can only use the Chat Widget in components that are part
+ of the module where you added _`CUSTOM_ELEMENTS_SCHEMA`_.
+
+
+
+
+---
+
+## Configuration
+
+Use the widget API to customize your Chat Widget:
+
+
+ Props with the type JSON need to be passed as Stringified JSONs, with the
+ format {"key":"value"}.
+
+
+| Prop | Type | Required | Description |
+| --------------------- | ------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| bot_message_style | JSON | No | Applies custom formatting to bot messages. |
+| chat_input_field | String | Yes | Defines the type of the input field for chat messages. |
+| chat_inputs | JSON | Yes | Determines the chat input elements and their respective values. |
+| chat_output_key | String | No | Specifies which output to display if multiple outputs are available. |
+| chat_position | String | No | Positions the chat window on the screen (options include: top-left, top-center, top-right, center-left, center-right, bottom-right, bottom-center, bottom-left). |
+| chat_trigger_style | JSON | No | Styles the chat trigger button. |
+| chat_window_style | JSON | No | Customizes the overall appearance of the chat window. |
+| error_message_style | JSON | No | Sets the format for error messages within the chat window. |
+| flow_id | String | Yes | Identifies the flow that the component is associated with. |
+| height | Number | No | Sets the height of the chat window in pixels. |
+| host_url | String | Yes | Specifies the URL of the host for chat component communication. |
+| input_container_style | JSON | No | Applies styling to the container where chat messages are entered. |
+| input_style | JSON | No | Sets the style for the chat input field. |
+| online | Boolean | No | Toggles the online status of the chat component. |
+| online_message | String | No | Sets a custom message to display when the chat component is online. |
+| placeholder | String | No | Sets the placeholder text for the chat input field. |
+| placeholder_sending | String | No | Sets the placeholder text to display while a message is being sent. |
+| send_button_style | JSON | No | Sets the style for the send button in the chat window. |
+| send_icon_style | JSON | No | Sets the style for the send icon in the chat window. |
+| tweaks | JSON | No | Applies additional custom adjustments for the associated flow. |
+| user_message_style | JSON | No | Determines the formatting for user messages in the chat window. |
+| width | Number | No | Sets the width of the chat window in pixels. |
+| window_title | String | No | Sets the title displayed in the chat window's header or title bar. |
diff --git a/docs/docs/guidelines/collection.mdx b/docs/docs/guidelines/collection.mdx
new file mode 100644
index 000000000..c0616b2e2
--- /dev/null
+++ b/docs/docs/guidelines/collection.mdx
@@ -0,0 +1,13 @@
+import ThemedImage from '@theme/ThemedImage';
+import useBaseUrl from '@docusaurus/useBaseUrl';
+import ZoomableImage from '/src/theme/ZoomableImage.js';
+import ReactPlayer from 'react-player';
+
+# Collection
+
+A collection is a snapshot of the flows available in the database. You can download your entire collection for local storage and upload it anytime for future use.
+
+
+
+
diff --git a/docs/docs/guidelines/components.mdx b/docs/docs/guidelines/components.mdx
new file mode 100644
index 000000000..b7dadcfce
--- /dev/null
+++ b/docs/docs/guidelines/components.mdx
@@ -0,0 +1,56 @@
+import ThemedImage from "@theme/ThemedImage";
+import useBaseUrl from "@docusaurus/useBaseUrl";
+import ZoomableImage from "/src/theme/ZoomableImage.js";
+import ReactPlayer from "react-player";
+
+# Component
+
+Components are the building blocks of the flows. They are made of inputs, outputs, and parameters that define their functionality, providing a convenient and straightforward way to compose LLM-based applications. Learn more about components and how they work in the LangChain [documentation](https://docs.langchain.com/docs/category/components) section.
+
+### Component's Features
+
+
+ During the flow creation process, you will notice handles (colored circles)
+ attached to one or both sides of a component. These handles represent the
+ availability to connect to other components, while their colors are type hints
+ (hover over a handle to see connection details).
+
+
+
+ For example, if you select a ConversationChain component, you
+ will see orange o and purple{" "}
+ o input handles. They indicate that
+ this component accepts an LLM and a Memory component as inputs. The red
+ asterisk * means that at least one input
+ of that type is required.
+
+
+{" "}
+
+
+
+ On the top right corner, you will find the component status icon ๐ด. Make the
+ necessary connections, build the flow (โก zap icon on the bottom right of the
+ canvas) and once the validation is completed, the status of each validated
+ component should light green ๐ข. Hover over the component status to reveal the
+ outputs going through it in case of success, or the detected error in case of
+ failure.
+
+
+---
+
+### Component's Parameters
+
+Langflow components can be edited in the component settings button. Hide parameters to reduce complexity and keep the canvas clean and intuitive for experimentation.
+
+
+
+
diff --git a/docs/docs/guidelines/custom-component.mdx b/docs/docs/guidelines/custom-component.mdx
new file mode 100644
index 000000000..bcd637222
--- /dev/null
+++ b/docs/docs/guidelines/custom-component.mdx
@@ -0,0 +1,407 @@
+---
+description: Custom Components
+hide_table_of_contents: true
+---
+
+import ZoomableImage from "/src/theme/ZoomableImage.js";
+import Admonition from "@theme/Admonition";
+
+# Custom Components
+
+In Langflow, a Custom Component is a special component type that allows users to extend the platform's functionality by creating their own reusable and configurable components.
+
+A Custom Component is created from a user-defined Python script that uses the _`CustomComponent`_ class provided by the Langflow library. These components can be as simple as a basic function that takes and returns a string or as complex as a combination of multiple sub-components and API calls.
+
+Let's take a look at the basic rules and features. Then we'll go over an example.
+
+## TL;DR
+
+- Create a class that inherits from _`CustomComponent`_ and contains a _`build`_ method.
+- Use arguments with [Type Annotations (or Type Hints)](https://docs.python.org/3/library/typing.html) of the _`build`_ method to create component fields.
+- Use the _`build_config`_ method to customize how these fields look and behave.
+- Set up a folder with your components to load them up in Langflow's sidebar.
+
+Here is an example:
+
+
+
+
+ Check out [FlowRunner Component](../examples/flow-runner) for a more complex
+ example.
+
+
+---
+
+## Rules
+
+The Python script for every Custom Component should follow a set of rules. Let's go over them one by one:
+
+
+
+### Rule 1
+
+The script must contain a **single class** that inherits from _`CustomComponent`_.
+
+```python
+from langflow import CustomComponent
+from langchain.schema import Document
+
+class MyComponent(CustomComponent):
+ display_name = "Custom Component"
+ description = "This is a custom component"
+
+ def build_config(self) -> dict:
+ ...
+
+ def build(self, document: Document, function: str) -> Document:
+ ...
+```
+
+---
+
+### Rule 2
+
+This class requires a _`build`_ method used to run the component and define its fields.
+
+```python
+from langflow import CustomComponent
+from langchain.schema import Document
+
+class MyComponent(CustomComponent):
+ display_name = "Custom Component"
+ description = "This is a custom component"
+
+ def build_config(self) -> dict:
+ ...
+
+ # focus
+ # mark
+ def build(self) -> Document:
+ ...
+```
+
+---
+
+The [Return Type Annotation](https://docs.python.org/3/library/typing.html) of the _`build`_ method defines the component type (e.g., Chain, BaseLLM, or basic Python types). Check out all supported types in the [component reference](../components/custom).
+
+```python
+from langflow import CustomComponent
+from langchain.schema import Document
+
+class MyComponent(CustomComponent):
+ display_name = "Custom Component"
+ description = "This is a custom component"
+
+ def build_config(self) -> dict:
+ ...
+
+ # focus[20:31]
+ # mark
+ def build(self) -> Document:
+ ...
+```
+
+---
+
+```python
+from langflow import CustomComponent
+from langchain.schema import Document
+
+class MyComponent(CustomComponent):
+ display_name = "Custom Component"
+ description = "This is a custom component"
+
+ def build_config(self) -> dict:
+ ...
+
+ def build(self) -> Document:
+ ...
+```
+
+### Rule 3
+
+The class can have a [_`build_config`_](focus://8) method, which defines configuration fields for the component. The [_`build_config`_](focus://8) method should always return a dictionary with specific keys representing the field names and their corresponding configurations. It must follow the format described below:
+
+- Top-level keys are field names.
+- Their values are also of type _`dict`_. They specify the behavior of the generated fields.
+
+Check out the [component reference](../components/custom) for more details on the available field configurations.
+
+---
+
+```python
+from langflow import CustomComponent
+from langchain.schema import Document
+
+class MyComponent(CustomComponent):
+ display_name = "Custom Component"
+ description = "This is a custom component"
+
+ def build_config(self) -> dict:
+ ...
+
+ def build(self) -> Document:
+ ...
+```
+
+## Example
+
+Let's create a custom component that processes a document (_`langchain.schema.Document`_) using a simple function.
+
+---
+
+### Pick a display name
+
+To start, let's choose a name for our component by adding a _`display_name`_ attribute. This name will appear on the canvas. The name of the class is not relevant, but let's call it _`DocumentProcessor`_.
+
+```python
+from langflow import CustomComponent
+from langchain.schema import Document
+
+# focus
+class DocumentProcessor(CustomComponent):
+ # focus
+ display_name = "Document Processor"
+ description = "This is a custom component"
+
+ def build_config(self) -> dict:
+ ...
+
+ def build(self) -> Document:
+ ...
+```
+
+---
+
+### Write a description
+
+We can also write a description for it using a _`description`_ attribute.
+
+```python
+from langflow import CustomComponent
+from langchain.schema import Document
+
+class DocumentProcessor(CustomComponent):
+ display_name = "Document Processor"
+ description = "This component processes a document"
+
+ def build_config(self) -> dict:
+ ...
+
+ def build(self) -> Document:
+ ...
+```
+
+---
+
+```python
+from langflow import CustomComponent
+from langchain.schema import Document
+
+class DocumentProcessor(CustomComponent):
+ display_name = "Document Processor"
+ description = "This component processes a document"
+
+ def build_config(self) -> dict:
+ ...
+
+ def build(self, document: Document, function: str) -> Document:
+ if isinstance(document, list):
+ document = document[0]
+ page_content = document.page_content
+ if function == "Uppercase":
+ page_content = page_content.upper()
+ elif function == "Lowercase":
+ page_content = page_content.lower()
+ elif function == "Titlecase":
+ page_content = page_content.title()
+ self.repr_value = f"Result of {function} function: {page_content}"
+ return Document(page_content=page_content)
+```
+
+### Add the build method
+
+Here, the build method takes two input parameters: _`document`_, representing the input document to be processed, and _`function`_, a string representing the selected text transformation to be applied (either "Uppercase," "Lowercase," or "Titlecase"). The method processes the text content of the input Document based on the selected function.
+
+The attribute _`repr_value`_ is used to display the result of the component on the canvas. It is optional and can be used to display any string value.
+
+The return type is _`Document`_.
+
+---
+
+### Customize the component fields
+
+The _`build_config`_ method is here defined to customize the component fields.
+
+- _`options`_ determines that the field will be a dropdown menu. The list values and field type must be _`str`_.
+- _`value`_ is the default option of the dropdown menu.
+- _`display_name`_ is the name of the field to be displayed.
+
+```python
+from langflow import CustomComponent
+from langchain.schema import Document
+
+class DocumentProcessor(CustomComponent):
+ display_name = "Document Processor"
+ description = "This component processes a document"
+
+ def build_config(self) -> dict:
+ options = ["Uppercase", "Lowercase", "Titlecase"]
+ return {
+ "function": {"options": options,
+ "value": options[0],
+ "display_name": "Function"
+ },
+ "document": {"display_name": "Document"}
+ }
+
+ def build(self, document: Document, function: str) -> Document:
+ if isinstance(document, list):
+ document = document[0]
+ page_content = document.page_content
+ if function == "Uppercase":
+ page_content = page_content.upper()
+ elif function == "Lowercase":
+ page_content = page_content.lower()
+ elif function == "Titlecase":
+ page_content = page_content.title()
+ self.repr_value = f"Result of {function} function: {page_content}"
+ return Document(page_content=page_content)
+```
+
+
+
+All done! This is what our script and brand-new custom component look like:
+
+
+
+
+
+
+
+
+
+---
+
+## Loading Custom Components
+
+For advanced customization, Langflow offers the option to create and load custom components outside of the standard interface. This process involves creating the desired components using a text editor and loading them using the Langflow CLI.
+
+### Folder Structure
+
+Create a folder that follows the same structural conventions as the [config.yaml](https://github.com/logspace-ai/langflow/blob/dev/src/backend/langflow/config.yaml) file. Inside this main directory, use a `custom_components` subdirectory for your custom components.
+
+Inside `custom_components`, you can create a Python file for each component. Similarly, any custom agents should be housed in an `agents` subdirectory.
+
+If you use a subdirectory name that is not in our config.yaml file, your component will appear in an `Other` category in the sidebar.
+
+Your structure should look something like this:
+
+```
+.
+โโโ custom_components
+ โโโ document_processor.py
+ โโโ ...
+โโโ agents
+ โโโ ...
+โโโ my_agents <-- Other category
+ โโโ ...
+```
+
+### Loading Custom Components
+
+You can specify the path to your custom components using the _`--components-path`_ argument when running the Langflow CLI, as shown below:
+
+```bash
+langflow --components-path /path/to/components
+```
+
+Alternatively, you can set the `LANGFLOW_COMPONENTS_PATH` environment variable:
+
+```bash
+export LANGFLOW_COMPONENTS_PATH=/path/to/components
+langflow
+```
+
+Langflow will attempt to load all of the components found in the specified directory. If a component fails to load due to errors in the component's code, Langflow will print an error message to the console but will continue loading the rest of the components.
+
+### Interacting with Custom Components
+
+Once your custom components have been loaded successfully, they will appear in Langflow's sidebar. From there, you can add them to your Langflow canvas for use. However, please note that components with errors will not be available for addition to the canvas. Always ensure your code is error-free before attempting to load components.
+
+Remember, creating custom components allows you to extend the functionality of Langflow to better suit your unique needs. Happy coding!
diff --git a/docs/docs/guidelines/features.mdx b/docs/docs/guidelines/features.mdx
new file mode 100644
index 000000000..6235b68db
--- /dev/null
+++ b/docs/docs/guidelines/features.mdx
@@ -0,0 +1,68 @@
+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";
+
+# Features
+
+
+ When you click for New Project, you will see on the top left corner of the
+ screen, some options such as Import, Export,{" "}
+ Code and Save, as displayed in the image
+ below:
+
+
+{" "}
+
+
+
+ Further down, we will explain each of these options.
+
+
+---
+
+### Import and Export
+
+Flows can be exported and imported as JSON files.
+
+
+Watch out for API keys being stored in local files.
+
+
+
+---
+
+### Code
+
+The Code button shows snippets to use your flow as a Python object or an API.
+
+**Python Code**
+
+Through the Langflow package, you can load a flow from a JSON file and use it as a LangChain object.
+
+```py
+from langflow import load_flow_from_json
+
+flow = load_flow_from_json("path/to/flow.json")
+# Now you can use it like any chain
+flow("Hey, have you heard of Langflow?")
+```
+
+**API**
+
+Once you save a flow, the API endpoint is created with your latest changes. Click the "code" button to use that flow as an API. You can post-adjust component parameters using the global variable TWEAKS.
+
+The example below shows a Python script making a POST request to a local API endpoint, which gets a prediction based on the message input.
+
+
))}
diff --git a/src/frontend/src/alerts/notice/index.tsx b/src/frontend/src/alerts/notice/index.tsx
index 81dce8ca0..494d9d4dc 100644
--- a/src/frontend/src/alerts/notice/index.tsx
+++ b/src/frontend/src/alerts/notice/index.tsx
@@ -1,7 +1,7 @@
import { Transition } from "@headlessui/react";
-import { InformationCircleIcon, XMarkIcon } from "@heroicons/react/24/outline";
import { useEffect, useState } from "react";
import { Link } from "react-router-dom";
+import IconComponent from "../../components/genericIconComponent";
import { NoticeAlertType } from "../../types/alerts";
export default function NoticeAlert({
@@ -36,22 +36,23 @@ export default function NoticeAlert({
setShow(false);
removeAlert(id);
}}
- className="rounded-md w-96 mt-6 shadow-xl bg-blue-50 dark:bg-blue-900 p-4"
+ className="mt-6 w-96 rounded-md bg-info-background p-4 shadow-xl"
>
-
-
{title}
-
+
{title}
+
{link !== "" ? (
Details
diff --git a/src/frontend/src/alerts/success/index.tsx b/src/frontend/src/alerts/success/index.tsx
index d915adfcd..5cb89b530 100644
--- a/src/frontend/src/alerts/success/index.tsx
+++ b/src/frontend/src/alerts/success/index.tsx
@@ -1,6 +1,6 @@
import { Transition } from "@headlessui/react";
-import { CheckCircleIcon, XMarkIcon } from "@heroicons/react/24/outline";
import { useEffect, useState } from "react";
+import IconComponent from "../../components/genericIconComponent";
import { SuccessAlertType } from "../../types/alerts";
export default function SuccessAlert({
@@ -34,19 +34,18 @@ export default function SuccessAlert({
setShow(false);
removeAlert(id);
}}
- className="rounded-md w-96 mt-6 shadow-xl bg-green-50 dark:bg-green-900 p-4"
+ className="success-alert"
>
-
-
- {title}
-
+
{title}
diff --git a/src/frontend/src/assets/male-technologist.png b/src/frontend/src/assets/male-technologist.png
new file mode 100644
index 000000000..3b5281237
Binary files /dev/null and b/src/frontend/src/assets/male-technologist.png differ
diff --git a/src/frontend/src/assets/robot.png b/src/frontend/src/assets/robot.png
new file mode 100644
index 000000000..81de3118d
Binary files /dev/null and b/src/frontend/src/assets/robot.png differ
diff --git a/src/frontend/src/components/AccordionComponent/index.tsx b/src/frontend/src/components/AccordionComponent/index.tsx
new file mode 100644
index 000000000..7212e6a1b
--- /dev/null
+++ b/src/frontend/src/components/AccordionComponent/index.tsx
@@ -0,0 +1,59 @@
+import { useState } from "react";
+import {
+ Accordion,
+ AccordionContent,
+ AccordionItem,
+ AccordionTrigger,
+} from "../../components/ui/accordion";
+import { AccordionComponentType } from "../../types/components";
+
+export default function AccordionComponent({
+ trigger,
+ children,
+ open = [],
+ keyValue,
+}: AccordionComponentType) {
+ const [value, setValue] = useState(
+ open.length === 0 ? "" : getOpenAccordion()
+ );
+
+ function getOpenAccordion() {
+ let value = "";
+ open.forEach((el) => {
+ if (el == trigger) {
+ value = trigger;
+ }
+ });
+
+ return value;
+ }
+
+ function handleClick() {
+ value === "" ? setValue(keyValue) : setValue("");
+ }
+
+ return (
+ <>
+
+
+ {
+ handleClick();
+ }}
+ className="ml-3"
+ >
+ {trigger}
+
+
+ {children}
+
+
+
+ >
+ );
+}
diff --git a/src/frontend/src/components/CrashErrorComponent/index.tsx b/src/frontend/src/components/CrashErrorComponent/index.tsx
index adc8909a8..fd7d22c36 100644
--- a/src/frontend/src/components/CrashErrorComponent/index.tsx
+++ b/src/frontend/src/components/CrashErrorComponent/index.tsx
@@ -1,11 +1,11 @@
export default function CrashErrorComponent({ error, resetErrorBoundary }) {
return (
-
-
-
+
+
+
Oops! An unknown error has occurred.
-
+
Please click the 'Reset Application' button to restore the
application's state. If the error persists, please create an issue on
our GitHub page. We apologize for any inconvenience this may have
@@ -14,7 +14,7 @@ export default function CrashErrorComponent({ error, resetErrorBoundary }) {