mirror of
https://github.com/hanzoai/flow.git
synced 2026-10-17 01:29:18 +00:00
rebrand to hanzoflow
This commit is contained in:
@@ -22,14 +22,14 @@ RUN apt-get update && apt-get install -y \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Create the vscode user and group with the expected UID and GID (1000)
|
||||
RUN groupadd -g 1000 langflow && \
|
||||
useradd -m -u 1000 -g 1000 -s /bin/zsh langflow && \
|
||||
echo "langflow ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||
RUN groupadd -g 1000 hanzoflow && \
|
||||
useradd -m -u 1000 -g 1000 -s /bin/zsh hanzoflow && \
|
||||
echo "hanzoflow ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||
|
||||
# Set default shell to Zsh
|
||||
SHELL ["/bin/zsh", "-c"]
|
||||
|
||||
RUN echo 'export PS1="%~ %# "' >> /home/langflow/.zshrc
|
||||
RUN echo 'export PS1="%~ %# "' >> /home/hanzoflow/.zshrc
|
||||
|
||||
# Set the default user
|
||||
USER langflow
|
||||
USER hanzoflow
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
# Langflow Demo Codespace Readme
|
||||
# Hanzoflow 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 Hanzoflow demo via GitHub Codespaces.
|
||||
|
||||
If you want a faster and easier demo experience with Langflow, DataStax Langflow is a hosted environment with zero setup: [Sign up for a free account.](https://astra.datastax.com/signup?type=langflow)
|
||||
If you want a faster and easier demo experience with Hanzoflow, DataStax Hanzoflow is a hosted environment with zero setup: [Sign up for a free account.](https://astra.datastax.com/signup?type=hanzoflow)
|
||||
|
||||
## Create a Codespace in GitHub
|
||||
|
||||
To setup the demo in Codespace:
|
||||
|
||||
1. Navigate to the Langflow repo
|
||||
1. Navigate to the Hanzoflow repo
|
||||
2. On the "Code <>" button, select the "Codespaces" tab
|
||||
3. Click the green "Create codespace on..." button (or "+" icon if you want more options) to create a new Codespace
|
||||
|
||||
@@ -17,12 +17,12 @@ To setup the demo in Codespace:
|
||||
After the codespace is opened, there will be two phases to the process. It will take ≈5-10 minutes to complete.
|
||||
|
||||
* **Phase 1**: Building Container; you can click on the "Building Codespace" link to watch the logs
|
||||
* **Phase 2**: Building Langflow; the terminal will now show `Running postCreateCommand...`, similar to:
|
||||
* **Phase 2**: Building Hanzoflow; the terminal will now show `Running postCreateCommand...`, similar to:
|
||||
|
||||
```
|
||||
✔ Finishing up...
|
||||
⠸ Running postCreateCommand...
|
||||
› sudo chown -R langflow .venv .mypy_cache src/frontend/node_modules src/frontend/build src/backend/base/langflow/frontend && make install_frontend && mak…
|
||||
› sudo chown -R hanzoflow .venv .mypy_cache src/frontend/node_modules src/frontend/build src/backend/base/hanzoflow/frontend && make install_frontend && mak…
|
||||
```
|
||||
|
||||
Once completed, this terminal window will close.
|
||||
@@ -39,18 +39,18 @@ Installation is now complete.
|
||||
|
||||
## Start up the Service
|
||||
|
||||
Open a new Terminal, and type `uv run langflow run`.
|
||||
Open a new Terminal, and type `uv run hanzoflow run`.
|
||||
|
||||
The service will start, and you will may notice a dialog in the lower right indicating there is a port available to connect to. However, the service will not be ready until you see the welcome banner:
|
||||
|
||||
```
|
||||
╭───────────────────────────────────────────────────────────────────╮
|
||||
│ Welcome to ⛓ Langflow │
|
||||
│ Welcome to ⛓ Hanzoflow │
|
||||
│ │
|
||||
│ │
|
||||
│ Collaborate, and contribute at our GitHub Repo 🌟 │
|
||||
│ │
|
||||
│ We collect anonymous usage data to improve Langflow. │
|
||||
│ We collect anonymous usage data to improve Hanzoflow. │
|
||||
│ You can opt-out by setting DO_NOT_TRACK=true in your environment. │
|
||||
│ │
|
||||
│ Access http://127.0.0.1:7860 │
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "Langflow Dev Container",
|
||||
"name": "Hanzoflow Dev Container",
|
||||
"build": {
|
||||
"context": "..",
|
||||
"dockerfile": "Dockerfile"
|
||||
@@ -8,7 +8,7 @@
|
||||
"ghcr.io/devcontainers/features/node": {},
|
||||
"ghcr.io/dhoeric/features/hadolint:1": {}
|
||||
},
|
||||
"postCreateCommand": "sudo chown -R langflow .venv .mypy_cache src/frontend/node_modules src/frontend/build src/backend/base/langflow/frontend && make install_frontend && make install_backend",
|
||||
"postCreateCommand": "sudo chown -R hanzoflow:hanzoflow .venv .mypy_cache src/frontend/node_modules src/frontend/build src/backend/base/hanzoflow/frontend && make install_frontend && make install_backend",
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
@@ -29,52 +29,59 @@
|
||||
"zsh": {
|
||||
"path": "/bin/zsh"
|
||||
}
|
||||
}
|
||||
},
|
||||
"python.defaultInterpreterPath": "/workspace/.venv/bin/python",
|
||||
"python.analysis.extraPaths": [
|
||||
"/workspace/src/backend/base"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"remoteUser": "langflow",
|
||||
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind",
|
||||
"remoteUser": "hanzoflow",
|
||||
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached",
|
||||
"workspaceFolder": "/workspace",
|
||||
"forwardPorts": [7860, 3000],
|
||||
"containerEnv": {
|
||||
"FRONTEND_START_FLAGS": "--host"
|
||||
"FRONTEND_START_FLAGS": "--host",
|
||||
"PYTHONPATH": "/workspace/src/backend/base",
|
||||
"HOME": "/home/hanzoflow"
|
||||
},
|
||||
"mounts": [
|
||||
{
|
||||
"source": "${localWorkspaceFolderBasename}-frontend-node_modules",
|
||||
"source": "hanzoflow-frontend-node_modules",
|
||||
"target": "/workspace/src/frontend/node_modules",
|
||||
"type": "volume"
|
||||
},
|
||||
{
|
||||
"source": "${localWorkspaceFolderBasename}-frontend-build",
|
||||
"source": "hanzoflow-frontend-build",
|
||||
"target": "/workspace/src/frontend/build",
|
||||
"type": "volume"
|
||||
},
|
||||
{
|
||||
"source": "${localWorkspaceFolderBasename}-backend-frontend",
|
||||
"target": "/workspace/src/backend/base/langflow/frontend",
|
||||
"source": "hanzoflow-backend-frontend",
|
||||
"target": "/workspace/src/backend/base/hanzoflow/frontend",
|
||||
"type": "volume"
|
||||
},
|
||||
{
|
||||
"source": "${localWorkspaceFolderBasename}-venv",
|
||||
"source": "hanzoflow-venv",
|
||||
"target": "/workspace/.venv",
|
||||
"type": "volume"
|
||||
},
|
||||
{
|
||||
"source": "${localWorkspaceFolderBasename}-mypy-cache",
|
||||
"source": "hanzoflow-mypy-cache",
|
||||
"target": "/workspace/.mypy_cache",
|
||||
"type": "volume"
|
||||
},
|
||||
{
|
||||
"source": "${localWorkspaceFolderBasename}-dist",
|
||||
"source": "hanzoflow-dist",
|
||||
"target": "/workspace/dist",
|
||||
"type": "volume"
|
||||
},
|
||||
{
|
||||
"source": "${localWorkspaceFolderBasename}-backend-dist",
|
||||
"source": "hanzoflow-backend-dist",
|
||||
"target": "/workspace/src/backend/base/dist",
|
||||
"type": "volume"
|
||||
}
|
||||
]
|
||||
],
|
||||
"updateRemoteUserUID": true
|
||||
}
|
||||
|
||||
+42
-42
@@ -6,104 +6,104 @@
|
||||
|
||||
# Config directory
|
||||
# Directory where files, logs and database will be stored
|
||||
# Example: LANGFLOW_CONFIG_DIR=~/.langflow
|
||||
LANGFLOW_CONFIG_DIR=
|
||||
# Example: HANZOFLOW_CONFIG_DIR=~/.langflow
|
||||
HANZOFLOW_CONFIG_DIR=
|
||||
|
||||
# Save database in the config directory
|
||||
# Values: true, false
|
||||
# If false, the database will be saved in Langflow's root directory
|
||||
# This means that the database will be deleted when Langflow is uninstalled
|
||||
# and that the database will not be shared between different virtual environments
|
||||
# Example: LANGFLOW_SAVE_DB_IN_CONFIG_DIR=true
|
||||
LANGFLOW_SAVE_DB_IN_CONFIG_DIR=
|
||||
# Example: HANZOFLOW_SAVE_DB_IN_CONFIG_DIR=true
|
||||
HANZOFLOW_SAVE_DB_IN_CONFIG_DIR=
|
||||
|
||||
# Database URL
|
||||
# Postgres example: LANGFLOW_DATABASE_URL=postgresql://postgres:postgres@localhost:5432/langflow
|
||||
# Postgres example: HANZOFLOW_DATABASE_URL=postgresql://postgres:postgres@localhost:5432/langflow
|
||||
# SQLite example:
|
||||
LANGFLOW_DATABASE_URL=sqlite:///./langflow.db
|
||||
HANZOFLOW_DATABASE_URL=sqlite:///./langflow.db
|
||||
|
||||
# Database connection retry
|
||||
# Values: true, false
|
||||
# If true, the database will retry to connect to the database if it fails
|
||||
# Example: LANGFLOW_DATABASE_CONNECTION_RETRY=true
|
||||
LANGFLOW_DATABASE_CONNECTION_RETRY=false
|
||||
# Example: HANZOFLOW_DATABASE_CONNECTION_RETRY=true
|
||||
HANZOFLOW_DATABASE_CONNECTION_RETRY=false
|
||||
|
||||
# Cache type
|
||||
LANGFLOW_LANGCHAIN_CACHE=SQLiteCache
|
||||
HANZOFLOW_LANGCHAIN_CACHE=SQLiteCache
|
||||
|
||||
# Server host
|
||||
# Example: LANGFLOW_HOST=127.0.0.1
|
||||
LANGFLOW_HOST=
|
||||
# Example: HANZOFLOW_HOST=127.0.0.1
|
||||
HANZOFLOW_HOST=
|
||||
|
||||
# Worker processes
|
||||
# Example: LANGFLOW_WORKERS=1
|
||||
LANGFLOW_WORKERS=
|
||||
# Example: HANZOFLOW_WORKERS=1
|
||||
HANZOFLOW_WORKERS=
|
||||
|
||||
# Server port
|
||||
# Example: LANGFLOW_PORT=7860
|
||||
LANGFLOW_PORT=
|
||||
# Example: HANZOFLOW_PORT=7860
|
||||
HANZOFLOW_PORT=
|
||||
|
||||
# Logging level
|
||||
# Example: LANGFLOW_LOG_LEVEL=critical
|
||||
LANGFLOW_LOG_LEVEL=
|
||||
# Example: HANZOFLOW_LOG_LEVEL=critical
|
||||
HANZOFLOW_LOG_LEVEL=
|
||||
|
||||
# Path to the log file
|
||||
# Example: LANGFLOW_LOG_FILE=logs/langflow.log
|
||||
LANGFLOW_LOG_FILE=
|
||||
# Example: HANZOFLOW_LOG_FILE=logs/langflow.log
|
||||
HANZOFLOW_LOG_FILE=
|
||||
|
||||
# Path to the frontend directory containing build files
|
||||
# Example: LANGFLOW_FRONTEND_PATH=/path/to/frontend/build/files
|
||||
LANGFLOW_FRONTEND_PATH=
|
||||
# Example: HANZOFLOW_FRONTEND_PATH=/path/to/frontend/build/files
|
||||
HANZOFLOW_FRONTEND_PATH=
|
||||
|
||||
# Whether to open the browser after starting the server
|
||||
# Values: true, false
|
||||
# Example: LANGFLOW_OPEN_BROWSER=true
|
||||
LANGFLOW_OPEN_BROWSER=
|
||||
# Example: HANZOFLOW_OPEN_BROWSER=true
|
||||
HANZOFLOW_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=
|
||||
# Example: HANZOFLOW_REMOVE_API_KEYS=false
|
||||
HANZOFLOW_REMOVE_API_KEYS=
|
||||
|
||||
# Whether to use RedisCache or ThreadingInMemoryCache or AsyncInMemoryCache
|
||||
# Values: async, memory, redis
|
||||
# Example: LANGFLOW_CACHE_TYPE=memory
|
||||
# Example: HANZOFLOW_CACHE_TYPE=memory
|
||||
# If you want to use redis then the following environment variables must be set:
|
||||
# LANGFLOW_REDIS_HOST (default: localhost)
|
||||
# LANGFLOW_REDIS_PORT (default: 6379)
|
||||
# LANGFLOW_REDIS_DB (default: 0)
|
||||
# LANGFLOW_REDIS_CACHE_EXPIRE (default: 3600)
|
||||
LANGFLOW_CACHE_TYPE=
|
||||
# HANZOFLOW_REDIS_HOST (default: localhost)
|
||||
# HANZOFLOW_REDIS_PORT (default: 6379)
|
||||
# HANZOFLOW_REDIS_DB (default: 0)
|
||||
# HANZOFLOW_REDIS_CACHE_EXPIRE (default: 3600)
|
||||
HANZOFLOW_CACHE_TYPE=
|
||||
|
||||
# Set AUTO_LOGIN to false if you want to disable auto login
|
||||
# and use the login form to login. LANGFLOW_SUPERUSER and LANGFLOW_SUPERUSER_PASSWORD
|
||||
# and use the login form to login. HANZOFLOW_SUPERUSER and HANZOFLOW_SUPERUSER_PASSWORD
|
||||
# must be set if AUTO_LOGIN is set to false
|
||||
# Values: true, false
|
||||
LANGFLOW_AUTO_LOGIN=
|
||||
HANZOFLOW_AUTO_LOGIN=
|
||||
|
||||
# Superuser username
|
||||
# Example: LANGFLOW_SUPERUSER=admin
|
||||
LANGFLOW_SUPERUSER=
|
||||
# Example: HANZOFLOW_SUPERUSER=admin
|
||||
HANZOFLOW_SUPERUSER=
|
||||
|
||||
# Superuser password
|
||||
# Example: LANGFLOW_SUPERUSER_PASSWORD=123456
|
||||
LANGFLOW_SUPERUSER_PASSWORD=
|
||||
# Example: HANZOFLOW_SUPERUSER_PASSWORD=123456
|
||||
HANZOFLOW_SUPERUSER_PASSWORD=
|
||||
|
||||
# Should store environment variables in the database
|
||||
# Values: true, false
|
||||
LANGFLOW_STORE_ENVIRONMENT_VARIABLES=
|
||||
HANZOFLOW_STORE_ENVIRONMENT_VARIABLES=
|
||||
|
||||
# STORE_URL
|
||||
# Example: LANGFLOW_STORE_URL=https://api.langflow.store
|
||||
# LANGFLOW_STORE_URL=
|
||||
# Example: HANZOFLOW_STORE_URL=https://api.langflow.store
|
||||
# HANZOFLOW_STORE_URL=
|
||||
|
||||
# DOWNLOAD_WEBHOOK_URL
|
||||
#
|
||||
# LANGFLOW_DOWNLOAD_WEBHOOK_URL=
|
||||
# HANZOFLOW_DOWNLOAD_WEBHOOK_URL=
|
||||
|
||||
# LIKE_WEBHOOK_URL
|
||||
#
|
||||
# LANGFLOW_LIKE_WEBHOOK_URL=
|
||||
# HANZOFLOW_LIKE_WEBHOOK_URL=
|
||||
|
||||
# Value must finish with slash /
|
||||
#BACKEND_URL=http://localhost:7860/
|
||||
|
||||
Vendored
+5
-5
@@ -10,7 +10,7 @@
|
||||
|
||||
"args": [
|
||||
"--factory",
|
||||
"langflow.main:create_app",
|
||||
"hanzoflow.main:create_app",
|
||||
"--port",
|
||||
"7860",
|
||||
"--reload",
|
||||
@@ -24,8 +24,8 @@
|
||||
"jinja": true,
|
||||
"justMyCode": false,
|
||||
"env": {
|
||||
"LANGFLOW_LOG_LEVEL": "debug",
|
||||
"LANGFLOW_PROMETHEUS_PORT": "9090"
|
||||
"HANZOFLOW_LOG_LEVEL": "debug",
|
||||
"HANZOFLOW_PROMETHEUS_PORT": "9090"
|
||||
},
|
||||
"envFile": "${workspaceFolder}/.env"
|
||||
},
|
||||
@@ -33,11 +33,11 @@
|
||||
"name": "Debug CLI",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"module": "langflow",
|
||||
"module": "hanzoflow",
|
||||
"args": [
|
||||
"run",
|
||||
"--path",
|
||||
"${workspaceFolder}/src/backend/base/langflow/frontend",
|
||||
"${workspaceFolder}/src/backend/base/hanzoflow/frontend",
|
||||
"--env-file",
|
||||
"${workspaceFolder}/.env"
|
||||
],
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ representative at an online or offline event.
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
contact@langflow.org.
|
||||
contact@hanzoflow.org.
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
# Contributing to Langflow
|
||||
# Contributing to Hanzoflow
|
||||
|
||||
This guide is intended to help you get started contributing to Langflow.
|
||||
This guide is intended to help you get started contributing to Hanzoflow.
|
||||
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.
|
||||
|
||||
@@ -8,13 +8,13 @@ To contribute to this project, please follow the [fork and pull request](https:/
|
||||
|
||||
## Reporting bugs or suggesting improvements
|
||||
|
||||
Our [GitHub issues](https://github.com/langflow-ai/langflow/issues) page is kept up to date
|
||||
Our [GitHub issues](https://github.com/hanzoflow-ai/hanzoflow/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. [See this page](https://github.com/langflow-ai/langflow/labels) for an overview of
|
||||
with sorting and discovery of issues of interest. [See this page](https://github.com/hanzoflow-ai/hanzoflow/labels) for an overview of
|
||||
the system we use to tag our issues and pull requests.
|
||||
|
||||
If you're looking for help with your code, consider posting a question on the
|
||||
[GitHub Discussions board](https://github.com/langflow-ai/langflow/discussions). Please
|
||||
[GitHub Discussions board](https://github.com/hanzoflow-ai/hanzoflow/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.
|
||||
@@ -33,7 +33,7 @@ so that more people can benefit from it.
|
||||
|
||||
## Contributing code and documentation
|
||||
|
||||
You can develop Langflow locally and contribute to the Project!
|
||||
You can develop Hanzoflow locally and contribute to the Project!
|
||||
|
||||
See [DEVELOPMENT.md](DEVELOPMENT.md) for instructions on setting up and using a development environment.
|
||||
|
||||
|
||||
+18
-18
@@ -9,21 +9,21 @@ This document details how to set up a local development environment that will al
|
||||
|
||||
## Set up Git Repository Fork
|
||||
|
||||
You will push changes to a fork of the Langflow repository, and from there create a Pull Request into the project repository.
|
||||
You will push changes to a fork of the Hanzoflow repository, and from there create a Pull Request into the project repository.
|
||||
|
||||
Fork the [Langflow GitHub repository](https://github.com/langflow-ai/langflow/fork), and follow the instructions to create a new fork.
|
||||
Fork the [Hanzoflow GitHub repository](https://github.com/hanzoflow-ai/hanzoflow/fork), and follow the instructions to create a new fork.
|
||||
|
||||
On your new fork, click the "<> Code" button to get a URL to [clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) using your preferred method, and clone the repository; for example using `https`:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/<your username>/langflow.git
|
||||
git clone https://github.com/<your username>/hanzoflow.git
|
||||
```
|
||||
|
||||
Finally, add the Project repository as `upstream`:
|
||||
|
||||
```bash
|
||||
cd langflow
|
||||
git remote add upstream https://github.com/langflow-ai/langflow.git
|
||||
cd hanzoflow
|
||||
git remote add upstream https://github.com/hanzoflow-ai/hanzoflow.git
|
||||
git remote set-url --push upstream no_push
|
||||
```
|
||||
|
||||
@@ -63,18 +63,18 @@ Setup and validate the initial environment by running:
|
||||
make init
|
||||
```
|
||||
|
||||
This will set up the development environment by installing backend and frontend dependencies, building the frontend static files, and initializing the project. It runs `make install_backend`, `make install_frontend`, `make build_frontend`, and finally `uv run langflow run` to start the application.
|
||||
This will set up the development environment by installing backend and frontend dependencies, building the frontend static files, and initializing the project. It runs `make install_backend`, `make install_frontend`, `make build_frontend`, and finally `uv run hanzoflow run` to start the application.
|
||||
|
||||
Once the application is running, the command output should look similar to:
|
||||
|
||||
```
|
||||
╭───────────────────────────────────────────────────────────────────╮
|
||||
│ Welcome to ⛓ Langflow │
|
||||
│ Welcome to ⛓ Hanzoflow │
|
||||
│ │
|
||||
│ │
|
||||
│ Collaborate, and contribute at our GitHub Repo 🌟 │
|
||||
│ │
|
||||
│ We collect anonymous usage data to improve Langflow. │
|
||||
│ We collect anonymous usage data to improve Hanzoflow. │
|
||||
│ You can opt-out by setting DO_NOT_TRACK=true in your environment. │
|
||||
│ │
|
||||
│ Access http://127.0.0.1:7860 │
|
||||
@@ -85,7 +85,7 @@ At this point, validate you can access the UI by opening the URL shown.
|
||||
|
||||
This is how the application would normally run: the (static) front-end pages are compiled, and then this "frontend" is served by the FastAPI server; the "backend" APIs are also serviced by the FastAPI server.
|
||||
|
||||
However, as a developer, you will want to proceed to the next step. Shutdown Langflow by hitting `Control (or Command)-C`.
|
||||
However, as a developer, you will want to proceed to the next step. Shutdown Hanzoflow by hitting `Control (or Command)-C`.
|
||||
|
||||
## Completing Development environment Setup
|
||||
|
||||
@@ -105,7 +105,7 @@ uv sync
|
||||
uv run pre-commit install
|
||||
```
|
||||
|
||||
## Run Langflow in "Development" Mode
|
||||
## Run Hanzoflow in "Development" Mode
|
||||
|
||||
With the above validation, you can now run the backend (FastAPI) and frontend (Node) services in a way that will "hot-reload" your changes. In this mode, the FastAPI server requires a Node.js server to serve the frontend pages rather than serving them directly.
|
||||
|
||||
@@ -127,11 +127,11 @@ make backend
|
||||
You will get output similar to:
|
||||
|
||||
```
|
||||
INFO: Will watch for changes in these directories: ['/home/phil/git/langflow']
|
||||
INFO: Will watch for changes in these directories: ['/home/phil/git/hanzoflow']
|
||||
INFO: Loading environment from '.env'
|
||||
INFO: Uvicorn running on http://0.0.0.0:7860 (Press CTRL+C to quit)
|
||||
INFO: Started reloader process [22330] using WatchFiles
|
||||
Starting Langflow ...
|
||||
Starting Hanzoflow ...
|
||||
```
|
||||
|
||||
At which point you can check http://localhost:7860/health in a browser; when the backend service is ready it will return a document like:
|
||||
@@ -142,7 +142,7 @@ At which point you can check http://localhost:7860/health in a browser; when the
|
||||
|
||||
### Start the Frontend Service
|
||||
|
||||
The frontend (User Interface) is, in shipped code (i.e. via `langflow run`), statically-compiled files that the backend FastAPI service provides to clients via port `7860`. In development mode, these are served by a Node.js service on port `3000`. In the *Frontend Terminal*, start the frontend service:
|
||||
The frontend (User Interface) is, in shipped code (i.e. via `hanzoflow run`), statically-compiled files that the backend FastAPI service provides to clients via port `7860`. In development mode, these are served by a Node.js service on port `3000`. In the *Frontend Terminal*, start the frontend service:
|
||||
|
||||
```bash
|
||||
make frontend
|
||||
@@ -158,7 +158,7 @@ You will get output similar to:
|
||||
➜ press h + enter to show help
|
||||
```
|
||||
|
||||
At this point, you can navigate to http://localhost:3000/ in a browser and access the Langflow User Interface.
|
||||
At this point, you can navigate to http://localhost:3000/ in a browser and access the Hanzoflow User Interface.
|
||||
|
||||
### Build and Display Documentation
|
||||
|
||||
@@ -182,7 +182,7 @@ At which point you can navigate to http://localhost:3001/ in a browser and view
|
||||
|
||||
## Adding or Modifying a Component
|
||||
|
||||
Components reside in folders under `src/backend/base/langflow`, and their unit tests under `src/backend/base/tests/unit/components`.
|
||||
Components reside in folders under `src/backend/base/hanzoflow`, and their unit tests under `src/backend/base/tests/unit/components`.
|
||||
|
||||
### Adding a Component
|
||||
|
||||
@@ -198,7 +198,7 @@ You should try to add a unit test for your component, though templates and best
|
||||
Modifying a component is much the same as adding a component: it is generally easier to make changes in the UI and then save the file in the repository. Please be sure to review and modify unit tests; if there is not a unit test for the component, the addition of one that at least covers your changes would be much appreciated!
|
||||
|
||||
> [!NOTE]
|
||||
> If you have an old version of the component on the canvas when changes are saved and the backend service restarts, that component should show "Updates Available" when the canvas is reloaded (i.e. a browser refresh). [Issue 5179](https://github.com/langflow-ai/langflow/issues/5179) indicates this behavior is not consistent, at least in a development setting.
|
||||
> If you have an old version of the component on the canvas when changes are saved and the backend service restarts, that component should show "Updates Available" when the canvas is reloaded (i.e. a browser refresh). [Issue 5179](https://github.com/hanzoflow-ai/hanzoflow/issues/5179) indicates this behavior is not consistent, at least in a development setting.
|
||||
|
||||
## Building and Testing Changes
|
||||
|
||||
@@ -210,7 +210,7 @@ When you are ready to commit, and before you commit, you should consider the fol
|
||||
|
||||
Once these changes are ready, it is helpful to rebase your changes on top of `upstream`'s `main` branch, to ensure you have the latest code version! Of course if you have had to merge changes into your component you may want to re-lint/format/unit_test.
|
||||
|
||||
As a final validation, stop the backend and frontend services and run `make init`; this will do a clean build and the UI should be available in port `7860` (as it has invoked `langflow run`). Open a **new** browser tab to this service and do a final check of your changes by adding your new/modified component onto the canvas from the Components list.
|
||||
As a final validation, stop the backend and frontend services and run `make init`; this will do a clean build and the UI should be available in port `7860` (as it has invoked `hanzoflow run`). Open a **new** browser tab to this service and do a final check of your changes by adding your new/modified component onto the canvas from the Components list.
|
||||
|
||||
## Committing, Pushing, and Pull Requests
|
||||
|
||||
@@ -233,7 +233,7 @@ You may observe some quirky things:
|
||||
|
||||
There are some files that change without you having made changes:
|
||||
|
||||
* Files in `src/backend/base/langflow/initial_setup/starter_projects` modify after `langflow run`; these are formatting changes. Feel free to commit (or ignore) them.
|
||||
* Files in `src/backend/base/hanzoflow/initial_setup/starter_projects` modify after `hanzoflow run`; these are formatting changes. Feel free to commit (or ignore) them.
|
||||
* `uv.lock` and `src/frontend/package-lock.json` files can be modified by `make` targets; changes should not be committed by individual contributors.
|
||||
* You can exclude these from consideration in git: `git update-index --assume-unchanged uv.lock src/frontend/package-lock.json`
|
||||
* You can re-include these from consideration in git: `git update-index --no-assume-unchanged uv.lock src/frontend/package-lock.json`
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2024 Langflow
|
||||
Copyright (c) 2024 Hanzoflow
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -16,7 +16,7 @@ host ?= 0.0.0.0
|
||||
port ?= 7860
|
||||
env ?= .env
|
||||
open_browser ?= true
|
||||
path = src/backend/base/langflow/frontend
|
||||
path = src/backend/base/hanzoflow/frontend
|
||||
workers ?= 1
|
||||
async ?= true
|
||||
lf ?= false
|
||||
@@ -34,10 +34,10 @@ all: help
|
||||
CLEAR_DIRS = $(foreach dir,$1,$(shell mkdir -p $(dir) && find $(dir) -mindepth 1 -delete))
|
||||
|
||||
# increment the patch version of the current package
|
||||
patch: ## bump the version in langflow and langflow-base
|
||||
patch: ## bump the version in hanzoflow and hanzoflow-base
|
||||
@echo 'Patching the version'
|
||||
@poetry version patch
|
||||
@echo 'Patching the version in langflow-base'
|
||||
@echo 'Patching the version in hanzoflow-base'
|
||||
@cd src/backend/base && poetry version patch
|
||||
@make lock
|
||||
|
||||
@@ -79,9 +79,9 @@ build_frontend: ## build the frontend static files
|
||||
@echo 'Building frontend static files...'
|
||||
@cd src/frontend && CI='' npm run build 2>&1 || { echo "\nBuild failed! Error output above ☝️"; exit 1; }
|
||||
@echo 'Clearing destination directory...'
|
||||
$(call CLEAR_DIRS,src/backend/base/langflow/frontend)
|
||||
$(call CLEAR_DIRS,src/backend/base/hanzoflow/frontend)
|
||||
@echo 'Copying build files...'
|
||||
@cp -r src/frontend/build/. src/backend/base/langflow/frontend
|
||||
@cp -r src/frontend/build/. src/backend/base/hanzoflow/frontend
|
||||
@echo '==== Frontend build complete ===='
|
||||
|
||||
init: check_tools clean_python_cache clean_npm_cache ## initialize the project
|
||||
@@ -89,7 +89,7 @@ init: check_tools clean_python_cache clean_npm_cache ## initialize the project
|
||||
@make install_frontend
|
||||
@make build_frontend
|
||||
@echo "$(GREEN)All requirements are installed.$(NC)"
|
||||
@uv run langflow run
|
||||
@uv run hanzoflow run
|
||||
|
||||
######################
|
||||
# CLEAN PROJECT
|
||||
@@ -107,7 +107,7 @@ clean_python_cache:
|
||||
clean_npm_cache:
|
||||
@echo "Cleaning npm cache..."
|
||||
cd src/frontend && npm cache clean --force
|
||||
$(call CLEAR_DIRS,src/frontend/node_modules src/frontend/build src/backend/base/langflow/frontend)
|
||||
$(call CLEAR_DIRS,src/frontend/node_modules src/frontend/build src/backend/base/hanzoflow/frontend)
|
||||
rm -f src/frontend/package-lock.json
|
||||
@echo "$(GREEN)NPM cache and frontend directories cleaned.$(NC)"
|
||||
|
||||
@@ -210,7 +210,7 @@ unsafe_fix:
|
||||
@uv run ruff check . --fix --unsafe-fixes
|
||||
|
||||
lint: install_backend ## run linters
|
||||
@uv run mypy --namespace-packages -p "langflow"
|
||||
@uv run mypy --namespace-packages -p "hanzoflow"
|
||||
|
||||
install_frontendci:
|
||||
@cd src/frontend && npm ci > /dev/null 2>&1
|
||||
@@ -231,7 +231,7 @@ endif
|
||||
|
||||
run_cli: install_frontend install_backend build_frontend ## run the CLI
|
||||
@echo 'Running the CLI'
|
||||
@uv run langflow run \
|
||||
@uv run hanzoflow run \
|
||||
--frontend-path $(path) \
|
||||
--log-level $(log_level) \
|
||||
--host $(host) \
|
||||
@@ -257,7 +257,7 @@ setup_devcontainer: ## set up the development container
|
||||
make install_backend
|
||||
make install_frontend
|
||||
make build_frontend
|
||||
uv run langflow --frontend-path src/frontend/build
|
||||
uv run hanzoflow --frontend-path src/frontend/build
|
||||
|
||||
setup_env: ## set up the environment
|
||||
@sh ./scripts/setup/setup_env.sh
|
||||
@@ -273,8 +273,8 @@ backend: setup_env install_backend ## run the backend in development mode
|
||||
@-kill -9 $$(lsof -t -i:7860) || true
|
||||
ifdef login
|
||||
@echo "Running backend autologin is $(login)";
|
||||
LANGFLOW_AUTO_LOGIN=$(login) uv run uvicorn \
|
||||
--factory langflow.main:create_app \
|
||||
HANZOFLOW_AUTO_LOGIN=$(login) uv run uvicorn \
|
||||
--factory hanzoflow.main:create_app \
|
||||
--host 0.0.0.0 \
|
||||
--port $(port) \
|
||||
$(if $(filter-out 1,$(workers)),, --reload) \
|
||||
@@ -284,7 +284,7 @@ ifdef login
|
||||
else
|
||||
@echo "Running backend respecting the $(env) file";
|
||||
uv run uvicorn \
|
||||
--factory langflow.main:create_app \
|
||||
--factory hanzoflow.main:create_app \
|
||||
--host 0.0.0.0 \
|
||||
--port $(port) \
|
||||
$(if $(filter-out 1,$(workers)),, --reload) \
|
||||
@@ -297,7 +297,7 @@ build_and_run: setup_env ## build the project and run it
|
||||
$(call CLEAR_DIRS,dist src/backend/base/dist)
|
||||
make build
|
||||
uv run pip install dist/*.tar.gz
|
||||
uv run langflow run
|
||||
uv run hanzoflow run
|
||||
|
||||
build_and_install: ## build the project and install it
|
||||
@echo 'Removing dist folder'
|
||||
@@ -308,23 +308,23 @@ build: setup_env ## build the frontend static files and package the project
|
||||
ifdef base
|
||||
make install_frontendci
|
||||
make build_frontend
|
||||
make build_langflow_base args="$(args)"
|
||||
make build_hanzoflow_base args="$(args)"
|
||||
endif
|
||||
|
||||
ifdef main
|
||||
make install_frontendci
|
||||
make build_frontend
|
||||
make build_langflow_base args="$(args)"
|
||||
make build_langflow args="$(args)"
|
||||
make build_hanzoflow_base args="$(args)"
|
||||
make build_hanzoflow args="$(args)"
|
||||
endif
|
||||
|
||||
build_langflow_base:
|
||||
build_hanzoflow_base:
|
||||
cd src/backend/base && uv build $(args)
|
||||
|
||||
build_langflow_backup:
|
||||
build_hanzoflow_backup:
|
||||
uv lock && uv build
|
||||
|
||||
build_langflow:
|
||||
build_hanzoflow:
|
||||
uv lock --no-upgrade
|
||||
uv build $(args)
|
||||
ifdef restore
|
||||
@@ -343,21 +343,21 @@ dockerfile_build:
|
||||
@echo 'BUILDING DOCKER IMAGE: ${DOCKERFILE}'
|
||||
@docker build --rm \
|
||||
-f ${DOCKERFILE} \
|
||||
-t langflow:${VERSION} .
|
||||
-t hanzoflow:${VERSION} .
|
||||
|
||||
dockerfile_build_be: dockerfile_build
|
||||
@echo 'BUILDING DOCKER IMAGE BACKEND: ${DOCKERFILE_BACKEND}'
|
||||
@docker build --rm \
|
||||
--build-arg LANGFLOW_IMAGE=langflow:${VERSION} \
|
||||
--build-arg HANZOFLOW_IMAGE=hanzoflow:${VERSION} \
|
||||
-f ${DOCKERFILE_BACKEND} \
|
||||
-t langflow_backend:${VERSION} .
|
||||
-t hanzoflow_backend:${VERSION} .
|
||||
|
||||
dockerfile_build_fe: dockerfile_build
|
||||
@echo 'BUILDING DOCKER IMAGE FRONTEND: ${DOCKERFILE_FRONTEND}'
|
||||
@docker build --rm \
|
||||
--build-arg LANGFLOW_IMAGE=langflow:${VERSION} \
|
||||
--build-arg HANZOFLOW_IMAGE=hanzoflow:${VERSION} \
|
||||
-f ${DOCKERFILE_FRONTEND} \
|
||||
-t langflow_frontend:${VERSION} .
|
||||
-t hanzoflow_frontend:${VERSION} .
|
||||
|
||||
clear_dockerimage:
|
||||
@echo 'Clearing the docker build'
|
||||
@@ -381,7 +381,7 @@ dcdev_up:
|
||||
lock_base:
|
||||
cd src/backend/base && uv lock
|
||||
|
||||
lock_langflow:
|
||||
lock_hanzoflow:
|
||||
uv lock
|
||||
|
||||
lock: ## lock dependencies
|
||||
@@ -397,14 +397,14 @@ update: ## update dependencies
|
||||
publish_base:
|
||||
cd src/backend/base && uv publish
|
||||
|
||||
publish_langflow:
|
||||
publish_hanzoflow:
|
||||
uv publish
|
||||
|
||||
publish_base_testpypi:
|
||||
# TODO: update this to use the test-pypi repository
|
||||
cd src/backend/base && uv publish -r test-pypi
|
||||
|
||||
publish_langflow_testpypi:
|
||||
publish_hanzoflow_testpypi:
|
||||
# TODO: update this to use the test-pypi repository
|
||||
uv publish -r test-pypi
|
||||
|
||||
@@ -415,7 +415,7 @@ ifdef base
|
||||
endif
|
||||
|
||||
ifdef main
|
||||
make publish_langflow
|
||||
make publish_hanzoflow
|
||||
endif
|
||||
|
||||
publish_testpypi: ## build the frontend static files and package the project and publish it to PyPI
|
||||
@@ -430,39 +430,39 @@ endif
|
||||
ifdef main
|
||||
#TODO: replace with uvx twine upload dist/*
|
||||
poetry config repositories.test-pypi https://test.pypi.org/legacy/
|
||||
make publish_langflow_testpypi
|
||||
make publish_hanzoflow_testpypi
|
||||
endif
|
||||
|
||||
|
||||
# example make alembic-revision message="Add user table"
|
||||
alembic-revision: ## generate a new migration
|
||||
@echo 'Generating a new Alembic revision'
|
||||
cd src/backend/base/langflow/ && uv run alembic revision --autogenerate -m "$(message)"
|
||||
cd src/backend/base/hanzoflow/ && uv run alembic revision --autogenerate -m "$(message)"
|
||||
|
||||
|
||||
alembic-upgrade: ## upgrade database to the latest version
|
||||
@echo 'Upgrading database to the latest version'
|
||||
cd src/backend/base/langflow/ && uv run alembic upgrade head
|
||||
cd src/backend/base/hanzoflow/ && uv run alembic upgrade head
|
||||
|
||||
alembic-downgrade: ## downgrade database by one version
|
||||
@echo 'Downgrading database by one version'
|
||||
cd src/backend/base/langflow/ && uv run alembic downgrade -1
|
||||
cd src/backend/base/hanzoflow/ && uv run alembic downgrade -1
|
||||
|
||||
alembic-current: ## show current revision
|
||||
@echo 'Showing current Alembic revision'
|
||||
cd src/backend/base/langflow/ && uv run alembic current
|
||||
cd src/backend/base/hanzoflow/ && uv run alembic current
|
||||
|
||||
alembic-history: ## show migration history
|
||||
@echo 'Showing Alembic migration history'
|
||||
cd src/backend/base/langflow/ && uv run alembic history --verbose
|
||||
cd src/backend/base/hanzoflow/ && uv run alembic history --verbose
|
||||
|
||||
alembic-check: ## check migration status
|
||||
@echo 'Running alembic check'
|
||||
cd src/backend/base/langflow/ && uv run alembic check
|
||||
cd src/backend/base/hanzoflow/ && uv run alembic check
|
||||
|
||||
alembic-stamp: ## stamp the database with a specific revision
|
||||
@echo 'Stamping the database with revision $(revision)'
|
||||
cd src/backend/base/langflow/ && uv run alembic stamp $(revision)
|
||||
cd src/backend/base/hanzoflow/ && uv run alembic stamp $(revision)
|
||||
|
||||
######################
|
||||
# LOAD TESTING
|
||||
@@ -491,7 +491,7 @@ locust: ## run locust load tests (options: locust_users=10 locust_spawn_rate=1 l
|
||||
@echo "Using locustfile: $(locust_file)"
|
||||
@export API_KEY=$(locust_api_key) && \
|
||||
export FLOW_ID=$(locust_flow_id) && \
|
||||
export LANGFLOW_HOST=$(locust_host) && \
|
||||
export HANZOFLOW_HOST=$(locust_host) && \
|
||||
export MIN_WAIT=$(locust_min_wait) && \
|
||||
export MAX_WAIT=$(locust_max_wait) && \
|
||||
export REQUEST_TIMEOUT=$(locust_request_timeout) && \
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
<!-- markdownlint-disable MD030 -->
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
[](https://github.com/langflow-ai/langflow/releases)
|
||||
[](https://github.com/hanzoflow-ai/hanzoflow/releases)
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
[](https://pypistats.org/packages/langflow)
|
||||
[](https://star-history.com/#langflow-ai/langflow)
|
||||
[](https://github.com/langflow-ai/langflow/issues)
|
||||
[](https://huggingface.co/spaces/Langflow/Langflow?duplicate=true)
|
||||
[](https://twitter.com/langflow)
|
||||
[](https://www.youtube.com/@Langflow)
|
||||
[](https://pypistats.org/packages/hanzoflow)
|
||||
[](https://star-history.com/#hanzoflow-ai/hanzoflow)
|
||||
[](https://github.com/hanzoflow-ai/hanzoflow/issues)
|
||||
[](https://huggingface.co/spaces/Hanzoflow/Hanzoflow?duplicate=true)
|
||||
[](https://twitter.com/hanzoflow)
|
||||
[](https://www.youtube.com/@Hanzoflow)
|
||||
|
||||
|
||||
[Langflow](https://langflow.org) is a powerful tool for building and deploying AI-powered agents and workflows. It provides developers with both a visual authoring experience and a built-in API server that turns every agent into an API endpoint that can be integrated into applications built on any framework or stack. Langflow comes with batteries included and supports all major LLMs, vector databases and a growing library of AI tools.
|
||||
[Hanzoflow](https://hanzoflow.org) is a powerful tool for building and deploying AI-powered agents and workflows. It provides developers with both a visual authoring experience and a built-in API server that turns every agent into an API endpoint that can be integrated into applications built on any framework or stack. Hanzoflow comes with batteries included and supports all major LLMs, vector databases and a growing library of AI tools.
|
||||
|
||||
## ✨ Highlight features
|
||||
|
||||
@@ -27,45 +27,45 @@
|
||||
|
||||
## ⚡️ Quickstart
|
||||
|
||||
Langflow works with Python 3.10 to 3.13.
|
||||
Hanzoflow works with Python 3.10 to 3.13.
|
||||
|
||||
Install with uv **(recommended)**
|
||||
|
||||
```shell
|
||||
uv pip install langflow
|
||||
uv pip install hanzoflow
|
||||
```
|
||||
|
||||
Install with pip
|
||||
|
||||
```shell
|
||||
pip install langflow
|
||||
pip install hanzoflow
|
||||
```
|
||||
|
||||
## 📦 Deployment
|
||||
|
||||
### Self-managed
|
||||
|
||||
Langflow is completely open source and you can deploy it to all major deployment clouds. Follow this [guide](https://docs.langflow.org/deployment-docker) to learn how to use Docker to deploy Langflow.
|
||||
Hanzoflow is completely open source and you can deploy it to all major deployment clouds. Follow this [guide](https://docs.hanzoflow.org/deployment-docker) to learn how to use Docker to deploy Hanzoflow.
|
||||
|
||||
### Fully-managed by DataStax
|
||||
|
||||
DataStax Langflow is a full-managed environment with zero setup. Developers can [sign up for a free account](https://astra.datastax.com/signup?type=langflow) to get started.
|
||||
DataStax Hanzoflow is a full-managed environment with zero setup. Developers can [sign up for a free account](https://astra.datastax.com/signup?type=hanzoflow) to get started.
|
||||
|
||||
## ⭐ Stay up-to-date
|
||||
|
||||
Star Langflow on GitHub to be instantly notified of new releases.
|
||||
Star Hanzoflow on GitHub to be instantly notified of new releases.
|
||||
|
||||

|
||||

|
||||
|
||||
## 👋 Contribute
|
||||
|
||||
We welcome contributions from developers of all levels. 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. If you'd like to contribute, please check our [contributing guidelines](./CONTRIBUTING.md) and help make Hanzoflow more accessible.
|
||||
|
||||
---
|
||||
|
||||
[](https://star-history.com/#langflow-ai/langflow&Date)
|
||||
[](https://star-history.com/#hanzoflow-ai/hanzoflow&Date)
|
||||
|
||||
## ❤️ Contributors
|
||||
|
||||
[](https://github.com/langflow-ai/langflow/graphs/contributors)
|
||||
[](https://github.com/hanzoflow-ai/hanzoflow/graphs/contributors)
|
||||
|
||||
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
# Run Langflow
|
||||
# Run Hanzoflow
|
||||
|
||||
|
||||
## Docker compose
|
||||
To run Langflow with Docker compose, you need to have Docker and Docker compose installed on your machine. You can install Docker and Docker compose by following the instructions on the [official Docker documentation](https://docs.docker.com/get-docker/).
|
||||
To run Hanzoflow with Docker compose, you need to have Docker and Docker compose installed on your machine. You can install Docker and Docker compose by following the instructions on the [official Docker documentation](https://docs.docker.com/get-docker/).
|
||||
|
||||
The docker-compose file uses `latest` tag; it's recommended to pull the latest version of the images before running the docker-compose file.
|
||||
|
||||
@@ -10,12 +10,12 @@ The docker-compose file uses `latest` tag; it's recommended to pull the latest v
|
||||
docker compose pull
|
||||
```
|
||||
|
||||
To start the Langflow services, run the following command:
|
||||
To start the Hanzoflow services, run the following command:
|
||||
|
||||
```bash
|
||||
docker compose up
|
||||
```
|
||||
|
||||
After running the command, you can access the Langflow services at the following url: http://localhost:80.
|
||||
After running the command, you can access the Hanzoflow services at the following url: http://localhost:80.
|
||||
|
||||
Edit the `.env` file to change the port or other configurations.
|
||||
@@ -67,7 +67,7 @@ services:
|
||||
- traefik.http.routers.${STACK_NAME?Variable not set}-proxy-http.middlewares=${STACK_NAME?Variable not set}-www-redirect,${STACK_NAME?Variable not set}-https-redirect
|
||||
|
||||
backend: &backend
|
||||
image: "langflowai/langflow-backend:latest"
|
||||
image: "hanzoflowai/hanzoflow-backend:latest"
|
||||
depends_on:
|
||||
- db
|
||||
- broker
|
||||
@@ -134,7 +134,7 @@ services:
|
||||
<<: *backend
|
||||
env_file:
|
||||
- .env
|
||||
command: /bin/sh -c "python -m celery -A langflow.worker.celery_app worker --loglevel=INFO --concurrency=1 -n lf-worker@%h -P eventlet"
|
||||
command: /bin/sh -c "python -m celery -A hanzoflow.worker.celery_app worker --loglevel=INFO --concurrency=1 -n lf-worker@%h -P eventlet"
|
||||
healthcheck:
|
||||
test: "exit 0"
|
||||
deploy:
|
||||
@@ -149,7 +149,7 @@ services:
|
||||
environment:
|
||||
- FLOWER_PORT=5555
|
||||
|
||||
command: /bin/sh -c "python -m celery -A langflow.worker.celery_app --broker=${BROKER_URL?Variable not set} flower --port=5555"
|
||||
command: /bin/sh -c "python -m celery -A hanzoflow.worker.celery_app --broker=${BROKER_URL?Variable not set} flower --port=5555"
|
||||
deploy:
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
@@ -165,7 +165,7 @@ services:
|
||||
- traefik.http.services.${STACK_NAME?Variable not set}-flower.loadbalancer.server.port=5555
|
||||
|
||||
frontend:
|
||||
image: "langflowai/langflow-frontend:latest"
|
||||
image: "hanzoflowai/hanzoflow-frontend:latest"
|
||||
env_file:
|
||||
- .env
|
||||
restart: on-failure
|
||||
|
||||
@@ -4,6 +4,6 @@ node_modules
|
||||
**/node_modules/
|
||||
dist/
|
||||
**/build/
|
||||
src/backend/langflow/frontend
|
||||
**/langflow-pre.db
|
||||
**/langflow.db
|
||||
src/backend/hanzoflow/frontend
|
||||
**/hanzoflow-pre.db
|
||||
**/hanzoflow.db
|
||||
@@ -1,6 +1,6 @@
|
||||
version: "3"
|
||||
networks:
|
||||
langflow:
|
||||
hanzoflow:
|
||||
|
||||
services:
|
||||
backend:
|
||||
@@ -13,9 +13,9 @@ services:
|
||||
- "7860:7860"
|
||||
volumes:
|
||||
- ./:/app
|
||||
command: bash -c "uvicorn --factory langflow.main:create_app --host 0.0.0.0 --port 7860 --reload --loop asyncio"
|
||||
command: bash -c "uvicorn --factory hanzoflow.main:create_app --host 0.0.0.0 --port 7860 --reload --loop asyncio"
|
||||
networks:
|
||||
- langflow
|
||||
- hanzoflow
|
||||
frontend:
|
||||
build:
|
||||
context: ./src/frontend
|
||||
@@ -34,4 +34,4 @@ services:
|
||||
- ./src/frontend/package.json:/home/node/app/package.json
|
||||
restart: on-failure
|
||||
networks:
|
||||
- langflow
|
||||
- hanzoflow
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export LANGFLOW_DATABASE_URL="mysql+pymysql://${username}:${password}@${host}:3306/${dbname}"
|
||||
# echo $LANGFLOW_DATABASE_URL
|
||||
uvicorn --factory langflow.main:create_app --host 0.0.0.0 --port 7860 --reload --log-level debug --loop asyncio
|
||||
export HANZOFLOW_DATABASE_URL="mysql+pymysql://${username}:${password}@${host}:3306/${dbname}"
|
||||
# echo $HANZOFLOW_DATABASE_URL
|
||||
uvicorn --factory hanzoflow.main:create_app --host 0.0.0.0 --port 7860 --reload --log-level debug --loop asyncio
|
||||
|
||||
# python -m langflow run --host 0.0.0.0 --port 7860
|
||||
# python -m hanzoflow run --host 0.0.0.0 --port 7860
|
||||
@@ -1,23 +1,23 @@
|
||||
networks:
|
||||
dev-langflow:
|
||||
dev-hanzoflow:
|
||||
|
||||
services:
|
||||
langflow:
|
||||
hanzoflow:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: docker/dev.Dockerfile
|
||||
image: dev-langflow
|
||||
container_name: dev-langflow
|
||||
image: dev-hanzoflow
|
||||
container_name: dev-hanzoflow
|
||||
restart: always
|
||||
ports:
|
||||
- "7860:7860"
|
||||
- "3000:3000"
|
||||
environment:
|
||||
- PYTHONDONTWRITEBYTECODE=1
|
||||
- LANGFLOW_DATABASE_URL=postgresql://langflow:langflow@postgres:5432/langflow
|
||||
- LANGFLOW_SUPERUSER=langflow
|
||||
- LANGFLOW_SUPERUSER_PASSWORD=langflow
|
||||
- LANGFLOW_CONFIG_DIR=/var/lib/langflow
|
||||
- HANZOFLOW_DATABASE_URL=postgresql://hanzoflow:hanzoflow@postgres:5432/hanzoflow
|
||||
- HANZOFLOW_SUPERUSER=hanzoflow
|
||||
- HANZOFLOW_SUPERUSER_PASSWORD=hanzoflow
|
||||
- HANZOFLOW_CONFIG_DIR=/var/lib/hanzoflow
|
||||
env_file:
|
||||
- ../.env
|
||||
volumes:
|
||||
@@ -25,18 +25,18 @@ services:
|
||||
depends_on:
|
||||
- postgres
|
||||
networks:
|
||||
- dev-langflow
|
||||
- dev-hanzoflow
|
||||
|
||||
|
||||
postgres:
|
||||
container_name: postgres
|
||||
image: pgvector/pgvector:pg16
|
||||
environment:
|
||||
POSTGRES_USER: langflow
|
||||
POSTGRES_PASSWORD: langflow
|
||||
POSTGRES_DB: langflow
|
||||
POSTGRES_USER: hanzoflow
|
||||
POSTGRES_PASSWORD: hanzoflow
|
||||
POSTGRES_DB: hanzoflow
|
||||
ports:
|
||||
- "5432:5432"
|
||||
networks:
|
||||
- dev-langflow
|
||||
- dev-hanzoflow
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM langflowai/langflow:latest
|
||||
FROM hanzoflowai/hanzoflow:latest
|
||||
|
||||
ENTRYPOINT ["python", "-m", "langflow", "run"]
|
||||
ENTRYPOINT ["python", "-m", "hanzoflow", "run"]
|
||||
|
||||
@@ -1 +1 @@
|
||||
FROM langflowai/langflow:1.0-alpha
|
||||
FROM hanzoflowai/hanzoflow:1.0-alpha
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM langflowai/langflow:latest
|
||||
FROM hanzoflowai/hanzoflow:latest
|
||||
|
||||
CMD ["python", "-m", "langflow", "run", "--host", "0.0.0.0", "--port", "7860"]
|
||||
CMD ["python", "-m", "hanzoflow", "run", "--host", "0.0.0.0", "--port", "7860"]
|
||||
|
||||
@@ -12,13 +12,13 @@ This guide will help you get LangFlow up and running using Docker and Docker Com
|
||||
1. Clone the LangFlow repository:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/langflow-ai/langflow.git
|
||||
git clone https://github.com/hanzoflow-ai/hanzoflow.git
|
||||
```
|
||||
|
||||
2. Navigate to the `docker_example` directory:
|
||||
|
||||
```sh
|
||||
cd langflow/docker_example
|
||||
cd hanzoflow/docker_example
|
||||
```
|
||||
|
||||
3. Run the Docker Compose file:
|
||||
@@ -31,20 +31,20 @@ LangFlow will now be accessible at [http://localhost:7860/](http://localhost:786
|
||||
|
||||
## Docker Compose Configuration
|
||||
|
||||
The Docker Compose configuration spins up two services: `langflow` and `postgres`.
|
||||
The Docker Compose configuration spins up two services: `hanzoflow` and `postgres`.
|
||||
|
||||
### LangFlow Service
|
||||
|
||||
The `langflow` service uses the `langflowai/langflow:latest` Docker image and exposes port 7860. It depends on the `postgres` service.
|
||||
The `hanzoflow` service uses the `hanzoflowai/hanzoflow:latest` Docker image and exposes port 7860. It depends on the `postgres` service.
|
||||
|
||||
Environment variables:
|
||||
|
||||
- `LANGFLOW_DATABASE_URL`: The connection string for the PostgreSQL database.
|
||||
- `LANGFLOW_CONFIG_DIR`: The directory where LangFlow stores logs, file storage, monitor data, and secret keys.
|
||||
- `HANZOFLOW_DATABASE_URL`: The connection string for the PostgreSQL database.
|
||||
- `HANZOFLOW_CONFIG_DIR`: The directory where LangFlow stores logs, file storage, monitor data, and secret keys.
|
||||
|
||||
Volumes:
|
||||
|
||||
- `langflow-data`: This volume is mapped to `/app/langflow` in the container.
|
||||
- `hanzoflow-data`: This volume is mapped to `/app/hanzoflow` in the container.
|
||||
|
||||
### PostgreSQL Service
|
||||
|
||||
@@ -58,8 +58,8 @@ Environment variables:
|
||||
|
||||
Volumes:
|
||||
|
||||
- `langflow-postgres`: This volume is mapped to `/var/lib/postgresql/data` in the container.
|
||||
- `hanzoflow-postgres`: This volume is mapped to `/var/lib/postgresql/data` in the container.
|
||||
|
||||
## Switching to a Specific LangFlow Version
|
||||
|
||||
If you want to use a specific version of LangFlow, you can modify the `image` field under the `langflow` service in the Docker Compose file. For example, to use version 1.0-alpha, change `langflowai/langflow:latest` to `langflowai/langflow:1.0-alpha`.
|
||||
If you want to use a specific version of LangFlow, you can modify the `image` field under the `hanzoflow` service in the Docker Compose file. For example, to use version 1.0-alpha, change `hanzoflowai/hanzoflow:latest` to `hanzoflowai/hanzoflow:1.0-alpha`.
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
services:
|
||||
langflow:
|
||||
image: langflowai/langflow:latest # or another version tag on https://hub.docker.com/r/langflowai/langflow
|
||||
hanzoflow:
|
||||
image: hanzoflowai/hanzoflow:latest # or another version tag on https://hub.docker.com/r/hanzoflowai/hanzoflow
|
||||
pull_policy: always # set to 'always' when using 'latest' image
|
||||
ports:
|
||||
- "7860:7860"
|
||||
depends_on:
|
||||
- postgres
|
||||
environment:
|
||||
- LANGFLOW_DATABASE_URL=postgresql://langflow:langflow@postgres:5432/langflow
|
||||
- HANZOFLOW_DATABASE_URL=postgresql://hanzoflow:hanzoflow@postgres:5432/hanzoflow
|
||||
# This variable defines where the logs, file storage, monitor data and secret keys are stored.
|
||||
- LANGFLOW_CONFIG_DIR=app/langflow
|
||||
- HANZOFLOW_CONFIG_DIR=app/hanzoflow
|
||||
volumes:
|
||||
- langflow-data:/app/langflow
|
||||
- hanzoflow-data:/app/hanzoflow
|
||||
|
||||
postgres:
|
||||
image: postgres:16
|
||||
environment:
|
||||
POSTGRES_USER: langflow
|
||||
POSTGRES_PASSWORD: langflow
|
||||
POSTGRES_DB: langflow
|
||||
POSTGRES_USER: hanzoflow
|
||||
POSTGRES_PASSWORD: hanzoflow
|
||||
POSTGRES_DB: hanzoflow
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- langflow-postgres:/var/lib/postgresql/data
|
||||
- hanzoflow-postgres:/var/lib/postgresql/data
|
||||
|
||||
volumes:
|
||||
langflow-postgres:
|
||||
langflow-data:
|
||||
hanzoflow-postgres:
|
||||
hanzoflow-data:
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM langflowai/langflow:1.0-alpha
|
||||
FROM hanzoflowai/hanzoflow:1.0-alpha
|
||||
|
||||
CMD ["python", "-m", "langflow", "run", "--host", "0.0.0.0", "--port", "7860"]
|
||||
CMD ["python", "-m", "hanzoflow", "run", "--host", "0.0.0.0", "--port", "7860"]
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
langflow:
|
||||
image: langflowai/langflow:1.0-alpha
|
||||
hanzoflow:
|
||||
image: hanzoflowai/hanzoflow:1.0-alpha
|
||||
ports:
|
||||
- "7860:7860"
|
||||
depends_on:
|
||||
- postgres
|
||||
environment:
|
||||
- LANGFLOW_DATABASE_URL=postgresql://langflow:langflow@postgres:5432/langflow
|
||||
- HANZOFLOW_DATABASE_URL=postgresql://hanzoflow:hanzoflow@postgres:5432/hanzoflow
|
||||
# This variable defines where the logs, file storage, monitor data and secret keys are stored.
|
||||
- LANGFLOW_CONFIG_DIR=app/langflow
|
||||
- HANZOFLOW_CONFIG_DIR=app/hanzoflow
|
||||
volumes:
|
||||
- langflow-data:/app/langflow
|
||||
- hanzoflow-data:/app/hanzoflow
|
||||
|
||||
postgres:
|
||||
image: postgres:16
|
||||
environment:
|
||||
POSTGRES_USER: langflow
|
||||
POSTGRES_PASSWORD: langflow
|
||||
POSTGRES_DB: langflow
|
||||
POSTGRES_USER: hanzoflow
|
||||
POSTGRES_PASSWORD: hanzoflow
|
||||
POSTGRES_DB: hanzoflow
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- langflow-postgres:/var/lib/postgresql/data
|
||||
- hanzoflow-postgres:/var/lib/postgresql/data
|
||||
|
||||
volumes:
|
||||
langflow-postgres:
|
||||
langflow-data:
|
||||
hanzoflow-postgres:
|
||||
hanzoflow-data:
|
||||
|
||||
@@ -6,9 +6,9 @@ slug: /api-reference-api-examples
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
This page provides examples and practices for managing Langflow using the Langflow API.
|
||||
This page provides examples and practices for managing Hanzoflow using the Hanzoflow API.
|
||||
|
||||
The Langflow API's OpenAPI spec can be viewed and tested at your Langflow deployment's `docs` endpoint.
|
||||
The Hanzoflow API's OpenAPI spec can be viewed and tested at your Hanzoflow deployment's `docs` endpoint.
|
||||
For example, `http://127.0.0.1:7860/docs`.
|
||||
|
||||
## Export values
|
||||
@@ -17,10 +17,10 @@ You might find it helpful to set the following environment variables in your ter
|
||||
|
||||
The examples in this guide use environment variables for these values.
|
||||
|
||||
* Export your Langflow URL in your terminal.
|
||||
Langflow starts by default at `http://127.0.0.1:7860`.
|
||||
* Export your Hanzoflow URL in your terminal.
|
||||
Hanzoflow starts by default at `http://127.0.0.1:7860`.
|
||||
```bash
|
||||
export LANGFLOW_URL="http://127.0.0.1:7860"
|
||||
export HANZOFLOW_URL="http://127.0.0.1:7860"
|
||||
```
|
||||
|
||||
* Export the `flow-id` in your terminal.
|
||||
@@ -30,12 +30,12 @@ export FLOW_ID="359cd752-07ea-46f2-9d3b-a4407ef618da"
|
||||
```
|
||||
|
||||
* Export the `folder-id` in your terminal.
|
||||
To find your folder ID, call the Langflow [/api/v1/folders/](#read-folders) endpoint for a list of folders.
|
||||
To find your folder ID, call the Hanzoflow [/api/v1/folders/](#read-folders) endpoint for a list of folders.
|
||||
<Tabs>
|
||||
<TabItem value="curl" label="curl" default>
|
||||
```bash
|
||||
curl -X GET \
|
||||
"$LANGFLOW_URL/api/v1/folders/" \
|
||||
"$HANZOFLOW_URL/api/v1/folders/" \
|
||||
-H "accept: application/json"
|
||||
```
|
||||
</TabItem>
|
||||
@@ -57,12 +57,12 @@ Export the `folder-id` as an environment variable.
|
||||
export FOLDER_ID="1415de42-8f01-4f36-bf34-539f23e47466"
|
||||
```
|
||||
|
||||
* Export the Langflow API key as an environment variable.
|
||||
To create a Langflow API key, run the following command in the Langflow CLI.
|
||||
* Export the Hanzoflow API key as an environment variable.
|
||||
To create a Hanzoflow API key, run the following command in the Hanzoflow CLI.
|
||||
<Tabs>
|
||||
<TabItem value="curl" label="curl" default>
|
||||
```text
|
||||
langflow api-key
|
||||
hanzoflow api-key
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="result" label="Result">
|
||||
@@ -74,30 +74,30 @@ sk-...
|
||||
</Tabs>
|
||||
Export the generated API key as an environment variable.
|
||||
```text
|
||||
export LANGFLOW_API_KEY="sk-..."
|
||||
export HANZOFLOW_API_KEY="sk-..."
|
||||
```
|
||||
|
||||
## Base
|
||||
|
||||
Use the base Langflow API to run your flow and retrieve configuration information.
|
||||
Use the base Hanzoflow API to run your flow and retrieve configuration information.
|
||||
|
||||
### Get all components
|
||||
|
||||
This operation returns a dictionary of all Langflow components.
|
||||
This operation returns a dictionary of all Hanzoflow components.
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="curl" label="curl" default>
|
||||
|
||||
```bash
|
||||
curl -X GET \
|
||||
"$LANGFLOW_URL/api/v1/all" \
|
||||
"$HANZOFLOW_URL/api/v1/all" \
|
||||
-H "accept: application/json"
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="result" label="Result">
|
||||
```text
|
||||
A dictionary of all Langflow components.
|
||||
A dictionary of all Hanzoflow components.
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@@ -116,7 +116,7 @@ The parameters are passed in the request body. In this example, the values are t
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
"$LANGFLOW_URL/api/v1/run/$FLOW_ID" \
|
||||
"$HANZOFLOW_URL/api/v1/run/$FLOW_ID" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"input_value": "Tell me about something interesting!",
|
||||
@@ -173,7 +173,7 @@ To stream LLM token responses, append the `?stream=true` query parameter to the
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
"$LANGFLOW_URL/api/v1/run/$FLOW_ID?stream=true" \
|
||||
"$HANZOFLOW_URL/api/v1/run/$FLOW_ID?stream=true" \
|
||||
-H "accept: application/json" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
@@ -241,7 +241,7 @@ Parameters can be passed to the `/run` endpoint in three ways:
|
||||
**Example request**
|
||||
```bash
|
||||
curl -X POST \
|
||||
"http://$LANGFLOW_URL/api/v1/run/$FLOW_ID?stream=true" \
|
||||
"http://$HANZOFLOW_URL/api/v1/run/$FLOW_ID?stream=true" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "accept: application/json" \
|
||||
-H "x-api-key: sk-..." \
|
||||
@@ -272,7 +272,7 @@ To test the **Webhook** component in your flow, see the [Webhook component](/com
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
"$LANGFLOW_URL/api/v1/webhook/$FLOW_ID" \
|
||||
"$HANZOFLOW_URL/api/v1/webhook/$FLOW_ID" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"data": "example-data"}'
|
||||
```
|
||||
@@ -310,7 +310,7 @@ Get the status of a task.
|
||||
|
||||
```bash
|
||||
curl -X GET \
|
||||
"$LANGFLOW_URL/api/v1/task/TASK_ID" \
|
||||
"$HANZOFLOW_URL/api/v1/task/TASK_ID" \
|
||||
-H "accept: application/json"
|
||||
```
|
||||
|
||||
@@ -335,14 +335,14 @@ This endpoint is deprecated. Use the `/file` endpoint instead.
|
||||
|
||||
### Get version
|
||||
|
||||
Get the version of the Langflow API.
|
||||
Get the version of the Hanzoflow API.
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="curl" label="curl" default>
|
||||
|
||||
```bash
|
||||
curl -X GET \
|
||||
"$LANGFLOW_URL/api/v1/version" \
|
||||
"$HANZOFLOW_URL/api/v1/version" \
|
||||
-H "accept: application/json"
|
||||
```
|
||||
|
||||
@@ -353,7 +353,7 @@ curl -X GET \
|
||||
{
|
||||
"version": "1.1.1",
|
||||
"main_version": "1.1.1",
|
||||
"package": "Langflow"
|
||||
"package": "Hanzoflow"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -362,14 +362,14 @@ curl -X GET \
|
||||
|
||||
### Get config
|
||||
|
||||
Retrieve the Langflow configuration information.
|
||||
Retrieve the Hanzoflow configuration information.
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="curl" label="curl" default>
|
||||
|
||||
```bash
|
||||
curl -X GET \
|
||||
"$LANGFLOW_URL/api/v1/config" \
|
||||
"$HANZOFLOW_URL/api/v1/config" \
|
||||
-H "accept: application/json"
|
||||
```
|
||||
|
||||
@@ -416,7 +416,7 @@ This endpoint builds and executes a flow, returning a job ID that can be used to
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
"$LANGFLOW_URL/api/v1/build/$FLOW_ID/flow" \
|
||||
"$HANZOFLOW_URL/api/v1/build/$FLOW_ID/flow" \
|
||||
-H "accept: application/json" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
@@ -445,7 +445,7 @@ curl -X POST \
|
||||
|
||||
```curl
|
||||
curl -X GET \
|
||||
"$LANGFLOW_URL/api/v1/build/123e4567-e89b-12d3-a456-426614174000/events" \
|
||||
"$HANZOFLOW_URL/api/v1/build/123e4567-e89b-12d3-a456-426614174000/events" \
|
||||
-H "accept: application/json"
|
||||
```
|
||||
|
||||
@@ -469,7 +469,7 @@ The events endpoint accepts an optional `stream` query parameter which defaults
|
||||
To disable streaming and get all events at once, set `stream` to `false`.
|
||||
```curl
|
||||
curl -X GET \
|
||||
"$LANGFLOW_URL/api/v1/build/123e4567-e89b-12d3-a456-426614174000/events?stream=false" \
|
||||
"$HANZOFLOW_URL/api/v1/build/123e4567-e89b-12d3-a456-426614174000/events?stream=false" \
|
||||
-H "accept: application/json"
|
||||
```
|
||||
|
||||
@@ -503,14 +503,14 @@ For example, to stop flow execution at the Open AI model component, run the foll
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
"$LANGFLOW_URL/api/v1/build/$FLOW_ID/flow" \
|
||||
"$HANZOFLOW_URL/api/v1/build/$FLOW_ID/flow" \
|
||||
-H "accept: application/json" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "x-api-key: $LANGFLOW_API_KEY" \
|
||||
-H "x-api-key: $HANZOFLOW_API_KEY" \
|
||||
-d '{"stop_component_id": "OpenAIModel-Uksag"}'
|
||||
```
|
||||
|
||||
The `/build` endpoint also accepts inputs for `data` directly, instead of using the values stored in the Langflow database.
|
||||
The `/build` endpoint also accepts inputs for `data` directly, instead of using the values stored in the Hanzoflow database.
|
||||
This is useful for running flows without having to pass custom values through the UI.
|
||||
|
||||
<Tabs>
|
||||
@@ -518,7 +518,7 @@ This is useful for running flows without having to pass custom values through th
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
"$LANGFLOW_URL/api/v1/build/$FLOW_ID/flow" \
|
||||
"$HANZOFLOW_URL/api/v1/build/$FLOW_ID/flow" \
|
||||
-H "accept: application/json" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
@@ -545,7 +545,7 @@ curl -X POST \
|
||||
|
||||
## Files
|
||||
|
||||
Use the `/files` endpoint to add or delete files between your local machine and Langflow.
|
||||
Use the `/files` endpoint to add or delete files between your local machine and Hanzoflow.
|
||||
|
||||
### Upload file
|
||||
|
||||
@@ -558,7 +558,7 @@ This example uploads `the_oscar_award.csv`.
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
"$LANGFLOW_URL/api/v1/files/upload/$FLOW_ID" \
|
||||
"$HANZOFLOW_URL/api/v1/files/upload/$FLOW_ID" \
|
||||
-H "accept: application/json" \
|
||||
-H "Content-Type: multipart/form-data" \
|
||||
-F "file=@the_oscar_award.csv"
|
||||
@@ -579,15 +579,15 @@ curl -X POST \
|
||||
|
||||
#### Upload image files
|
||||
|
||||
Send image files to the Langflow API for AI analysis.
|
||||
Send image files to the Hanzoflow API for AI analysis.
|
||||
|
||||
The default file limit is 100 MB. To configure this value, change the `LANGFLOW_MAX_FILE_SIZE_UPLOAD` environment variable.
|
||||
The default file limit is 100 MB. To configure this value, change the `HANZOFLOW_MAX_FILE_SIZE_UPLOAD` environment variable.
|
||||
For more information, see [Supported environment variables](/environment-variables#supported-variables).
|
||||
|
||||
1. To send an image to your flow with the API, POST the image file to the `v1/files/upload/<YOUR-FLOW-ID>` endpoint of your flow.
|
||||
|
||||
```bash
|
||||
curl -X POST "$LANGFLOW_URL/api/v1/files/upload/a430cc57-06bb-4c11-be39-d3d4de68d2c4" \
|
||||
curl -X POST "$HANZOFLOW_URL/api/v1/files/upload/a430cc57-06bb-4c11-be39-d3d4de68d2c4" \
|
||||
-H "Content-Type: multipart/form-data" \
|
||||
-F "[email protected]"
|
||||
```
|
||||
@@ -599,11 +599,11 @@ The API returns the image file path in the format `"file_path":"<YOUR-FLOW-ID>/<
|
||||
```
|
||||
|
||||
2. Post the image file to the **Chat Input** component of a **Basic prompting** flow.
|
||||
Pass the file path value as an input in the **Tweaks** section of the curl call to Langflow.
|
||||
Pass the file path value as an input in the **Tweaks** section of the curl call to Hanzoflow.
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
"$LANGFLOW_URL/api/v1/run/a430cc57-06bb-4c11-be39-d3d4de68d2c4?stream=false" \
|
||||
"$HANZOFLOW_URL/api/v1/run/a430cc57-06bb-4c11-be39-d3d4de68d2c4?stream=false" \
|
||||
-H 'Content-Type: application/json'\
|
||||
-d '{
|
||||
"output_type": "chat",
|
||||
@@ -632,7 +632,7 @@ List all files associated with a specific flow.
|
||||
|
||||
```bash
|
||||
curl -X GET \
|
||||
"$LANGFLOW_URL/api/v1/files/list/$FLOW_ID" \
|
||||
"$HANZOFLOW_URL/api/v1/files/list/$FLOW_ID" \
|
||||
-H "accept: application/json"
|
||||
```
|
||||
|
||||
@@ -654,9 +654,9 @@ curl -X GET \
|
||||
|
||||
Download a specific file for a given flow.
|
||||
|
||||
To look up the file name in Langflow, use the `/list` endpoint.
|
||||
To look up the file name in Hanzoflow, use the `/list` endpoint.
|
||||
|
||||
This example downloads the `2024-12-30_15-19-43_the_oscar_award.csv` file from Langflow to a file named `output-file.csv`.
|
||||
This example downloads the `2024-12-30_15-19-43_the_oscar_award.csv` file from Hanzoflow to a file named `output-file.csv`.
|
||||
|
||||
The `--output` flag is optional.
|
||||
|
||||
@@ -665,7 +665,7 @@ The `--output` flag is optional.
|
||||
|
||||
```bash
|
||||
curl -X GET \
|
||||
"$LANGFLOW_URL/api/v1/files/download/$FLOW_ID/2024-12-30_15-19-43_the_oscar_award.csv" \
|
||||
"$HANZOFLOW_URL/api/v1/files/download/$FLOW_ID/2024-12-30_15-19-43_the_oscar_award.csv" \
|
||||
-H "accept: application/json" \
|
||||
--output output-file.csv
|
||||
```
|
||||
@@ -684,9 +684,9 @@ The file contents.
|
||||
|
||||
Download an image file for a given flow.
|
||||
|
||||
To look up the file name in Langflow, use the `/list` endpoint.
|
||||
To look up the file name in Hanzoflow, use the `/list` endpoint.
|
||||
|
||||
This example downloads the `2024-12-30_15-42-44_image-file.png` file from Langflow to a file named `output-image.png`.
|
||||
This example downloads the `2024-12-30_15-42-44_image-file.png` file from Hanzoflow to a file named `output-image.png`.
|
||||
|
||||
The `--output` flag is optional.
|
||||
|
||||
@@ -695,7 +695,7 @@ The `--output` flag is optional.
|
||||
|
||||
```bash
|
||||
curl -X GET \
|
||||
"$LANGFLOW_URL/api/v1/files/images/$FLOW_ID/2024-12-30_15-42-44_image-file.png" \
|
||||
"$HANZOFLOW_URL/api/v1/files/images/$FLOW_ID/2024-12-30_15-42-44_image-file.png" \
|
||||
-H "accept: application/json" \
|
||||
--output output-image.png
|
||||
```
|
||||
@@ -715,14 +715,14 @@ Image file content.
|
||||
|
||||
Delete a specific file from a flow.
|
||||
|
||||
This example deletes the `2024-12-30_15-42-44_image-file.png` file from Langflow.
|
||||
This example deletes the `2024-12-30_15-42-44_image-file.png` file from Hanzoflow.
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="curl" label="curl" default>
|
||||
|
||||
```bash
|
||||
curl -X DELETE \
|
||||
"$LANGFLOW_URL/api/v1/files/delete/$FLOW_ID/2024-12-30_15-42-44_image-file.png" \
|
||||
"$HANZOFLOW_URL/api/v1/files/delete/$FLOW_ID/2024-12-30_15-42-44_image-file.png" \
|
||||
-H "accept: application/json"
|
||||
```
|
||||
|
||||
@@ -751,7 +751,7 @@ Create a new flow.
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
"$LANGFLOW_URL/api/v1/flows/" \
|
||||
"$HANZOFLOW_URL/api/v1/flows/" \
|
||||
-H "accept: application/json" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
@@ -789,7 +789,7 @@ Retrieve a list of flows with pagination support.
|
||||
|
||||
```bash
|
||||
curl -X GET \
|
||||
"$LANGFLOW_URL/api/v1/flows/?remove_example_flows=false&components_only=false&get_all=true&header_flows=false&page=1&size=50" \
|
||||
"$HANZOFLOW_URL/api/v1/flows/?remove_example_flows=false&components_only=false&get_all=true&header_flows=false&page=1&size=50" \
|
||||
-H "accept: application/json"
|
||||
```
|
||||
|
||||
@@ -811,7 +811,7 @@ To retrieve only the flows from a specific folder, pass `folder_id` in the query
|
||||
|
||||
```bash
|
||||
curl -X GET \
|
||||
"$LANGFLOW_URL/api/v1/flows/?remove_example_flows=true&components_only=false&get_all=false&folder_id=$FOLDER_ID&header_flows=false&page=1&size=1" \
|
||||
"$HANZOFLOW_URL/api/v1/flows/?remove_example_flows=true&components_only=false&get_all=false&folder_id=$FOLDER_ID&header_flows=false&page=1&size=1" \
|
||||
-H "accept: application/json"
|
||||
```
|
||||
|
||||
@@ -835,7 +835,7 @@ Read a specific flow by its ID.
|
||||
|
||||
```bash
|
||||
curl -X GET \
|
||||
"$LANGFLOW_URL/api/v1/flows/$FLOW_ID" \
|
||||
"$HANZOFLOW_URL/api/v1/flows/$FLOW_ID" \
|
||||
-H "accept: application/json"
|
||||
```
|
||||
|
||||
@@ -872,7 +872,7 @@ This example changes the value for `endpoint_name` from a random UUID to `my_new
|
||||
|
||||
```bash
|
||||
curl -X PATCH \
|
||||
"$LANGFLOW_URL/api/v1/flows/$FLOW_ID" \
|
||||
"$HANZOFLOW_URL/api/v1/flows/$FLOW_ID" \
|
||||
-H "accept: application/json" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
@@ -920,7 +920,7 @@ Delete a specific flow by its ID.
|
||||
|
||||
```bash
|
||||
curl -X DELETE \
|
||||
"$LANGFLOW_URL/api/v1/flows/$FLOW_ID" \
|
||||
"$HANZOFLOW_URL/api/v1/flows/$FLOW_ID" \
|
||||
-H "accept: application/json"
|
||||
```
|
||||
|
||||
@@ -946,7 +946,7 @@ Create multiple new flows.
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
"$LANGFLOW_URL/api/v1/flows/batch/" \
|
||||
"$HANZOFLOW_URL/api/v1/flows/batch/" \
|
||||
-H "accept: application/json" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
@@ -1016,7 +1016,7 @@ This example uploads a local file named `agent-with-astra-db-tool.json`.
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
"$LANGFLOW_URL/api/v1/flows/upload/?folder_id=$FOLDER_ID" \
|
||||
"$HANZOFLOW_URL/api/v1/flows/upload/?folder_id=$FOLDER_ID" \
|
||||
-H "accept: application/json" \
|
||||
-H "Content-Type: multipart/form-data" \
|
||||
-F "[email protected];type=application/json"
|
||||
@@ -1046,7 +1046,7 @@ The target `folder_id` must already exist before uploading a flow. Call the [/ap
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
"$LANGFLOW_URL/api/v1/flows/upload/?folder_id=$FOLDER_ID" \
|
||||
"$HANZOFLOW_URL/api/v1/flows/upload/?folder_id=$FOLDER_ID" \
|
||||
-H "accept: application/json" \
|
||||
-H "Content-Type: multipart/form-data" \
|
||||
-F "[email protected];type=application/json"
|
||||
@@ -1063,14 +1063,14 @@ This endpoint downloads a ZIP file containing flows for all `flow-id` values lis
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
"$LANGFLOW_URL/api/v1/flows/download/" \
|
||||
"$HANZOFLOW_URL/api/v1/flows/download/" \
|
||||
-H "accept: application/json" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '[
|
||||
"e1e40c77-0541-41a9-88ab-ddb3419398b5",
|
||||
"92f9a4c5-cfc8-4656-ae63-1f0881163c28"
|
||||
]' \
|
||||
--output langflow-flows.zip
|
||||
--output hanzoflow-flows.zip
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
@@ -1093,7 +1093,7 @@ Retrieve a list of basic example flows.
|
||||
|
||||
```bash
|
||||
curl -X GET \
|
||||
"$LANGFLOW_URL/api/v1/flows/basic_examples/" \
|
||||
"$HANZOFLOW_URL/api/v1/flows/basic_examples/" \
|
||||
-H "accept: application/json"
|
||||
```
|
||||
|
||||
@@ -1116,14 +1116,14 @@ Folders store your flows and components.
|
||||
|
||||
### Read folders
|
||||
|
||||
Get a list of Langflow folders.
|
||||
Get a list of Hanzoflow folders.
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="curl" label="curl" default>
|
||||
|
||||
```bash
|
||||
curl -X GET \
|
||||
"$LANGFLOW_URL/api/v1/folders/" \
|
||||
"$HANZOFLOW_URL/api/v1/folders/" \
|
||||
-H "accept: application/json"
|
||||
```
|
||||
|
||||
@@ -1153,7 +1153,7 @@ Create a new folder.
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
"$LANGFLOW_URL/api/v1/folders/" \
|
||||
"$HANZOFLOW_URL/api/v1/folders/" \
|
||||
-H "accept: application/json" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
@@ -1185,7 +1185,7 @@ Adding a flow to a folder moves the flow from its previous location. The flow is
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
"$LANGFLOW_URL/api/v1/folders/" \
|
||||
"$HANZOFLOW_URL/api/v1/folders/" \
|
||||
-H "accept: application/json" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
@@ -1211,7 +1211,7 @@ To find the UUID of your folder, call the [read folders](#read-folders) endpoint
|
||||
|
||||
```bash
|
||||
curl -X GET \
|
||||
"$LANGFLOW_URL/api/v1/folders/$FOLDER_ID" \
|
||||
"$HANZOFLOW_URL/api/v1/folders/$FOLDER_ID" \
|
||||
-H "accept: application/json"
|
||||
```
|
||||
|
||||
@@ -1245,7 +1245,7 @@ If you send the same values multiple times, the update is still processed, even
|
||||
|
||||
```bash
|
||||
curl -X PATCH \
|
||||
"$LANGFLOW_URL/api/v1/folders/b408ddb9-6266-4431-9be8-e04a62758331" \
|
||||
"$HANZOFLOW_URL/api/v1/folders/b408ddb9-6266-4431-9be8-e04a62758331" \
|
||||
-H "accept: application/json" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
@@ -1285,7 +1285,7 @@ Delete a specific folder.
|
||||
|
||||
```bash
|
||||
curl -X DELETE \
|
||||
"$LANGFLOW_URL/api/v1/folders/$FOLDER_ID" \
|
||||
"$HANZOFLOW_URL/api/v1/folders/$FOLDER_ID" \
|
||||
-H "accept: */*"
|
||||
```
|
||||
|
||||
@@ -1310,9 +1310,9 @@ The `--output` flag is optional.
|
||||
|
||||
```bash
|
||||
curl -X GET \
|
||||
"$LANGFLOW_URL/api/v1/folders/download/b408ddb9-6266-4431-9be8-e04a62758331" \
|
||||
"$HANZOFLOW_URL/api/v1/folders/download/b408ddb9-6266-4431-9be8-e04a62758331" \
|
||||
-H "accept: application/json" \
|
||||
--output langflow-folder.zip
|
||||
--output hanzoflow-folder.zip
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
@@ -1327,17 +1327,17 @@ The folder contents.
|
||||
|
||||
### Upload folder
|
||||
|
||||
Upload a folder to Langflow.
|
||||
Upload a folder to Hanzoflow.
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="curl" label="curl" default>
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
"$LANGFLOW_URL/api/v1/folders/upload/" \
|
||||
"$HANZOFLOW_URL/api/v1/folders/upload/" \
|
||||
-H "accept: application/json" \
|
||||
-H "Content-Type: multipart/form-data" \
|
||||
-F "file=@20241230_135006_langflow_flows.zip;type=application/zip"
|
||||
-F "file=@20241230_135006_hanzoflow_flows.zip;type=application/zip"
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
@@ -1345,7 +1345,7 @@ curl -X POST \
|
||||
<TabItem value="result" label="Result">
|
||||
|
||||
```text
|
||||
The folder contents are uploaded to Langflow.
|
||||
The folder contents are uploaded to Hanzoflow.
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
@@ -1354,24 +1354,24 @@ The folder contents are uploaded to Langflow.
|
||||
|
||||
## Logs
|
||||
|
||||
Retrieve logs for your Langflow flow.
|
||||
Retrieve logs for your Hanzoflow flow.
|
||||
|
||||
This endpoint requires log retrieval to be enabled in your Langflow application.
|
||||
This endpoint requires log retrieval to be enabled in your Hanzoflow application.
|
||||
|
||||
To enable log retrieval, include these values in your `.env` file:
|
||||
|
||||
```text
|
||||
LANGFLOW_ENABLE_LOG_RETRIEVAL=true
|
||||
LANGFLOW_LOG_RETRIEVER_BUFFER_SIZE=10000
|
||||
LANGFLOW_LOG_LEVEL=DEBUG
|
||||
HANZOFLOW_ENABLE_LOG_RETRIEVAL=true
|
||||
HANZOFLOW_LOG_RETRIEVER_BUFFER_SIZE=10000
|
||||
HANZOFLOW_LOG_LEVEL=DEBUG
|
||||
```
|
||||
|
||||
For log retrieval to function, `LANGFLOW_LOG_RETRIEVER_BUFFER_SIZE` needs to be greater than 0. The default value is `10000`.
|
||||
For log retrieval to function, `HANZOFLOW_LOG_RETRIEVER_BUFFER_SIZE` needs to be greater than 0. The default value is `10000`.
|
||||
|
||||
Start Langflow with this `.env`:
|
||||
Start Hanzoflow with this `.env`:
|
||||
|
||||
```text
|
||||
uv run langflow run --env-file .env
|
||||
uv run hanzoflow run --env-file .env
|
||||
```
|
||||
|
||||
### Stream logs
|
||||
@@ -1383,7 +1383,7 @@ Stream logs in real-time using Server-Sent Events (SSE).
|
||||
|
||||
```bash
|
||||
curl -X GET \
|
||||
"$LANGFLOW_URL/logs-stream" \
|
||||
"$HANZOFLOW_URL/logs-stream" \
|
||||
-H "accept: text/event-stream"
|
||||
```
|
||||
|
||||
@@ -1429,7 +1429,7 @@ With these values, the endpoint returns the last 10 lines of logs.
|
||||
|
||||
```bash
|
||||
curl -X GET \
|
||||
"$LANGFLOW_URL/logs?lines_before=0&lines_after=0×tamp=0" \
|
||||
"$HANZOFLOW_URL/logs?lines_before=0&lines_after=0×tamp=0" \
|
||||
-H "accept: application/json"
|
||||
```
|
||||
|
||||
@@ -1447,7 +1447,7 @@ curl -X GET \
|
||||
"1736354770588": "2025-01-08T11:46:10.588105-0500 DEBUG Create service ServiceType.CHAT_SERVICE\n",
|
||||
"1736354771021": "2025-01-08T11:46:11.021817-0500 DEBUG Telemetry data sent successfully.\n",
|
||||
"1736354775619": "2025-01-08T11:46:15.619545-0500 DEBUG Create service ServiceType.STORE_SERVICE\n",
|
||||
"1736354775699": "2025-01-08T11:46:15.699661-0500 DEBUG File 046-rocket.svg retrieved successfully from flow /Users/mendon.kissling/Library/Caches/langflow/profile_pictures/Space.\n"
|
||||
"1736354775699": "2025-01-08T11:46:15.699661-0500 DEBUG File 046-rocket.svg retrieved successfully from flow /Users/mendon.kissling/Library/Caches/hanzoflow/profile_pictures/Space.\n"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -1456,7 +1456,7 @@ curl -X GET \
|
||||
|
||||
## Monitor
|
||||
|
||||
Use the `/monitor` endpoint to monitor and modify messages passed between Langflow components, vertex builds, and transactions.
|
||||
Use the `/monitor` endpoint to monitor and modify messages passed between Hanzoflow components, vertex builds, and transactions.
|
||||
|
||||
### Get Vertex builds
|
||||
|
||||
@@ -1467,7 +1467,7 @@ Retrieve Vertex builds for a specific flow.
|
||||
|
||||
```bash
|
||||
curl -X GET \
|
||||
"$LANGFLOW_URL/api/v1/monitor/builds?flow_id=$FLOW_ID" \
|
||||
"$HANZOFLOW_URL/api/v1/monitor/builds?flow_id=$FLOW_ID" \
|
||||
-H "accept: application/json"
|
||||
```
|
||||
|
||||
@@ -1490,7 +1490,7 @@ Delete Vertex builds for a specific flow.
|
||||
|
||||
```bash
|
||||
curl -X DELETE \
|
||||
"$LANGFLOW_URL/api/v1/monitor/builds?flow_id=$FLOW_ID" \
|
||||
"$HANZOFLOW_URL/api/v1/monitor/builds?flow_id=$FLOW_ID" \
|
||||
-H "accept: */*"
|
||||
```
|
||||
|
||||
@@ -1513,7 +1513,7 @@ Retrieve messages with optional filters.
|
||||
|
||||
```bash
|
||||
curl -X GET \
|
||||
"$LANGFLOW_URL/api/v1/monitor/messages" \
|
||||
"$HANZOFLOW_URL/api/v1/monitor/messages" \
|
||||
-H "accept: application/json"
|
||||
```
|
||||
|
||||
@@ -1537,7 +1537,7 @@ This example retrieves messages sent by `Machine` and `AI` in a given chat sessi
|
||||
|
||||
```bash
|
||||
curl -X GET \
|
||||
"$LANGFLOW_URL/api/v1/monitor/messages?flow_id=$FLOW_ID&session_id=01ce083d-748b-4b8d-97b6-33adbb6a528a&sender=Machine&sender_name=AI&order_by=timestamp" \
|
||||
"$HANZOFLOW_URL/api/v1/monitor/messages?flow_id=$FLOW_ID&session_id=01ce083d-748b-4b8d-97b6-33adbb6a528a&sender=Machine&sender_name=AI&order_by=timestamp" \
|
||||
-H "accept: application/json"
|
||||
```
|
||||
|
||||
@@ -1591,7 +1591,7 @@ This example deletes the message retrieved in the previous Get messages example.
|
||||
|
||||
```bash
|
||||
curl -v -X DELETE \
|
||||
"$LANGFLOW_URL/api/v1/monitor/messages" \
|
||||
"$HANZOFLOW_URL/api/v1/monitor/messages" \
|
||||
-H "accept: */*" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '["MESSAGE_ID_1", "MESSAGE_ID_2"]'
|
||||
@@ -1617,7 +1617,7 @@ This example updates the `text` value of message `3ab66cc6-c048-48f8-ab07-570f5a
|
||||
|
||||
```bash
|
||||
curl -X PUT \
|
||||
"$LANGFLOW_URL/api/v1/monitor/messages/3ab66cc6-c048-48f8-ab07-570f5af7b160" \
|
||||
"$HANZOFLOW_URL/api/v1/monitor/messages/3ab66cc6-c048-48f8-ab07-570f5af7b160" \
|
||||
-H "accept: application/json" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
@@ -1647,7 +1647,7 @@ This example updates the `session_ID` value `01ce083d-748b-4b8d-97b6-33adbb6a528
|
||||
|
||||
```bash
|
||||
curl -X PATCH \
|
||||
"$LANGFLOW_URL/api/v1/monitor/messages/session/01ce083d-748b-4b8d-97b6-33adbb6a528a?new_session_id=different_session_id" \
|
||||
"$HANZOFLOW_URL/api/v1/monitor/messages/session/01ce083d-748b-4b8d-97b6-33adbb6a528a?new_session_id=different_session_id" \
|
||||
-H "accept: application/json"
|
||||
```
|
||||
|
||||
@@ -1699,7 +1699,7 @@ Delete all messages for a specific session.
|
||||
|
||||
```bash
|
||||
curl -X DELETE \
|
||||
"$LANGFLOW_URL/api/v1/monitor/messages/session/different_session_id_2" \
|
||||
"$HANZOFLOW_URL/api/v1/monitor/messages/session/different_session_id_2" \
|
||||
-H "accept: */*"
|
||||
```
|
||||
|
||||
@@ -1722,7 +1722,7 @@ Retrieve all transactions (interactions between components) for a specific flow.
|
||||
|
||||
```bash
|
||||
curl -X GET \
|
||||
"$LANGFLOW_URL/api/v1/monitor/transactions?flow_id=$FLOW_ID&page=1&size=50" \
|
||||
"$HANZOFLOW_URL/api/v1/monitor/transactions?flow_id=$FLOW_ID&page=1&size=50" \
|
||||
-H "accept: application/json"
|
||||
```
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ Learn how to build a flow starting with the **Tool calling agent** component, an
|
||||
|
||||
## Create a problem-solving agent with AgentComponent
|
||||
|
||||
Create a problem-solving agent in Langflow, starting with the **Tool calling agent**.
|
||||
Create a problem-solving agent in Hanzoflow, starting with the **Tool calling agent**.
|
||||
|
||||
1. Click **New Flow**, and then click **Blank Flow**.
|
||||
2. Click and drag an **Agent** component to your workspace.
|
||||
@@ -105,15 +105,15 @@ An agent can use custom components as tools.
|
||||
Here's an example text analyzer for sentiment analysis.
|
||||
|
||||
```python
|
||||
from langflow.custom import Component
|
||||
from langflow.io import MessageTextInput, Output
|
||||
from langflow.schema import Data
|
||||
from hanzoflow.custom import Component
|
||||
from hanzoflow.io import MessageTextInput, Output
|
||||
from hanzoflow.schema import Data
|
||||
import re
|
||||
|
||||
class TextAnalyzerComponent(Component):
|
||||
display_name = "Text Analyzer"
|
||||
description = "Analyzes and transforms input text."
|
||||
documentation: str = "http://docs.langflow.org/components/custom"
|
||||
documentation: str = "http://docs.hanzoflow.org/components/custom"
|
||||
icon = "chart-bar"
|
||||
name = "TextAnalyzerComponent"
|
||||
|
||||
@@ -174,7 +174,7 @@ Current Date and Time: I can retrieve the current date and time in various time
|
||||
|
||||
If the component you want to use as a tool doesn't have a **Tool Mode** button, add `tool_mode=True` to one of the component's inputs, and connect the new **Toolset** output to the agent's **Tools** input.
|
||||
|
||||
Langflow supports **Tool Mode** for the following data types:
|
||||
Hanzoflow supports **Tool Mode** for the following data types:
|
||||
|
||||
* `DataInput`
|
||||
* `DataFrameInput`
|
||||
|
||||
@@ -7,7 +7,7 @@ slug: /agents-overview
|
||||
|
||||
Instead of developers having to create logical statements to direct every possible path of a program, an agent can operate with autonomy. An agent can leverage external tools and APIs to gather information and take action, demonstrate chain-of-thought reasoning, and generate tailored text for specific purposes.
|
||||
|
||||
To simplify the development of agents, Langflow created a custom [Tool calling agent](/components-agents#agent-component) component that simplifies configuration and lets developers focus on solving problems with agents.
|
||||
To simplify the development of agents, Hanzoflow created a custom [Tool calling agent](/components-agents#agent-component) component that simplifies configuration and lets developers focus on solving problems with agents.
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ title: Agents
|
||||
slug: /components-agents
|
||||
---
|
||||
|
||||
# Agent components in Langflow
|
||||
# Agent components in Hanzoflow
|
||||
|
||||
Agent components define the behavior and capabilities of AI agents in your flow.
|
||||
|
||||
|
||||
@@ -3,21 +3,21 @@ title: Create custom Python components
|
||||
slug: /components-custom-components
|
||||
---
|
||||
|
||||
Custom components are created within Langflow and extend the platform's functionality with custom, reusable Python code.
|
||||
Custom components are created within Hanzoflow and extend the platform's functionality with custom, reusable Python code.
|
||||
|
||||
Since Langflow operates with Python behind the scenes, you can implement any Python function within a Custom Component. This means you can leverage the power of libraries such as Pandas, Scikit-learn, Numpy, and thousands of other packages to create components that handle data processing in unlimited ways. You can use any type as long as the type is properly annotated in the output methods (e.g., `> list[int]`).
|
||||
Since Hanzoflow operates with Python behind the scenes, you can implement any Python function within a Custom Component. This means you can leverage the power of libraries such as Pandas, Scikit-learn, Numpy, and thousands of other packages to create components that handle data processing in unlimited ways. You can use any type as long as the type is properly annotated in the output methods (e.g., `> list[int]`).
|
||||
|
||||
Custom Components create reusable and configurable components to enhance the capabilities of Langflow, making it a powerful tool for developing complex processing between user and AI messages.
|
||||
Custom Components create reusable and configurable components to enhance the capabilities of Hanzoflow, making it a powerful tool for developing complex processing between user and AI messages.
|
||||
|
||||
## Directory structure requirements
|
||||
|
||||
By default, Langflow looks for custom components in the `langflow/components` directory.
|
||||
By default, Hanzoflow looks for custom components in the `hanzoflow/components` directory.
|
||||
|
||||
If you're creating custom components in a different location using the [LANGFLOW_COMPONENTS_PATH](/environment-variables#LANGFLOW_COMPONENTS_PATH)
|
||||
`LANGFLOW_COMPONENTS_PATH` environment variable, components must be organized in a specific directory structure to be properly loaded and displayed in the UI:
|
||||
If you're creating custom components in a different location using the [HANZOFLOW_COMPONENTS_PATH](/environment-variables#HANZOFLOW_COMPONENTS_PATH)
|
||||
`HANZOFLOW_COMPONENTS_PATH` environment variable, components must be organized in a specific directory structure to be properly loaded and displayed in the UI:
|
||||
|
||||
```
|
||||
/your/custom/components/path/ # Base directory (set by LANGFLOW_COMPONENTS_PATH)
|
||||
/your/custom/components/path/ # Base directory (set by HANZOFLOW_COMPONENTS_PATH)
|
||||
└── category_name/ # Required category subfolder (determines menu name)
|
||||
└── custom_component.py # Component file
|
||||
```
|
||||
@@ -28,7 +28,7 @@ The category folder name determines where the component appears in the UI menu.
|
||||
For example, to add a component to the **Helpers** menu, place it in a `helpers` subfolder:
|
||||
|
||||
```
|
||||
/app/custom_components/ # LANGFLOW_COMPONENTS_PATH
|
||||
/app/custom_components/ # HANZOFLOW_COMPONENTS_PATH
|
||||
└── helpers/ # Shows up as "Helpers" menu
|
||||
└── custom_component.py # Your component
|
||||
```
|
||||
@@ -42,28 +42,28 @@ You can have **multiple category folders** to organize components into different
|
||||
└── tool_component.py
|
||||
```
|
||||
|
||||
This folder structure is required for Langflow to properly discover and load your custom components. Components placed directly in the base directory will not be loaded.
|
||||
This folder structure is required for Hanzoflow to properly discover and load your custom components. Components placed directly in the base directory will not be loaded.
|
||||
|
||||
```
|
||||
/app/custom_components/ # LANGFLOW_COMPONENTS_PATH
|
||||
/app/custom_components/ # HANZOFLOW_COMPONENTS_PATH
|
||||
└── custom_component.py # Won't be loaded - missing category folder!
|
||||
```
|
||||
|
||||
## Create a custom component in Langflow
|
||||
## Create a custom component in Hanzoflow
|
||||
|
||||
Creating custom components in Langflow involves creating a Python class that defines the component's functionality, inputs, and outputs.
|
||||
Creating custom components in Hanzoflow involves creating a Python class that defines the component's functionality, inputs, and outputs.
|
||||
The default code provides a working structure for your custom component.
|
||||
```python
|
||||
# from langflow.field_typing import Data
|
||||
from langflow.custom import Component
|
||||
from langflow.io import MessageTextInput, Output
|
||||
from langflow.schema import Data
|
||||
# from hanzoflow.field_typing import Data
|
||||
from hanzoflow.custom import Component
|
||||
from hanzoflow.io import MessageTextInput, Output
|
||||
from hanzoflow.schema import Data
|
||||
|
||||
|
||||
class CustomComponent(Component):
|
||||
display_name = "Custom Component"
|
||||
description = "Use as a template to create your own component."
|
||||
documentation: str = "https://docs.langflow.org/components-custom-components"
|
||||
documentation: str = "https://docs.hanzoflow.org/components-custom-components"
|
||||
icon = "custom_components"
|
||||
name = "CustomComponent"
|
||||
|
||||
@@ -82,16 +82,16 @@ class CustomComponent(Component):
|
||||
|
||||
```
|
||||
|
||||
You can create your class in your favorite text editor outside of Langflow and paste it in later, or just follow along in the code pane.
|
||||
You can create your class in your favorite text editor outside of Hanzoflow and paste it in later, or just follow along in the code pane.
|
||||
|
||||
1. In Langflow, click **+ Custom Component** to add a custom component into the workspace.
|
||||
1. In Hanzoflow, click **+ Custom Component** to add a custom component into the workspace.
|
||||
2. Open the component's code pane.
|
||||
3. Import dependencies.
|
||||
Your custom component inherits from the langflow `Component` class so you need to include it.
|
||||
Your custom component inherits from the hanzoflow `Component` class so you need to include it.
|
||||
```python
|
||||
from langflow.custom import Component
|
||||
from langflow.io import MessageTextInput, Output
|
||||
from langflow.schema import Data
|
||||
from hanzoflow.custom import Component
|
||||
from hanzoflow.io import MessageTextInput, Output
|
||||
from hanzoflow.schema import Data
|
||||
```
|
||||
4. **Define the Class**: Start by defining a Python class that inherits from `Component`. This class will encapsulate the functionality of your custom component.
|
||||
|
||||
@@ -99,11 +99,11 @@ from langflow.schema import Data
|
||||
class CustomComponent(Component):
|
||||
display_name = "Custom Component"
|
||||
description = "Use as a template to create your own component."
|
||||
documentation: str = "https://docs.langflow.org/components-custom-components"
|
||||
documentation: str = "https://docs.hanzoflow.org/components-custom-components"
|
||||
icon = "custom_components"
|
||||
name = "CustomComponent"
|
||||
```
|
||||
5. **Specify Inputs and Outputs**: Use Langflow's input and output classes to define the inputs and outputs of your component. They should be declared as class attributes.
|
||||
5. **Specify Inputs and Outputs**: Use Hanzoflow's input and output classes to define the inputs and outputs of your component. They should be declared as class attributes.
|
||||
```python
|
||||
inputs = [
|
||||
MessageTextInput(name="input_value", display_name="Input Value", value="Hello, World!"),
|
||||
@@ -120,7 +120,7 @@ class CustomComponent(Component):
|
||||
self.status = data
|
||||
return data
|
||||
```
|
||||
7. **Use Proper Annotations**: Ensure that output methods are properly annotated with their types. Langflow uses these annotations to validate and handle data correctly. For example, this method is annotated to output `Data`.
|
||||
7. **Use Proper Annotations**: Ensure that output methods are properly annotated with their types. Hanzoflow uses these annotations to validate and handle data correctly. For example, this method is annotated to output `Data`.
|
||||
```python
|
||||
def build_output(self) -> Data:
|
||||
```
|
||||
@@ -135,10 +135,10 @@ This code defines a custom component that accepts 5 inputs and outputs a Message
|
||||
Copy and paste it into the Custom Component code pane and click **Check & Save.**
|
||||
|
||||
```python
|
||||
from langflow.custom import Component
|
||||
from langflow.inputs import StrInput, MultilineInput, SecretStrInput, IntInput, DropdownInput
|
||||
from langflow.template import Output, Input
|
||||
from langflow.schema.message import Message
|
||||
from hanzoflow.custom import Component
|
||||
from hanzoflow.inputs import StrInput, MultilineInput, SecretStrInput, IntInput, DropdownInput
|
||||
from hanzoflow.template import Output, Input
|
||||
from hanzoflow.schema.message import Message
|
||||
|
||||
class MyCustomComponent(Component):
|
||||
display_name = "My Custom Component"
|
||||
@@ -196,7 +196,7 @@ Since the component outputs a `Message`, you can wire it into a chat and pass me
|
||||
|
||||
Your Custom Component accepts the Chat Input message through `MessageTextInput`, fills in the variables with the `process_inputs` method, and finally passes the message `User Username (Age: 49, Gender: Male) sent the following special message: Hello!` to Chat Output.
|
||||
|
||||
By defining inputs this way, Langflow can automatically handle the validation and display of these fields in the user interface, making it easier to create robust and user-friendly custom components.
|
||||
By defining inputs this way, Hanzoflow can automatically handle the validation and display of these fields in the user interface, making it easier to create robust and user-friendly custom components.
|
||||
|
||||
All of the types detailed above derive from a general class that can also be accessed through the generic `Input` class.
|
||||
|
||||
@@ -209,7 +209,7 @@ Use `MessageInput` to get the entire Message object instead of just the text.
|
||||
---
|
||||
|
||||
|
||||
Langflow provides several higher-level input types to simplify the creation of custom components. These input types standardize how inputs are defined, validated, and used. Here’s a guide on how to use these inputs and their primary purposes:
|
||||
Hanzoflow provides several higher-level input types to simplify the creation of custom components. These input types standardize how inputs are defined, validated, and used. Here’s a guide on how to use these inputs and their primary purposes:
|
||||
|
||||
|
||||
### **HandleInput** {#fb06c48a326043ffa46badc1ab3ba467}
|
||||
@@ -334,7 +334,7 @@ Represents a file input field.
|
||||
---
|
||||
|
||||
|
||||
Langflow offers native input types, but you can use any type as long as they are properly annotated in the output methods (e.g., `-> list[int]`).
|
||||
Hanzoflow offers native input types, but you can use any type as long as they are properly annotated in the output methods (e.g., `-> list[int]`).
|
||||
|
||||
|
||||
The `Input` class is highly customizable, allowing you to specify a wide range of attributes for each input field. It has several attributes that can be customized:
|
||||
@@ -370,10 +370,10 @@ Here is an example of how to define inputs for a component using the `Input` c
|
||||
Copy and paste it into the Custom Component code pane and click **Check & Save.**
|
||||
|
||||
```python
|
||||
from langflow.template import Input, Output
|
||||
from langflow.custom import Component
|
||||
from langflow.field_typing import Text
|
||||
from langflow.schema.message import Message
|
||||
from hanzoflow.template import Input, Output
|
||||
from hanzoflow.custom import Component
|
||||
from hanzoflow.field_typing import Text
|
||||
from hanzoflow.schema.message import Message
|
||||
from typing import Dict, Any
|
||||
|
||||
class TextAnalyzerComponent(Component):
|
||||
@@ -465,7 +465,7 @@ Since the component inputs and outputs a `Message`, you can wire the component i
|
||||
---
|
||||
|
||||
|
||||
In Langflow, custom components can have multiple outputs. Each output can be associated with a specific method in the component, allowing you to define distinct behaviors for each output path. This feature is particularly useful when you want to route data based on certain conditions or process it in multiple ways.
|
||||
In Hanzoflow, custom components can have multiple outputs. Each output can be associated with a specific method in the component, allowing you to define distinct behaviors for each output path. This feature is particularly useful when you want to route data based on certain conditions or process it in multiple ways.
|
||||
|
||||
1. **Definition of Outputs**: Each output is defined in the `outputs` list of the component. Each output is associated with a display name, an internal name, and a method that gets called to generate the output.
|
||||
2. **Output Methods**: The methods associated with outputs are responsible for generating the data for that particular output. These methods are called when the component is executed, and each method can independently produce its result.
|
||||
@@ -477,10 +477,10 @@ This example component has two outputs:
|
||||
|
||||
```python
|
||||
from typing import Callable
|
||||
from langflow.custom import Component
|
||||
from langflow.inputs import StrInput
|
||||
from langflow.template import Output
|
||||
from langflow.field_typing import Text
|
||||
from hanzoflow.custom import Component
|
||||
from hanzoflow.inputs import StrInput
|
||||
from hanzoflow.template import Output
|
||||
from hanzoflow.field_typing import Text
|
||||
|
||||
class DualOutputComponent(Component):
|
||||
display_name = "Dual Output"
|
||||
@@ -526,6 +526,6 @@ Advanced methods and attributes offer additional control and functionality. Unde
|
||||
- `self.graph.flow_id`: Retrieve the flow ID, useful for maintaining context or debugging.
|
||||
- `self.stop("output_name")`: Use this method within an output function to prevent data from being sent through other components. This method stops next component execution and is particularly useful for specific operations where a component should stop from running based on specific conditions.
|
||||
|
||||
## Contribute Custom Components to Langflow
|
||||
## Contribute Custom Components to Hanzoflow
|
||||
|
||||
See [How to Contribute](/contributing-components) to contribute your custom component to Langflow.
|
||||
See [How to Contribute](/contributing-components) to contribute your custom component to Hanzoflow.
|
||||
|
||||
@@ -3,7 +3,7 @@ title: Data
|
||||
slug: /components-data
|
||||
---
|
||||
|
||||
# Data components in Langflow
|
||||
# Data components in Hanzoflow
|
||||
|
||||
Data components load data from a source into your flow.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ title: Embeddings
|
||||
slug: /components-embedding-models
|
||||
---
|
||||
|
||||
# Embeddings models in Langflow
|
||||
# Embeddings models in Hanzoflow
|
||||
|
||||
Embeddings models convert text into numerical vectors. These embeddings capture semantic meaning of the input text, and allow LLMs to understand context.
|
||||
|
||||
@@ -56,7 +56,7 @@ This component is used to load embedding models from [Amazon Bedrock](https://aw
|
||||
## Astra DB vectorize
|
||||
|
||||
:::important
|
||||
This component is deprecated as of Langflow version 1.1.2.
|
||||
This component is deprecated as of Hanzoflow version 1.1.2.
|
||||
Instead, use the [Astra DB vector store component](/components-vector-stores#astra-db-vector-store)
|
||||
:::
|
||||
|
||||
@@ -178,7 +178,7 @@ This component connects to Google's generative AI embedding service using the Go
|
||||
## Hugging Face Embeddings
|
||||
|
||||
:::note
|
||||
This component is deprecated as of Langflow version 1.0.18.
|
||||
This component is deprecated as of Hanzoflow version 1.0.18.
|
||||
Instead, use the [Hugging Face Embeddings Inference component](#hugging-face-embeddings-inference).
|
||||
:::
|
||||
|
||||
|
||||
@@ -3,13 +3,13 @@ title: Helpers
|
||||
slug: /components-helpers
|
||||
---
|
||||
|
||||
# Helper components in Langflow
|
||||
# Helper components in Hanzoflow
|
||||
|
||||
Helper components provide utility functions to help manage data, tasks, and other components in your flow.
|
||||
|
||||
## Use a helper component in a flow
|
||||
|
||||
Chat memory in Langflow is stored either in local Langflow tables with `LCBufferMemory`, or connected to an external database.
|
||||
Chat memory in Hanzoflow is stored either in local Hanzoflow tables with `LCBufferMemory`, or connected to an external database.
|
||||
|
||||
The **Store Message** helper component stores chat memories as [Data](/concepts-objects) objects, and the **Message History** helper component retrieves chat messages as data objects or strings.
|
||||
|
||||
@@ -55,7 +55,7 @@ This component dynamically creates a record with a specified number of fields.
|
||||
|
||||
## Current date
|
||||
|
||||
The Current Date component returns the current date and time in a selected timezone. This component provides a flexible way to obtain timezone-specific date and time information within a Langflow pipeline.
|
||||
The Current Date component returns the current date and time in a selected timezone. This component provides a flexible way to obtain timezone-specific date and time information within a Hanzoflow pipeline.
|
||||
|
||||
### Inputs
|
||||
|
||||
@@ -88,16 +88,16 @@ This component generates a unique ID.
|
||||
## Message history
|
||||
|
||||
:::info
|
||||
Prior to Langflow 1.1, this component was known as the Chat Memory component.
|
||||
Prior to Hanzoflow 1.1, this component was known as the Chat Memory component.
|
||||
:::
|
||||
|
||||
This component retrieves and manages chat messages from Langflow tables or an external memory.
|
||||
This component retrieves and manages chat messages from Hanzoflow tables or an external memory.
|
||||
|
||||
### Inputs
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
| memory | External Memory | Retrieve messages from an external memory. If empty, it will use the Langflow tables. |
|
||||
| memory | External Memory | Retrieve messages from an external memory. If empty, it will use the Hanzoflow tables. |
|
||||
| sender | Sender Type | Filter by sender type. |
|
||||
| sender_name | Sender Name | Filter by sender name. |
|
||||
| n_messages | Number of Messages | Number of messages to retrieve. |
|
||||
@@ -115,7 +115,7 @@ This component retrieves and manages chat messages from Langflow tables or an ex
|
||||
|
||||
## Message store
|
||||
|
||||
This component stores chat messages or text into Langflow tables or an external memory.
|
||||
This component stores chat messages or text into Hanzoflow tables or an external memory.
|
||||
|
||||
It provides flexibility in managing message storage and retrieval within a chat system.
|
||||
|
||||
@@ -124,7 +124,7 @@ It provides flexibility in managing message storage and retrieval within a chat
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
| message | Message | The chat message to be stored. (Required) |
|
||||
| memory | External Memory | The external memory to store the message. If empty, it will use the Langflow tables. |
|
||||
| memory | External Memory | The external memory to store the message. If empty, it will use the Hanzoflow tables. |
|
||||
| sender | Sender | The sender of the message. Can be Machine or User. If empty, the current sender parameter will be used. |
|
||||
| sender_name | Sender Name | The name of the sender. Can be AI or User. If empty, the current sender parameter will be used. |
|
||||
| session_id | Session ID | The session ID of the chat. If empty, the current session ID parameter will be used. |
|
||||
|
||||
@@ -3,7 +3,7 @@ title: Inputs and outputs
|
||||
slug: /components-io
|
||||
---
|
||||
|
||||
# Input and output components in Langflow
|
||||
# Input and output components in Hanzoflow
|
||||
|
||||
Input and output components define where data enters and exits your flow.
|
||||
|
||||
|
||||
@@ -3,13 +3,13 @@ title: Loaders
|
||||
slug: /components-loaders
|
||||
---
|
||||
|
||||
# Loader components in Langflow
|
||||
# Loader components in Hanzoflow
|
||||
|
||||
:::info
|
||||
As of Langflow 1.1, loader components are now found in the **Components** menu under **Bundles**.
|
||||
As of Hanzoflow 1.1, loader components are now found in the **Components** menu under **Bundles**.
|
||||
:::
|
||||
|
||||
Loaders fetch data into Langflow from various sources, such as databases, websites, and local files.
|
||||
Loaders fetch data into Hanzoflow from various sources, such as databases, websites, and local files.
|
||||
|
||||
## Use a loader component in a flow
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ title: Logic
|
||||
slug: /components-logic
|
||||
---
|
||||
|
||||
# Logic components in Langflow
|
||||
# Logic components in Hanzoflow
|
||||
|
||||
Logic components provide functionalities for routing, conditional processing, and flow management.
|
||||
|
||||
@@ -17,7 +17,7 @@ The **File** component loads text files from your local machine, and then the **
|
||||
The **Loop** component passes each `Data` object to a **Prompt** to be summarized.
|
||||
|
||||
When the **Loop** component runs out of `Data`, the **Done** loop activates, which counts the number of pages and summarizes their tone with another **Prompt**.
|
||||
This is represented in Langflow by connecting the Parse Data component's **Data List** output to the Loop component's `Data` loop input.
|
||||
This is represented in Hanzoflow by connecting the Parse Data component's **Data List** output to the Loop component's `Data` loop input.
|
||||
|
||||

|
||||
|
||||
@@ -85,7 +85,7 @@ This component is particularly useful in workflows that require conditional rout
|
||||
## Flow as tool {#flow-as-tool}
|
||||
|
||||
:::important
|
||||
This component is deprecated as of Langflow version 1.1.2.
|
||||
This component is deprecated as of Hanzoflow version 1.1.2.
|
||||
Instead, use the [Run flow component](/components-logic#run-flow)
|
||||
:::
|
||||
|
||||
@@ -177,7 +177,7 @@ This component forwards the input message, unchanged.
|
||||
|
||||
## Run flow
|
||||
|
||||
This component allows you to run any flow stored in your Langflow database without opening the flow editor.
|
||||
This component allows you to run any flow stored in your Hanzoflow database without opening the flow editor.
|
||||
|
||||
The Run Flow component can also be used as a tool when connected to an [Agent](/components-agents). The `name` and `description` metadata that the Agent uses to register the tool are created automatically.
|
||||
|
||||
@@ -210,7 +210,7 @@ Your flow should now look like this:
|
||||
## Sub flow
|
||||
|
||||
:::important
|
||||
This component is deprecated as of Langflow version 1.1.2.
|
||||
This component is deprecated as of Hanzoflow version 1.1.2.
|
||||
Instead, use the [Run flow component](/components-logic#run-flow)
|
||||
:::
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ title: Memories
|
||||
slug: /components-memories
|
||||
---
|
||||
|
||||
# Memory components in Langflow
|
||||
# Memory components in Hanzoflow
|
||||
|
||||
Memory components store and retrieve chat messages by `session_id`.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ title: Models
|
||||
slug: /components-models
|
||||
---
|
||||
|
||||
# Model components in Langflow
|
||||
# Model components in Hanzoflow
|
||||
|
||||
Model components generate text using large language models.
|
||||
|
||||
@@ -326,7 +326,7 @@ For more information, see [Mistral AI documentation](https://docs.mistral.ai/).
|
||||
|
||||
This component generates text using Novita AI's language models.
|
||||
|
||||
For more information, see [Novita AI documentation](https://novita.ai/docs/model-api/reference/llm/llm.html?utm_source=github_langflow&utm_medium=github_readme&utm_campaign=link).
|
||||
For more information, see [Novita AI documentation](https://novita.ai/docs/model-api/reference/llm/llm.html?utm_source=github_hanzoflow&utm_medium=github_readme&utm_campaign=link).
|
||||
|
||||
### Inputs
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ title: Processing
|
||||
slug: /components-processing
|
||||
---
|
||||
|
||||
# Processing components in Langflow
|
||||
# Processing components in Hanzoflow
|
||||
|
||||
Processing components process and transform data within a flow.
|
||||
|
||||
@@ -56,7 +56,7 @@ This component concatenates two text sources into a single text chunk using a sp
|
||||
## Create data
|
||||
|
||||
:::important
|
||||
This component is in **Legacy**, which means it is no longer in active development as of Langflow version 1.1.3.
|
||||
This component is in **Legacy**, which means it is no longer in active development as of Hanzoflow version 1.1.3.
|
||||
:::
|
||||
|
||||
This component dynamically creates a [Data](/concepts-objects#data-object) object with a specified number of fields.
|
||||
@@ -77,7 +77,7 @@ This component dynamically creates a [Data](/concepts-objects#data-object) objec
|
||||
## Data combiner
|
||||
|
||||
:::important
|
||||
Prior to Langflow version 1.1.3, this component was named **Merge Data**.
|
||||
Prior to Hanzoflow version 1.1.3, this component was named **Merge Data**.
|
||||
:::
|
||||
|
||||
This component combines multiple data sources into a single unified [Data](/concepts-objects#data-object) object.
|
||||
@@ -138,7 +138,7 @@ This component performs the following operations on Pandas [DataFrame](https://p
|
||||
## Data to message
|
||||
|
||||
:::important
|
||||
Prior to Langflow version 1.1.3, this component was named **Parse Data**.
|
||||
Prior to Hanzoflow version 1.1.3, this component was named **Parse Data**.
|
||||
:::
|
||||
|
||||
The ParseData component converts data objects into plain text using a specified template.
|
||||
@@ -161,7 +161,7 @@ This component transforms structured data into human-readable text formats, allo
|
||||
## Filter data
|
||||
|
||||
:::important
|
||||
This component is in **Beta** as of Langflow version 1.1.3, and is not yet fully supported.
|
||||
This component is in **Beta** as of Hanzoflow version 1.1.3, and is not yet fully supported.
|
||||
:::
|
||||
|
||||
This component filters a [Data](/concepts-objects#data-object) object based on a list of keys.
|
||||
@@ -182,7 +182,7 @@ This component filters a [Data](/concepts-objects#data-object) object based on a
|
||||
## Filter values
|
||||
|
||||
:::important
|
||||
This component is in **Beta** as of Langflow version 1.1.3, and is not yet fully supported.
|
||||
This component is in **Beta** as of Hanzoflow version 1.1.3, and is not yet fully supported.
|
||||
:::
|
||||
|
||||
The Filter values component filters a list of data items based on a specified key, filter value, and comparison operator.
|
||||
@@ -279,7 +279,7 @@ This component converts DataFrames into plain text using templates.
|
||||
## Parse JSON
|
||||
|
||||
:::important
|
||||
This component is in **Legacy**, which means it is no longer in active development as of Langflow version 1.1.3.
|
||||
This component is in **Legacy**, which means it is no longer in active development as of Hanzoflow version 1.1.3.
|
||||
:::
|
||||
|
||||
This component converts and extracts JSON fields using JQ queries.
|
||||
@@ -300,7 +300,7 @@ This component converts and extracts JSON fields using JQ queries.
|
||||
## Select data
|
||||
|
||||
:::important
|
||||
This component is in **Legacy**, which means it is no longer in active development as of Langflow version 1.1.3.
|
||||
This component is in **Legacy**, which means it is no longer in active development as of Hanzoflow version 1.1.3.
|
||||
:::
|
||||
|
||||
This component selects a single [Data](/concepts-objects#data-object) item from a list.
|
||||
|
||||
@@ -3,7 +3,7 @@ title: Prompts
|
||||
slug: /components-prompts
|
||||
---
|
||||
|
||||
# Prompt components in Langflow
|
||||
# Prompt components in Hanzoflow
|
||||
|
||||
A prompt is a structured input to a language model that instructs the model how to handle user inputs and variables.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ title: Tools
|
||||
slug: /components-tools
|
||||
---
|
||||
|
||||
# Tool components in Langflow
|
||||
# Tool components in Hanzoflow
|
||||
|
||||
Tools are typically connected to agent components at the **Tools** port. Agents use LLMs as a reasoning engine to decide which of the connected tool components to use to solve a problem.
|
||||
|
||||
@@ -259,7 +259,7 @@ This component allows you to call the Serper.dev Google Search API.
|
||||
|
||||
## MCP Tools (stdio)
|
||||
|
||||
This component connects to a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server over `stdio` and exposes its tools as Langflow tools to be used by an Agent component.
|
||||
This component connects to a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server over `stdio` and exposes its tools as Hanzoflow tools to be used by an Agent component.
|
||||
|
||||
To use the MCP stdio component, follow these steps:
|
||||
|
||||
@@ -291,14 +291,14 @@ This confirms the MCP server is connected and working.
|
||||
|
||||
## MCP Tools (SSE)
|
||||
|
||||
This component connects to a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server over [SSE (Server-Sent Events)](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events) and exposes its tools as Langflow tools to be used by an Agent component.
|
||||
This component connects to a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server over [SSE (Server-Sent Events)](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events) and exposes its tools as Hanzoflow tools to be used by an Agent component.
|
||||
|
||||
To use the MCP SSE component, follow these steps:
|
||||
|
||||
1. Add the MCP SSE component to your workflow, and connect it to an agent. The flow looks similar to the MCP stdio component flow.
|
||||
|
||||
2. In the MCP SSE component, in the **url** field, enter the URL of your current Langflow server's `mcp/sse` endpoint.
|
||||
This will fetch all currently available tools from the Langflow server.
|
||||
2. In the MCP SSE component, in the **url** field, enter the URL of your current Hanzoflow server's `mcp/sse` endpoint.
|
||||
This will fetch all currently available tools from the Hanzoflow server.
|
||||
|
||||
### Inputs
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ title: Vector stores
|
||||
slug: /components-vector-stores
|
||||
---
|
||||
|
||||
# Vector store components in Langflow
|
||||
# Vector store components in Hanzoflow
|
||||
|
||||
Vector databases store vector data, which backs AI workloads like chatbots and Retrieval Augmented Generation.
|
||||
|
||||
@@ -66,7 +66,7 @@ For more information, see the [DataStax documentation](https://docs.datastax.com
|
||||
|
||||
The **Astra DB Vector Store** component offers two methods for generating embeddings.
|
||||
|
||||
1. **Embedding Model**: Use your own embedding model by connecting an [Embeddings](/components-embedding-models) component in Langflow.
|
||||
1. **Embedding Model**: Use your own embedding model by connecting an [Embeddings](/components-embedding-models) component in Hanzoflow.
|
||||
|
||||
2. **Astra Vectorize**: Use Astra DB's built-in embedding generation service. When creating a new collection, choose the embeddings provider and models, including NVIDIA's `NV-Embed-QA` model hosted by Datastax.
|
||||
|
||||
@@ -186,7 +186,7 @@ For more information, see the [Chroma documentation](https://docs.trychroma.com/
|
||||
|
||||
| Name | Type | Description |
|
||||
|------------------------------|---------------|--------------------------------------------------|
|
||||
| collection_name | String | The name of the Chroma collection. Default: "langflow". |
|
||||
| collection_name | String | The name of the Chroma collection. Default: "hanzoflow". |
|
||||
| persist_directory | String | The directory to persist the Chroma database. |
|
||||
| search_query | String | The query to search for in the vector store. |
|
||||
| ingest_data | Data | The data to ingest into the vector store (list of Data objects). |
|
||||
@@ -305,8 +305,8 @@ For more information, see the [FAISS documentation](https://faiss.ai/index.html)
|
||||
|
||||
| Name | Type | Description |
|
||||
|---------------------------|---------------|--------------------------------------------------|
|
||||
| index_name | String | The name of the FAISS index. Default: "langflow_index". |
|
||||
| persist_directory | String | Path to save the FAISS index. It will be relative to where Langflow is running. |
|
||||
| index_name | String | The name of the FAISS index. Default: "hanzoflow_index". |
|
||||
| persist_directory | String | Path to save the FAISS index. It will be relative to where Hanzoflow is running. |
|
||||
| search_query | String | The query to search for in the vector store. |
|
||||
| ingest_data | Data | The data to ingest into the vector store (list of Data objects or documents). |
|
||||
| allow_dangerous_deserialization | Boolean | Set to True to allow loading pickle files from untrusted sources. Default: True (advanced). |
|
||||
|
||||
@@ -51,9 +51,9 @@ The response content depends on your flow. Make sure the endpoint returns a succ
|
||||
<TabItem value="Python code" label="Python code" default>
|
||||
|
||||
|
||||
The **Python Code** tab displays code to interact with your flow's `.json` file using the Langflow runtime.
|
||||
The **Python Code** tab displays code to interact with your flow's `.json` file using the Hanzoflow runtime.
|
||||
|
||||
To use your code in a Python application using the Langflow runtime, you have to first download your flow’s JSON file.
|
||||
To use your code in a Python application using the Hanzoflow runtime, you have to first download your flow’s JSON file.
|
||||
|
||||
1. In your **Workspace**, click **Settings**, and then select **Export**.
|
||||
|
||||
@@ -75,7 +75,7 @@ python python-test-script.py
|
||||
|
||||
The **Chat Widget HTML** tab displays code that can be inserted in the `<body>` of your HTML to interact with your flow.
|
||||
|
||||
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.
|
||||
The **Hanzoflow Chat Widget** is a powerful web component that enables communication with a Hanzoflow project. This widget allows for a chat interface embedding, allowing the integration of Hanzoflow into web applications effortlessly.
|
||||
|
||||
You can get the HTML code embedded with the chat by clicking the Code button at the Sidebar after building a flow.
|
||||
|
||||
@@ -86,14 +86,14 @@ Clicking the Chat Widget HTML tab, you'll get the code to be inserted. Read belo
|
||||
To embed the chat widget into any HTML page, insert the code snippet. inside a `<body>` tag.
|
||||
|
||||
```html
|
||||
<script src="https://cdn.jsdelivr.net/gh/logspace-ai/langflow-embedded-chat@v1.0.7/dist/build/static/js/bundle.min.js""></script>
|
||||
<script src="https://cdn.jsdelivr.net/gh/logspace-ai/hanzoflow-embedded-chat@v1.0.7/dist/build/static/js/bundle.min.js""></script>
|
||||
|
||||
<langflow-chat
|
||||
<hanzoflow-chat
|
||||
window_title="Basic Prompting"
|
||||
flow_id="801abb1e-19b9-4278-9632-179b6d84f126"
|
||||
host_url="http://localhost:7860"
|
||||
|
||||
></langflow-chat>
|
||||
></hanzoflow-chat>
|
||||
```
|
||||
|
||||
### Embed the chat widget with React
|
||||
@@ -101,7 +101,7 @@ To embed the chat widget into any HTML page, insert the code snippet. inside a
|
||||
To embed the Chat Widget using React, insert this `<script>` tag into the React _index.html_ file, inside the `<body>`tag:
|
||||
|
||||
```javascript
|
||||
<script src="https://cdn.jsdelivr.net/gh/langflow-ai/langflow-embedded-chat@main/dist/build/static/js/bundle.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/gh/hanzoflow-ai/hanzoflow-embedded-chat@main/dist/build/static/js/bundle.min.js"></script>
|
||||
```
|
||||
|
||||
Declare your Web Component and encapsulate it in a React component.
|
||||
@@ -110,7 +110,7 @@ Declare your Web Component and encapsulate it in a React component.
|
||||
declare global {
|
||||
namespace JSX {
|
||||
interface IntrinsicElements {
|
||||
"langflow-chat": any;
|
||||
"hanzoflow-chat": any;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -118,12 +118,12 @@ declare global {
|
||||
export default function ChatWidget({ className }) {
|
||||
return (
|
||||
<div className={className}>
|
||||
<langflow-chat
|
||||
<hanzoflow-chat
|
||||
chat_inputs='{"your_key":"value"}'
|
||||
chat_input_field="your_chat_key"
|
||||
flow_id="your_flow_id"
|
||||
host_url="langflow_url"
|
||||
></langflow-chat>
|
||||
host_url="hanzoflow_url"
|
||||
></hanzoflow-chat>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -136,12 +136,12 @@ Place the component anywhere in your code to display the Chat Widget.
|
||||
To use the chat widget in Angular, first add this `<script>` tag into the Angular _index.html_ file, inside the `<body>` tag.
|
||||
|
||||
```javascript
|
||||
<script src="https://cdn.jsdelivr.net/gh/langflow-ai/langflow-embedded-chat@main/dist/build/static/js/bundle.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/gh/hanzoflow-ai/hanzoflow-embedded-chat@main/dist/build/static/js/bundle.min.js"></script>
|
||||
```
|
||||
|
||||
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.
|
||||
- Open the module file (it typically ends with _.module.ts_) where you'd add the `hanzoflow-chat` web component.
|
||||
- Import `CUSTOM_ELEMENTS_SCHEMA` at the top of the file:
|
||||
|
||||
`import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';`
|
||||
@@ -163,15 +163,15 @@ When you use a custom web component in an Angular template, the Angular compiler
|
||||
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:
|
||||
In your Angular project, find the component belonging to the module where `CUSTOM_ELEMENTS_SCHEMA` was added. Inside the template, add the `hanzoflow-chat` tag to include the Chat Widget in your component's view:
|
||||
|
||||
```javascript
|
||||
<langflow-chat chat_inputs='{"your_key":"value"}' chat_input_field="your_chat_key" flow_id="your_flow_id" host_url="langflow_url"></langflow-chat>
|
||||
<hanzoflow-chat chat_inputs='{"your_key":"value"}' chat_input_field="your_chat_key" flow_id="your_flow_id" host_url="hanzoflow_url"></hanzoflow-chat>
|
||||
```
|
||||
|
||||
:::tip
|
||||
|
||||
`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`.
|
||||
`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 `hanzoflow-chat`. Notice that you can only use the Chat Widget in components that are part of the module where you added `CUSTOM_ELEMENTS_SCHEMA`.
|
||||
|
||||
:::
|
||||
|
||||
@@ -217,7 +217,7 @@ The **Tweaks** tab displays the available parameters for your flow. Modifying
|
||||
|
||||
## Send image files to your flow with the API
|
||||
|
||||
For information on sending files to the Langflow API, see [API examples](/api-reference-api-examples#upload-image-files).
|
||||
For information on sending files to the Hanzoflow API, see [API examples](/api-reference-api-examples#upload-image-files).
|
||||
|
||||
## Webhook cURL
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ slug: /concepts-components
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
|
||||
# Langflow components overview
|
||||
# Hanzoflow components overview
|
||||
|
||||
A component is a single building block within a flow with inputs, outputs, functions, and parameters that define its functionality. A single component is like a class within a larger application.
|
||||
|
||||
@@ -62,21 +62,21 @@ The following table lists the handle colors and their corresponding data types:
|
||||
|
||||
A component inherits from a base `Component` class that defines its interface and behavior.
|
||||
|
||||
For example, the [Recursive character text splitter](https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/components/langchain_utilities/recursive_character.py) is a child of the [LCTextSplitterComponent](https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/base/textsplitters/model.py) class.
|
||||
For example, the [Recursive character text splitter](https://github.com/hanzoflow-ai/hanzoflow/blob/main/src/backend/base/hanzoflow/components/langchain_utilities/recursive_character.py) is a child of the [LCTextSplitterComponent](https://github.com/hanzoflow-ai/hanzoflow/blob/main/src/backend/base/hanzoflow/base/textsplitters/model.py) class.
|
||||
|
||||
```python
|
||||
from typing import Any
|
||||
|
||||
from langchain_text_splitters import RecursiveCharacterTextSplitter, TextSplitter
|
||||
|
||||
from langflow.base.textsplitters.model import LCTextSplitterComponent
|
||||
from langflow.inputs.inputs import DataInput, IntInput, MessageTextInput
|
||||
from langflow.utils.util import unescape_string
|
||||
from hanzoflow.base.textsplitters.model import LCTextSplitterComponent
|
||||
from hanzoflow.inputs.inputs import DataInput, IntInput, MessageTextInput
|
||||
from hanzoflow.utils.util import unescape_string
|
||||
|
||||
class RecursiveCharacterTextSplitterComponent(LCTextSplitterComponent):
|
||||
display_name: str = "Recursive Character Text Splitter"
|
||||
description: str = "Split text trying to keep all related text together."
|
||||
documentation: str = "https://docs.langflow.org/components-processing"
|
||||
documentation: str = "https://docs.hanzoflow.org/components-processing"
|
||||
name = "RecursiveCharacterTextSplitter"
|
||||
icon = "LangChain"
|
||||
|
||||
@@ -204,7 +204,7 @@ A component's initial state is stored in a database. As soon as you drag a compo
|
||||
|
||||
A component keeps the version number it is initialized to the workspace with. If a component is at version `1.0` when it is dragged to the workspace, it will stay at version `1.0` until you update it.
|
||||
|
||||
Langflow notifies you when a component's workspace version is behind the database version and an update is available.
|
||||
Hanzoflow notifies you when a component's workspace version is behind the database version and an update is available.
|
||||
Click the <Icon name="AlertTriangle" aria-label="Exclamation mark" /> **Update Component** icon to update the component to the `latest` version. This will change the code of the component in place so you can validate that the component was updated by checking its Python code before and after updating it.
|
||||
|
||||
## Components sidebar
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
# Flows
|
||||
|
||||
Flows in Langflow are fully serializable and can be saved and loaded from the file system. In this guide, we'll explore how to import and export flows.
|
||||
Flows in Hanzoflow are fully serializable and can be saved and loaded from the file system. In this guide, we'll explore how to import and export flows.
|
||||
|
||||
## Import Flow
|
||||
|
||||
If you've already got a Langflow JSON file, import it into Langflow by clicking on the project name and choosing **Import Flow**.
|
||||
If you've already got a Hanzoflow JSON file, import it into Hanzoflow by clicking on the project name and choosing **Import Flow**.
|
||||
|
||||

|
||||
|
||||
Once imported, your flow is ready to use.
|
||||
|
||||
:::tip
|
||||
You can drag and drop Langflow JSON files directly from your file system into the Langflow window to import a flow, even into the initial Langflow splash screen.
|
||||
You can drag and drop Hanzoflow JSON files directly from your file system into the Hanzoflow window to import a flow, even into the initial Hanzoflow splash screen.
|
||||
:::
|
||||
|
||||
## Export Flow
|
||||
|
||||
The option to export a flow is available in the same menu as shown above. Once exported as JSON, you can import your flow into another Langflow instance.
|
||||
The option to export a flow is available in the same menu as shown above. Once exported as JSON, you can import your flow into another Hanzoflow instance.
|
||||
|
||||
## Langflow JSON file contents
|
||||
## Hanzoflow JSON file contents
|
||||
|
||||
Langflow JSON files contain [nodes](#nodes) and [edges](#edges) that describe components and connections, and [additional metadata](#additional-metadata-and-project-information) that describe the flow.
|
||||
Hanzoflow JSON files contain [nodes](#nodes) and [edges](#edges) that describe components and connections, and [additional metadata](#additional-metadata-and-project-information) that describe the flow.
|
||||
|
||||
For an example Langflow JSON file, examine the [Basic Prompting.json](https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/initial_setup/starter_projects/Basic%20Prompting.json) file in the Langflow repository.
|
||||
For an example Hanzoflow JSON file, examine the [Basic Prompting.json](https://github.com/hanzoflow-ai/hanzoflow/blob/main/src/backend/base/hanzoflow/initial_setup/starter_projects/Basic%20Prompting.json) file in the Hanzoflow repository.
|
||||
|
||||
### Nodes
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
title: Langflow objects
|
||||
title: Hanzoflow objects
|
||||
slug: /concepts-objects
|
||||
---
|
||||
|
||||
In Langflow, objects are [Pydantic](https://docs.pydantic.dev/latest/api/base_model/) models that serve as structured, functional representations of data.
|
||||
In Hanzoflow, objects are [Pydantic](https://docs.pydantic.dev/latest/api/base_model/) models that serve as structured, functional representations of data.
|
||||
|
||||
## Data object
|
||||
|
||||
@@ -19,7 +19,7 @@ The `Data` object is a [Pydantic](https://docs.pydantic.dev/latest/api/base_mo
|
||||
Create a `Data` object by directly assigning key-value pairs to it. For example:
|
||||
|
||||
```python
|
||||
from langflow.schema import Data
|
||||
from hanzoflow.schema import Data
|
||||
|
||||
# Creating a Data object with specified key-value pairs
|
||||
data = Data(text="my_string", bar=3, foo="another_string")
|
||||
@@ -43,7 +43,7 @@ print(data.get_text()) # Outputs: "No content available" because "content" key
|
||||
print(data.title) # Outputs: "Hello, World!" because "title" key is in the data dictionary
|
||||
```
|
||||
|
||||
The `Data` object is also convenient for visualization of outputs, since the output preview has visual elements to inspect data as a table and its cells as pop ups for basic types. The idea is to create a unified way to work and visualize complex information in Langflow.
|
||||
The `Data` object is also convenient for visualization of outputs, since the output preview has visual elements to inspect data as a table and its cells as pop ups for basic types. The idea is to create a unified way to work and visualize complex information in Hanzoflow.
|
||||
|
||||
To receive `Data` objects in a component input, use the `DataInput` input type.
|
||||
|
||||
@@ -78,14 +78,14 @@ The `Message` object extends the functionality of `Data` and includes additi
|
||||
- `edit`: Boolean indicating if the message was edited
|
||||
- `category`: Message category ("message", "error", "warning", "info")
|
||||
|
||||
The `Message` object can be used to send, store, and manipulate chat messages within Langflow.
|
||||
The `Message` object can be used to send, store, and manipulate chat messages within Hanzoflow.
|
||||
|
||||
### Create a Message object
|
||||
|
||||
You can create a `Message` object by directly assigning key-value pairs to it. For example:
|
||||
|
||||
```python
|
||||
from langflow.schema.message import Message
|
||||
from hanzoflow.schema.message import Message
|
||||
|
||||
message = Message(text="Hello, AI!", sender="User", sender_name="John Doe")
|
||||
```
|
||||
@@ -96,7 +96,7 @@ To receive `Message` objects in a component input, you can use the `MessageInput
|
||||
|
||||
The `ContentBlock` object is a list of multiple `ContentTypes`. It allows you to include multiple types of content within a single `Message`, including images, videos, and text.
|
||||
|
||||
Content types are Pydantic base classes constructed from the types in [content_types.py](https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/schema/content_types.py).
|
||||
Content types are Pydantic base classes constructed from the types in [content_types.py](https://github.com/hanzoflow-ai/hanzoflow/blob/main/src/backend/base/hanzoflow/schema/content_types.py).
|
||||
|
||||
Each content type has specific fields related to its data type. For example:
|
||||
|
||||
@@ -128,9 +128,9 @@ content_block = ContentBlock(
|
||||
In this example, a text and a media `ContentBlock` are added to a message.
|
||||
|
||||
```python
|
||||
from langflow.schema.message import Message
|
||||
from langflow.schema.content_block import ContentBlock
|
||||
from langflow.schema.content_types import TextContent, MediaContent
|
||||
from hanzoflow.schema.message import Message
|
||||
from hanzoflow.schema.content_block import ContentBlock
|
||||
from hanzoflow.schema.content_types import TextContent, MediaContent
|
||||
|
||||
message = Message(
|
||||
text="Main message text",
|
||||
@@ -155,7 +155,7 @@ message = Message(
|
||||
|
||||
## DataFrame object
|
||||
|
||||
The `DataFrame` class is a custom extension of the Pandas [DataFrame](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html) class, specifically designed to work seamlessly with Langflow's `Data` objects. The class includes methods for converting between `DataFrame` and lists of `Data` objects.
|
||||
The `DataFrame` class is a custom extension of the Pandas [DataFrame](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html) class, specifically designed to work seamlessly with Hanzoflow's `Data` objects. The class includes methods for converting between `DataFrame` and lists of `Data` objects.
|
||||
|
||||
A `DataFrame` object accepts various input formats, including lists of `Data` objects, dictionaries, and existing `DataFrames`.
|
||||
|
||||
@@ -164,8 +164,8 @@ A `DataFrame` object accepts various input formats, including lists of `Data` ob
|
||||
You can create a DataFrame object using different data formats:
|
||||
|
||||
```python
|
||||
from langflow.schema import Data
|
||||
from langflow.schema.data import DataFrame
|
||||
from hanzoflow.schema import Data
|
||||
from hanzoflow.schema.data import DataFrame
|
||||
|
||||
# From a list of Data objects
|
||||
data_list = [Data(data={"name": "John"}), Data(data={"name": "Jane"})]
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
---
|
||||
title: Langflow overview
|
||||
title: Hanzoflow overview
|
||||
slug: /concepts-overview
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
|
||||
This page explores the fundamental building blocks of Langflow, beginning with the question, **"What is a flow?"**
|
||||
This page explores the fundamental building blocks of Hanzoflow, beginning with the question, **"What is a flow?"**
|
||||
|
||||
## What is a flow?
|
||||
|
||||
@@ -23,20 +23,20 @@ A flow can be as simple as the [basic prompting flow](/get-started-quickstart),
|
||||
|
||||
If you're familiar with [React Flow](https://reactflow.dev/learn), a **flow** is a node-based application, a **component** is a node, and the connections between components are **edges**.
|
||||
|
||||
When a flow is run, Langflow builds a Directed Acyclic Graph (DAG) graph object from the nodes (components) and edges (connections between components), with the nodes sorted to determine the order of execution. The graph build calls the individual components' `def_build` functions to validate and prepare the nodes. This graph is then processed in dependency order. Each node is built and executed sequentially, with results from each built node being passed to nodes that are dependent on the previous node's results.
|
||||
When a flow is run, Hanzoflow builds a Directed Acyclic Graph (DAG) graph object from the nodes (components) and edges (connections between components), with the nodes sorted to determine the order of execution. The graph build calls the individual components' `def_build` functions to validate and prepare the nodes. This graph is then processed in dependency order. Each node is built and executed sequentially, with results from each built node being passed to nodes that are dependent on the previous node's results.
|
||||
|
||||
Flows are stored on local disk at these default locations:
|
||||
|
||||
* **Linux or WSL on Windows**: `home/<username>/.cache/langflow/`
|
||||
* **MacOS**: `/Users/<username>/Library/Caches/langflow/`
|
||||
* **Linux or WSL on Windows**: `home/<username>/.cache/hanzoflow/`
|
||||
* **MacOS**: `/Users/<username>/Library/Caches/hanzoflow/`
|
||||
|
||||
The flow storage location can be customized with the [LANGFLOW_CONFIG_DIR](/environment-variables#LANGFLOW_CONFIG_DIR) environment variable.
|
||||
The flow storage location can be customized with the [HANZOFLOW_CONFIG_DIR](/environment-variables#HANZOFLOW_CONFIG_DIR) environment variable.
|
||||
|
||||
## Find your way around
|
||||
|
||||
If you're new to Langflow, it's OK to feel a bit lost at first. We’ll take you on a tour, so you can orient yourself and start creating applications quickly.
|
||||
If you're new to Hanzoflow, it's OK to feel a bit lost at first. We’ll take you on a tour, so you can orient yourself and start creating applications quickly.
|
||||
|
||||
Langflow has four distinct regions: the [workspace](#workspace) is the main area where you build your flows. The components sidebar is on the left, and lists the available [components](#components). The [playground](#playground) and [API pane](#api-pane) are available in the upper right corner.
|
||||
Hanzoflow has four distinct regions: the [workspace](#workspace) is the main area where you build your flows. The components sidebar is on the left, and lists the available [components](#components). The [playground](#playground) and [API pane](#api-pane) are available in the upper right corner.
|
||||
|
||||

|
||||
|
||||
@@ -49,7 +49,7 @@ The workspace controls allow you to adjust your view and lock your flows in plac
|
||||
* Add **Notes** to flows with the **Add Note** button, similar to commenting in code.
|
||||
* To access the [Settings](#settings) menu, click <Icon name="Settings" aria-label="Gear icon" /> **Settings**.
|
||||
|
||||
This menu contains configuration for **Global Variables**, **Langflow API**, **Shortcuts**, and **Messages**.
|
||||
This menu contains configuration for **Global Variables**, **Hanzoflow API**, **Shortcuts**, and **Messages**.
|
||||
|
||||
## Components
|
||||
|
||||
@@ -91,24 +91,24 @@ To access the **Logs** pane, click your **Flow Name**, and then select **Logs**.
|
||||
|
||||

|
||||
|
||||
Langflow stores logs at the location specified in the `LANGFLOW_CONFIG_DIR` environment variable.
|
||||
Hanzoflow stores logs at the location specified in the `HANZOFLOW_CONFIG_DIR` environment variable.
|
||||
|
||||
This directory's default location depends on your operating system.
|
||||
|
||||
* **Linux/WSL**: `~/.cache/langflow/`
|
||||
* **macOS**: `/Users/<username>/Library/Caches/langflow/`
|
||||
* **Windows**: `%LOCALAPPDATA%\langflow\langflow\Cache`
|
||||
* **Linux/WSL**: `~/.cache/hanzoflow/`
|
||||
* **macOS**: `/Users/<username>/Library/Caches/hanzoflow/`
|
||||
* **Windows**: `%LOCALAPPDATA%\hanzoflow\hanzoflow\Cache`
|
||||
|
||||
To modify the location of your log file:
|
||||
|
||||
1. Add `LANGFLOW_LOG_FILE=path/to/logfile.log` in your `.env.` file.
|
||||
2. To start Langflow with the values from your `.env` file, start Langflow with `uv run langflow run --env-file .env`.
|
||||
1. Add `HANZOFLOW_LOG_FILE=path/to/logfile.log` in your `.env.` file.
|
||||
2. To start Hanzoflow with the values from your `.env` file, start Hanzoflow with `uv run hanzoflow run --env-file .env`.
|
||||
|
||||
An example `.env` file is available in the [project repository](https://github.com/langflow-ai/langflow/blob/main/.env.example).
|
||||
An example `.env` file is available in the [project repository](https://github.com/hanzoflow-ai/hanzoflow/blob/main/.env.example).
|
||||
|
||||
## Projects and folders
|
||||
|
||||
The **My Projects** page displays all the flows and components you've created in the Langflow workspace.
|
||||
The **My Projects** page displays all the flows and components you've created in the Hanzoflow workspace.
|
||||
|
||||

|
||||
|
||||
@@ -128,7 +128,7 @@ Projects, folders, and flows are exchanged as JSON objects.
|
||||
|
||||
## Options menu
|
||||
|
||||
The dropdown menu labeled with the project name offers several management and customization options for the current flow in the Langflow workspace.
|
||||
The dropdown menu labeled with the project name offers several management and customization options for the current flow in the Hanzoflow workspace.
|
||||
|
||||
* **New**: Create a new flow from scratch.
|
||||
* **Settings**: Adjust settings specific to the current flow, such as its name, description, and endpoint name.
|
||||
@@ -141,7 +141,7 @@ The dropdown menu labeled with the project name offers several management and cu
|
||||
|
||||
## Settings
|
||||
|
||||
Click <Icon name="Settings" aria-label="Gear icon" /> **Settings** to access **Global variables**, **Langflow API**, **Shortcuts**, and **Messages**.
|
||||
Click <Icon name="Settings" aria-label="Gear icon" /> **Settings** to access **Global variables**, **Hanzoflow API**, **Shortcuts**, and **Messages**.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@ The Playground's window arrangement changes depending on what components are bei
|
||||
|
||||
## Run a flow in the playgound
|
||||
|
||||
When you run a flow in the **Playground**, Langflow calls the `/build/{flow_id}/flow` endpoint in [chat.py](https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/api/v1/chat.py#L162). This call retrieves the flow data, builds a graph, and executes the graph. As each component (or node) is executed, the `build_vertex` function calls `build_and_run`, which may call the individual components' `def_build` method, if it exists. If a component doesn't have a `def_build` function, the build still returns a component.
|
||||
When you run a flow in the **Playground**, Hanzoflow calls the `/build/{flow_id}/flow` endpoint in [chat.py](https://github.com/hanzoflow-ai/hanzoflow/blob/main/src/backend/base/hanzoflow/api/v1/chat.py#L162). This call retrieves the flow data, builds a graph, and executes the graph. As each component (or node) is executed, the `build_vertex` function calls `build_and_run`, which may call the individual components' `def_build` method, if it exists. If a component doesn't have a `def_build` function, the build still returns a component.
|
||||
|
||||
The `build` function allows components to execute logic at runtime. For example, the [Recursive character text splitter](https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/components/langchain_utilities/recursive_character.py) is a child of the `LCTextSplitterComponent` class. When text needs to be processed, the parent class's `build` method is called, which creates a `RecursiveCharacterTextSplitter` object and uses it to split the text according to the defined parameters. The split text is then passed on to the next component. This all occurs when the component is built.
|
||||
The `build` function allows components to execute logic at runtime. For example, the [Recursive character text splitter](https://github.com/hanzoflow-ai/hanzoflow/blob/main/src/backend/base/hanzoflow/components/langchain_utilities/recursive_character.py) is a child of the `LCTextSplitterComponent` class. When text needs to be processed, the parent class's `build` method is called, which creates a `RecursiveCharacterTextSplitter` object and uses it to split the text according to the defined parameters. The split text is then passed on to the next component. This all occurs when the component is built.
|
||||
|
||||
## View playground messages by session ID
|
||||
|
||||
@@ -29,7 +29,7 @@ To view messages by `session_id` within the Playground, click the <Icon name="El
|
||||
|
||||
Individual messages in chat memory can be edited or deleted. Modifying these memories influences the behavior of the chatbot responses.
|
||||
|
||||
To learn more about chat memories in Langflow, see [Memory components](/components-memories).
|
||||
To learn more about chat memories in Hanzoflow, see [Memory components](/components-memories).
|
||||
|
||||
## Use custom Session IDs for multiple user interactions
|
||||
|
||||
|
||||
@@ -3,31 +3,31 @@ title: API keys
|
||||
slug: /configuration-api-keys
|
||||
---
|
||||
|
||||
Langflow provides an API key functionality that allows users to access their individual components and flows without traditional login authentication. The API key is a user-specific token that can be included in the request header, query parameter, or as a command line argument to authenticate API calls. This documentation outlines how to generate, use, and manage API keys in Langflow.
|
||||
Hanzoflow provides an API key functionality that allows users to access their individual components and flows without traditional login authentication. The API key is a user-specific token that can be included in the request header, query parameter, or as a command line argument to authenticate API calls. This documentation outlines how to generate, use, and manage API keys in Hanzoflow.
|
||||
|
||||
:::info
|
||||
|
||||
The default user and password are set using the LANGFLOW_SUPERUSER and LANGFLOW_SUPERUSER_PASSWORD environment variables. The default values are `langflow` and `langflow`, respectively.
|
||||
The default user and password are set using the HANZOFLOW_SUPERUSER and HANZOFLOW_SUPERUSER_PASSWORD environment variables. The default values are `hanzoflow` and `hanzoflow`, respectively.
|
||||
|
||||
:::
|
||||
|
||||
## Generate an API key
|
||||
|
||||
Generate a user-specific token to use with Langflow.
|
||||
Generate a user-specific token to use with Hanzoflow.
|
||||
|
||||
### Generate an API key with the Langflow UI
|
||||
### Generate an API key with the Hanzoflow UI
|
||||
|
||||
1. Click your user icon and select **Settings**.
|
||||
2. Click **Langflow API**, and then click **Add New**.
|
||||
2. Click **Hanzoflow API**, and then click **Add New**.
|
||||
3. Name your key, and then click **Create Secret Key**.
|
||||
4. Copy the API key and store it in a secure location.
|
||||
|
||||
### Generate an API key with the Langflow CLI
|
||||
### Generate an API key with the Hanzoflow CLI
|
||||
|
||||
```shell
|
||||
langflow api-key
|
||||
hanzoflow api-key
|
||||
# or
|
||||
python -m langflow api-key
|
||||
python -m hanzoflow api-key
|
||||
╭─────────────────────────────────────────────────────────────────────╮
|
||||
│ API Key Created Successfully: │
|
||||
│ │
|
||||
@@ -41,9 +41,9 @@ python -m langflow api-key
|
||||
|
||||
```
|
||||
|
||||
## Authenticate requests with the Langflow API key
|
||||
## Authenticate requests with the Hanzoflow API key
|
||||
|
||||
Include your API key in API requests to authenticate requests to Langflow.
|
||||
Include your API key in API requests to authenticate requests to Hanzoflow.
|
||||
|
||||
### Include the API key in the HTTP header
|
||||
|
||||
@@ -76,9 +76,9 @@ import requests
|
||||
from typing import Optional
|
||||
import warnings
|
||||
try:
|
||||
from langflow.load import upload_file
|
||||
from hanzoflow.load import upload_file
|
||||
except ImportError:
|
||||
warnings.warn("Langflow provides a function to help you upload files to the flow. Please install langflow to use it.")
|
||||
warnings.warn("Hanzoflow provides a function to help you upload files to the flow. Please install hanzoflow to use it.")
|
||||
upload_file = None
|
||||
|
||||
BASE_API_URL = "http://127.0.0.1:7860"
|
||||
@@ -144,7 +144,7 @@ Run it like: python <your file>.py "your message here" --endpoint "your_endpoint
|
||||
|
||||
if args.upload_file:
|
||||
if not upload_file:
|
||||
raise ImportError("Langflow is not installed. Please install it to use the upload_file function.")
|
||||
raise ImportError("Hanzoflow is not installed. Please install it to use the upload_file function.")
|
||||
elif not args.components:
|
||||
raise ValueError("You need to provide the components to upload the file to.")
|
||||
tweaks = upload_file(file_path=args.upload_file, host=BASE_API_URL, flow_id=args.endpoint, components=[args.components], tweaks=tweaks)
|
||||
@@ -185,7 +185,7 @@ To choose a custom name for your API endpoint, select **Project Settings** >
|
||||
To revoke an API key, delete it from the list of keys in the **Settings** menu.
|
||||
|
||||
1. Click your user icon and select **Settings**.
|
||||
2. Click **Langflow API**.
|
||||
2. Click **Hanzoflow API**.
|
||||
3. Select the keys you want to delete and click the trash can icon.
|
||||
|
||||
This action immediately invalidates the key and prevents it from being used again.
|
||||
|
||||
@@ -6,36 +6,36 @@ slug: /configuration-authentication
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
The login functionality in Langflow serves to authenticate users and protect sensitive routes in the application.
|
||||
The login functionality in Hanzoflow serves to authenticate users and protect sensitive routes in the application.
|
||||
|
||||
## Create a superuser and new users in Langflow
|
||||
## Create a superuser and new users in Hanzoflow
|
||||
|
||||
Learn how to create a new superuser, log in to Langflow, and add new users.
|
||||
Learn how to create a new superuser, log in to Hanzoflow, and add new users.
|
||||
|
||||
1. Create a `.env` file and open it in your preferred editor.
|
||||
|
||||
2. Add the following environment variables to your file.
|
||||
|
||||
```bash
|
||||
LANGFLOW_AUTO_LOGIN=False
|
||||
LANGFLOW_SUPERUSER=admin
|
||||
LANGFLOW_SUPERUSER_PASSWORD=securepassword
|
||||
LANGFLOW_SECRET_KEY=randomly_generated_secure_key
|
||||
LANGFLOW_NEW_USER_IS_ACTIVE=False
|
||||
HANZOFLOW_AUTO_LOGIN=False
|
||||
HANZOFLOW_SUPERUSER=admin
|
||||
HANZOFLOW_SUPERUSER_PASSWORD=securepassword
|
||||
HANZOFLOW_SECRET_KEY=randomly_generated_secure_key
|
||||
HANZOFLOW_NEW_USER_IS_ACTIVE=False
|
||||
```
|
||||
|
||||
For more information, see [Authentication configuration values](#values).
|
||||
|
||||
:::tip
|
||||
The Langflow project includes a [`.env.example`](https://github.com/langflow-ai/langflow/blob/main/.env.example) file to help you get started.
|
||||
The Hanzoflow project includes a [`.env.example`](https://github.com/hanzoflow-ai/hanzoflow/blob/main/.env.example) file to help you get started.
|
||||
You can copy the contents of this file into your own `.env` file and replace the example values with your own preferred settings.
|
||||
:::
|
||||
|
||||
3. Save your `.env` file.
|
||||
4. Run Langflow with the configured environment variables.
|
||||
4. Run Hanzoflow with the configured environment variables.
|
||||
|
||||
```bash
|
||||
python -m langflow run --env-file .env
|
||||
python -m hanzoflow run --env-file .env
|
||||
```
|
||||
|
||||
5. Sign in with your username `admin` and password `securepassword`.
|
||||
@@ -46,22 +46,22 @@ python -m langflow run --env-file .env
|
||||
The user can only sign in if you select them as **Active**.
|
||||
9. To give the user `superuser` privileges, click **Superuser**.
|
||||
10. Click **Save**.
|
||||
11. To confirm your new user has been created, sign out of Langflow, and then sign back in using your new **Username** and **Password**.
|
||||
11. To confirm your new user has been created, sign out of Hanzoflow, and then sign back in using your new **Username** and **Password**.
|
||||
|
||||
## Manage Superuser with the Langflow CLI
|
||||
## Manage Superuser with the Hanzoflow CLI
|
||||
|
||||
Langflow provides a command-line utility for interactively creating superusers:
|
||||
Hanzoflow provides a command-line utility for interactively creating superusers:
|
||||
|
||||
1. Enter the CLI command:
|
||||
|
||||
```bash
|
||||
langflow superuser
|
||||
hanzoflow superuser
|
||||
```
|
||||
|
||||
2. Langflow prompts you for a **Username** and **Password**:
|
||||
2. Hanzoflow prompts you for a **Username** and **Password**:
|
||||
|
||||
```
|
||||
langflow superuser
|
||||
hanzoflow superuser
|
||||
Username: new_superuser_1
|
||||
Password:
|
||||
Default folder created successfully.
|
||||
@@ -76,62 +76,62 @@ The following table lists the available authentication configuration variables,
|
||||
|
||||
| Variable | Description | Default |
|
||||
| ----------------------------- | ------------------------------------- | ------- |
|
||||
| `LANGFLOW_AUTO_LOGIN` | Enables automatic login | `True` |
|
||||
| `LANGFLOW_SUPERUSER` | Superuser username | - |
|
||||
| `LANGFLOW_SUPERUSER_PASSWORD` | Superuser password | - |
|
||||
| `LANGFLOW_SECRET_KEY` | Key for encrypting superuser password | - |
|
||||
| `LANGFLOW_NEW_USER_IS_ACTIVE` | Automatically activates new users | `False` |
|
||||
| `HANZOFLOW_AUTO_LOGIN` | Enables automatic login | `True` |
|
||||
| `HANZOFLOW_SUPERUSER` | Superuser username | - |
|
||||
| `HANZOFLOW_SUPERUSER_PASSWORD` | Superuser password | - |
|
||||
| `HANZOFLOW_SECRET_KEY` | Key for encrypting superuser password | - |
|
||||
| `HANZOFLOW_NEW_USER_IS_ACTIVE` | Automatically activates new users | `False` |
|
||||
|
||||
### LANGFLOW_AUTO_LOGIN
|
||||
### HANZOFLOW_AUTO_LOGIN
|
||||
|
||||
By default, this variable is set to `True`. When enabled, Langflow operates as it did in versions prior to 0.5, including automatic login without requiring explicit user authentication.
|
||||
By default, this variable is set to `True`. When enabled, Hanzoflow operates as it did in versions prior to 0.5, including automatic login without requiring explicit user authentication.
|
||||
|
||||
To disable automatic login and enforce user authentication:
|
||||
|
||||
```shell
|
||||
LANGFLOW_AUTO_LOGIN=False
|
||||
HANZOFLOW_AUTO_LOGIN=False
|
||||
```
|
||||
|
||||
### LANGFLOW_SUPERUSER and LANGFLOW_SUPERUSER_PASSWORD
|
||||
### HANZOFLOW_SUPERUSER and HANZOFLOW_SUPERUSER_PASSWORD
|
||||
|
||||
These environment variables are only relevant when LANGFLOW_AUTO_LOGIN is set to False. They specify the username and password for the superuser, which is essential for administrative tasks.
|
||||
These environment variables are only relevant when HANZOFLOW_AUTO_LOGIN is set to False. They specify the username and password for the superuser, which is essential for administrative tasks.
|
||||
To create a superuser manually:
|
||||
|
||||
```bash
|
||||
LANGFLOW_SUPERUSER=admin
|
||||
LANGFLOW_SUPERUSER_PASSWORD=securepassword
|
||||
HANZOFLOW_SUPERUSER=admin
|
||||
HANZOFLOW_SUPERUSER_PASSWORD=securepassword
|
||||
```
|
||||
|
||||
### LANGFLOW_SECRET_KEY
|
||||
### HANZOFLOW_SECRET_KEY
|
||||
|
||||
This environment variable holds a secret key used for encrypting sensitive data like API keys.
|
||||
|
||||
```bash
|
||||
LANGFLOW_SECRET_KEY=dBuuuB_FHLvU8T9eUNlxQF9ppqRxwWpXXQ42kM2_fb
|
||||
HANZOFLOW_SECRET_KEY=dBuuuB_FHLvU8T9eUNlxQF9ppqRxwWpXXQ42kM2_fb
|
||||
```
|
||||
|
||||
Langflow uses the [Fernet](https://pypi.org/project/cryptography/) library for secret key encryption.
|
||||
Hanzoflow uses the [Fernet](https://pypi.org/project/cryptography/) library for secret key encryption.
|
||||
|
||||
### Create a LANGFLOW_SECRET_KEY
|
||||
### Create a HANZOFLOW_SECRET_KEY
|
||||
|
||||
The `LANGFLOW_SECRET_KEY` is used for encrypting sensitive data. It must be:
|
||||
The `HANZOFLOW_SECRET_KEY` is used for encrypting sensitive data. It must be:
|
||||
- At least 32 bytes long
|
||||
- URL-safe base64 encoded
|
||||
|
||||
1. To create a `LANGFLOW_SECRET_KEY`, run the following command:
|
||||
1. To create a `HANZOFLOW_SECRET_KEY`, run the following command:
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="unix" label="macOS/Linux">
|
||||
|
||||
```bash
|
||||
# Copy to clipboard (macOS)
|
||||
python3 -c "from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')" | pbcopy
|
||||
python3 -c "from secrets import token_urlsafe; print(f'HANZOFLOW_SECRET_KEY={token_urlsafe(32)}')" | pbcopy
|
||||
|
||||
# Copy to clipboard (Linux)
|
||||
python3 -c "from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')" | xclip -selection clipboard
|
||||
python3 -c "from secrets import token_urlsafe; print(f'HANZOFLOW_SECRET_KEY={token_urlsafe(32)}')" | xclip -selection clipboard
|
||||
|
||||
# Or just print
|
||||
python3 -c "from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')"
|
||||
python3 -c "from secrets import token_urlsafe; print(f'HANZOFLOW_SECRET_KEY={token_urlsafe(32)}')"
|
||||
```
|
||||
</TabItem>
|
||||
|
||||
@@ -139,10 +139,10 @@ python3 -c "from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={toke
|
||||
|
||||
```bash
|
||||
# Copy to clipboard
|
||||
python -c "from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')" | clip
|
||||
python -c "from secrets import token_urlsafe; print(f'HANZOFLOW_SECRET_KEY={token_urlsafe(32)}')" | clip
|
||||
|
||||
# Or just print
|
||||
python -c "from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')"
|
||||
python -c "from secrets import token_urlsafe; print(f'HANZOFLOW_SECRET_KEY={token_urlsafe(32)}')"
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
@@ -153,38 +153,38 @@ Treat the generated secure key as you would an application access token. Do not
|
||||
|
||||
2. Create a `.env` file with the following configuration, and include your generated secret key value.
|
||||
```bash
|
||||
LANGFLOW_AUTO_LOGIN=False
|
||||
LANGFLOW_SUPERUSER=admin
|
||||
LANGFLOW_SUPERUSER_PASSWORD=securepassword
|
||||
LANGFLOW_SECRET_KEY=dBuuuB_FHLvU8T9eUNlxQF9ppqRxwWpXXQ42kM2_fbg # Your generated key
|
||||
LANGFLOW_NEW_USER_IS_ACTIVE=False
|
||||
HANZOFLOW_AUTO_LOGIN=False
|
||||
HANZOFLOW_SUPERUSER=admin
|
||||
HANZOFLOW_SUPERUSER_PASSWORD=securepassword
|
||||
HANZOFLOW_SECRET_KEY=dBuuuB_FHLvU8T9eUNlxQF9ppqRxwWpXXQ42kM2_fbg # Your generated key
|
||||
HANZOFLOW_NEW_USER_IS_ACTIVE=False
|
||||
```
|
||||
|
||||
3. Start Langflow with the values from your `.env` file.
|
||||
3. Start Hanzoflow with the values from your `.env` file.
|
||||
```bash
|
||||
uv run langflow run --env-file .env
|
||||
uv run hanzoflow run --env-file .env
|
||||
```
|
||||
|
||||
The generated secret key value is now used to encrypt your global variables.
|
||||
|
||||
If no key is provided, Langflow will automatically generate a secure key. This is not recommended for production environments, because in a multi-instance deployment like Kubernetes, auto-generated keys won't be able to decrypt data encrypted by other instances. Instead, you should explicitly set the `LANGFLOW_SECRET_KEY` environment variable in the deployment configuration to be the same across all instances.
|
||||
If no key is provided, Hanzoflow will automatically generate a secure key. This is not recommended for production environments, because in a multi-instance deployment like Kubernetes, auto-generated keys won't be able to decrypt data encrypted by other instances. Instead, you should explicitly set the `HANZOFLOW_SECRET_KEY` environment variable in the deployment configuration to be the same across all instances.
|
||||
|
||||
### Rotate the LANGFLOW_SECRET_KEY
|
||||
### Rotate the HANZOFLOW_SECRET_KEY
|
||||
|
||||
To rotate the key, follow these steps.
|
||||
|
||||
1. Create a new `LANGFLOW_SECRET_KEY` with the command in [Create a LANGFLOW_SECRET_KEY](#create-a-langflow_secret_key).
|
||||
2. Stop your Langflow instance.
|
||||
3. Update the `LANGFLOW_SECRET_KEY` in your `.env` file with the new key.
|
||||
4. Restart Langflow with the updated environment file:
|
||||
1. Create a new `HANZOFLOW_SECRET_KEY` with the command in [Create a HANZOFLOW_SECRET_KEY](#create-a-hanzoflow_secret_key).
|
||||
2. Stop your Hanzoflow instance.
|
||||
3. Update the `HANZOFLOW_SECRET_KEY` in your `.env` file with the new key.
|
||||
4. Restart Hanzoflow with the updated environment file:
|
||||
```bash
|
||||
langflow run --env-file .env
|
||||
hanzoflow run --env-file .env
|
||||
```
|
||||
|
||||
### LANGFLOW_NEW_USER_IS_ACTIVE
|
||||
### HANZOFLOW_NEW_USER_IS_ACTIVE
|
||||
|
||||
By default, this variable is set to `False`. When enabled, new users are automatically activated and can log in without requiring explicit activation by the superuser.
|
||||
|
||||
```bash
|
||||
LANGFLOW_NEW_USER_IS_ACTIVE=False
|
||||
HANZOFLOW_NEW_USER_IS_ACTIVE=False
|
||||
```
|
||||
@@ -3,11 +3,11 @@ title: Auto-saving
|
||||
slug: /configuration-auto-save
|
||||
---
|
||||
|
||||
Langflow supports both manual and auto-saving functionality.
|
||||
Hanzoflow supports both manual and auto-saving functionality.
|
||||
|
||||
## Auto-saving {#auto-saving}
|
||||
|
||||
When Langflow is in auto-saving mode, all changes are saved automatically. Auto-save progress is indicated in the left side of the top bar.
|
||||
When Hanzoflow is in auto-saving mode, all changes are saved automatically. Auto-save progress is indicated in the left side of the top bar.
|
||||
|
||||
* When a flow is being saved, a loading icon indicates that the flow is being saved in the database.
|
||||
|
||||
@@ -22,19 +22,19 @@ To disable auto-saving,
|
||||
1. Set an environment variable in your `.env` file.
|
||||
|
||||
```env
|
||||
LANGFLOW_AUTO_SAVING=false
|
||||
HANZOFLOW_AUTO_SAVING=false
|
||||
```
|
||||
|
||||
2. Start Langflow with the values from your `.env` file.
|
||||
2. Start Hanzoflow with the values from your `.env` file.
|
||||
|
||||
```shell
|
||||
python -m langflow run --env-file .env
|
||||
python -m hanzoflow run --env-file .env
|
||||
```
|
||||
|
||||
Alternatively, disable auto-saving by passing the `--no-auto-saving` flag at startup.
|
||||
|
||||
```shell
|
||||
python -m langflow --no-auto-saving
|
||||
python -m hanzoflow --no-auto-saving
|
||||
```
|
||||
|
||||
## Save a flow manually {#manual-saving}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
---
|
||||
title: Run Langflow in backend-only mode
|
||||
title: Run Hanzoflow in backend-only mode
|
||||
slug: /configuration-backend-only
|
||||
---
|
||||
|
||||
Langflow can run in `--backend-only` mode to expose a Langflow app as an API endpoint, without running the frontend UI.
|
||||
This is also known as "headless" mode. Running Langflow without the frontend is useful for automation, testing, and situations where you just need to serve a flow as a workload without creating a new flow in the UI.
|
||||
Hanzoflow can run in `--backend-only` mode to expose a Hanzoflow app as an API endpoint, without running the frontend UI.
|
||||
This is also known as "headless" mode. Running Hanzoflow without the frontend is useful for automation, testing, and situations where you just need to serve a flow as a workload without creating a new flow in the UI.
|
||||
|
||||
To run Langflow in backend-only mode, pass the `--backend-only` flag at startup.
|
||||
To run Hanzoflow in backend-only mode, pass the `--backend-only` flag at startup.
|
||||
|
||||
```python
|
||||
python3 -m langflow run --backend-only
|
||||
python3 -m hanzoflow run --backend-only
|
||||
```
|
||||
|
||||
The terminal prints `Welcome to ⛓ Langflow`, and Langflow will now serve requests to its API without the frontend running.
|
||||
The terminal prints `Welcome to ⛓ Hanzoflow`, and Hanzoflow will now serve requests to its API without the frontend running.
|
||||
|
||||
## Set up a basic prompting flow in backend-only mode
|
||||
|
||||
@@ -21,15 +21,15 @@ However, you can use these same instructions as guidelines for using any type of
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- [Langflow is installed](/get-started-installation)
|
||||
- [Hanzoflow is installed](/get-started-installation)
|
||||
- [You have an OpenAI API key](https://platform.openai.com/)
|
||||
- [You have a Langflow Basic Prompting flow](/starter-projects-basic-prompting)
|
||||
- [You have a Hanzoflow Basic Prompting flow](/starter-projects-basic-prompting)
|
||||
|
||||
### Get your flow's ID
|
||||
|
||||
This guide assumes you have created a [Basic Prompting flow](/starter-projects-basic-prompting) or have another working flow available.
|
||||
|
||||
1. In the Langflow UI, click **API**.
|
||||
1. In the Hanzoflow UI, click **API**.
|
||||
2. Click **curl** > **Copy code** to copy the curl command.
|
||||
This command will POST input to your flow's endpoint.
|
||||
It will look something like this:
|
||||
@@ -49,21 +49,21 @@ curl -X POST \
|
||||
}}'
|
||||
```
|
||||
|
||||
The flow ID in this example is `fff8dcaa-f0f6-4136-9df0-b7cb38de42e0`, a UUID generated by Langflow and used in the endpoint URL.
|
||||
The flow ID in this example is `fff8dcaa-f0f6-4136-9df0-b7cb38de42e0`, a UUID generated by Hanzoflow and used in the endpoint URL.
|
||||
See [API](/configuration-api-keys) to change the endpoint.
|
||||
|
||||
3. To stop Langflow, press **Ctrl+C**.
|
||||
3. To stop Hanzoflow, press **Ctrl+C**.
|
||||
|
||||
### Start Langflow in backend-only mode
|
||||
### Start Hanzoflow in backend-only mode
|
||||
|
||||
1. Start Langflow in backend-only mode.
|
||||
1. Start Hanzoflow in backend-only mode.
|
||||
|
||||
```python
|
||||
python3 -m langflow run --backend-only
|
||||
python3 -m hanzoflow run --backend-only
|
||||
```
|
||||
|
||||
The terminal prints `Welcome to ⛓ Langflow`.
|
||||
Langflow is now serving requests to its API.
|
||||
The terminal prints `Welcome to ⛓ Hanzoflow`.
|
||||
Hanzoflow is now serving requests to its API.
|
||||
|
||||
2. Run the curl code you copied from the UI.
|
||||
You should get a result like this:
|
||||
@@ -72,21 +72,21 @@ You should get a result like this:
|
||||
{"session_id":"ef7e0554-69e5-4e3e-ab29-ee83bcd8d9ef:bf81d898868ac87e1b4edbd96c131c5dee801ea2971122cc91352d144a45b880","outputs":[{"inputs":{"input_value":"hi, are you there?"},"outputs":[{"results":{"result":"Arrr, ahoy matey! Aye, I be here. What be ye needin', me hearty?"},"artifacts":{"message":"Arrr, ahoy matey! Aye, I be here. What be ye needin', me hearty?","sender":"Machine","sender_name":"AI"},"messages":[{"message":"Arrr, ahoy matey! Aye, I be here. What be ye needin', me hearty?","sender":"Machine","sender_name":"AI","component_id":"ChatOutput-ktwdw"}],"component_display_name":"Chat Output","component_id":"ChatOutput-ktwdw","used_frozen_result":false}]}]}%
|
||||
```
|
||||
|
||||
This confirms Langflow is receiving your POST request, running the flow, and returning the result without running the frontend.
|
||||
This confirms Hanzoflow is receiving your POST request, running the flow, and returning the result without running the frontend.
|
||||
|
||||
You can interact with this endpoint using the other options in the **API** menu, including the Python and Javascript APIs.
|
||||
|
||||
### Query the Langflow endpoint with a Python script
|
||||
### Query the Hanzoflow endpoint with a Python script
|
||||
|
||||
Using the same flow ID, run a Python sample script to send a query and get a prettified JSON response back.
|
||||
|
||||
1. Create a Python file and name it `langflow_api_demo.py`.
|
||||
1. Create a Python file and name it `hanzoflow_api_demo.py`.
|
||||
|
||||
```python
|
||||
import requests
|
||||
import json
|
||||
|
||||
def query_langflow(message):
|
||||
def query_hanzoflow(message):
|
||||
url = "http://127.0.0.1:7861/api/v1/run/fff8dcaa-f0f6-4136-9df0-b7cb38de42e0"
|
||||
headers = {"Content-Type": "application/json"}
|
||||
data = {"input_value": message}
|
||||
@@ -95,14 +95,14 @@ def query_langflow(message):
|
||||
return response.json()
|
||||
|
||||
user_input = input("Enter your message: ")
|
||||
result = query_langflow(user_input)
|
||||
result = query_hanzoflow(user_input)
|
||||
|
||||
print(json.dumps(result, indent=2))
|
||||
```
|
||||
2. Run the script.
|
||||
|
||||
```python
|
||||
python langflow_api_demo.py
|
||||
python hanzoflow_api_demo.py
|
||||
```
|
||||
|
||||
3. Enter your message when prompted.
|
||||
@@ -113,7 +113,7 @@ You will get a prettified JSON response back containing a response to your messa
|
||||
To change the host and port, pass the values as additional flags.
|
||||
|
||||
```python
|
||||
python -m langflow run --host 127.0.0.1 --port 7860 --backend-only
|
||||
python -m hanzoflow run --host 127.0.0.1 --port 7860 --backend-only
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
---
|
||||
title: Langflow CLI
|
||||
title: Hanzoflow CLI
|
||||
slug: /configuration-cli
|
||||
---
|
||||
|
||||
import Link from '@docusaurus/Link';
|
||||
|
||||
# Langflow CLI
|
||||
# Hanzoflow CLI
|
||||
|
||||
The Langflow command line interface (Langflow CLI) is the main interface for managing and running the Langflow server.
|
||||
The Hanzoflow command line interface (Hanzoflow CLI) is the main interface for managing and running the Hanzoflow server.
|
||||
|
||||
## CLI commands
|
||||
|
||||
The following sections describe the available CLI commands and their options, as well as their corresponding [environment variables](./environment-variables.md).
|
||||
|
||||
### langflow
|
||||
### hanzoflow
|
||||
|
||||
Running the CLI without any arguments displays a list of available options and commands.
|
||||
|
||||
```bash
|
||||
langflow [OPTIONS]
|
||||
hanzoflow [OPTIONS]
|
||||
# or
|
||||
python -m langflow [OPTIONS]
|
||||
python -m hanzoflow [OPTIONS]
|
||||
```
|
||||
|
||||
#### Options
|
||||
@@ -31,14 +31,14 @@ python -m langflow [OPTIONS]
|
||||
| <Link id="show-completion"/>`--show-completion` | *Not applicable* | *Not applicable* | Show the location of the auto-completion config file (if installed). |
|
||||
| <Link id="help"/>`--help` | *Not applicable* | *Not applicable* | Display information about the command usage and its options and arguments. |
|
||||
|
||||
### langflow api-key
|
||||
### hanzoflow api-key
|
||||
|
||||
Create an API key for the default superuser if the [`LANGFLOW_AUTO_LOGIN` environment variable] is set to `true`.
|
||||
Create an API key for the default superuser if the [`HANZOFLOW_AUTO_LOGIN` environment variable] is set to `true`.
|
||||
|
||||
```bash
|
||||
langflow api-key [OPTIONS]
|
||||
hanzoflow api-key [OPTIONS]
|
||||
# or
|
||||
python -m langflow api-key [OPTIONS]
|
||||
python -m hanzoflow api-key [OPTIONS]
|
||||
```
|
||||
|
||||
#### Options
|
||||
@@ -49,20 +49,20 @@ python -m langflow api-key [OPTIONS]
|
||||
| <Link id="show-completion"/>`--show-completion` | *Not applicable* | *Not applicable* | Show the location of the auto-completion config file (if installed). |
|
||||
| <Link id="help"/>`--help` | *Not applicable* | *Not applicable* | Display information about the command usage and its options and arguments. |
|
||||
|
||||
### langflow copy-db
|
||||
### hanzoflow copy-db
|
||||
|
||||
Copy the database files to the current directory.
|
||||
Copy the Langflow database files, `langflow.db` and `langflow-pre.db` (if they exist), from the cache directory to the current directory.
|
||||
Copy the Hanzoflow database files, `hanzoflow.db` and `hanzoflow-pre.db` (if they exist), from the cache directory to the current directory.
|
||||
|
||||
:::note
|
||||
The current directory is the directory containing `__main__.py`.
|
||||
You can find this directory by running `which langflow`.
|
||||
You can find this directory by running `which hanzoflow`.
|
||||
:::
|
||||
|
||||
```bash
|
||||
langflow copy-db
|
||||
hanzoflow copy-db
|
||||
# or
|
||||
python -m langflow copy-db
|
||||
python -m hanzoflow copy-db
|
||||
```
|
||||
|
||||
#### Options
|
||||
@@ -71,14 +71,14 @@ python -m langflow copy-db
|
||||
|--------|---------|--------|-------------|
|
||||
| <Link id="copy-db-help"/>`--help` | *Not applicable* | *Not applicable* | Display information about the command usage and its options and arguments. |
|
||||
|
||||
### langflow migration
|
||||
### hanzoflow migration
|
||||
|
||||
Run or test database migrations.
|
||||
|
||||
```bash
|
||||
langflow migration [OPTIONS]
|
||||
hanzoflow migration [OPTIONS]
|
||||
# or
|
||||
python -m langflow migration [OPTIONS]
|
||||
python -m hanzoflow migration [OPTIONS]
|
||||
```
|
||||
|
||||
#### Options
|
||||
@@ -89,64 +89,64 @@ python -m langflow migration [OPTIONS]
|
||||
| <Link id="migration-fix"/>`--fix` | `false` (`--no-fix`) | [Boolean](#boolean) | Fix migrations. This is a destructive operation, and all affected data will be deleted. Only use this option if you know what you are doing. |
|
||||
| <Link id="migration-help"/>`--help` | *Not applicable* | *Not applicable* | Display information about the command usage and its options and arguments. |
|
||||
|
||||
### langflow run
|
||||
### hanzoflow run
|
||||
|
||||
Start the Langflow server.
|
||||
Start the Hanzoflow server.
|
||||
|
||||
```bash
|
||||
langflow run [OPTIONS]
|
||||
hanzoflow run [OPTIONS]
|
||||
# or
|
||||
python -m langflow run [OPTIONS]
|
||||
python -m hanzoflow run [OPTIONS]
|
||||
```
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Default | Values | Description |
|
||||
|--------|---------|--------|-------------|
|
||||
| <Link id="run-host"/>`--host` | `127.0.0.1` | String | The host on which the Langflow server will run.<br/>See [`LANGFLOW_HOST` variable](./environment-variables.md#LANGFLOW_HOST). |
|
||||
| <Link id="run-workers"/>`--workers` | `1` | Integer | Number of worker processes.<br/>See [`LANGFLOW_WORKERS` variable](./environment-variables.md#LANGFLOW_WORKERS). |
|
||||
| <Link id="run-worker-timeout"/>`--worker-timeout` | `300` | Integer | Worker timeout in seconds.<br/>See [`LANGFLOW_WORKER_TIMEOUT` variable](./environment-variables.md#LANGFLOW_WORKER_TIMEOUT). |
|
||||
| <Link id="run-port"/>`--port` | `7860` | Integer | The port on which the Langflow server will run. The server automatically selects a free port if the specified port is in use.<br/>See [`LANGFLOW_PORT` variable](./environment-variables.md#LANGFLOW_PORT). |
|
||||
| <Link id="run-components-path"/>`--components-path` | `langflow/components` | String | Path to the directory containing custom components.<br/>See [`LANGFLOW_COMPONENTS_PATH` variable](./environment-variables.md#LANGFLOW_COMPONENTS_PATH). |
|
||||
| <Link id="run-host"/>`--host` | `127.0.0.1` | String | The host on which the Hanzoflow server will run.<br/>See [`HANZOFLOW_HOST` variable](./environment-variables.md#HANZOFLOW_HOST). |
|
||||
| <Link id="run-workers"/>`--workers` | `1` | Integer | Number of worker processes.<br/>See [`HANZOFLOW_WORKERS` variable](./environment-variables.md#HANZOFLOW_WORKERS). |
|
||||
| <Link id="run-worker-timeout"/>`--worker-timeout` | `300` | Integer | Worker timeout in seconds.<br/>See [`HANZOFLOW_WORKER_TIMEOUT` variable](./environment-variables.md#HANZOFLOW_WORKER_TIMEOUT). |
|
||||
| <Link id="run-port"/>`--port` | `7860` | Integer | The port on which the Hanzoflow server will run. The server automatically selects a free port if the specified port is in use.<br/>See [`HANZOFLOW_PORT` variable](./environment-variables.md#HANZOFLOW_PORT). |
|
||||
| <Link id="run-components-path"/>`--components-path` | `hanzoflow/components` | String | Path to the directory containing custom components.<br/>See [`HANZOFLOW_COMPONENTS_PATH` variable](./environment-variables.md#HANZOFLOW_COMPONENTS_PATH). |
|
||||
| <Link id="run-env-file"/>`--env-file` | Not set | String | Path to the `.env` file containing environment variables.<br/>See [Import environment variables from a .env file](./environment-variables.md#configure-variables-env-file). |
|
||||
| <Link id="run-log-level"/>`--log-level` | `critical` | `debug`<br/>`info`<br/>`warning`<br/>`error`<br/>`critical` | Set the logging level.<br/>See [`LANGFLOW_LOG_LEVEL` variable](./environment-variables.md#LANGFLOW_LOG_LEVEL). |
|
||||
| <Link id="run-log-file"/>`--log-file` | `logs/langflow.log` | String | Set the path to the log file for Langflow.<br/>See [`LANGFLOW_LOG_FILE` variable](./environment-variables.md#LANGFLOW_LOG_FILE). |
|
||||
| <Link id="run-cache"/>`--cache` | `InMemoryCache` | `InMemoryCache`<br/>`SQLiteCache` | Type of cache to use.<br/>See [`LANGFLOW_LANGCHAIN_CACHE` variable](./environment-variables.md#LANGFLOW_LANGCHAIN_CACHE). |
|
||||
| <Link id="run-dev"/>`--dev` | `false` (`--no-dev`) | [Boolean](#boolean) | Run Langflow in development mode (may contain bugs).<br/>See [`LANGFLOW_DEV` variable](./environment-variables.md#LANGFLOW_DEV). |
|
||||
| <Link id="run-frontend-path"/>`--frontend-path` | `./frontend` | String | Path to the frontend directory containing build files. This is for development purposes only.<br/>See [`LANGFLOW_FRONTEND_PATH` variable](./environment-variables.md#LANGFLOW_FRONTEND_PATH). |
|
||||
| <Link id="run-open-browser"/>`--open-browser` | `true` | [Boolean](#boolean) | Open the system web browser on startup. Use `--no-open-browser` to disable opening the system web browser on startup.<br/> See [`LANGFLOW_OPEN_BROWSER` variable](./environment-variables.md#LANGFLOW_OPEN_BROWSER). |
|
||||
| <Link id="run-remove-api-keys"/>`--remove-api-keys` | `false` (`--no-remove-api-keys`) | [Boolean](#boolean) | Remove API keys from the projects saved in the database.<br/> See [`LANGFLOW_REMOVE_API_KEYS` variable](./environment-variables.md#LANGFLOW_REMOVE_API_KEYS). |
|
||||
| <Link id="run-backend-only"/>`--backend-only` | `false` (`--no-backend-only`) | [Boolean](#boolean) | Only run Langflow's backend server (no frontend).<br/>See [`LANGFLOW_BACKEND_ONLY` variable](./environment-variables.md#LANGFLOW_BACKEND_ONLY). |
|
||||
| <Link id="run-store"/>`--store` | `true` | [Boolean](#boolean) | Enable the Langflow Store features. Use `--no-store` to disable the Langflow Store features.<br/>See [`LANGFLOW_STORE` variable](./environment-variables.md#LANGFLOW_STORE). |
|
||||
| <Link id="run-auto-saving"/>`--auto-saving` | `true` | [Boolean](#boolean) | Enable flow auto-saving. Use `--no-auto-saving` to disable flow auto-saving.<br/>See [`LANGFLOW_AUTO_SAVING` variable](./environment-variables.md#LANGFLOW_AUTO_SAVING). |
|
||||
| <Link id="run-auto-saving-interval"/>`--auto-saving-interval` | `1000` | Integer | Set the interval for flow auto-saving in milliseconds.<br/>See [`LANGFLOW_AUTO_SAVING_INTERVAL` variable](./environment-variables.md#LANGFLOW_AUTO_SAVING_INTERVAL). |
|
||||
| <Link id="run-health-check-max-retries"/>`--health-check-max-retries` | `5` | Integer | Set the maximum number of retries for the health check. Use `--no-health-check-max-retries` to disable the maximum number of retries for the health check.<br/>See [`LANGFLOW_HEALTH_CHECK_MAX_RETRIES` variable](./environment-variables.md#LANGFLOW_HEALTH_CHECK_MAX_RETRIES). |
|
||||
| <Link id="run-max-file-size-upload"/>`--max-file-size-upload` | `100` | Integer | Set the maximum file size for the upload in megabytes.<br/>See [`LANGFLOW_MAX_FILE_SIZE_UPLOAD` variable](./environment-variables.md#LANGFLOW_MAX_FILE_SIZE_UPLOAD). |
|
||||
| <Link id="run-log-level"/>`--log-level` | `critical` | `debug`<br/>`info`<br/>`warning`<br/>`error`<br/>`critical` | Set the logging level.<br/>See [`HANZOFLOW_LOG_LEVEL` variable](./environment-variables.md#HANZOFLOW_LOG_LEVEL). |
|
||||
| <Link id="run-log-file"/>`--log-file` | `logs/hanzoflow.log` | String | Set the path to the log file for Hanzoflow.<br/>See [`HANZOFLOW_LOG_FILE` variable](./environment-variables.md#HANZOFLOW_LOG_FILE). |
|
||||
| <Link id="run-cache"/>`--cache` | `InMemoryCache` | `InMemoryCache`<br/>`SQLiteCache` | Type of cache to use.<br/>See [`HANZOFLOW_LANGCHAIN_CACHE` variable](./environment-variables.md#HANZOFLOW_LANGCHAIN_CACHE). |
|
||||
| <Link id="run-dev"/>`--dev` | `false` (`--no-dev`) | [Boolean](#boolean) | Run Hanzoflow in development mode (may contain bugs).<br/>See [`HANZOFLOW_DEV` variable](./environment-variables.md#HANZOFLOW_DEV). |
|
||||
| <Link id="run-frontend-path"/>`--frontend-path` | `./frontend` | String | Path to the frontend directory containing build files. This is for development purposes only.<br/>See [`HANZOFLOW_FRONTEND_PATH` variable](./environment-variables.md#HANZOFLOW_FRONTEND_PATH). |
|
||||
| <Link id="run-open-browser"/>`--open-browser` | `true` | [Boolean](#boolean) | Open the system web browser on startup. Use `--no-open-browser` to disable opening the system web browser on startup.<br/> See [`HANZOFLOW_OPEN_BROWSER` variable](./environment-variables.md#HANZOFLOW_OPEN_BROWSER). |
|
||||
| <Link id="run-remove-api-keys"/>`--remove-api-keys` | `false` (`--no-remove-api-keys`) | [Boolean](#boolean) | Remove API keys from the projects saved in the database.<br/> See [`HANZOFLOW_REMOVE_API_KEYS` variable](./environment-variables.md#HANZOFLOW_REMOVE_API_KEYS). |
|
||||
| <Link id="run-backend-only"/>`--backend-only` | `false` (`--no-backend-only`) | [Boolean](#boolean) | Only run Hanzoflow's backend server (no frontend).<br/>See [`HANZOFLOW_BACKEND_ONLY` variable](./environment-variables.md#HANZOFLOW_BACKEND_ONLY). |
|
||||
| <Link id="run-store"/>`--store` | `true` | [Boolean](#boolean) | Enable the Hanzoflow Store features. Use `--no-store` to disable the Hanzoflow Store features.<br/>See [`HANZOFLOW_STORE` variable](./environment-variables.md#HANZOFLOW_STORE). |
|
||||
| <Link id="run-auto-saving"/>`--auto-saving` | `true` | [Boolean](#boolean) | Enable flow auto-saving. Use `--no-auto-saving` to disable flow auto-saving.<br/>See [`HANZOFLOW_AUTO_SAVING` variable](./environment-variables.md#HANZOFLOW_AUTO_SAVING). |
|
||||
| <Link id="run-auto-saving-interval"/>`--auto-saving-interval` | `1000` | Integer | Set the interval for flow auto-saving in milliseconds.<br/>See [`HANZOFLOW_AUTO_SAVING_INTERVAL` variable](./environment-variables.md#HANZOFLOW_AUTO_SAVING_INTERVAL). |
|
||||
| <Link id="run-health-check-max-retries"/>`--health-check-max-retries` | `5` | Integer | Set the maximum number of retries for the health check. Use `--no-health-check-max-retries` to disable the maximum number of retries for the health check.<br/>See [`HANZOFLOW_HEALTH_CHECK_MAX_RETRIES` variable](./environment-variables.md#HANZOFLOW_HEALTH_CHECK_MAX_RETRIES). |
|
||||
| <Link id="run-max-file-size-upload"/>`--max-file-size-upload` | `100` | Integer | Set the maximum file size for the upload in megabytes.<br/>See [`HANZOFLOW_MAX_FILE_SIZE_UPLOAD` variable](./environment-variables.md#HANZOFLOW_MAX_FILE_SIZE_UPLOAD). |
|
||||
| <Link id="run-help"/>`--help` | *Not applicable* | *Not applicable* | Display information about the command usage and its options and arguments. |
|
||||
|
||||
### langflow superuser
|
||||
### hanzoflow superuser
|
||||
|
||||
Create a superuser account.
|
||||
|
||||
```bash
|
||||
langflow superuser [OPTIONS]
|
||||
hanzoflow superuser [OPTIONS]
|
||||
# or
|
||||
python -m langflow superuser [OPTIONS]
|
||||
python -m hanzoflow superuser [OPTIONS]
|
||||
```
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Default | Values | Description |
|
||||
|--------|---------|--------|-------------|
|
||||
| <Link id="superuser-username"/>`--username` | Required | String | Specify the name for the superuser.<br/>See [`LANGFLOW_SUPERUSER` variable](./environment-variables.md#LANGFLOW_SUPERUSER). |
|
||||
| <Link id="superuser-password"/>`--password` | Required | String | Specify the password for the superuser.<br/>See [`LANGFLOW_SUPERUSER_PASSWORD` variable](./environment-variables.md#LANGFLOW_SUPERUSER_PASSWORD). |
|
||||
| <Link id="superuser-username"/>`--username` | Required | String | Specify the name for the superuser.<br/>See [`HANZOFLOW_SUPERUSER` variable](./environment-variables.md#HANZOFLOW_SUPERUSER). |
|
||||
| <Link id="superuser-password"/>`--password` | Required | String | Specify the password for the superuser.<br/>See [`HANZOFLOW_SUPERUSER_PASSWORD` variable](./environment-variables.md#HANZOFLOW_SUPERUSER_PASSWORD). |
|
||||
| <Link id="superuser-log-level"/>`--log-level` | `critical` | `debug`<br/>`info`<br/>`warning`<br/>`error`<br/>`critical` | Set the logging level. |
|
||||
|
||||
## Precedence
|
||||
|
||||
Langflow CLI options override the values of corresponding [environment variables](./environment-variables.md).
|
||||
Hanzoflow CLI options override the values of corresponding [environment variables](./environment-variables.md).
|
||||
|
||||
For example, if you have `LANGFLOW_PORT=7860` defined as an environment variable, but you run the CLI with `--port 7880`, then Langflow will set the port to **`7880`** (the value passed with the CLI).
|
||||
For example, if you have `HANZOFLOW_PORT=7860` defined as an environment variable, but you run the CLI with `--port 7880`, then Hanzoflow will set the port to **`7880`** (the value passed with the CLI).
|
||||
|
||||
## Assign values
|
||||
|
||||
@@ -163,7 +163,7 @@ To activate a boolean option, type it on the command line.
|
||||
For example:
|
||||
|
||||
```bash
|
||||
langflow run --remove-api-keys
|
||||
hanzoflow run --remove-api-keys
|
||||
```
|
||||
|
||||
All boolean options have a corresponding option that negates it.
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
title: Configure an external PostgreSQL database
|
||||
slug: /configuration-custom-database
|
||||
---
|
||||
Langflow's default database is [SQLite](https://www.sqlite.org/docs.html), but you can configure Langflow to use PostgreSQL instead.
|
||||
Hanzoflow's default database is [SQLite](https://www.sqlite.org/docs.html), but you can configure Hanzoflow to use PostgreSQL instead.
|
||||
|
||||
This guide walks you through setting up an external database for Langflow by replacing the default SQLite connection string `sqlite:///./langflow.db` with PostgreSQL.
|
||||
This guide walks you through setting up an external database for Hanzoflow by replacing the default SQLite connection string `sqlite:///./hanzoflow.db` with PostgreSQL.
|
||||
|
||||
## Prerequisite
|
||||
|
||||
* A [PostgreSQL](https://www.pgadmin.org/download/) database
|
||||
|
||||
## Connect Langflow to PostgreSQL
|
||||
## Connect Hanzoflow to PostgreSQL
|
||||
|
||||
To connect Langflow to PostgreSQL, follow these steps.
|
||||
To connect Hanzoflow to PostgreSQL, follow these steps.
|
||||
|
||||
1. Find your PostgreSQL database's connection string.
|
||||
It looks like `postgresql://user:password@host:port/dbname`.
|
||||
@@ -22,92 +22,92 @@ The hostname in your connection string depends on how you're running PostgreSQL.
|
||||
- If you're running PostgreSQL in Docker Compose, use the service name, such as `postgres`.
|
||||
- If you're running PostgreSQL in a separate Docker container with `docker run`, use the container's IP address or network alias.
|
||||
|
||||
2. Create a `.env` file for configuring Langflow.
|
||||
2. Create a `.env` file for configuring Hanzoflow.
|
||||
```
|
||||
touch .env
|
||||
```
|
||||
|
||||
3. To set the database URL environment variable, add it to your `.env` file:
|
||||
```text
|
||||
LANGFLOW_DATABASE_URL="postgresql://user:password@localhost:5432/dbname"
|
||||
HANZOFLOW_DATABASE_URL="postgresql://user:password@localhost:5432/dbname"
|
||||
```
|
||||
|
||||
:::tip
|
||||
The Langflow project includes a [`.env.example`](https://github.com/langflow-ai/langflow/blob/main/.env.example) file to help you get started.
|
||||
The Hanzoflow project includes a [`.env.example`](https://github.com/hanzoflow-ai/hanzoflow/blob/main/.env.example) file to help you get started.
|
||||
You can copy the contents of this file into your own `.env` file and replace the example values with your own preferred settings.
|
||||
Replace the value for `LANGFLOW_DATABASE_URL` with your PostgreSQL connection string.
|
||||
Replace the value for `HANZOFLOW_DATABASE_URL` with your PostgreSQL connection string.
|
||||
:::
|
||||
|
||||
4. Run Langflow with the `.env` file:
|
||||
4. Run Hanzoflow with the `.env` file:
|
||||
```bash
|
||||
uv run langflow run --env-file .env
|
||||
uv run hanzoflow run --env-file .env
|
||||
```
|
||||
|
||||
5. In Langflow, create traffic by running a flow.
|
||||
5. In Hanzoflow, create traffic by running a flow.
|
||||
6. Inspect your PostgreSQL deployment's tables and activity.
|
||||
New tables and traffic are created.
|
||||
|
||||
## Example Langflow and PostgreSQL docker-compose.yml
|
||||
## Example Hanzoflow and PostgreSQL docker-compose.yml
|
||||
|
||||
The Langflow project includes a [docker-compose.yml](https://github.com/langflow-ai/langflow/blob/main/docker_example/docker-compose.yml) file for quick deployment with PostgreSQL.
|
||||
The Hanzoflow project includes a [docker-compose.yml](https://github.com/hanzoflow-ai/hanzoflow/blob/main/docker_example/docker-compose.yml) file for quick deployment with PostgreSQL.
|
||||
|
||||
This configuration launches Langflow and PostgreSQL containers in the same Docker network, ensuring proper connectivity between services. It also sets up persistent volumes for both Langflow and PostgreSQL data.
|
||||
This configuration launches Hanzoflow and PostgreSQL containers in the same Docker network, ensuring proper connectivity between services. It also sets up persistent volumes for both Hanzoflow and PostgreSQL data.
|
||||
|
||||
To start the services, navigate to the `/docker_example` directory, and then run `docker-compose up`.
|
||||
|
||||
```yaml
|
||||
services:
|
||||
langflow:
|
||||
image: langflowai/langflow:latest # or another version tag on https://hub.docker.com/r/langflowai/langflow
|
||||
hanzoflow:
|
||||
image: hanzoflowai/hanzoflow:latest # or another version tag on https://hub.docker.com/r/hanzoflowai/hanzoflow
|
||||
pull_policy: always # set to 'always' when using 'latest' image
|
||||
ports:
|
||||
- "7860:7860"
|
||||
depends_on:
|
||||
- postgres
|
||||
environment:
|
||||
- LANGFLOW_DATABASE_URL=postgresql://langflow:langflow@postgres:5432/langflow
|
||||
- HANZOFLOW_DATABASE_URL=postgresql://hanzoflow:hanzoflow@postgres:5432/hanzoflow
|
||||
# This variable defines where the logs, file storage, monitor data, and secret keys are stored.
|
||||
- LANGFLOW_CONFIG_DIR=app/langflow
|
||||
- HANZOFLOW_CONFIG_DIR=app/hanzoflow
|
||||
volumes:
|
||||
- langflow-data:/app/langflow
|
||||
- hanzoflow-data:/app/hanzoflow
|
||||
|
||||
postgres:
|
||||
image: postgres:16
|
||||
environment:
|
||||
POSTGRES_USER: langflow
|
||||
POSTGRES_PASSWORD: langflow
|
||||
POSTGRES_DB: langflow
|
||||
POSTGRES_USER: hanzoflow
|
||||
POSTGRES_PASSWORD: hanzoflow
|
||||
POSTGRES_DB: hanzoflow
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- langflow-postgres:/var/lib/postgresql/data
|
||||
- hanzoflow-postgres:/var/lib/postgresql/data
|
||||
|
||||
volumes:
|
||||
langflow-postgres: # Persistent volume for PostgreSQL data
|
||||
langflow-data: # Persistent volume for Langflow data
|
||||
hanzoflow-postgres: # Persistent volume for PostgreSQL data
|
||||
hanzoflow-data: # Persistent volume for Hanzoflow data
|
||||
```
|
||||
|
||||
:::note
|
||||
Docker Compose creates an isolated network for all services defined in the docker-compose.yml file. This ensures that the services can communicate with each other using their service names as hostnames, for example, `postgres` in the database URL. If you were to run PostgreSQL separately using `docker run`, it would be in a different network and Langflow wouldn't be able to connect to it using the service name.
|
||||
Docker Compose creates an isolated network for all services defined in the docker-compose.yml file. This ensures that the services can communicate with each other using their service names as hostnames, for example, `postgres` in the database URL. If you were to run PostgreSQL separately using `docker run`, it would be in a different network and Hanzoflow wouldn't be able to connect to it using the service name.
|
||||
:::
|
||||
|
||||
## Deploy multiple Langflow instances with a shared database
|
||||
## Deploy multiple Hanzoflow instances with a shared database
|
||||
|
||||
To configure multiple Langflow instances that share the same PostgreSQL database, modify your `docker-compose.yml` file to include multiple Langflow services.
|
||||
To configure multiple Hanzoflow instances that share the same PostgreSQL database, modify your `docker-compose.yml` file to include multiple Hanzoflow services.
|
||||
|
||||
Use environment variables for more centralized configuration management:
|
||||
|
||||
1. Update your `.env` file with values for your PostgreSQL database:
|
||||
```text
|
||||
POSTGRES_USER=langflow
|
||||
POSTGRES_USER=hanzoflow
|
||||
POSTGRES_PASSWORD=your_secure_password
|
||||
POSTGRES_DB=langflow
|
||||
POSTGRES_DB=hanzoflow
|
||||
POSTGRES_HOST=postgres
|
||||
POSTGRES_PORT=5432
|
||||
LANGFLOW_CONFIG_DIR=app/langflow
|
||||
LANGFLOW_PORT_1=7860
|
||||
LANGFLOW_PORT_2=7861
|
||||
LANGFLOW_HOST=0.0.0.0
|
||||
HANZOFLOW_CONFIG_DIR=app/hanzoflow
|
||||
HANZOFLOW_PORT_1=7860
|
||||
HANZOFLOW_PORT_2=7861
|
||||
HANZOFLOW_HOST=0.0.0.0
|
||||
```
|
||||
2. Reference these variables in your `docker-compose.yml`:
|
||||
```yaml
|
||||
@@ -121,60 +121,60 @@ services:
|
||||
ports:
|
||||
- "${POSTGRES_PORT}:5432"
|
||||
volumes:
|
||||
- langflow-postgres:/var/lib/postgresql/data
|
||||
- hanzoflow-postgres:/var/lib/postgresql/data
|
||||
|
||||
langflow-1:
|
||||
image: langflowai/langflow:latest
|
||||
hanzoflow-1:
|
||||
image: hanzoflowai/hanzoflow:latest
|
||||
pull_policy: always
|
||||
ports:
|
||||
- "${LANGFLOW_PORT_1}:7860"
|
||||
- "${HANZOFLOW_PORT_1}:7860"
|
||||
depends_on:
|
||||
- postgres
|
||||
environment:
|
||||
- LANGFLOW_DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
|
||||
- LANGFLOW_CONFIG_DIR=${LANGFLOW_CONFIG_DIR}
|
||||
- LANGFLOW_HOST=${LANGFLOW_HOST}
|
||||
- HANZOFLOW_DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
|
||||
- HANZOFLOW_CONFIG_DIR=${HANZOFLOW_CONFIG_DIR}
|
||||
- HANZOFLOW_HOST=${HANZOFLOW_HOST}
|
||||
- PORT=7860
|
||||
volumes:
|
||||
- langflow-data-1:/app/langflow
|
||||
- hanzoflow-data-1:/app/hanzoflow
|
||||
|
||||
langflow-2:
|
||||
image: langflowai/langflow:latest
|
||||
hanzoflow-2:
|
||||
image: hanzoflowai/hanzoflow:latest
|
||||
pull_policy: always
|
||||
ports:
|
||||
- "${LANGFLOW_PORT_2}:7860"
|
||||
- "${HANZOFLOW_PORT_2}:7860"
|
||||
depends_on:
|
||||
- postgres
|
||||
environment:
|
||||
- LANGFLOW_DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
|
||||
- LANGFLOW_CONFIG_DIR=${LANGFLOW_CONFIG_DIR}
|
||||
- LANGFLOW_HOST=${LANGFLOW_HOST}
|
||||
- HANZOFLOW_DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
|
||||
- HANZOFLOW_CONFIG_DIR=${HANZOFLOW_CONFIG_DIR}
|
||||
- HANZOFLOW_HOST=${HANZOFLOW_HOST}
|
||||
- PORT=7860
|
||||
volumes:
|
||||
- langflow-data-2:/app/langflow
|
||||
- hanzoflow-data-2:/app/hanzoflow
|
||||
|
||||
volumes:
|
||||
langflow-postgres:
|
||||
langflow-data-1:
|
||||
langflow-data-2:
|
||||
hanzoflow-postgres:
|
||||
hanzoflow-data-1:
|
||||
hanzoflow-data-2:
|
||||
```
|
||||
|
||||
3. Deploy the file with `docker-compose up`.
|
||||
You can access the first Langflow instance at `http://localhost:7860`, and the second Langflow instance at `http://localhost:7861`.
|
||||
You can access the first Hanzoflow instance at `http://localhost:7860`, and the second Hanzoflow instance at `http://localhost:7861`.
|
||||
|
||||
4. To confirm both instances are using the same database, run the `docker exec` command to start `psql` in your PostgreSQL container.
|
||||
Your container name may vary.
|
||||
```bash
|
||||
docker exec -it docker-test-postgres-1 psql -U langflow -d langflow
|
||||
docker exec -it docker-test-postgres-1 psql -U hanzoflow -d hanzoflow
|
||||
```
|
||||
|
||||
5. Query the database for active connections:
|
||||
```sql
|
||||
langflow=# SELECT * FROM pg_stat_activity WHERE datname = 'langflow';
|
||||
hanzoflow=# SELECT * FROM pg_stat_activity WHERE datname = 'hanzoflow';
|
||||
```
|
||||
|
||||
6. Examine the query results for multiple connections with different `client_addr` values, for example `172.21.0.3` and `172.21.0.4`.
|
||||
|
||||
Since each Langflow instance runs in its own container on the Docker network, using different incoming IP addresses confirms that both instances are actively connected to the PostgreSQL database.
|
||||
Since each Hanzoflow instance runs in its own container on the Docker network, using different incoming IP addresses confirms that both instances are actively connected to the PostgreSQL database.
|
||||
|
||||
7. To quit psql, type `quit`.
|
||||
@@ -11,11 +11,11 @@ import TabItem from '@theme/TabItem';
|
||||
Global variables let you store and reuse generic input values and credentials across your projects.
|
||||
You can use a global variable in any text input field that displays the <Icon name="Globe" aria-label="Globe" /> **Globe** icon.
|
||||
|
||||
Langflow stores global variables in its internal database, and encrypts the values using a secret key.
|
||||
Hanzoflow stores global variables in its internal database, and encrypts the values using a secret key.
|
||||
|
||||
## Create a global variable {#3543d5ef00eb453aa459b97ba85501e5}
|
||||
|
||||
1. In the Langflow UI, click your profile icon, and then select **Settings**.
|
||||
1. In the Hanzoflow UI, click your profile icon, and then select **Settings**.
|
||||
|
||||
2. Click **Global Variables**.
|
||||
|
||||
@@ -25,11 +25,11 @@ Langflow stores global variables in its internal database, and encrypts the valu
|
||||
|
||||
5. Optional: Select a **Type** for your global variable. The available types are **Generic** (default) and **Credential**.
|
||||
|
||||
No matter which **Type** you select, Langflow still encrypts the **Value** of the global variable.
|
||||
No matter which **Type** you select, Hanzoflow still encrypts the **Value** of the global variable.
|
||||
|
||||
6. Enter the **Value** for your global variable.
|
||||
|
||||
7. Optional: Use the **Apply To Fields** menu to select one or more fields that you want Langflow to automatically apply your global variable to. For example, if you select **OpenAI API Key**, Langflow will automatically apply the variable to any **OpenAI API Key** field.
|
||||
7. Optional: Use the **Apply To Fields** menu to select one or more fields that you want Hanzoflow to automatically apply your global variable to. For example, if you select **OpenAI API Key**, Hanzoflow will automatically apply the variable to any **OpenAI API Key** field.
|
||||
|
||||
8. Click **Save Variable**.
|
||||
|
||||
@@ -42,7 +42,7 @@ In **Settings > Global Variables**, the **Value** column shows the encrypted has
|
||||
|
||||
## Edit a global variable
|
||||
|
||||
1. In the Langflow UI, click your profile icon, and then select **Settings**.
|
||||
1. In the Hanzoflow UI, click your profile icon, and then select **Settings**.
|
||||
|
||||
2. Click **Global Variables**.
|
||||
|
||||
@@ -58,7 +58,7 @@ In **Settings > Global Variables**, the **Value** column shows the encrypted has
|
||||
Deleting a global variable permanently deletes any references to it from your existing projects.
|
||||
:::
|
||||
|
||||
1. In the Langflow UI, click your profile icon, and then select **Settings**.
|
||||
1. In the Hanzoflow UI, click your profile icon, and then select **Settings**.
|
||||
|
||||
2. Click **Global Variables**.
|
||||
|
||||
@@ -72,42 +72,42 @@ The global variable, and any existing references to it, are deleted.
|
||||
|
||||
### Custom environment variables
|
||||
|
||||
You can use the `LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` environment variable to source global variables from your runtime environment.
|
||||
You can use the `HANZOFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` environment variable to source global variables from your runtime environment.
|
||||
|
||||
<Tabs>
|
||||
|
||||
<TabItem value="local" label="Local" default>
|
||||
|
||||
If you installed Langflow locally, you must define the `LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` environment variable in a `.env` file.
|
||||
If you installed Hanzoflow locally, you must define the `HANZOFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` environment variable in a `.env` file.
|
||||
|
||||
1. Create a `.env` file and open it in your preferred editor.
|
||||
|
||||
2. Add the `LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` environment variable as follows:
|
||||
2. Add the `HANZOFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` environment variable as follows:
|
||||
|
||||
```plaintext title=".env"
|
||||
LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT=VARIABLE1,VARIABLE2
|
||||
HANZOFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT=VARIABLE1,VARIABLE2
|
||||
```
|
||||
|
||||
Replace `VARIABLE1,VARIABLE2` with a comma-separated list (no spaces) of variables that you want Langflow to source from the environment.
|
||||
Replace `VARIABLE1,VARIABLE2` with a comma-separated list (no spaces) of variables that you want Hanzoflow to source from the environment.
|
||||
For example, `my_key,some_string`.
|
||||
|
||||
3. Save and close the file.
|
||||
|
||||
4. Start Langflow with the `.env` file:
|
||||
4. Start Hanzoflow with the `.env` file:
|
||||
|
||||
```bash
|
||||
VARIABLE1="VALUE1" VARIABLE2="VALUE2" python -m langflow run --env-file .env
|
||||
VARIABLE1="VALUE1" VARIABLE2="VALUE2" python -m hanzoflow run --env-file .env
|
||||
```
|
||||
|
||||
:::note
|
||||
In this example, the environment variables (`VARIABLE1="VALUE1"` and `VARIABLE2="VALUE2"`) are prefixed to the startup command.
|
||||
This is a rudimentary method for exposing environment variables to Python on the command line, and is meant for illustrative purposes.
|
||||
Make sure to expose your environment variables to Langflow in a manner that best suits your own environment.
|
||||
Make sure to expose your environment variables to Hanzoflow in a manner that best suits your own environment.
|
||||
:::
|
||||
|
||||
5. Confirm that Langflow successfully sourced the global variables from the environment.
|
||||
5. Confirm that Hanzoflow successfully sourced the global variables from the environment.
|
||||
|
||||
1. In the Langflow UI, click your profile icon, and then select **Settings**.
|
||||
1. In the Hanzoflow UI, click your profile icon, and then select **Settings**.
|
||||
|
||||
2. Click **Global Variables**.
|
||||
|
||||
@@ -117,20 +117,20 @@ If you installed Langflow locally, you must define the `LANGFLOW_VARIABLES_TO_GE
|
||||
|
||||
<TabItem value="docker" label="Docker">
|
||||
|
||||
If you're using Docker, you can pass `LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` directly from the command line or from a `.env` file.
|
||||
If you're using Docker, you can pass `HANZOFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` directly from the command line or from a `.env` file.
|
||||
|
||||
To pass `LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` directly from the command line:
|
||||
To pass `HANZOFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` directly from the command line:
|
||||
|
||||
```bash
|
||||
docker run -it --rm \
|
||||
-p 7860:7860 \
|
||||
-e LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT="VARIABLE1,VARIABLE2" \
|
||||
-e HANZOFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT="VARIABLE1,VARIABLE2" \
|
||||
-e VARIABLE1="VALUE1" \
|
||||
-e VARIABLE2="VALUE2" \
|
||||
langflowai/langflow:latest
|
||||
hanzoflowai/hanzoflow:latest
|
||||
```
|
||||
|
||||
To pass `LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` from a `.env` file:
|
||||
To pass `HANZOFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` from a `.env` file:
|
||||
|
||||
```bash
|
||||
docker run -it --rm \
|
||||
@@ -138,7 +138,7 @@ docker run -it --rm \
|
||||
--env-file .env \
|
||||
-e VARIABLE1="VALUE1" \
|
||||
-e VARIABLE2="VALUE2" \
|
||||
langflowai/langflow:latest
|
||||
hanzoflowai/hanzoflow:latest
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
@@ -149,23 +149,23 @@ docker run -it --rm \
|
||||
When adding global variables from the environment, the following limitations apply:
|
||||
|
||||
- You can only source the **Name** and **Value** from the environment.
|
||||
To add additional parameters, such as the **Apply To Fields** parameter, you must edit the global variables in the Langflow UI.
|
||||
To add additional parameters, such as the **Apply To Fields** parameter, you must edit the global variables in the Hanzoflow UI.
|
||||
|
||||
- Global variables that you add from the environment always have the **Credential** type.
|
||||
:::
|
||||
|
||||
:::tip
|
||||
If you want to explicitly prevent Langflow from sourcing global variables from the environment, set `LANGFLOW_STORE_ENVIRONMENT_VARIABLES` to `false` in your `.env` file:
|
||||
If you want to explicitly prevent Hanzoflow from sourcing global variables from the environment, set `HANZOFLOW_STORE_ENVIRONMENT_VARIABLES` to `false` in your `.env` file:
|
||||
|
||||
```plaintext title=".env"
|
||||
LANGFLOW_STORE_ENVIRONMENT_VARIABLES=false
|
||||
HANZOFLOW_STORE_ENVIRONMENT_VARIABLES=false
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
### Default environment variables
|
||||
|
||||
Langflow automatically detects and converts some environment variables into global variables of the type **Credential**, which are applied to the specific fields in components that require them. Currently, the following variables are supported:
|
||||
Hanzoflow automatically detects and converts some environment variables into global variables of the type **Credential**, which are applied to the specific fields in components that require them. Currently, the following variables are supported:
|
||||
|
||||
- `OPENAI_API_KEY`
|
||||
- `ANTHROPIC_API_KEY`
|
||||
|
||||
@@ -3,16 +3,16 @@ title: Security best practices
|
||||
slug: /configuration-security-best-practices
|
||||
---
|
||||
|
||||
This guide outlines security best practices for deploying and managing Langflow.
|
||||
This guide outlines security best practices for deploying and managing Hanzoflow.
|
||||
|
||||
## Secret key protection
|
||||
|
||||
The secret key is critical for encrypting sensitive data in Langflow. Follow these guidelines:
|
||||
The secret key is critical for encrypting sensitive data in Hanzoflow. Follow these guidelines:
|
||||
|
||||
- Always use a custom secret key in production:
|
||||
|
||||
```bash
|
||||
LANGFLOW_SECRET_KEY=your-secure-secret-key
|
||||
HANZOFLOW_SECRET_KEY=your-secure-secret-key
|
||||
```
|
||||
|
||||
- Store the secret key securely:
|
||||
@@ -22,9 +22,9 @@ The secret key is critical for encrypting sensitive data in Langflow. Follow the
|
||||
- Regularly rotate the secret key.
|
||||
|
||||
- Use the default secret key locations:
|
||||
- macOS: `~/Library/Caches/langflow/secret_key`
|
||||
- Linux: `~/.cache/langflow/secret_key`
|
||||
- Windows: `%USERPROFILE%\AppData\Local\langflow\secret_key`
|
||||
- macOS: `~/Library/Caches/hanzoflow/secret_key`
|
||||
- Linux: `~/.cache/hanzoflow/secret_key`
|
||||
- Windows: `%USERPROFILE%\AppData\Local\hanzoflow\secret_key`
|
||||
|
||||
## API keys and credentials
|
||||
|
||||
@@ -38,10 +38,10 @@ The secret key is critical for encrypting sensitive data in Langflow. Follow the
|
||||
- Store the database in a secure location:
|
||||
|
||||
```bash
|
||||
LANGFLOW_SAVE_DB_IN_CONFIG_DIR=true
|
||||
LANGFLOW_CONFIG_DIR=/secure/path/to/config
|
||||
HANZOFLOW_SAVE_DB_IN_CONFIG_DIR=true
|
||||
HANZOFLOW_CONFIG_DIR=/secure/path/to/config
|
||||
```
|
||||
|
||||
- Use the default database locations:
|
||||
- macOS/Linux: `PYTHON_LOCATION/site-packages/langflow/langflow.db`
|
||||
- Windows: `PYTHON_LOCATION\Lib\site-packages\langflow\langflow.db`
|
||||
- macOS/Linux: `PYTHON_LOCATION/site-packages/hanzoflow/hanzoflow.db`
|
||||
- Windows: `PYTHON_LOCATION\Lib\site-packages\hanzoflow\hanzoflow.db`
|
||||
|
||||
@@ -8,14 +8,14 @@ import TabItem from '@theme/TabItem';
|
||||
import Link from '@docusaurus/Link';
|
||||
|
||||
|
||||
Langflow lets you configure a number of settings using environment variables.
|
||||
Hanzoflow lets you configure a number of settings using environment variables.
|
||||
|
||||
## Configure environment variables
|
||||
|
||||
Langflow recognizes [supported environment variables](#supported-variables) from the following sources:
|
||||
Hanzoflow recognizes [supported environment variables](#supported-variables) from the following sources:
|
||||
|
||||
- Environment variables that you've set in your terminal.
|
||||
- Environment variables that you've imported from a `.env` file using the `--env-file` option in the Langflow CLI.
|
||||
- Environment variables that you've imported from a `.env` file using the `--env-file` option in the Hanzoflow CLI.
|
||||
|
||||
You can choose to use one source exclusively, or use both sources together.
|
||||
If you choose to use both sources together, be aware that environment variables imported from a `.env` file take [precedence](#precedence) over those set in your terminal.
|
||||
@@ -43,13 +43,13 @@ set VARIABLE_NAME='VALUE'
|
||||
docker run -it --rm \
|
||||
-p 7860:7860 \
|
||||
-e VARIABLE_NAME='VALUE' \
|
||||
langflowai/langflow:latest
|
||||
hanzoflowai/hanzoflow:latest
|
||||
```
|
||||
</TabItem>
|
||||
|
||||
</Tabs>
|
||||
|
||||
When you start Langflow, it looks for environment variables that you've set in your terminal.
|
||||
When you start Hanzoflow, it looks for environment variables that you've set in your terminal.
|
||||
If it detects a supported environment variable, then it automatically adopts the specified value, subject to [precedence rules](#precedence).
|
||||
|
||||
### Import environment variables from a .env file {#configure-variables-env-file}
|
||||
@@ -64,19 +64,19 @@ If it detects a supported environment variable, then it automatically adopts the
|
||||
```
|
||||
|
||||
:::tip
|
||||
The Langflow project includes a [`.env.example`](https://github.com/langflow-ai/langflow/blob/main/.env.example) file to help you get started.
|
||||
The Hanzoflow project includes a [`.env.example`](https://github.com/hanzoflow-ai/hanzoflow/blob/main/.env.example) file to help you get started.
|
||||
You can copy the contents of this file into your own `.env` file and replace the example values with your own preferred settings.
|
||||
:::
|
||||
|
||||
3. Save and close the file.
|
||||
|
||||
4. Start Langflow using the `--env-file` option to define the path to your `.env` file:
|
||||
4. Start Hanzoflow using the `--env-file` option to define the path to your `.env` file:
|
||||
|
||||
<Tabs>
|
||||
|
||||
<TabItem value="local" label="Local" default>
|
||||
```bash
|
||||
python -m langflow run --env-file .env
|
||||
python -m hanzoflow run --env-file .env
|
||||
```
|
||||
</TabItem>
|
||||
|
||||
@@ -85,78 +85,78 @@ If it detects a supported environment variable, then it automatically adopts the
|
||||
docker run -it --rm \
|
||||
-p 7860:7860 \
|
||||
--env-file .env \
|
||||
langflowai/langflow:latest
|
||||
hanzoflowai/hanzoflow:latest
|
||||
```
|
||||
</TabItem>
|
||||
|
||||
</Tabs>
|
||||
|
||||
On startup, Langflow imports the environment variables from your `.env` file, as well as any that you [set in your terminal](#configure-variables-terminal), and adopts their specified values.
|
||||
On startup, Hanzoflow imports the environment variables from your `.env` file, as well as any that you [set in your terminal](#configure-variables-terminal), and adopts their specified values.
|
||||
|
||||
## Precedence {#precedence}
|
||||
|
||||
Environment variables [defined in the .env file](#configure-variables-env-file) take precedence over those [set in your terminal](#configure-variables-terminal).
|
||||
That means, if you happen to set the same environment variable in both your terminal and your `.env` file, Langflow adopts the value from the the `.env` file.
|
||||
That means, if you happen to set the same environment variable in both your terminal and your `.env` file, Hanzoflow adopts the value from the the `.env` file.
|
||||
|
||||
:::info[CLI precedence]
|
||||
[Langflow CLI options](./configuration-cli.md) override the value of corresponding environment variables defined in the `.env` file as well as any environment variables set in your terminal.
|
||||
[Hanzoflow CLI options](./configuration-cli.md) override the value of corresponding environment variables defined in the `.env` file as well as any environment variables set in your terminal.
|
||||
:::
|
||||
|
||||
## Supported environment variables {#supported-variables}
|
||||
|
||||
The following table lists the environment variables supported by Langflow.
|
||||
The following table lists the environment variables supported by Hanzoflow.
|
||||
|
||||
| Variable | Format / Values | Default | Description |
|
||||
|----------|---------------|---------|-------------|
|
||||
| <Link id="DO_NOT_TRACK"/>`DO_NOT_TRACK` | Boolean | `false` | If enabled, Langflow will not track telemetry. |
|
||||
| <Link id="LANGFLOW_AUTO_LOGIN"/>`LANGFLOW_AUTO_LOGIN` | Boolean | `true` | Enable automatic login for Langflow. Set to `false` to disable automatic login and require the login form to log into the Langflow UI. Setting to `false` requires [`LANGFLOW_SUPERUSER`](#LANGFLOW_SUPERUSER) and [`LANGFLOW_SUPERUSER_PASSWORD`](environment-variables.md#LANGFLOW_SUPERUSER_PASSWORD) to be set. |
|
||||
| <Link id="LANGFLOW_AUTO_SAVING"/>`LANGFLOW_AUTO_SAVING` | Boolean | `true` | Enable flow auto-saving.<br/>See [`--auto-saving` option](./configuration-cli.md#run-auto-saving). |
|
||||
| <Link id="LANGFLOW_AUTO_SAVING_INTERVAL"/>`LANGFLOW_AUTO_SAVING_INTERVAL` | Integer | `1000` | Set the interval for flow auto-saving in milliseconds.<br/>See [`--auto-saving-interval` option](./configuration-cli.md#run-auto-saving-interval). |
|
||||
| <Link id="LANGFLOW_BACKEND_ONLY"/>`LANGFLOW_BACKEND_ONLY` | Boolean | `false` | Only run Langflow's backend server (no frontend).<br/>See [`--backend-only` option](./configuration-cli.md#run-backend-only). |
|
||||
| <Link id="LANGFLOW_CACHE_TYPE"/>`LANGFLOW_CACHE_TYPE` | `async`<br/>`redis`<br/>`memory`<br/>`disk`<br/>`critical` | `async` | Set the cache type for Langflow.<br/>If you set the type to `redis`, then you must also set the following environment variables: [`LANGFLOW_REDIS_HOST`](#LANGFLOW_REDIS_HOST), [`LANGFLOW_REDIS_PORT`](#LANGFLOW_REDIS_PORT), [`LANGFLOW_REDIS_DB`](#LANGFLOW_REDIS_DB), and [`LANGFLOW_REDIS_CACHE_EXPIRE`](#LANGFLOW_REDIS_CACHE_EXPIRE). |
|
||||
| <Link id="LANGFLOW_COMPONENTS_PATH"/>`LANGFLOW_COMPONENTS_PATH` | String | `langflow/components` | Path to the directory containing custom components.<br/>See [`--components-path` option](./configuration-cli.md#run-components-path). |
|
||||
| <Link id="LANGFLOW_CONFIG_DIR"/>`LANGFLOW_CONFIG_DIR` | String | **Linux/WSL**: `~/.cache/langflow/`<br/>**macOS**: `/Users/<username>/Library/Caches/langflow/`<br/>**Windows**: `%LOCALAPPDATA%\langflow\langflow\Cache` | Set the Langflow configuration directory where files, logs, and the Langflow database are stored. |
|
||||
| <Link id="LANGFLOW_DATABASE_URL"/>`LANGFLOW_DATABASE_URL` | String | Not set | Set the database URL for Langflow. If not provided, Langflow will use a SQLite database. |
|
||||
| <Link id="LANGFLOW_DATABASE_CONNECTION_RETRY"/>`LANGFLOW_DATABASE_CONNECTION_RETRY` | Boolean | `false` | If True, Langflow will retry to connect to the database if it fails. |
|
||||
| <Link id="LANGFLOW_DB_POOL_SIZE"/>`LANGFLOW_DB_POOL_SIZE` | Integer | `10` | **DEPRECATED:** Use `LANGFLOW_DB_CONNECTION_SETTINGS` instead. The number of connections to keep open in the connection pool. |
|
||||
| <Link id="LANGFLOW_DB_MAX_OVERFLOW"/>`LANGFLOW_DB_MAX_OVERFLOW` | Integer | `20` | **DEPRECATED:** Use `LANGFLOW_DB_CONNECTION_SETTINGS` instead. The number of connections to allow that can be opened beyond the pool size. |
|
||||
| <Link id="LANGFLOW_DB_CONNECT_TIMEOUT"/>`LANGFLOW_DB_CONNECT_TIMEOUT` | Integer | `20` | The number of seconds to wait before giving up on a lock to be released or establishing a connection to the database. |
|
||||
| <Link id="LANGFLOW_DB_CONNECTION_SETTINGS"/>`LANGFLOW_DB_CONNECTION_SETTINGS` | JSON | Not set | A JSON dictionary to centralize database connection parameters. Example: `{"pool_size": 10, "max_overflow": 20}` |
|
||||
| <Link id="LANGFLOW_DEV"/>`LANGFLOW_DEV` | Boolean | `false` | Run Langflow in development mode (may contain bugs).<br/>See [`--dev` option](./configuration-cli.md#run-dev). |
|
||||
| <Link id="LANGFLOW_FALLBACK_TO_ENV_VAR"/>`LANGFLOW_FALLBACK_TO_ENV_VAR` | Boolean | `true` | If enabled, [global variables](../Configuration/configuration-global-variables.md) set in the Langflow UI fall back to an environment variable with the same name when Langflow fails to retrieve the variable value. |
|
||||
| <Link id="LANGFLOW_FRONTEND_PATH"/>`LANGFLOW_FRONTEND_PATH` | String | `./frontend` | Path to the frontend directory containing build files. This is for development purposes only.<br/>See [`--frontend-path` option](./configuration-cli.md#run-frontend-path). |
|
||||
| <Link id="LANGFLOW_HEALTH_CHECK_MAX_RETRIES"/>`LANGFLOW_HEALTH_CHECK_MAX_RETRIES` | Integer | `5` | Set the maximum number of retries for the health check.<br/>See [`--health-check-max-retries` option](./configuration-cli.md#run-health-check-max-retries). |
|
||||
| <Link id="LANGFLOW_HOST"/>`LANGFLOW_HOST` | String | `127.0.0.1` | The host on which the Langflow server will run.<br/>See [`--host` option](./configuration-cli.md#run-host). |
|
||||
| <Link id="LANGFLOW_LANGCHAIN_CACHE"/>`LANGFLOW_LANGCHAIN_CACHE` | `InMemoryCache`<br/>`SQLiteCache` | `InMemoryCache` | Type of cache to use.<br/>See [`--cache` option](./configuration-cli.md#run-cache). |
|
||||
| <Link id="LANGFLOW_LOG_LEVEL"/>`LANGFLOW_LOG_LEVEL` | `DEBUG`<br/>`INFO`<br/>`WARNING`<br/>`ERROR`<br/>`CRITICAL` | `INFO` | Set the logging level for Langflow. |
|
||||
| <Link id="LANGFLOW_LOG_FILE"/>`LANGFLOW_LOG_FILE` | String | Not set | Path to the log file. If not set, logs will be written to stdout. |
|
||||
| <Link id="LANGFLOW_MAX_FILE_SIZE_UPLOAD"/>`LANGFLOW_MAX_FILE_SIZE_UPLOAD` | Integer | `100` | Set the maximum file size for the upload in megabytes.<br/>See [`--max-file-size-upload` option](./configuration-cli.md#run-max-file-size-upload). |
|
||||
| <Link id="LANGFLOW_MCP_SERVER_ENABLED"/>`LANGFLOW_MCP_SERVER_ENABLED` | Boolean | `true` | If set to False, Langflow will not enable the MCP server. |
|
||||
| <Link id="LANGFLOW_MCP_SERVER_ENABLE_PROGRESS_NOTIFICATIONS"/>`LANGFLOW_MCP_SERVER_ENABLE_PROGRESS_NOTIFICATIONS` | Boolean | `false` | If set to True, Langflow will send progress notifications in the MCP server. |
|
||||
| <Link id="LANGFLOW_NEW_USER_IS_ACTIVE"/>`LANGFLOW_NEW_USER_IS_ACTIVE` | Boolean | `false` | When enabled, new users are automatically activated and can log in without requiring explicit activation by the superuser. |
|
||||
| <Link id="LANGFLOW_OPEN_BROWSER"/>`LANGFLOW_OPEN_BROWSER` | Boolean | `false` | Open the system web browser on startup.<br/>See [`--open-browser` option](./configuration-cli.md#run-open-browser). |
|
||||
| <Link id="LANGFLOW_PORT"/>`LANGFLOW_PORT` | Integer | `7860` | The port on which the Langflow server will run. The server automatically selects a free port if the specified port is in use.<br/>See [`--port` option](./configuration-cli.md#run-port). |
|
||||
| <Link id="LANGFLOW_PROMETHEUS_ENABLED"/>`LANGFLOW_PROMETHEUS_ENABLED` | Boolean | `false` | Expose Prometheus metrics. |
|
||||
| <Link id="LANGFLOW_PROMETHEUS_PORT"/>`LANGFLOW_PROMETHEUS_PORT` | Integer | `9090` | Set the port on which Langflow exposes Prometheus metrics. |
|
||||
| <Link id="LANGFLOW_REDIS_CACHE_EXPIRE"/>`LANGFLOW_REDIS_CACHE_EXPIRE` | Integer | `3600` | See [`LANGFLOW_CACHE_TYPE`](#LANGFLOW_CACHE_TYPE). |
|
||||
| <Link id="LANGFLOW_REDIS_DB"/>`LANGFLOW_REDIS_DB` | Integer | `0` | See [`LANGFLOW_CACHE_TYPE`](#LANGFLOW_CACHE_TYPE). |
|
||||
| <Link id="LANGFLOW_REDIS_HOST"/>`LANGFLOW_REDIS_HOST` | String | `localhost` | See [`LANGFLOW_CACHE_TYPE`](#LANGFLOW_CACHE_TYPE). |
|
||||
| <Link id="LANGFLOW_REDIS_PORT"/>`LANGFLOW_REDIS_PORT` | String | `6379` | See [`LANGFLOW_CACHE_TYPE`](#LANGFLOW_CACHE_TYPE). |
|
||||
| <Link id="LANGFLOW_REMOVE_API_KEYS"/>`LANGFLOW_REMOVE_API_KEYS` | Boolean | `false` | Remove API keys from the projects saved in the database.<br/>See [`--remove-api-keys` option](./configuration-cli.md#run-remove-api-keys). |
|
||||
| <Link id="LANGFLOW_SAVE_DB_IN_CONFIG_DIR"/>`LANGFLOW_SAVE_DB_IN_CONFIG_DIR` | Boolean | `false` | Save the Langflow database in [`LANGFLOW_CONFIG_DIR`](#LANGFLOW_CONFIG_DIR) instead of in the Langflow package directory. Note, when this variable is set to default (`false`), the database isn't shared between different virtual environments and the database is deleted when you uninstall Langflow. |
|
||||
| <Link id="LANGFLOW_SECRET_KEY"/>`LANGFLOW_SECRET_KEY` | String | Auto-generated | Key used for encrypting sensitive data like API keys. If not provided, a secure key will be auto-generated. For production environments with multiple instances, you should explicitly set this to ensure consistent encryption across instances. |
|
||||
| <Link id="LANGFLOW_STORE"/>`LANGFLOW_STORE` | Boolean | `true` | Enable the Langflow Store.<br/>See [`--store` option](./configuration-cli.md#run-store). |
|
||||
| <Link id="LANGFLOW_STORE_ENVIRONMENT_VARIABLES"/>`LANGFLOW_STORE_ENVIRONMENT_VARIABLES` | Boolean | `true` | Store environment variables as [global variables](../Configuration/configuration-global-variables.md) in the database. |
|
||||
| <Link id="LANGFLOW_SUPERUSER"/>`LANGFLOW_SUPERUSER` | String | `langflow` | Set the name for the superuser. Required if [`LANGFLOW_AUTO_LOGIN`](#LANGFLOW_AUTO_LOGIN) is set to `false`.<br/>See [`superuser --username` option](./configuration-cli.md#superuser-username). |
|
||||
| <Link id="LANGFLOW_SUPERUSER_PASSWORD"/>`LANGFLOW_SUPERUSER_PASSWORD` | String | `langflow` | Set the password for the superuser. Required if [`LANGFLOW_AUTO_LOGIN`](#LANGFLOW_AUTO_LOGIN) is set to `false`.<br/>See [`superuser --password` option](./configuration-cli.md#superuser-password). |
|
||||
| <Link id="LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT"/>`LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` | String | Not set | Comma-separated list of environment variables to get from the environment and store as [global variables](../Configuration/configuration-global-variables.md). |
|
||||
| <Link id="LANGFLOW_LOAD_FLOWS_PATH"/>`LANGFLOW_LOAD_FLOWS_PATH` | String | Not set | Path to a directory containing flow JSON files to be loaded on startup. Note that this feature only works if `LANGFLOW_AUTO_LOGIN` is enabled. |
|
||||
| <Link id="LANGFLOW_WORKER_TIMEOUT"/>`LANGFLOW_WORKER_TIMEOUT` | Integer | `300` | Worker timeout in seconds.<br/>See [`--worker-timeout` option](./configuration-cli.md#run-worker-timeout). |
|
||||
| <Link id="LANGFLOW_WORKERS"/>`LANGFLOW_WORKERS` | Integer | `1` | Number of worker processes.<br/>See [`--workers` option](./configuration-cli.md#run-workers). |
|
||||
| <Link id="DO_NOT_TRACK"/>`DO_NOT_TRACK` | Boolean | `false` | If enabled, Hanzoflow will not track telemetry. |
|
||||
| <Link id="HANZOFLOW_AUTO_LOGIN"/>`HANZOFLOW_AUTO_LOGIN` | Boolean | `true` | Enable automatic login for Hanzoflow. Set to `false` to disable automatic login and require the login form to log into the Hanzoflow UI. Setting to `false` requires [`HANZOFLOW_SUPERUSER`](#HANZOFLOW_SUPERUSER) and [`HANZOFLOW_SUPERUSER_PASSWORD`](environment-variables.md#HANZOFLOW_SUPERUSER_PASSWORD) to be set. |
|
||||
| <Link id="HANZOFLOW_AUTO_SAVING"/>`HANZOFLOW_AUTO_SAVING` | Boolean | `true` | Enable flow auto-saving.<br/>See [`--auto-saving` option](./configuration-cli.md#run-auto-saving). |
|
||||
| <Link id="HANZOFLOW_AUTO_SAVING_INTERVAL"/>`HANZOFLOW_AUTO_SAVING_INTERVAL` | Integer | `1000` | Set the interval for flow auto-saving in milliseconds.<br/>See [`--auto-saving-interval` option](./configuration-cli.md#run-auto-saving-interval). |
|
||||
| <Link id="HANZOFLOW_BACKEND_ONLY"/>`HANZOFLOW_BACKEND_ONLY` | Boolean | `false` | Only run Hanzoflow's backend server (no frontend).<br/>See [`--backend-only` option](./configuration-cli.md#run-backend-only). |
|
||||
| <Link id="HANZOFLOW_CACHE_TYPE"/>`HANZOFLOW_CACHE_TYPE` | `async`<br/>`redis`<br/>`memory`<br/>`disk`<br/>`critical` | `async` | Set the cache type for Hanzoflow.<br/>If you set the type to `redis`, then you must also set the following environment variables: [`HANZOFLOW_REDIS_HOST`](#HANZOFLOW_REDIS_HOST), [`HANZOFLOW_REDIS_PORT`](#HANZOFLOW_REDIS_PORT), [`HANZOFLOW_REDIS_DB`](#HANZOFLOW_REDIS_DB), and [`HANZOFLOW_REDIS_CACHE_EXPIRE`](#HANZOFLOW_REDIS_CACHE_EXPIRE). |
|
||||
| <Link id="HANZOFLOW_COMPONENTS_PATH"/>`HANZOFLOW_COMPONENTS_PATH` | String | `hanzoflow/components` | Path to the directory containing custom components.<br/>See [`--components-path` option](./configuration-cli.md#run-components-path). |
|
||||
| <Link id="HANZOFLOW_CONFIG_DIR"/>`HANZOFLOW_CONFIG_DIR` | String | **Linux/WSL**: `~/.cache/hanzoflow/`<br/>**macOS**: `/Users/<username>/Library/Caches/hanzoflow/`<br/>**Windows**: `%LOCALAPPDATA%\hanzoflow\hanzoflow\Cache` | Set the Hanzoflow configuration directory where files, logs, and the Hanzoflow database are stored. |
|
||||
| <Link id="HANZOFLOW_DATABASE_URL"/>`HANZOFLOW_DATABASE_URL` | String | Not set | Set the database URL for Hanzoflow. If not provided, Hanzoflow will use a SQLite database. |
|
||||
| <Link id="HANZOFLOW_DATABASE_CONNECTION_RETRY"/>`HANZOFLOW_DATABASE_CONNECTION_RETRY` | Boolean | `false` | If True, Hanzoflow will retry to connect to the database if it fails. |
|
||||
| <Link id="HANZOFLOW_DB_POOL_SIZE"/>`HANZOFLOW_DB_POOL_SIZE` | Integer | `10` | **DEPRECATED:** Use `HANZOFLOW_DB_CONNECTION_SETTINGS` instead. The number of connections to keep open in the connection pool. |
|
||||
| <Link id="HANZOFLOW_DB_MAX_OVERFLOW"/>`HANZOFLOW_DB_MAX_OVERFLOW` | Integer | `20` | **DEPRECATED:** Use `HANZOFLOW_DB_CONNECTION_SETTINGS` instead. The number of connections to allow that can be opened beyond the pool size. |
|
||||
| <Link id="HANZOFLOW_DB_CONNECT_TIMEOUT"/>`HANZOFLOW_DB_CONNECT_TIMEOUT` | Integer | `20` | The number of seconds to wait before giving up on a lock to be released or establishing a connection to the database. |
|
||||
| <Link id="HANZOFLOW_DB_CONNECTION_SETTINGS"/>`HANZOFLOW_DB_CONNECTION_SETTINGS` | JSON | Not set | A JSON dictionary to centralize database connection parameters. Example: `{"pool_size": 10, "max_overflow": 20}` |
|
||||
| <Link id="HANZOFLOW_DEV"/>`HANZOFLOW_DEV` | Boolean | `false` | Run Hanzoflow in development mode (may contain bugs).<br/>See [`--dev` option](./configuration-cli.md#run-dev). |
|
||||
| <Link id="HANZOFLOW_FALLBACK_TO_ENV_VAR"/>`HANZOFLOW_FALLBACK_TO_ENV_VAR` | Boolean | `true` | If enabled, [global variables](../Configuration/configuration-global-variables.md) set in the Hanzoflow UI fall back to an environment variable with the same name when Hanzoflow fails to retrieve the variable value. |
|
||||
| <Link id="HANZOFLOW_FRONTEND_PATH"/>`HANZOFLOW_FRONTEND_PATH` | String | `./frontend` | Path to the frontend directory containing build files. This is for development purposes only.<br/>See [`--frontend-path` option](./configuration-cli.md#run-frontend-path). |
|
||||
| <Link id="HANZOFLOW_HEALTH_CHECK_MAX_RETRIES"/>`HANZOFLOW_HEALTH_CHECK_MAX_RETRIES` | Integer | `5` | Set the maximum number of retries for the health check.<br/>See [`--health-check-max-retries` option](./configuration-cli.md#run-health-check-max-retries). |
|
||||
| <Link id="HANZOFLOW_HOST"/>`HANZOFLOW_HOST` | String | `127.0.0.1` | The host on which the Hanzoflow server will run.<br/>See [`--host` option](./configuration-cli.md#run-host). |
|
||||
| <Link id="HANZOFLOW_LANGCHAIN_CACHE"/>`HANZOFLOW_LANGCHAIN_CACHE` | `InMemoryCache`<br/>`SQLiteCache` | `InMemoryCache` | Type of cache to use.<br/>See [`--cache` option](./configuration-cli.md#run-cache). |
|
||||
| <Link id="HANZOFLOW_LOG_LEVEL"/>`HANZOFLOW_LOG_LEVEL` | `DEBUG`<br/>`INFO`<br/>`WARNING`<br/>`ERROR`<br/>`CRITICAL` | `INFO` | Set the logging level for Hanzoflow. |
|
||||
| <Link id="HANZOFLOW_LOG_FILE"/>`HANZOFLOW_LOG_FILE` | String | Not set | Path to the log file. If not set, logs will be written to stdout. |
|
||||
| <Link id="HANZOFLOW_MAX_FILE_SIZE_UPLOAD"/>`HANZOFLOW_MAX_FILE_SIZE_UPLOAD` | Integer | `100` | Set the maximum file size for the upload in megabytes.<br/>See [`--max-file-size-upload` option](./configuration-cli.md#run-max-file-size-upload). |
|
||||
| <Link id="HANZOFLOW_MCP_SERVER_ENABLED"/>`HANZOFLOW_MCP_SERVER_ENABLED` | Boolean | `true` | If set to False, Hanzoflow will not enable the MCP server. |
|
||||
| <Link id="HANZOFLOW_MCP_SERVER_ENABLE_PROGRESS_NOTIFICATIONS"/>`HANZOFLOW_MCP_SERVER_ENABLE_PROGRESS_NOTIFICATIONS` | Boolean | `false` | If set to True, Hanzoflow will send progress notifications in the MCP server. |
|
||||
| <Link id="HANZOFLOW_NEW_USER_IS_ACTIVE"/>`HANZOFLOW_NEW_USER_IS_ACTIVE` | Boolean | `false` | When enabled, new users are automatically activated and can log in without requiring explicit activation by the superuser. |
|
||||
| <Link id="HANZOFLOW_OPEN_BROWSER"/>`HANZOFLOW_OPEN_BROWSER` | Boolean | `false` | Open the system web browser on startup.<br/>See [`--open-browser` option](./configuration-cli.md#run-open-browser). |
|
||||
| <Link id="HANZOFLOW_PORT"/>`HANZOFLOW_PORT` | Integer | `7860` | The port on which the Hanzoflow server will run. The server automatically selects a free port if the specified port is in use.<br/>See [`--port` option](./configuration-cli.md#run-port). |
|
||||
| <Link id="HANZOFLOW_PROMETHEUS_ENABLED"/>`HANZOFLOW_PROMETHEUS_ENABLED` | Boolean | `false` | Expose Prometheus metrics. |
|
||||
| <Link id="HANZOFLOW_PROMETHEUS_PORT"/>`HANZOFLOW_PROMETHEUS_PORT` | Integer | `9090` | Set the port on which Hanzoflow exposes Prometheus metrics. |
|
||||
| <Link id="HANZOFLOW_REDIS_CACHE_EXPIRE"/>`HANZOFLOW_REDIS_CACHE_EXPIRE` | Integer | `3600` | See [`HANZOFLOW_CACHE_TYPE`](#HANZOFLOW_CACHE_TYPE). |
|
||||
| <Link id="HANZOFLOW_REDIS_DB"/>`HANZOFLOW_REDIS_DB` | Integer | `0` | See [`HANZOFLOW_CACHE_TYPE`](#HANZOFLOW_CACHE_TYPE). |
|
||||
| <Link id="HANZOFLOW_REDIS_HOST"/>`HANZOFLOW_REDIS_HOST` | String | `localhost` | See [`HANZOFLOW_CACHE_TYPE`](#HANZOFLOW_CACHE_TYPE). |
|
||||
| <Link id="HANZOFLOW_REDIS_PORT"/>`HANZOFLOW_REDIS_PORT` | String | `6379` | See [`HANZOFLOW_CACHE_TYPE`](#HANZOFLOW_CACHE_TYPE). |
|
||||
| <Link id="HANZOFLOW_REMOVE_API_KEYS"/>`HANZOFLOW_REMOVE_API_KEYS` | Boolean | `false` | Remove API keys from the projects saved in the database.<br/>See [`--remove-api-keys` option](./configuration-cli.md#run-remove-api-keys). |
|
||||
| <Link id="HANZOFLOW_SAVE_DB_IN_CONFIG_DIR"/>`HANZOFLOW_SAVE_DB_IN_CONFIG_DIR` | Boolean | `false` | Save the Hanzoflow database in [`HANZOFLOW_CONFIG_DIR`](#HANZOFLOW_CONFIG_DIR) instead of in the Hanzoflow package directory. Note, when this variable is set to default (`false`), the database isn't shared between different virtual environments and the database is deleted when you uninstall Hanzoflow. |
|
||||
| <Link id="HANZOFLOW_SECRET_KEY"/>`HANZOFLOW_SECRET_KEY` | String | Auto-generated | Key used for encrypting sensitive data like API keys. If not provided, a secure key will be auto-generated. For production environments with multiple instances, you should explicitly set this to ensure consistent encryption across instances. |
|
||||
| <Link id="HANZOFLOW_STORE"/>`HANZOFLOW_STORE` | Boolean | `true` | Enable the Hanzoflow Store.<br/>See [`--store` option](./configuration-cli.md#run-store). |
|
||||
| <Link id="HANZOFLOW_STORE_ENVIRONMENT_VARIABLES"/>`HANZOFLOW_STORE_ENVIRONMENT_VARIABLES` | Boolean | `true` | Store environment variables as [global variables](../Configuration/configuration-global-variables.md) in the database. |
|
||||
| <Link id="HANZOFLOW_SUPERUSER"/>`HANZOFLOW_SUPERUSER` | String | `hanzoflow` | Set the name for the superuser. Required if [`HANZOFLOW_AUTO_LOGIN`](#HANZOFLOW_AUTO_LOGIN) is set to `false`.<br/>See [`superuser --username` option](./configuration-cli.md#superuser-username). |
|
||||
| <Link id="HANZOFLOW_SUPERUSER_PASSWORD"/>`HANZOFLOW_SUPERUSER_PASSWORD` | String | `hanzoflow` | Set the password for the superuser. Required if [`HANZOFLOW_AUTO_LOGIN`](#HANZOFLOW_AUTO_LOGIN) is set to `false`.<br/>See [`superuser --password` option](./configuration-cli.md#superuser-password). |
|
||||
| <Link id="HANZOFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT"/>`HANZOFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` | String | Not set | Comma-separated list of environment variables to get from the environment and store as [global variables](../Configuration/configuration-global-variables.md). |
|
||||
| <Link id="HANZOFLOW_LOAD_FLOWS_PATH"/>`HANZOFLOW_LOAD_FLOWS_PATH` | String | Not set | Path to a directory containing flow JSON files to be loaded on startup. Note that this feature only works if `HANZOFLOW_AUTO_LOGIN` is enabled. |
|
||||
| <Link id="HANZOFLOW_WORKER_TIMEOUT"/>`HANZOFLOW_WORKER_TIMEOUT` | Integer | `300` | Worker timeout in seconds.<br/>See [`--worker-timeout` option](./configuration-cli.md#run-worker-timeout). |
|
||||
| <Link id="HANZOFLOW_WORKERS"/>`HANZOFLOW_WORKERS` | Integer | `1` | Number of worker processes.<br/>See [`--workers` option](./configuration-cli.md#run-workers). |
|
||||
|
||||
## Configure .env, override.conf, and tasks.json files
|
||||
|
||||
The following examples show how to configure Langflow using environment variables in different scenarios.
|
||||
The following examples show how to configure Hanzoflow using environment variables in different scenarios.
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="env" label=".env File" default>
|
||||
@@ -167,32 +167,32 @@ Create or edit a file named `.env` in your project root directory and add your c
|
||||
|
||||
```plaintext title=".env"
|
||||
DO_NOT_TRACK=true
|
||||
LANGFLOW_AUTO_LOGIN=false
|
||||
LANGFLOW_AUTO_SAVING=true
|
||||
LANGFLOW_AUTO_SAVING_INTERVAL=1000
|
||||
LANGFLOW_BACKEND_ONLY=false
|
||||
LANGFLOW_CACHE_TYPE=async
|
||||
LANGFLOW_COMPONENTS_PATH=/path/to/components/
|
||||
LANGFLOW_CONFIG_DIR=/path/to/config/
|
||||
LANGFLOW_DATABASE_URL=postgresql://user:password@localhost:5432/langflow
|
||||
LANGFLOW_DEV=false
|
||||
LANGFLOW_FALLBACK_TO_ENV_VAR=false
|
||||
LANGFLOW_HEALTH_CHECK_MAX_RETRIES=5
|
||||
LANGFLOW_HOST=127.0.0.1
|
||||
LANGFLOW_LANGCHAIN_CACHE=InMemoryCache
|
||||
LANGFLOW_MAX_FILE_SIZE_UPLOAD=10000
|
||||
LANGFLOW_LOG_LEVEL=error
|
||||
LANGFLOW_OPEN_BROWSER=false
|
||||
LANGFLOW_PORT=7860
|
||||
LANGFLOW_REMOVE_API_KEYS=false
|
||||
LANGFLOW_SAVE_DB_IN_CONFIG_DIR=true
|
||||
LANGFLOW_SECRET_KEY=somesecretkey
|
||||
LANGFLOW_STORE=true
|
||||
LANGFLOW_STORE_ENVIRONMENT_VARIABLES=true
|
||||
LANGFLOW_SUPERUSER=adminuser
|
||||
LANGFLOW_SUPERUSER_PASSWORD=adminpass
|
||||
LANGFLOW_WORKER_TIMEOUT=60000
|
||||
LANGFLOW_WORKERS=3
|
||||
HANZOFLOW_AUTO_LOGIN=false
|
||||
HANZOFLOW_AUTO_SAVING=true
|
||||
HANZOFLOW_AUTO_SAVING_INTERVAL=1000
|
||||
HANZOFLOW_BACKEND_ONLY=false
|
||||
HANZOFLOW_CACHE_TYPE=async
|
||||
HANZOFLOW_COMPONENTS_PATH=/path/to/components/
|
||||
HANZOFLOW_CONFIG_DIR=/path/to/config/
|
||||
HANZOFLOW_DATABASE_URL=postgresql://user:password@localhost:5432/hanzoflow
|
||||
HANZOFLOW_DEV=false
|
||||
HANZOFLOW_FALLBACK_TO_ENV_VAR=false
|
||||
HANZOFLOW_HEALTH_CHECK_MAX_RETRIES=5
|
||||
HANZOFLOW_HOST=127.0.0.1
|
||||
HANZOFLOW_LANGCHAIN_CACHE=InMemoryCache
|
||||
HANZOFLOW_MAX_FILE_SIZE_UPLOAD=10000
|
||||
HANZOFLOW_LOG_LEVEL=error
|
||||
HANZOFLOW_OPEN_BROWSER=false
|
||||
HANZOFLOW_PORT=7860
|
||||
HANZOFLOW_REMOVE_API_KEYS=false
|
||||
HANZOFLOW_SAVE_DB_IN_CONFIG_DIR=true
|
||||
HANZOFLOW_SECRET_KEY=somesecretkey
|
||||
HANZOFLOW_STORE=true
|
||||
HANZOFLOW_STORE_ENVIRONMENT_VARIABLES=true
|
||||
HANZOFLOW_SUPERUSER=adminuser
|
||||
HANZOFLOW_SUPERUSER_PASSWORD=adminpass
|
||||
HANZOFLOW_WORKER_TIMEOUT=60000
|
||||
HANZOFLOW_WORKERS=3
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
@@ -205,34 +205,34 @@ To add environment variables, create or edit a service configuration file and ad
|
||||
```ini title="override.conf"
|
||||
[Service]
|
||||
Environment="DO_NOT_TRACK=true"
|
||||
Environment="LANGFLOW_AUTO_LOGIN=false"
|
||||
Environment="LANGFLOW_AUTO_SAVING=true"
|
||||
Environment="LANGFLOW_AUTO_SAVING_INTERVAL=1000"
|
||||
Environment="LANGFLOW_BACKEND_ONLY=false"
|
||||
Environment="LANGFLOW_CACHE_TYPE=async"
|
||||
Environment="LANGFLOW_COMPONENTS_PATH=/path/to/components/"
|
||||
Environment="LANGFLOW_CONFIG_DIR=/path/to/config"
|
||||
Environment="LANGFLOW_DATABASE_URL=postgresql://user:password@localhost:5432/langflow"
|
||||
Environment="LANGFLOW_DEV=false"
|
||||
Environment="LANGFLOW_FALLBACK_TO_ENV_VAR=false"
|
||||
Environment="LANGFLOW_HEALTH_CHECK_MAX_RETRIES=5"
|
||||
Environment="LANGFLOW_HOST=127.0.0.1"
|
||||
Environment="LANGFLOW_LANGCHAIN_CACHE=InMemoryCache"
|
||||
Environment="LANGFLOW_MAX_FILE_SIZE_UPLOAD=10000"
|
||||
Environment="LANGFLOW_LOG_ENV=container_json"
|
||||
Environment="LANGFLOW_LOG_FILE=logs/langflow.log"
|
||||
Environment="LANGFLOW_LOG_LEVEL=error"
|
||||
Environment="LANGFLOW_OPEN_BROWSER=false"
|
||||
Environment="LANGFLOW_PORT=7860"
|
||||
Environment="LANGFLOW_REMOVE_API_KEYS=false"
|
||||
Environment="LANGFLOW_SAVE_DB_IN_CONFIG_DIR=true"
|
||||
Environment="LANGFLOW_SECRET_KEY=somesecretkey"
|
||||
Environment="LANGFLOW_STORE=true"
|
||||
Environment="LANGFLOW_STORE_ENVIRONMENT_VARIABLES=true"
|
||||
Environment="LANGFLOW_SUPERUSER=adminuser"
|
||||
Environment="LANGFLOW_SUPERUSER_PASSWORD=adminpass"
|
||||
Environment="LANGFLOW_WORKER_TIMEOUT=60000"
|
||||
Environment="LANGFLOW_WORKERS=3"
|
||||
Environment="HANZOFLOW_AUTO_LOGIN=false"
|
||||
Environment="HANZOFLOW_AUTO_SAVING=true"
|
||||
Environment="HANZOFLOW_AUTO_SAVING_INTERVAL=1000"
|
||||
Environment="HANZOFLOW_BACKEND_ONLY=false"
|
||||
Environment="HANZOFLOW_CACHE_TYPE=async"
|
||||
Environment="HANZOFLOW_COMPONENTS_PATH=/path/to/components/"
|
||||
Environment="HANZOFLOW_CONFIG_DIR=/path/to/config"
|
||||
Environment="HANZOFLOW_DATABASE_URL=postgresql://user:password@localhost:5432/hanzoflow"
|
||||
Environment="HANZOFLOW_DEV=false"
|
||||
Environment="HANZOFLOW_FALLBACK_TO_ENV_VAR=false"
|
||||
Environment="HANZOFLOW_HEALTH_CHECK_MAX_RETRIES=5"
|
||||
Environment="HANZOFLOW_HOST=127.0.0.1"
|
||||
Environment="HANZOFLOW_LANGCHAIN_CACHE=InMemoryCache"
|
||||
Environment="HANZOFLOW_MAX_FILE_SIZE_UPLOAD=10000"
|
||||
Environment="HANZOFLOW_LOG_ENV=container_json"
|
||||
Environment="HANZOFLOW_LOG_FILE=logs/hanzoflow.log"
|
||||
Environment="HANZOFLOW_LOG_LEVEL=error"
|
||||
Environment="HANZOFLOW_OPEN_BROWSER=false"
|
||||
Environment="HANZOFLOW_PORT=7860"
|
||||
Environment="HANZOFLOW_REMOVE_API_KEYS=false"
|
||||
Environment="HANZOFLOW_SAVE_DB_IN_CONFIG_DIR=true"
|
||||
Environment="HANZOFLOW_SECRET_KEY=somesecretkey"
|
||||
Environment="HANZOFLOW_STORE=true"
|
||||
Environment="HANZOFLOW_STORE_ENVIRONMENT_VARIABLES=true"
|
||||
Environment="HANZOFLOW_SUPERUSER=adminuser"
|
||||
Environment="HANZOFLOW_SUPERUSER_PASSWORD=adminpass"
|
||||
Environment="HANZOFLOW_WORKER_TIMEOUT=60000"
|
||||
Environment="HANZOFLOW_WORKERS=3"
|
||||
```
|
||||
|
||||
For more information on systemd, see the [Red Hat documentation](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/using_systemd_unit_files_to_customize_and_optimize_your_system/assembly_working-with-systemd-unit-files_working-with-systemd#assembly_working-with-systemd-unit-files_working-with-systemd).
|
||||
@@ -250,41 +250,41 @@ Create or edit the `.vscode/tasks.json` file in your project root:
|
||||
"options": {
|
||||
"env": {
|
||||
"DO_NOT_TRACK": "true",
|
||||
"LANGFLOW_AUTO_LOGIN": "false",
|
||||
"LANGFLOW_AUTO_SAVING": "true",
|
||||
"LANGFLOW_AUTO_SAVING_INTERVAL": "1000",
|
||||
"LANGFLOW_BACKEND_ONLY": "false",
|
||||
"LANGFLOW_CACHE_TYPE": "async",
|
||||
"LANGFLOW_COMPONENTS_PATH": "D:/path/to/components/",
|
||||
"LANGFLOW_CONFIG_DIR": "D:/path/to/config/",
|
||||
"LANGFLOW_DATABASE_URL": "postgresql://postgres:password@localhost:5432/langflow",
|
||||
"LANGFLOW_DEV": "false",
|
||||
"LANGFLOW_FALLBACK_TO_ENV_VAR": "false",
|
||||
"LANGFLOW_HEALTH_CHECK_MAX_RETRIES": "5",
|
||||
"LANGFLOW_HOST": "localhost",
|
||||
"LANGFLOW_LANGCHAIN_CACHE": "InMemoryCache",
|
||||
"LANGFLOW_MAX_FILE_SIZE_UPLOAD": "10000",
|
||||
"LANGFLOW_LOG_ENV": "container_csv",
|
||||
"LANGFLOW_LOG_FILE": "langflow.log",
|
||||
"LANGFLOW_LOG_LEVEL": "error",
|
||||
"LANGFLOW_OPEN_BROWSER": "false",
|
||||
"LANGFLOW_PORT": "7860",
|
||||
"LANGFLOW_REMOVE_API_KEYS": "true",
|
||||
"LANGFLOW_SAVE_DB_IN_CONFIG_DIR": "false",
|
||||
"LANGFLOW_SECRET_KEY": "somesecretkey",
|
||||
"LANGFLOW_STORE": "true",
|
||||
"LANGFLOW_STORE_ENVIRONMENT_VARIABLES": "true",
|
||||
"LANGFLOW_SUPERUSER": "adminuser",
|
||||
"LANGFLOW_SUPERUSER_PASSWORD": "adminpass",
|
||||
"LANGFLOW_WORKER_TIMEOUT": "60000",
|
||||
"LANGFLOW_WORKERS": "3"
|
||||
"HANZOFLOW_AUTO_LOGIN": "false",
|
||||
"HANZOFLOW_AUTO_SAVING": "true",
|
||||
"HANZOFLOW_AUTO_SAVING_INTERVAL": "1000",
|
||||
"HANZOFLOW_BACKEND_ONLY": "false",
|
||||
"HANZOFLOW_CACHE_TYPE": "async",
|
||||
"HANZOFLOW_COMPONENTS_PATH": "D:/path/to/components/",
|
||||
"HANZOFLOW_CONFIG_DIR": "D:/path/to/config/",
|
||||
"HANZOFLOW_DATABASE_URL": "postgresql://postgres:password@localhost:5432/hanzoflow",
|
||||
"HANZOFLOW_DEV": "false",
|
||||
"HANZOFLOW_FALLBACK_TO_ENV_VAR": "false",
|
||||
"HANZOFLOW_HEALTH_CHECK_MAX_RETRIES": "5",
|
||||
"HANZOFLOW_HOST": "localhost",
|
||||
"HANZOFLOW_LANGCHAIN_CACHE": "InMemoryCache",
|
||||
"HANZOFLOW_MAX_FILE_SIZE_UPLOAD": "10000",
|
||||
"HANZOFLOW_LOG_ENV": "container_csv",
|
||||
"HANZOFLOW_LOG_FILE": "hanzoflow.log",
|
||||
"HANZOFLOW_LOG_LEVEL": "error",
|
||||
"HANZOFLOW_OPEN_BROWSER": "false",
|
||||
"HANZOFLOW_PORT": "7860",
|
||||
"HANZOFLOW_REMOVE_API_KEYS": "true",
|
||||
"HANZOFLOW_SAVE_DB_IN_CONFIG_DIR": "false",
|
||||
"HANZOFLOW_SECRET_KEY": "somesecretkey",
|
||||
"HANZOFLOW_STORE": "true",
|
||||
"HANZOFLOW_STORE_ENVIRONMENT_VARIABLES": "true",
|
||||
"HANZOFLOW_SUPERUSER": "adminuser",
|
||||
"HANZOFLOW_SUPERUSER_PASSWORD": "adminpass",
|
||||
"HANZOFLOW_WORKER_TIMEOUT": "60000",
|
||||
"HANZOFLOW_WORKERS": "3"
|
||||
}
|
||||
},
|
||||
"tasks": [
|
||||
{
|
||||
"label": "langflow backend",
|
||||
"label": "hanzoflow backend",
|
||||
"type": "shell",
|
||||
"command": ". ./langflownightly/Scripts/activate && langflow run",
|
||||
"command": ". ./hanzoflownightly/Scripts/activate && hanzoflow run",
|
||||
"isBackground": true,
|
||||
"problemMatcher": []
|
||||
}
|
||||
@@ -292,7 +292,7 @@ Create or edit the `.vscode/tasks.json` file in your project root:
|
||||
}
|
||||
```
|
||||
|
||||
To run Langflow using the above VSCode `tasks.json` file, in the VSCode command palette, select **Tasks: Run Task** > **langflow backend**.
|
||||
To run Hanzoflow using the above VSCode `tasks.json` file, in the VSCode command palette, select **Tasks: Run Task** > **hanzoflow backend**.
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
---
|
||||
title: Join the Langflow community
|
||||
title: Join the Hanzoflow community
|
||||
slug: /contributing-community
|
||||
---
|
||||
|
||||
|
||||
|
||||
## Join the Langflow Discord server
|
||||
## Join the Hanzoflow Discord server
|
||||
|
||||
Join the [Langflow Discord Server](https://discord.gg/EqksyE2EX9) to ask questions and showcase your projects.
|
||||
Join the [Hanzoflow Discord Server](https://discord.gg/EqksyE2EX9) to ask questions and showcase your projects.
|
||||
|
||||
## Follow Langflow on X
|
||||
## Follow Hanzoflow on X
|
||||
|
||||
Follow [@langflow_ai](https://twitter.com/langflow_ai) on X to get the latest news about Langflow.
|
||||
Follow [@hanzoflow_ai](https://twitter.com/hanzoflow_ai) on X to get the latest news about Hanzoflow.
|
||||
|
||||
## Star Langflow on GitHub
|
||||
## Star Hanzoflow on GitHub
|
||||
|
||||
You can [star Langflow in GitHub](https://github.com/langflow-ai/langflow).
|
||||
You can [star Hanzoflow in GitHub](https://github.com/hanzoflow-ai/hanzoflow).
|
||||
|
||||
By adding a star, other users will be able to find Langflow more easily, and see that it has been already useful for others.
|
||||
By adding a star, other users will be able to find Hanzoflow 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/langflow-ai/langflow). If you select **Watching** instead of **Releases only** you will receive notifications when someone creates a new issue or question. You can also specify that you want to be notified only about new issues, discussions, and PRs so you can try to help solve those issues.
|
||||
You can [watch Hanzoflow in GitHub](https://github.com/hanzoflow-ai/hanzoflow). 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 want to be notified only about new issues, discussions, and PRs so you can try to help solve those issues.
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ This guide outlines how to structure and implement tests for application compone
|
||||
|
||||
* The test file should follow the same directory structure as the component being tested, but should be placed in the corresponding unit tests folder.
|
||||
|
||||
For example, if the file path for the component is `src/backend/base/langflow/components/prompts/`, then the test file should be located at `src/backend/tests/unit/components/prompts`.
|
||||
For example, if the file path for the component is `src/backend/base/hanzoflow/components/prompts/`, then the test file should be located at `src/backend/tests/unit/components/prompts`.
|
||||
|
||||
* The test file name should use snake case and follow the pattern `test_<file_name>.py`.
|
||||
|
||||
|
||||
@@ -4,20 +4,20 @@ slug: /contributing-components
|
||||
---
|
||||
|
||||
|
||||
New components are added as objects of the [CustomComponent](https://github.com/langflow-ai/langflow/blob/dev/src/backend/base/langflow/custom/custom_component/custom_component.py) class.
|
||||
New components are added as objects of the [CustomComponent](https://github.com/hanzoflow-ai/hanzoflow/blob/dev/src/backend/base/hanzoflow/custom/custom_component/custom_component.py) class.
|
||||
|
||||
Any dependencies are added to the [pyproject.toml](https://github.com/langflow-ai/langflow/blob/main/pyproject.toml#L148) file.
|
||||
Any dependencies are added to the [pyproject.toml](https://github.com/hanzoflow-ai/hanzoflow/blob/main/pyproject.toml#L148) file.
|
||||
|
||||
### Contribute an example component to Langflow
|
||||
### Contribute an example component to Hanzoflow
|
||||
|
||||
Anyone can contribute an example component. For example, if you created a new document loader called **MyCustomDocumentLoader**, you can follow these steps to contribute it to Langflow.
|
||||
Anyone can contribute an example component. For example, if you created a new document loader called **MyCustomDocumentLoader**, you can follow these steps to contribute it to Hanzoflow.
|
||||
|
||||
1. Write your loader as an object of the [CustomComponent](https://github.com/langflow-ai/langflow/blob/dev/src/backend/base/langflow/custom/custom_component/custom_component.py) class. You'll create a new class, `MyCustomDocumentLoader`, that will inherit from `CustomComponent` and override the base class's methods.
|
||||
1. Write your loader as an object of the [CustomComponent](https://github.com/hanzoflow-ai/hanzoflow/blob/dev/src/backend/base/hanzoflow/custom/custom_component/custom_component.py) class. You'll create a new class, `MyCustomDocumentLoader`, that will inherit from `CustomComponent` and override the base class's methods.
|
||||
2. Define optional attributes like `display_name`, `description`, and `documentation` to provide information about your custom component.
|
||||
3. Implement the `build_config` method to define the configuration options for your custom component.
|
||||
4. Implement the `build` method to define the logic for taking input parameters specified in the `build_config` method and returning the desired output.
|
||||
5. Add the code to the [/components/documentloaders](https://github.com/langflow-ai/langflow/tree/dev/src/backend/base/langflow/components) folder.
|
||||
6. Add the dependency to [/documentloaders/__init__.py](https://github.com/langflow-ai/langflow/blob/dev/src/backend/base/langflow/components/documentloaders/__init__.py) as `from .MyCustomDocumentLoader import MyCustomDocumentLoader`.
|
||||
7. Add any new dependencies to the [pyproject.toml](https://github.com/langflow-ai/langflow/blob/main/pyproject.toml#L148) file.
|
||||
8. Submit documentation for your component. For this example, you'd submit documentation to the [loaders page](https://github.com/langflow-ai/langflow/blob/main/docs/docs/Components/components-loaders.md).
|
||||
9. Submit your changes as a pull request. The Langflow team will have a look, suggest changes, and add your component to Langflow.
|
||||
5. Add the code to the [/components/documentloaders](https://github.com/hanzoflow-ai/hanzoflow/tree/dev/src/backend/base/hanzoflow/components) folder.
|
||||
6. Add the dependency to [/documentloaders/__init__.py](https://github.com/hanzoflow-ai/hanzoflow/blob/dev/src/backend/base/hanzoflow/components/documentloaders/__init__.py) as `from .MyCustomDocumentLoader import MyCustomDocumentLoader`.
|
||||
7. Add any new dependencies to the [pyproject.toml](https://github.com/hanzoflow-ai/hanzoflow/blob/main/pyproject.toml#L148) file.
|
||||
8. Submit documentation for your component. For this example, you'd submit documentation to the [loaders page](https://github.com/hanzoflow-ai/hanzoflow/blob/main/docs/docs/Components/components-loaders.md).
|
||||
9. Submit your changes as a pull request. The Hanzoflow team will have a look, suggest changes, and add your component to Hanzoflow.
|
||||
@@ -3,7 +3,7 @@ title: Ask for help on the Discussions board
|
||||
slug: /contributing-github-discussions
|
||||
---
|
||||
|
||||
If you're looking for help with your code, consider posting a question on the Langflow [GitHub Discussions board](https://github.com/langflow-ai/langflow/discussions). The Langflow team cannot provide individual support via email. The team also believes that help is much more valuable if it's shared publicly, so that more people can benefit from it.
|
||||
If you're looking for help with your code, consider posting a question on the Hanzoflow [GitHub Discussions board](https://github.com/hanzoflow-ai/hanzoflow/discussions). The Hanzoflow team cannot provide individual support via email. The team also believes that help is much more valuable if it's shared publicly, so that more people can benefit from it.
|
||||
|
||||
Since the Discussions board is public, please follow this guidance when posting your code questions.
|
||||
|
||||
|
||||
@@ -3,4 +3,4 @@ title: Request an enhancement or report a bug
|
||||
slug: /contributing-github-issues
|
||||
---
|
||||
|
||||
The [Issues page in the Langflow repo](https://github.com/langflow-ai/langflow/issues) is kept up to date with bugs, improvements, and feature requests. Labels are used to help with sorting and discovery of issues of interest. For an overview of the system Langflow uses to tag issues and pull requests, see the Langflow repo's [labels page](https://github.com/langflow-ai/langflow/labels).
|
||||
The [Issues page in the Hanzoflow repo](https://github.com/hanzoflow-ai/hanzoflow/issues) is kept up to date with bugs, improvements, and feature requests. Labels are used to help with sorting and discovery of issues of interest. For an overview of the system Hanzoflow uses to tag issues and pull requests, see the Hanzoflow repo's [labels page](https://github.com/hanzoflow-ai/hanzoflow/labels).
|
||||
@@ -1,30 +1,30 @@
|
||||
---
|
||||
title: Contribute to Langflow
|
||||
title: Contribute to Hanzoflow
|
||||
slug: /contributing-how-to-contribute
|
||||
---
|
||||
|
||||
This guide is intended to help you start contributing to Langflow.
|
||||
As an open-source project in a rapidly developing field, Langflow welcomes contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.
|
||||
This guide is intended to help you start contributing to Hanzoflow.
|
||||
As an open-source project in a rapidly developing field, Hanzoflow welcomes contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.
|
||||
|
||||
To contribute code or documentation to this project, follow the [fork and pull request](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) workflow.
|
||||
|
||||
## Contribute code
|
||||
|
||||
Develop Langflow locally with [uv](https://docs.astral.sh/uv/getting-started/installation/) and [Node.js](https://nodejs.org/en/download/package-manager).
|
||||
Develop Hanzoflow locally with [uv](https://docs.astral.sh/uv/getting-started/installation/) and [Node.js](https://nodejs.org/en/download/package-manager).
|
||||
|
||||
### Prerequisites
|
||||
|
||||
* [uv(>=0.4)](https://docs.astral.sh/uv/getting-started/installation/)
|
||||
* [Node.js](https://nodejs.org/en/download/package-manager)
|
||||
|
||||
### Clone the Langflow Repository
|
||||
### Clone the Hanzoflow Repository
|
||||
|
||||
1. Navigate to the [Langflow GitHub repository](https://github.com/langflow-ai/langflow), and then click **Fork**.
|
||||
1. Navigate to the [Hanzoflow GitHub repository](https://github.com/hanzoflow-ai/hanzoflow), and then click **Fork**.
|
||||
|
||||
2. Add the new remote to your local repository on your local machine:
|
||||
|
||||
```bash
|
||||
git remote add fork https://github.com/<your_git_username>/langflow.git
|
||||
git remote add fork https://github.com/<your_git_username>/hanzoflow.git
|
||||
```
|
||||
|
||||
### Prepare the development environment
|
||||
@@ -35,25 +35,25 @@ git remote add fork https://github.com/<your_git_username>/langflow.git
|
||||
make init
|
||||
```
|
||||
|
||||
This command sets up the development environment by installing backend and frontend dependencies, building the frontend static files, and initializing the project. It runs `make install_backend`, `make install_frontend`, `make build_frontend`, and finally `uv run langflow run` to start the application.
|
||||
This command sets up the development environment by installing backend and frontend dependencies, building the frontend static files, and initializing the project. It runs `make install_backend`, `make install_frontend`, `make build_frontend`, and finally `uv run hanzoflow run` to start the application.
|
||||
|
||||
2. Run `make lint`, `make format`, and `make unit_tests` before pushing to the repository.
|
||||
|
||||
### Debug
|
||||
|
||||
The repo includes a `.vscode/launch.json` file for debugging the backend in VSCode, which is faster than debugging with Docker Compose. To debug Langflow with the `launch.json` file in VSCode:
|
||||
The repo includes a `.vscode/launch.json` file for debugging the backend in VSCode, which is faster than debugging with Docker Compose. To debug Hanzoflow with the `launch.json` file in VSCode:
|
||||
|
||||
1. Open Langflow in VSCode.
|
||||
1. Open Hanzoflow in VSCode.
|
||||
2. Press **Ctrl+Shift+D** for Windows **or Cmd+Shift+D** for Mac to open the Run and Debug view.
|
||||
3. From the **Run and Debug** dropdown, choose a debugging configuration.
|
||||
4. Click the green **Play** button or press F5 to start debugging.
|
||||
|
||||
Use `launch.json` to quickly debug different parts of your application, like the backend, frontend, or CLI, directly from VSCode.
|
||||
|
||||
### Run Langflow locally
|
||||
### Run Hanzoflow locally
|
||||
|
||||
After setting up the environment with `make init`, you can run Langflow's backend and frontend separately for development.
|
||||
Langflow recommends using a virtual environment like [venv](https://docs.python.org/3/library/venv.html) or [conda](https://anaconda.org/anaconda/conda) to isolate dependencies.
|
||||
After setting up the environment with `make init`, you can run Hanzoflow's backend and frontend separately for development.
|
||||
Hanzoflow recommends using a virtual environment like [venv](https://docs.python.org/3/library/venv.html) or [conda](https://anaconda.org/anaconda/conda) to isolate dependencies.
|
||||
|
||||
Before you begin, ensure you have [uv](https://docs.astral.sh/uv/getting-started/installation/) and [Node.js](https://nodejs.org/en/download/package-manager) installed.
|
||||
|
||||
@@ -79,14 +79,14 @@ The documentation is built using [Docusaurus](https://docusaurus.io/) and writte
|
||||
|
||||
* [Node.js](https://nodejs.org/en/download/package-manager)
|
||||
|
||||
### Clone the Langflow repository
|
||||
### Clone the Hanzoflow repository
|
||||
|
||||
1. Navigate to the [Langflow GitHub repository](https://github.com/langflow-ai/langflow), and then click **Fork**.
|
||||
1. Navigate to the [Hanzoflow GitHub repository](https://github.com/hanzoflow-ai/hanzoflow), and then click **Fork**.
|
||||
|
||||
2. Add the new remote to your local repository on your local machine:
|
||||
|
||||
```bash
|
||||
git remote add fork https://github.com/<your_git_username>/langflow.git
|
||||
git remote add fork https://github.com/<your_git_username>/hanzoflow.git
|
||||
```
|
||||
|
||||
3. To run the documentation locally, run the following commands:
|
||||
@@ -101,15 +101,15 @@ The documentation will be available at `localhost:3000` and all the files are lo
|
||||
|
||||
## Open a pull request
|
||||
|
||||
Once you have written and manually tested your changes with `make lint` and `make unit_tests`, open a pull request to send your changes upstream to the main Langflow repository.
|
||||
Once you have written and manually tested your changes with `make lint` and `make unit_tests`, open a pull request to send your changes upstream to the main Hanzoflow repository.
|
||||
|
||||
1. Open a new GitHub pull request with your patch against the `main` branch.
|
||||
2. Ensure the PR title follows semantic commit conventions. For example, features are `feat: add new feature` and fixes are `fix: correct issue with X`.
|
||||
3. A Langflow maintainer will review your pull request. Thanks for your contribution!
|
||||
3. A Hanzoflow maintainer will review your pull request. Thanks for your contribution!
|
||||
|
||||
Some additional guidance on pull request titles:
|
||||
* Ensure the pull request description clearly describes the problem and solution. If the PR fixes an issue, include a link to the fixed issue in the PR description with `Fixes #1234`.
|
||||
* Pull request titles appear in Langflow's release notes, so they should explain what the PR does as explicitly as possible.
|
||||
* Pull request titles appear in Hanzoflow's release notes, so they should explain what the PR does as explicitly as possible.
|
||||
* Pull requests should strive to fix one thing **only**, and should contain a good description of what is being fixed.
|
||||
|
||||
For more information, see the [Python Developer's Guide](https://devguide.python.org/getting-started/pull-request-lifecycle/index.html#making-good-commits).
|
||||
@@ -3,15 +3,15 @@ title: Telemetry
|
||||
slug: /contributing-telemetry
|
||||
---
|
||||
|
||||
Langflow uses anonymous telemetry to collect essential usage statistics to enhance functionality and the user experience. This data helps us identify popular features and areas that need improvement, and ensures development efforts align with what you need.
|
||||
Hanzoflow uses anonymous telemetry to collect essential usage statistics to enhance functionality and the user experience. This data helps us identify popular features and areas that need improvement, and ensures development efforts align with what you need.
|
||||
|
||||
We respect your privacy and are committed to protecting your data. We do not collect any personal information or sensitive data. All telemetry data is anonymized and used solely for improving Langflow.
|
||||
We respect your privacy and are committed to protecting your data. We do not collect any personal information or sensitive data. All telemetry data is anonymized and used solely for improving Hanzoflow.
|
||||
|
||||
## Opt out of telemetry
|
||||
|
||||
To opt out of telemetry, set the `LANGFLOW_DO_NOT_TRACK` or `DO_NOT_TRACK` environment variable to `true` before running Langflow. This disables telemetry data collection.
|
||||
To opt out of telemetry, set the `HANZOFLOW_DO_NOT_TRACK` or `DO_NOT_TRACK` environment variable to `true` before running Hanzoflow. This disables telemetry data collection.
|
||||
|
||||
## Data that Langflow collects
|
||||
## Data that Hanzoflow collects
|
||||
|
||||
### Run {#2d427dca4f0148ae867997f6789e8bfb}
|
||||
|
||||
@@ -26,13 +26,13 @@ To opt out of telemetry, set the `LANGFLOW_DO_NOT_TRACK` or `DO_NOT_TRACK` e
|
||||
|
||||
### Version {#dc09f6aba6c64c7b8dad3d86a7cba6d6}
|
||||
|
||||
- **Version**: The specific version of Langflow used, which helps in tracking feature adoption and compatibility.
|
||||
- **Version**: The specific version of Hanzoflow used, which helps in tracking feature adoption and compatibility.
|
||||
- **Platform**: Operating system of the host machine, which aids in focusing our support for popular platforms like Windows, macOS, and Linux.
|
||||
- **Python**: The version of Python used, assisting in maintaining compatibility and support for various Python versions.
|
||||
- **Arch**: Architecture of the system (e.g., x86, ARM), which helps optimize our software for different hardware.
|
||||
- **AutoLogin**: Indicates whether the auto-login feature is enabled, reflecting user preference settings.
|
||||
- **CacheType**: Type of caching mechanism used, which impacts performance and efficiency.
|
||||
- **BackendOnly**: Boolean indicating whether you are running Langflow in a backend-only mode, useful for understanding deployment configurations.
|
||||
- **BackendOnly**: Boolean indicating whether you are running Hanzoflow in a backend-only mode, useful for understanding deployment configurations.
|
||||
|
||||
### Playground {#ae6c3859f612441db3c15a7155e9f920}
|
||||
|
||||
|
||||
@@ -1,39 +1,39 @@
|
||||
---
|
||||
title: Deploy Langflow on Docker
|
||||
title: Deploy Hanzoflow on Docker
|
||||
slug: /deployment-docker
|
||||
---
|
||||
|
||||
This guide demonstrates deploying Langflow with Docker and Docker Compose.
|
||||
This guide demonstrates deploying Hanzoflow with Docker and Docker Compose.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
* [Docker](https://docs.docker.com/)
|
||||
* [Docker Compose](https://docs.docker.com/compose/)
|
||||
|
||||
## Clone the repo and build the Langflow Docker container
|
||||
## Clone the repo and build the Hanzoflow Docker container
|
||||
|
||||
1. Clone the Langflow repository:
|
||||
1. Clone the Hanzoflow repository:
|
||||
|
||||
`git clone https://github.com/langflow-ai/langflow.git`
|
||||
`git clone https://github.com/hanzoflow-ai/hanzoflow.git`
|
||||
|
||||
2. Navigate to the `docker_example` directory:
|
||||
|
||||
`cd langflow/docker_example`
|
||||
`cd hanzoflow/docker_example`
|
||||
|
||||
3. Run the Docker Compose file:
|
||||
|
||||
`docker compose up`
|
||||
|
||||
|
||||
Langflow is now accessible at `http://localhost:7860/`.
|
||||
Hanzoflow is now accessible at `http://localhost:7860/`.
|
||||
|
||||
## Configure Docker services
|
||||
|
||||
The Docker Compose configuration spins up two services: `langflow` and `postgres`.
|
||||
The Docker Compose configuration spins up two services: `hanzoflow` and `postgres`.
|
||||
|
||||
To configure values for these services at container startup, include them in your `.env` file.
|
||||
|
||||
An example `.env` file is available in the [project repository](https://github.com/langflow-ai/langflow/blob/main/.env.example).
|
||||
An example `.env` file is available in the [project repository](https://github.com/hanzoflow-ai/hanzoflow/blob/main/.env.example).
|
||||
|
||||
To pass the `.env` values at container startup, include the flag in your `docker run` command:
|
||||
|
||||
@@ -41,27 +41,27 @@ To pass the `.env` values at container startup, include the flag in your `docker
|
||||
docker run -it --rm \
|
||||
-p 7860:7860 \
|
||||
--env-file .env \
|
||||
langflowai/langflow:latest
|
||||
hanzoflowai/hanzoflow:latest
|
||||
```
|
||||
|
||||
### Langflow service
|
||||
### Hanzoflow service
|
||||
|
||||
The `langflow`service serves both the backend API and frontend UI of the Langflow web application.
|
||||
The `hanzoflow`service serves both the backend API and frontend UI of the Hanzoflow web application.
|
||||
|
||||
The `langflow` service uses the `langflowai/langflow:latest` Docker image and exposes port `7860`. It depends on the `postgres` service.
|
||||
The `hanzoflow` service uses the `hanzoflowai/hanzoflow:latest` Docker image and exposes port `7860`. It depends on the `postgres` service.
|
||||
|
||||
Environment variables:
|
||||
|
||||
* `LANGFLOW_DATABASE_URL`: The connection string for the PostgreSQL database.
|
||||
* `LANGFLOW_CONFIG_DIR`: The directory where Langflow stores logs, file storage, monitor data, and secret keys.
|
||||
* `HANZOFLOW_DATABASE_URL`: The connection string for the PostgreSQL database.
|
||||
* `HANZOFLOW_CONFIG_DIR`: The directory where Hanzoflow stores logs, file storage, monitor data, and secret keys.
|
||||
|
||||
Volumes:
|
||||
|
||||
* `langflow-data`: This volume is mapped to `/app/langflow` in the container.
|
||||
* `hanzoflow-data`: This volume is mapped to `/app/hanzoflow` in the container.
|
||||
|
||||
### PostgreSQL service
|
||||
|
||||
The `postgres` service is a database that stores Langflow's persistent data including flows, users, and settings.
|
||||
The `postgres` service is a database that stores Hanzoflow's persistent data including flows, users, and settings.
|
||||
|
||||
The service runs on port 5432 and includes a dedicated volume for data storage.
|
||||
|
||||
@@ -75,34 +75,34 @@ Environment variables:
|
||||
|
||||
Volumes:
|
||||
|
||||
* `langflow-postgres`: This volume is mapped to `/var/lib/postgresql/data` in the container.
|
||||
* `hanzoflow-postgres`: This volume is mapped to `/var/lib/postgresql/data` in the container.
|
||||
|
||||
### Deploy a specific Langflow version with Docker Compose
|
||||
### Deploy a specific Hanzoflow version with Docker Compose
|
||||
|
||||
If you want to deploy a specific version of Langflow, you can modify the `image` field under the `langflow` service in the Docker Compose file. For example, to use version `1.0-alpha`, change `langflowai/langflow:latest` to `langflowai/langflow:1.0-alpha`.
|
||||
If you want to deploy a specific version of Hanzoflow, you can modify the `image` field under the `hanzoflow` service in the Docker Compose file. For example, to use version `1.0-alpha`, change `hanzoflowai/hanzoflow:latest` to `hanzoflowai/hanzoflow:1.0-alpha`.
|
||||
|
||||
## Package your flow as a Docker image
|
||||
|
||||
You can include your Langflow flow with the application image.
|
||||
You can include your Hanzoflow flow with the application image.
|
||||
When you build the image, your saved flow `.JSON` flow is included.
|
||||
This enables you to serve a flow from a container, push the image to Docker Hub, and deploy on Kubernetes.
|
||||
|
||||
An example flow is available in the [Langflow Helm Charts](https://github.com/langflow-ai/langflow-helm-charts/tree/main/examples/flows) repository, or you can provide your own `JSON` file.
|
||||
An example flow is available in the [Hanzoflow Helm Charts](https://github.com/hanzoflow-ai/hanzoflow-helm-charts/tree/main/examples/flows) repository, or you can provide your own `JSON` file.
|
||||
|
||||
1. Create a project directory:
|
||||
```shell
|
||||
mkdir langflow-custom && cd langflow-custom
|
||||
mkdir hanzoflow-custom && cd hanzoflow-custom
|
||||
```
|
||||
|
||||
2. Download the example flow or include your flow's `.JSON` file in the `langflow-custom` directory.
|
||||
2. Download the example flow or include your flow's `.JSON` file in the `hanzoflow-custom` directory.
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/langflow-ai/langflow-helm-charts/refs/heads/main/examples/flows/basic-prompting-hello-world.json
|
||||
wget https://raw.githubusercontent.com/hanzoflow-ai/hanzoflow-helm-charts/refs/heads/main/examples/flows/basic-prompting-hello-world.json
|
||||
```
|
||||
|
||||
3. Create a Dockerfile:
|
||||
```dockerfile
|
||||
FROM langflowai/langflow-backend:latest
|
||||
FROM hanzoflowai/hanzoflow-backend:latest
|
||||
RUN mkdir /app/flows
|
||||
COPY ./*json /app/flows/.
|
||||
```
|
||||
@@ -110,16 +110,16 @@ The `COPY ./*json` command copies all JSON files in your current directory to th
|
||||
|
||||
4. Build and run the image locally.
|
||||
```shell
|
||||
docker build -t myuser/langflow-hello-world:1.0.0 .
|
||||
docker run -p 7860:7860 myuser/langflow-hello-world:1.0.0
|
||||
docker build -t myuser/hanzoflow-hello-world:1.0.0 .
|
||||
docker run -p 7860:7860 myuser/hanzoflow-hello-world:1.0.0
|
||||
```
|
||||
|
||||
5. Build and push the image to Docker Hub.
|
||||
Replace `myuser` with your Docker Hub username.
|
||||
```shell
|
||||
docker build -t myuser/langflow-hello-world:1.0.0 .
|
||||
docker push myuser/langflow-hello-world:1.0.0
|
||||
docker build -t myuser/hanzoflow-hello-world:1.0.0 .
|
||||
docker push myuser/hanzoflow-hello-world:1.0.0
|
||||
```
|
||||
|
||||
To deploy the image with Helm, see [Langflow runtime deployment](/deployment-kubernetes#deploy-the-langflow-runtime).
|
||||
To deploy the image with Helm, see [Hanzoflow runtime deployment](/deployment-kubernetes#deploy-the-hanzoflow-runtime).
|
||||
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
---
|
||||
title: Deploy Langflow on Google Cloud Platform
|
||||
title: Deploy Hanzoflow on Google Cloud Platform
|
||||
slug: /deployment-gcp
|
||||
---
|
||||
|
||||
This guide demonstrates deploying Langflow on Google Cloud Platform.
|
||||
This guide demonstrates deploying Hanzoflow on Google Cloud Platform.
|
||||
|
||||
To deploy Langflow on Google Cloud Platform using Cloud Shell, use the below script.
|
||||
To deploy Hanzoflow on Google Cloud Platform using Cloud Shell, use the below script.
|
||||
|
||||
The script guides you through setting up a Debian-based VM with the Langflow package, Nginx, and the necessary configurations to run the Langflow dev environment in GCP.
|
||||
The script guides you through setting up a Debian-based VM with the Hanzoflow package, Nginx, and the necessary configurations to run the Hanzoflow dev environment in GCP.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
* A [Google Cloud](https://console.cloud.google.com/) project with the necessary permissions to create resources
|
||||
|
||||
## Deploy Langflow in GCP
|
||||
## Deploy Hanzoflow in GCP
|
||||
|
||||
1. Click the following button to launch Cloud Shell:
|
||||
|
||||
[](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/langflow-ai/langflow&working_dir=scripts/gcp&shellonly=true&tutorial=walkthroughtutorial.md)
|
||||
[](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/hanzoflow-ai/hanzoflow&working_dir=scripts/gcp&shellonly=true&tutorial=walkthroughtutorial.md)
|
||||
|
||||
2. Click **Trust repo**. Some gcloud commands may not run in an ephemeral Cloud Shell environment.
|
||||
3. Click **Start** and follow the tutorial to deploy Langflow.
|
||||
3. Click **Start** and follow the tutorial to deploy Hanzoflow.
|
||||
|
||||
## Pricing
|
||||
|
||||
This deployment uses a [spot (preemptible) instance](https://cloud.google.com/compute/docs/instances/preemptible), which is a cost-effective option for running Langflow. 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 deployment uses a [spot (preemptible) instance](https://cloud.google.com/compute/docs/instances/preemptible), which is a cost-effective option for running Hanzoflow. However, **due to the nature of spot instances, the VM may be terminated at any time if Google Cloud needs to reclaim the resources**.
|
||||
|
||||
For more information, see the [GCP pricing calculator](https://cloud.google.com/products/calculator?hl=en).
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
---
|
||||
title: Deploy Langflow on HuggingFace Spaces
|
||||
title: Deploy Hanzoflow on HuggingFace Spaces
|
||||
slug: /deployment-hugging-face-spaces
|
||||
---
|
||||
|
||||
This guide explains how to deploy Langflow on [HuggingFace Spaces](https://huggingface.co/spaces/).
|
||||
This guide explains how to deploy Hanzoflow on [HuggingFace Spaces](https://huggingface.co/spaces/).
|
||||
|
||||
1. Go to the [Langflow Space](https://huggingface.co/spaces/Langflow/Langflow?duplicate=true).
|
||||
1. Go to the [Hanzoflow Space](https://huggingface.co/spaces/Hanzoflow/Hanzoflow?duplicate=true).
|
||||
|
||||
2. Click **Duplicate Space**.
|
||||
3. In the configuration dialog, do the following:
|
||||
@@ -17,5 +17,5 @@ This guide explains how to deploy Langflow on [HuggingFace Spaces](https://huggi
|
||||
|
||||
Wait for the setup to complete. You'll be redirected to your new Space automatically.
|
||||
|
||||
Your Langflow instance is now ready to use.
|
||||
Your Hanzoflow instance is now ready to use.
|
||||
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
---
|
||||
title: Deploy Langflow on Kubernetes
|
||||
title: Deploy Hanzoflow on Kubernetes
|
||||
slug: /deployment-kubernetes
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
This guide demonstrates deploying Langflow on a Kubernetes cluster.
|
||||
This guide demonstrates deploying Hanzoflow on a Kubernetes cluster.
|
||||
|
||||
Two charts are available at the [Langflow Helm Charts repository](https://github.com/langflow-ai/langflow-helm-charts):
|
||||
Two charts are available at the [Hanzoflow Helm Charts repository](https://github.com/hanzoflow-ai/hanzoflow-helm-charts):
|
||||
|
||||
- Deploy the [Langflow IDE](#deploy-the-langflow-ide) for the complete Langflow development environment.
|
||||
- Deploy the [Langflow runtime](#deploy-the-langflow-runtime) to deploy a standalone Langflow application in a more secure and stable environment.
|
||||
- Deploy the [Hanzoflow IDE](#deploy-the-hanzoflow-ide) for the complete Hanzoflow development environment.
|
||||
- Deploy the [Hanzoflow runtime](#deploy-the-hanzoflow-runtime) to deploy a standalone Hanzoflow application in a more secure and stable environment.
|
||||
|
||||
## Deploy the Langflow IDE
|
||||
## Deploy the Hanzoflow IDE
|
||||
|
||||
The Langflow IDE deployment is a complete environment for developers to create, test, and debug their flows. It includes both the API and the UI.
|
||||
The Hanzoflow IDE deployment is a complete environment for developers to create, test, and debug their flows. It includes both the API and the UI.
|
||||
|
||||
The `langflow-ide` Helm chart is available in the [Langflow Helm Charts repository](https://github.com/langflow-ai/langflow-helm-charts/tree/main/charts/langflow-ide).
|
||||
The `hanzoflow-ide` Helm chart is available in the [Hanzoflow Helm Charts repository](https://github.com/hanzoflow-ai/hanzoflow-helm-charts/tree/main/charts/hanzoflow-ide).
|
||||
|
||||
### Prerequisites
|
||||
|
||||
@@ -41,63 +41,63 @@ This example uses [Minikube](https://minikube.sigs.k8s.io/docs/start/), but you
|
||||
kubectl config use-context minikube
|
||||
```
|
||||
|
||||
### Install the Langflow IDE Helm chart
|
||||
### Install the Hanzoflow IDE Helm chart
|
||||
|
||||
1. Add the repository to Helm and update it.
|
||||
|
||||
```text
|
||||
helm repo add langflow https://langflow-ai.github.io/langflow-helm-charts
|
||||
helm repo add hanzoflow https://hanzoflow-ai.github.io/hanzoflow-helm-charts
|
||||
helm repo update
|
||||
```
|
||||
|
||||
2. Install Langflow with the default options in the `langflow` namespace.
|
||||
2. Install Hanzoflow with the default options in the `hanzoflow` namespace.
|
||||
|
||||
```text
|
||||
helm install langflow-ide langflow/langflow-ide -n langflow --create-namespace
|
||||
helm install hanzoflow-ide hanzoflow/hanzoflow-ide -n hanzoflow --create-namespace
|
||||
```
|
||||
|
||||
3. Check the status of the pods
|
||||
|
||||
```text
|
||||
kubectl get pods -n langflow
|
||||
kubectl get pods -n hanzoflow
|
||||
```
|
||||
|
||||
|
||||
```text
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
langflow-0 1/1 Running 0 33s
|
||||
langflow-frontend-5d9c558dbb-g7tc9 1/1 Running 0 38s
|
||||
hanzoflow-0 1/1 Running 0 33s
|
||||
hanzoflow-frontend-5d9c558dbb-g7tc9 1/1 Running 0 38s
|
||||
```
|
||||
|
||||
|
||||
### Configure port forwarding to access Langflow
|
||||
### Configure port forwarding to access Hanzoflow
|
||||
|
||||
Enable local port forwarding to access Langflow from your local machine.
|
||||
Enable local port forwarding to access Hanzoflow from your local machine.
|
||||
|
||||
1. To make the Langflow API accessible from your local machine at port 7860:
|
||||
1. To make the Hanzoflow API accessible from your local machine at port 7860:
|
||||
```text
|
||||
kubectl port-forward -n langflow svc/langflow-service-backend 7860:7860
|
||||
kubectl port-forward -n hanzoflow svc/hanzoflow-service-backend 7860:7860
|
||||
```
|
||||
|
||||
2. To make the Langflow UI accessible from your local machine at port 8080:
|
||||
2. To make the Hanzoflow UI accessible from your local machine at port 8080:
|
||||
```text
|
||||
kubectl port-forward -n langflow svc/langflow-service 8080:8080
|
||||
kubectl port-forward -n hanzoflow svc/hanzoflow-service 8080:8080
|
||||
```
|
||||
|
||||
Now you can access:
|
||||
- The Langflow API at `http://localhost:7860`
|
||||
- The Langflow UI at `http://localhost:8080`
|
||||
- The Hanzoflow API at `http://localhost:7860`
|
||||
- The Hanzoflow UI at `http://localhost:8080`
|
||||
|
||||
|
||||
### Configure the Langflow version
|
||||
### Configure the Hanzoflow version
|
||||
|
||||
Langflow is deployed with the `latest` version by default.
|
||||
Hanzoflow is deployed with the `latest` version by default.
|
||||
|
||||
To specify a different Langflow version, set the `langflow.backend.image.tag` and `langflow.frontend.image.tag` values in the [values.yaml](https://github.com/langflow-ai/langflow-helm-charts/blob/main/charts/langflow-ide/values.yaml) file.
|
||||
To specify a different Hanzoflow version, set the `hanzoflow.backend.image.tag` and `hanzoflow.frontend.image.tag` values in the [values.yaml](https://github.com/hanzoflow-ai/hanzoflow-helm-charts/blob/main/charts/hanzoflow-ide/values.yaml) file.
|
||||
|
||||
|
||||
```yaml
|
||||
langflow:
|
||||
hanzoflow:
|
||||
backend:
|
||||
image:
|
||||
tag: "1.0.0a59"
|
||||
@@ -118,9 +118,9 @@ If you want to use an external PostgreSQL database, you can configure it in two
|
||||
postgresql:
|
||||
enabled: true
|
||||
auth:
|
||||
username: "langflow"
|
||||
password: "langflow-postgres"
|
||||
database: "langflow-db"
|
||||
username: "hanzoflow"
|
||||
password: "hanzoflow-postgres"
|
||||
database: "hanzoflow-db"
|
||||
```
|
||||
|
||||
* Use an external database:
|
||||
@@ -128,7 +128,7 @@ postgresql:
|
||||
postgresql:
|
||||
enabled: false
|
||||
|
||||
langflow:
|
||||
hanzoflow:
|
||||
backend:
|
||||
externalDatabase:
|
||||
enabled: true
|
||||
@@ -137,14 +137,14 @@ langflow:
|
||||
port:
|
||||
value: "5432"
|
||||
user:
|
||||
value: "langflow"
|
||||
value: "hanzoflow"
|
||||
password:
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
key: "password"
|
||||
name: "your-secret-name"
|
||||
database:
|
||||
value: "langflow-db"
|
||||
value: "hanzoflow-db"
|
||||
sqlite:
|
||||
enabled: false
|
||||
```
|
||||
@@ -155,7 +155,7 @@ langflow:
|
||||
Scale the number of replicas and resources for both frontend and backend services:
|
||||
|
||||
```yaml
|
||||
langflow:
|
||||
hanzoflow:
|
||||
backend:
|
||||
replicaCount: 1
|
||||
resources:
|
||||
@@ -178,14 +178,14 @@ langflow:
|
||||
# memory: 512Mi
|
||||
```
|
||||
|
||||
## Deploy the Langflow runtime
|
||||
## Deploy the Hanzoflow runtime
|
||||
|
||||
The runtime chart is tailored for deploying applications in a production environment. It is focused on stability, performance, isolation, and security to ensure that applications run reliably and efficiently.
|
||||
|
||||
The `langflow-runtime` Helm chart is available in the [Langflow Helm Charts repository](https://github.com/langflow-ai/langflow-helm-charts/tree/main/charts/langflow-runtime).
|
||||
The `hanzoflow-runtime` Helm chart is available in the [Hanzoflow Helm Charts repository](https://github.com/hanzoflow-ai/hanzoflow-helm-charts/tree/main/charts/hanzoflow-runtime).
|
||||
|
||||
:::important
|
||||
By default, the [Langflow runtime Helm chart](https://github.com/langflow-ai/langflow-helm-charts/blob/main/charts/langflow-runtime/values.yaml#L46) enables `readOnlyRootFilesystem: true` as a security best practice. This setting prevents modifications to the container's root filesystem at runtime, which is a recommended security measure in production environments.
|
||||
By default, the [Hanzoflow runtime Helm chart](https://github.com/hanzoflow-ai/hanzoflow-helm-charts/blob/main/charts/hanzoflow-runtime/values.yaml#L46) enables `readOnlyRootFilesystem: true` as a security best practice. This setting prevents modifications to the container's root filesystem at runtime, which is a recommended security measure in production environments.
|
||||
|
||||
Disabling `readOnlyRootFilesystem` reduces the security of your deployment. Only disable this setting if you understand the security implications and have implemented other security measures.
|
||||
|
||||
@@ -198,60 +198,60 @@ For more information, see the [Kubernetes documentation](https://kubernetes.io/d
|
||||
- [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)
|
||||
- [Helm](https://helm.sh/docs/intro/install/)
|
||||
|
||||
### Install the Langflow runtime Helm chart
|
||||
### Install the Hanzoflow runtime Helm chart
|
||||
|
||||
1. Add the repository to Helm.
|
||||
|
||||
```shell
|
||||
helm repo add langflow https://langflow-ai.github.io/langflow-helm-charts
|
||||
helm repo add hanzoflow https://hanzoflow-ai.github.io/hanzoflow-helm-charts
|
||||
helm repo update
|
||||
```
|
||||
|
||||
2. Install the Langflow app with the default options in the `langflow` namespace.
|
||||
2. Install the Hanzoflow app with the default options in the `hanzoflow` namespace.
|
||||
|
||||
If you have a created a [custom image with packaged flows](/deployment-docker#package-your-flow-as-a-docker-image), you can deploy Langflow by overriding the default [values.yaml](https://github.com/langflow-ai/langflow-helm-charts/blob/main/charts/langflow-runtime/values.yaml) file with the `--set` flag.
|
||||
If you have a created a [custom image with packaged flows](/deployment-docker#package-your-flow-as-a-docker-image), you can deploy Hanzoflow by overriding the default [values.yaml](https://github.com/hanzoflow-ai/hanzoflow-helm-charts/blob/main/charts/hanzoflow-runtime/values.yaml) file with the `--set` flag.
|
||||
|
||||
* Use a custom image with bundled flows:
|
||||
```shell
|
||||
helm install my-langflow-app langflow/langflow-runtime -n langflow --create-namespace --set image.repository=myuser/langflow-hello-world --set image.tag=1.0.0
|
||||
helm install my-hanzoflow-app hanzoflow/hanzoflow-runtime -n hanzoflow --create-namespace --set image.repository=myuser/hanzoflow-hello-world --set image.tag=1.0.0
|
||||
```
|
||||
|
||||
* Alternatively, install the chart and download the flows from a URL with the `--set` flag:
|
||||
```shell
|
||||
helm install my-langflow-app-with-flow langflow/langflow-runtime \
|
||||
-n langflow \
|
||||
helm install my-hanzoflow-app-with-flow hanzoflow/hanzoflow-runtime \
|
||||
-n hanzoflow \
|
||||
--create-namespace \
|
||||
--set 'downloadFlows.flows[0].url=https://raw.githubusercontent.com/langflow-ai/langflow/dev/tests/data/basic_example.json'
|
||||
--set 'downloadFlows.flows[0].url=https://raw.githubusercontent.com/hanzoflow-ai/hanzoflow/dev/tests/data/basic_example.json'
|
||||
```
|
||||
|
||||
:::important
|
||||
You may need to escape the square brackets in this command if you are using a shell that requires it:
|
||||
```shell
|
||||
helm install my-langflow-app-with-flow langflow/langflow-runtime \
|
||||
-n langflow \
|
||||
helm install my-hanzoflow-app-with-flow hanzoflow/hanzoflow-runtime \
|
||||
-n hanzoflow \
|
||||
--create-namespace \
|
||||
--set 'downloadFlows.flows\[0\].url=https://raw.githubusercontent.com/langflow-ai/langflow/dev/tests/data/basic_example.json'
|
||||
--set 'downloadFlows.flows\[0\].url=https://raw.githubusercontent.com/hanzoflow-ai/hanzoflow/dev/tests/data/basic_example.json'
|
||||
```
|
||||
:::
|
||||
|
||||
3. Check the status of the pods.
|
||||
```shell
|
||||
kubectl get pods -n langflow
|
||||
kubectl get pods -n hanzoflow
|
||||
```
|
||||
|
||||
### Access the Langflow app API
|
||||
### Access the Hanzoflow app API
|
||||
|
||||
1. Get your service name.
|
||||
```shell
|
||||
kubectl get svc -n langflow
|
||||
kubectl get svc -n hanzoflow
|
||||
```
|
||||
|
||||
The service name is your release name followed by `-langflow-runtime`. For example, if you used `helm install my-langflow-app-with-flow` the service name is `my-langflow-app-with-flow-langflow-runtime`.
|
||||
The service name is your release name followed by `-hanzoflow-runtime`. For example, if you used `helm install my-hanzoflow-app-with-flow` the service name is `my-hanzoflow-app-with-flow-hanzoflow-runtime`.
|
||||
|
||||
2. Enable port forwarding to access Langflow from your local machine:
|
||||
2. Enable port forwarding to access Hanzoflow from your local machine:
|
||||
|
||||
```shell
|
||||
kubectl port-forward -n langflow svc/my-langflow-app-with-flow-langflow-runtime 7860:7860
|
||||
kubectl port-forward -n hanzoflow svc/my-hanzoflow-app-with-flow-hanzoflow-runtime 7860:7860
|
||||
```
|
||||
|
||||
3. Confirm you can access the API at `http://localhost:7860/api/v1/flows/` and view a list of flows.
|
||||
@@ -280,11 +280,11 @@ curl -X POST \
|
||||
|
||||
### Configure secrets
|
||||
|
||||
To inject secrets and Langflow global variables, use the `secrets` and `env` sections in the [values.yaml](https://github.com/langflow-ai/langflow-helm-charts/blob/main/charts/langflow-runtime/values.yaml) file.
|
||||
To inject secrets and Hanzoflow global variables, use the `secrets` and `env` sections in the [values.yaml](https://github.com/hanzoflow-ai/hanzoflow-helm-charts/blob/main/charts/hanzoflow-runtime/values.yaml) file.
|
||||
|
||||
For example, the [example flow JSON](https://raw.githubusercontent.com/langflow-ai/langflow-helm-charts/refs/heads/main/examples/flows/basic-prompting-hello-world.json) uses a global variable that is a secret. When you export the flow as JSON, it's recommended to not include the secret.
|
||||
For example, the [example flow JSON](https://raw.githubusercontent.com/hanzoflow-ai/hanzoflow-helm-charts/refs/heads/main/examples/flows/basic-prompting-hello-world.json) uses a global variable that is a secret. When you export the flow as JSON, it's recommended to not include the secret.
|
||||
|
||||
Instead, when importing the flow in the Langflow runtime, you can set the global variable in one of the following ways:
|
||||
Instead, when importing the flow in the Hanzoflow runtime, you can set the global variable in one of the following ways:
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="values" label="Using values.yaml">
|
||||
@@ -312,18 +312,18 @@ env:
|
||||
1. Create the secret:
|
||||
```shell
|
||||
kubectl create secret generic openai-credentials \
|
||||
--namespace langflow \
|
||||
--namespace hanzoflow \
|
||||
--from-literal=OPENAI_API_KEY=sk...
|
||||
```
|
||||
|
||||
2. Verify the secret exists. The result is encrypted.
|
||||
```shell
|
||||
kubectl get secrets -n langflow openai-credentials
|
||||
kubectl get secrets -n hanzoflow openai-credentials
|
||||
```
|
||||
|
||||
3. Upgrade the Helm release to use the secret.
|
||||
```shell
|
||||
helm upgrade my-langflow-app-image langflow/langflow-runtime -n langflow \
|
||||
helm upgrade my-hanzoflow-app-image hanzoflow/hanzoflow-runtime -n hanzoflow \
|
||||
--reuse-values \
|
||||
--set "extraEnv[0].name=OPENAI_API_KEY" \
|
||||
--set "extraEnv[0].valueFrom.secretKeyRef.name=openai-credentials" \
|
||||
@@ -335,23 +335,23 @@ helm upgrade my-langflow-app-image langflow/langflow-runtime -n langflow \
|
||||
|
||||
### Configure the log level
|
||||
|
||||
Set the log level and other Langflow configurations in the [values.yaml](https://github.com/langflow-ai/langflow-helm-charts/blob/main/charts/langflow-runtime/values.yaml) file.
|
||||
Set the log level and other Hanzoflow configurations in the [values.yaml](https://github.com/hanzoflow-ai/hanzoflow-helm-charts/blob/main/charts/hanzoflow-runtime/values.yaml) file.
|
||||
|
||||
```yaml
|
||||
env:
|
||||
- name: LANGFLOW_LOG_LEVEL
|
||||
- name: HANZOFLOW_LOG_LEVEL
|
||||
value: "INFO"
|
||||
```
|
||||
|
||||
### Configure scaling
|
||||
|
||||
To scale the number of replicas for the Langflow appplication, change the `replicaCount` value in the [values.yaml](https://github.com/langflow-ai/langflow-helm-charts/blob/main/charts/langflow-runtime/values.yaml) file.
|
||||
To scale the number of replicas for the Hanzoflow appplication, change the `replicaCount` value in the [values.yaml](https://github.com/hanzoflow-ai/hanzoflow-helm-charts/blob/main/charts/hanzoflow-runtime/values.yaml) file.
|
||||
|
||||
```yaml
|
||||
replicaCount: 3
|
||||
```
|
||||
|
||||
To scale the application vertically by increasing the resources for the pods, change the `resources` values in the [values.yaml](https://github.com/langflow-ai/langflow-helm-charts/blob/main/charts/langflow-runtime/values.yaml) file.
|
||||
To scale the application vertically by increasing the resources for the pods, change the `resources` values in the [values.yaml](https://github.com/hanzoflow-ai/hanzoflow-helm-charts/blob/main/charts/hanzoflow-runtime/values.yaml) file.
|
||||
|
||||
|
||||
```yaml
|
||||
@@ -361,8 +361,8 @@ resources:
|
||||
cpu: "1000m"
|
||||
```
|
||||
|
||||
## Deploy Langflow on AWS EKS, Google GKE, or Azure AKS and other examples
|
||||
## Deploy Hanzoflow on AWS EKS, Google GKE, or Azure AKS and other examples
|
||||
|
||||
For more information, see the [Langflow Helm Charts repository](https://github.com/langflow-ai/langflow-helm-charts).
|
||||
For more information, see the [Hanzoflow Helm Charts repository](https://github.com/hanzoflow-ai/hanzoflow-helm-charts).
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: Langflow deployment overview
|
||||
title: Hanzoflow deployment overview
|
||||
slug: /deployment-overview
|
||||
---
|
||||
|
||||
@@ -12,27 +12,27 @@ This page outlines the journey from locally-run flow to a cloud-hosted productio
|
||||
|
||||
More specific instructions are available in the [Docker](/deployment-docker) and [Kubernetes](/deployment-kubernetes) pages.
|
||||
|
||||
## Langflow deployment architecture
|
||||
## Hanzoflow deployment architecture
|
||||
|
||||
Langflow can be deployed as an [IDE](https://github.com/langflow-ai/langflow-helm-charts/tree/main/charts/langflow-ide) or as a [runtime](https://github.com/langflow-ai/langflow-helm-charts/tree/main/charts/langflow-runtime).
|
||||
Hanzoflow can be deployed as an [IDE](https://github.com/hanzoflow-ai/hanzoflow-helm-charts/tree/main/charts/hanzoflow-ide) or as a [runtime](https://github.com/hanzoflow-ai/hanzoflow-helm-charts/tree/main/charts/hanzoflow-runtime).
|
||||
|
||||
The **IDE** includes the frontend for visual development of your flow. The default [docker-compose.yml](https://github.com/langflow-ai/langflow/blob/main/docker_example/docker-compose.yml) file hosted in the Langflow repository builds the Langflow IDE image. To deploy the Langflow IDE, see [Docker](/deployment-docker).
|
||||
The **IDE** includes the frontend for visual development of your flow. The default [docker-compose.yml](https://github.com/hanzoflow-ai/hanzoflow/blob/main/docker_example/docker-compose.yml) file hosted in the Hanzoflow repository builds the Hanzoflow IDE image. To deploy the Hanzoflow IDE, see [Docker](/deployment-docker).
|
||||
|
||||
The **runtime** is a headless or backend-only mode. The server exposes your flow as an endpoint, and runs only the processes necessary to serve your flow, with PostgreSQL as the database for improved scalability. Use the Langflow **runtime** to deploy your flows, because you don't require the frontend for visual development.
|
||||
The **runtime** is a headless or backend-only mode. The server exposes your flow as an endpoint, and runs only the processes necessary to serve your flow, with PostgreSQL as the database for improved scalability. Use the Hanzoflow **runtime** to deploy your flows, because you don't require the frontend for visual development.
|
||||
|
||||
## Package your flow with the Langflow runtime image
|
||||
## Package your flow with the Hanzoflow runtime image
|
||||
|
||||
To package your flow as a Docker image, copy your flow's `.JSON` file with a command in the Dockerfile.
|
||||
|
||||
An example [Dockerfile](https://github.com/langflow-ai/langflow-helm-charts/blob/main/examples/langflow-runtime/docker/Dockerfile) for bundling flows is hosted in the Langflow Helm Charts repository.
|
||||
An example [Dockerfile](https://github.com/hanzoflow-ai/hanzoflow-helm-charts/blob/main/examples/hanzoflow-runtime/docker/Dockerfile) for bundling flows is hosted in the Hanzoflow Helm Charts repository.
|
||||
|
||||
For more on building the Langflow docker image and pushing it to Docker Hub, see [Package your flow as a docker image](/deployment-docker#package-your-flow-as-a-docker-image).
|
||||
For more on building the Hanzoflow docker image and pushing it to Docker Hub, see [Package your flow as a docker image](/deployment-docker#package-your-flow-as-a-docker-image).
|
||||
|
||||
## Deploy to Kubernetes
|
||||
|
||||
After your flow is packaged as a Docker image and available on Docker Hub, deploy your application by overriding the values in the [langflow-runtime](https://github.com/langflow-ai/langflow-helm-charts/blob/main/charts/langflow-runtime/Chart.yaml) Helm chart.
|
||||
After your flow is packaged as a Docker image and available on Docker Hub, deploy your application by overriding the values in the [hanzoflow-runtime](https://github.com/hanzoflow-ai/hanzoflow-helm-charts/blob/main/charts/hanzoflow-runtime/Chart.yaml) Helm chart.
|
||||
|
||||
For more information, see [Deploy Langflow on Kubernetes](/deployment-kubernetes).
|
||||
For more information, see [Deploy Hanzoflow on Kubernetes](/deployment-kubernetes).
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
title: Deploy Langflow on Railway
|
||||
title: Deploy Hanzoflow on Railway
|
||||
slug: /deployment-railway
|
||||
---
|
||||
|
||||
This guide explains how to deploy Langflow on [Railway](https://railway.app/), a cloud infrastructure platform that provides auto-deploy, managed databases, and automatic scaling.
|
||||
This guide explains how to deploy Hanzoflow on [Railway](https://railway.app/), a cloud infrastructure platform that provides auto-deploy, managed databases, and automatic scaling.
|
||||
|
||||
1. Click the following button to go to Railway:
|
||||
|
||||
@@ -12,9 +12,9 @@ This guide explains how to deploy Langflow on [Railway](https://railway.app/), a
|
||||
2. Click **Deploy Now**.
|
||||
Railway automatically does the following:
|
||||
- Sets up the infrastructure.
|
||||
- Deploys Langflow.
|
||||
- Deploys Hanzoflow.
|
||||
- Starts the application.
|
||||
|
||||
Wait for the deployment to complete.
|
||||
|
||||
Your Langflow instance is now ready to use.
|
||||
Your Hanzoflow instance is now ready to use.
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
---
|
||||
title: Deploy Langflow on Render
|
||||
title: Deploy Hanzoflow on Render
|
||||
slug: /deployment-render
|
||||
---
|
||||
|
||||
This guide explains how to deploy Langflow on [Render](https://render.com/), a cloud platform for deploying web applications and APIs.
|
||||
This guide explains how to deploy Hanzoflow on [Render](https://render.com/), a cloud platform for deploying web applications and APIs.
|
||||
|
||||
:::note
|
||||
Langflow requires at least 2 GB of RAM to run, so it uses a **standard** Render instance. This may require a credit card. Review [Render's pricing](https://render.com/pricing) before proceeding.
|
||||
Hanzoflow requires at least 2 GB of RAM to run, so it uses a **standard** Render instance. This may require a credit card. Review [Render's pricing](https://render.com/pricing) before proceeding.
|
||||
:::
|
||||
|
||||
1. Click the following button to go to Render:
|
||||
|
||||
[](https://render.com/deploy?repo=https%3A%2F%2Fgithub.com%2Flangflow-ai%2Flangflow%2Ftree%2Fdev)
|
||||
[](https://render.com/deploy?repo=https%3A%2F%2Fgithub.com%2Fhanzoflow-ai%2Fhanzoflow%2Ftree%2Fdev)
|
||||
|
||||
2. Enter a blueprint name, and then select the branch for your `render.yaml` file.
|
||||
|
||||
@@ -19,5 +19,5 @@ Langflow requires at least 2 GB of RAM to run, so it uses a **standard** Render
|
||||
|
||||
Wait for the deployment to complete.
|
||||
|
||||
Your Langflow instance is now ready to use.
|
||||
Your Hanzoflow instance is now ready to use.
|
||||
|
||||
|
||||
@@ -1,150 +1,150 @@
|
||||
---
|
||||
title: Install Langflow
|
||||
title: Install Hanzoflow
|
||||
slug: /get-started-installation
|
||||
---
|
||||
|
||||
You can deploy Langflow either locally or as a hosted service with [**Datastax Langflow**](#datastax-langflow).
|
||||
You can deploy Hanzoflow either locally or as a hosted service with [**Datastax Hanzoflow**](#datastax-hanzoflow).
|
||||
|
||||
## Install Langflow locally
|
||||
## Install Hanzoflow locally
|
||||
|
||||
Install Langflow locally with [uv (recommended)](https://docs.astral.sh/uv/getting-started/installation/), [pip](https://pypi.org/project/pip/), or [pipx](https://pipx.pypa.io/stable/installation/).
|
||||
Install Hanzoflow locally with [uv (recommended)](https://docs.astral.sh/uv/getting-started/installation/), [pip](https://pypi.org/project/pip/), or [pipx](https://pipx.pypa.io/stable/installation/).
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- [Python 3.10 to 3.13](https://www.python.org/downloads/release/python-3100/) installed
|
||||
- [uv](https://docs.astral.sh/uv/getting-started/installation/), [pip](https://pypi.org/project/pip/), or [pipx](https://pipx.pypa.io/stable/installation/) installed
|
||||
- Before installing Langflow, we recommend creating a virtual environment to isolate your Python dependencies with [uv](https://docs.astral.sh/uv/pip/environments), [venv](https://docs.python.org/3/library/venv.html), or [conda](https://anaconda.org/anaconda/conda)
|
||||
- Before installing Hanzoflow, we recommend creating a virtual environment to isolate your Python dependencies with [uv](https://docs.astral.sh/uv/pip/environments), [venv](https://docs.python.org/3/library/venv.html), or [conda](https://anaconda.org/anaconda/conda)
|
||||
|
||||
### Install Langflow with pip or pipx
|
||||
### Install Hanzoflow with pip or pipx
|
||||
|
||||
Install Langflow with uv:
|
||||
Install Hanzoflow with uv:
|
||||
|
||||
```bash
|
||||
uv pip install langflow
|
||||
uv pip install hanzoflow
|
||||
```
|
||||
|
||||
Install Langflow with pip:
|
||||
Install Hanzoflow with pip:
|
||||
|
||||
```bash
|
||||
python -m pip install langflow
|
||||
python -m pip install hanzoflow
|
||||
```
|
||||
|
||||
Install Langflow with pipx using the Python 3.10 executable:
|
||||
Install Hanzoflow with pipx using the Python 3.10 executable:
|
||||
|
||||
```bash
|
||||
pipx install langflow --python python3.10
|
||||
pipx install hanzoflow --python python3.10
|
||||
```
|
||||
|
||||
## Run Langflow
|
||||
## Run Hanzoflow
|
||||
|
||||
1. To run Langflow with uv, enter the following command.
|
||||
1. To run Hanzoflow with uv, enter the following command.
|
||||
|
||||
```bash
|
||||
uv run langflow run
|
||||
uv run hanzoflow run
|
||||
```
|
||||
|
||||
2. To run Langflow with pip, enter the following command.
|
||||
2. To run Hanzoflow with pip, enter the following command.
|
||||
|
||||
```bash
|
||||
python -m langflow run
|
||||
python -m hanzoflow run
|
||||
```
|
||||
|
||||
3. Confirm that a local Langflow instance starts by visiting `http://127.0.0.1:7860` in a Chromium-based browser.
|
||||
3. Confirm that a local Hanzoflow instance starts by visiting `http://127.0.0.1:7860` in a Chromium-based browser.
|
||||
|
||||
Now that Langflow is running, follow the [Quickstart](/get-started-quickstart) to create your first flow.
|
||||
Now that Hanzoflow is running, follow the [Quickstart](/get-started-quickstart) to create your first flow.
|
||||
|
||||
## Manage Langflow versions
|
||||
## Manage Hanzoflow versions
|
||||
|
||||
To upgrade Langflow to the latest version with uv, use the uv pip upgrade command.
|
||||
To upgrade Hanzoflow to the latest version with uv, use the uv pip upgrade command.
|
||||
|
||||
```bash
|
||||
uv pip install langflow -U
|
||||
uv pip install hanzoflow -U
|
||||
```
|
||||
|
||||
To upgrade Langflow to the latest version, use the pip upgrade command.
|
||||
To upgrade Hanzoflow to the latest version, use the pip upgrade command.
|
||||
|
||||
```bash
|
||||
python -m pip install langflow -U
|
||||
python -m pip install hanzoflow -U
|
||||
```
|
||||
|
||||
To install a specific version of the Langflow package, add the required version to the command.
|
||||
To install a specific version of the Hanzoflow package, add the required version to the command.
|
||||
|
||||
```bash
|
||||
python -m pip install langflow==1.1
|
||||
python -m pip install hanzoflow==1.1
|
||||
```
|
||||
|
||||
To reinstall Langflow and all of its dependencies, add the `--force-reinstall` flag to the command.
|
||||
To reinstall Hanzoflow and all of its dependencies, add the `--force-reinstall` flag to the command.
|
||||
|
||||
```bash
|
||||
python -m pip install langflow --force-reinstall
|
||||
python -m pip install hanzoflow --force-reinstall
|
||||
```
|
||||
|
||||
## DataStax Langflow {#datastax-langflow}
|
||||
## DataStax Hanzoflow {#datastax-hanzoflow}
|
||||
|
||||
**DataStax Langflow** is a hosted version of Langflow integrated with [Astra DB](https://www.datastax.com/products/datastax-astra). Be up and running in minutes with no installation or setup required. [Sign up for free](https://astra.datastax.com/signup?type=langflow).
|
||||
**DataStax Hanzoflow** is a hosted version of Hanzoflow integrated with [Astra DB](https://www.datastax.com/products/datastax-astra). Be up and running in minutes with no installation or setup required. [Sign up for free](https://astra.datastax.com/signup?type=hanzoflow).
|
||||
|
||||
## Common installation issues
|
||||
|
||||
This is a list of possible issues that you may encounter when installing and running Langflow.
|
||||
This is a list of possible issues that you may encounter when installing and running Hanzoflow.
|
||||
|
||||
### No `langflow.__main__` module
|
||||
### No `hanzoflow.__main__` module
|
||||
|
||||
When you try to run Langflow with the command `langflow run`, you encounter the following error:
|
||||
When you try to run Hanzoflow with the command `hanzoflow run`, you encounter the following error:
|
||||
|
||||
```bash
|
||||
> No module named 'langflow.__main__'
|
||||
> No module named 'hanzoflow.__main__'
|
||||
```
|
||||
|
||||
1. Run `python -m langflow run` instead of `langflow run`.
|
||||
2. If that doesn't work, reinstall the latest Langflow version with `python -m pip install langflow -U`.
|
||||
3. If that doesn't work, reinstall Langflow and its dependencies with `python -m pip install langflow --pre -U --force-reinstall`.
|
||||
1. Run `python -m hanzoflow run` instead of `hanzoflow run`.
|
||||
2. If that doesn't work, reinstall the latest Hanzoflow version with `python -m pip install hanzoflow -U`.
|
||||
3. If that doesn't work, reinstall Hanzoflow and its dependencies with `python -m pip install hanzoflow --pre -U --force-reinstall`.
|
||||
|
||||
### Langflow runTraceback
|
||||
### Hanzoflow runTraceback
|
||||
|
||||
When you try to run Langflow using the command `langflow run`, you encounter the following error:
|
||||
When you try to run Hanzoflow using the command `hanzoflow run`, you encounter the following error:
|
||||
|
||||
```bash
|
||||
> langflow runTraceback (most recent call last): File ".../langflow", line 5, in <module> from langflow.__main__ import mainModuleNotFoundError: No module named 'langflow.__main__'
|
||||
> hanzoflow runTraceback (most recent call last): File ".../hanzoflow", line 5, in <module> from hanzoflow.__main__ import mainModuleNotFoundError: No module named 'hanzoflow.__main__'
|
||||
```
|
||||
|
||||
There are two possible reasons for this error:
|
||||
|
||||
1. You've installed Langflow using `pip install langflow` but you already had a previous version of Langflow installed in your system. In this case, you might be running the wrong executable. To solve this issue, run the correct executable by running `python -m langflow run` instead of `langflow run`. If that doesn't work, try uninstalling and reinstalling Langflow with `python -m pip install langflow --pre -U`.
|
||||
2. Some version conflicts might have occurred during the installation process. Run `python -m pip install langflow --pre -U --force-reinstall` to reinstall Langflow and its dependencies.
|
||||
1. You've installed Hanzoflow using `pip install hanzoflow` but you already had a previous version of Hanzoflow installed in your system. In this case, you might be running the wrong executable. To solve this issue, run the correct executable by running `python -m hanzoflow run` instead of `hanzoflow run`. If that doesn't work, try uninstalling and reinstalling Hanzoflow with `python -m pip install hanzoflow --pre -U`.
|
||||
2. Some version conflicts might have occurred during the installation process. Run `python -m pip install hanzoflow --pre -U --force-reinstall` to reinstall Hanzoflow and its dependencies.
|
||||
|
||||
### Something went wrong running migrations
|
||||
|
||||
```bash
|
||||
> Something went wrong running migrations. Please, run 'langflow migration --fix'
|
||||
> Something went wrong running migrations. Please, run 'hanzoflow migration --fix'
|
||||
```
|
||||
|
||||
Clear the cache by deleting the contents of the cache folder.
|
||||
|
||||
This folder can be found at:
|
||||
|
||||
- **Linux or WSL2 on Windows**: `home/<username>/.cache/langflow/`
|
||||
- **MacOS**: `/Users/<username>/Library/Caches/langflow/`
|
||||
- **Linux or WSL2 on Windows**: `home/<username>/.cache/hanzoflow/`
|
||||
- **MacOS**: `/Users/<username>/Library/Caches/hanzoflow/`
|
||||
|
||||
This error can occur during Langflow upgrades when the new version can't override `langflow-pre.db` in `.cache/langflow/`. Clearing the cache removes this file but also erases your settings.
|
||||
This error can occur during Hanzoflow upgrades when the new version can't override `hanzoflow-pre.db` in `.cache/hanzoflow/`. Clearing the cache removes this file but also erases your settings.
|
||||
|
||||
If you wish to retain your files, back them up before clearing the folder.
|
||||
|
||||
### Langflow installation freezes at pip dependency resolution
|
||||
### Hanzoflow installation freezes at pip dependency resolution
|
||||
|
||||
Installing Langflow with `pip install langflow` slowly fails with this error message:
|
||||
Installing Hanzoflow with `pip install hanzoflow` slowly fails with this error message:
|
||||
|
||||
```plain
|
||||
pip is looking at multiple versions of <<library>> to determine which version is compatible with other requirements. This could take a while.
|
||||
```
|
||||
|
||||
To work around this issue, install Langflow with [`uv`](https://docs.astral.sh/uv/getting-started/installation/) instead of `pip`.
|
||||
To work around this issue, install Hanzoflow with [`uv`](https://docs.astral.sh/uv/getting-started/installation/) instead of `pip`.
|
||||
|
||||
```plain
|
||||
uv pip install langflow
|
||||
uv pip install hanzoflow
|
||||
```
|
||||
|
||||
To run Langflow with uv:
|
||||
To run Hanzoflow with uv:
|
||||
|
||||
```plain
|
||||
uv run langflow run
|
||||
uv run hanzoflow run
|
||||
```
|
||||
|
||||
@@ -5,7 +5,7 @@ slug: /get-started-quickstart
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
|
||||
Get to know Langflow by building an OpenAI-powered chatbot application. After you've constructed a chatbot, add Retrieval Augmented Generation (RAG) to chat with your own data.
|
||||
Get to know Hanzoflow by building an OpenAI-powered chatbot application. After you've constructed a chatbot, add Retrieval Augmented Generation (RAG) to chat with your own data.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@@ -14,9 +14,9 @@ Get to know Langflow by building an OpenAI-powered chatbot application. After yo
|
||||
* An Astra DB application token scoped to read and write to the database
|
||||
* A collection created in [Astra](https://docs.datastax.com/en/astra-db-serverless/databases/manage-collections.html#create-collection) or a new collection created in the **Astra DB** component
|
||||
|
||||
## Open Langflow and start a new project
|
||||
## Open Hanzoflow and start a new project
|
||||
|
||||
1. From the Langflow dashboard, click **New Flow**, and then select **Blank Flow**. A blank workspace opens where you can build your flow.
|
||||
1. From the Hanzoflow dashboard, click **New Flow**, and then select **Blank Flow**. A blank workspace opens where you can build your flow.
|
||||
|
||||
:::tip
|
||||
If you don't want to create a blank flow, click **New Flow**, and then select **Basic Prompting** for a pre-built flow.
|
||||
@@ -66,7 +66,7 @@ Your finished basic prompting flow should look like this:
|
||||
|
||||
Add your OpenAI API key to the OpenAI model component, and add a prompt to the Prompt component to instruct the model how to respond.
|
||||
|
||||
1. Add your credentials to the OpenAI component. The fastest way to complete these fields is with Langflow’s [Global Variables](/configuration-global-variables).
|
||||
1. Add your credentials to the OpenAI component. The fastest way to complete these fields is with Hanzoflow’s [Global Variables](/configuration-global-variables).
|
||||
|
||||
1. In the OpenAI component’s OpenAI API Key field, click the <Icon name="Globe" aria-label="Globe" /> **Globe** button, and then click **Add New Variable**.
|
||||
Alternatively, click your username in the top right corner, and then click **Settings**, **Global Variables**, and then **Add New**.
|
||||
@@ -79,11 +79,11 @@ If you're unsure, use `Answer the user as if you were a GenAI expert, enthusiast
|
||||
3. Click **Playground** to start a chat session.
|
||||
4. Enter a query, and then make sure the bot responds according to the prompt you set in the **Prompt** component.
|
||||
|
||||
You have successfully created a chatbot application using OpenAI in the Langflow Workspace.
|
||||
You have successfully created a chatbot application using OpenAI in the Hanzoflow Workspace.
|
||||
|
||||
## Add vector RAG to your application
|
||||
|
||||
You created a chatbot application with Langflow, but let's try an experiment.
|
||||
You created a chatbot application with Hanzoflow, but let's try an experiment.
|
||||
|
||||
1. Ask the bot: `Who won the Oscar in 2024 for best movie?`
|
||||
2. The bot's response is similar to this:
|
||||
@@ -145,16 +145,16 @@ The [OpenAI Embeddings](/components-embedding-models#openai-embeddings) componen
|
||||
1. Select **New collection**.
|
||||
2. Complete the **Name**, **Embedding generation method**, **Embedding model**, and **Dimensions** fields, and then click **Create**.
|
||||
|
||||
Your choice for the **Embedding generation method** and **Embedding model** depends on whether you want to use embeddings generated by a provider through Astra's vectorize service, or generated by a component in Langflow.
|
||||
Your choice for the **Embedding generation method** and **Embedding model** depends on whether you want to use embeddings generated by a provider through Astra's vectorize service, or generated by a component in Hanzoflow.
|
||||
|
||||
* To use embeddings generated by a provider through Astra's vectorize service, select the model from the **Embedding generation method** dropdown menu, and then select the model from the **Embedding model** dropdown menu.
|
||||
* To use embeddings generated by a component in Langflow, select **Bring your own** for both the **Embedding generation method** and **Embedding model** fields. In this starter project, the option for the embeddings method and model is the **OpenAI Embeddings** component connected to the **Astra DB** component.
|
||||
* To use embeddings generated by a component in Hanzoflow, select **Bring your own** for both the **Embedding generation method** and **Embedding model** fields. In this starter project, the option for the embeddings method and model is the **OpenAI Embeddings** component connected to the **Astra DB** component.
|
||||
* The **Dimensions** value must match the dimensions of your collection. This field is **not required** if you use embeddings generated through Astra's vectorize service. You can find this value in the **Collection** in your [Astra DB deployment](https://astra.datastax.com).
|
||||
|
||||
For more information, see the [DataStax Astra DB Serverless documentation](https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html).
|
||||
|
||||
|
||||
If you used Langflow's **Global Variables** feature, the RAG application flow components are already configured with the necessary credentials.
|
||||
If you used Hanzoflow's **Global Variables** feature, the RAG application flow components are already configured with the necessary credentials.
|
||||
|
||||
### Run the chatbot with retrieved context
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: Welcome to Hanzoflow
|
||||
slug: /
|
||||
---
|
||||
|
||||
Hanzoflow is a new, visual framework for building multi-agent and RAG applications. It is open-source, Python-powered, fully customizable, and LLM and vector store agnostic.
|
||||
|
||||
Its intuitive interface allows for easy manipulation of AI building blocks, enabling developers to quickly prototype and turn their ideas into powerful, real-world solutions.
|
||||
|
||||
Hanzoflow empowers developers to rapidly prototype and build AI applications with its user-friendly interface and powerful features. Whether you're a seasoned AI developer or just starting out, Hanzoflow provides the tools you need to bring your AI ideas to life.
|
||||
|
||||
## Visual flow builder
|
||||
|
||||
Hanzoflow is an intuitive visual flow builder. This drag-and-drop interface allows developers to create complex AI workflows without writing extensive code. You can easily connect different components, such as prompts, language models, and data sources, to build sophisticated AI applications.
|
||||
|
||||

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

|
||||
|
||||
## Use cases
|
||||
|
||||
Langflow can be used for a wide range of AI applications, including:
|
||||
|
||||
* [Craft intelligent chatbots](/tutorials-memory-chatbot)
|
||||
* [Build document analysis systems](/tutorials-document-qa)
|
||||
* [Generate compelling content](/tutorials-blog-writer)
|
||||
* [Orchestrate multi-agent applications](/starter-projects-simple-agent)
|
||||
|
||||
## Community and support
|
||||
|
||||
Join Langflow's vibrant community of developers and AI enthusiasts. See the following resources to join discussions, share your projects, and get support:
|
||||
|
||||
* [Contribute to Langflow](contributing-how-to-contribute)
|
||||
* [Langflow Discord Server](https://discord.gg/EqksyE2EX9)
|
||||
* [@langflow_ai](https://twitter.com/langflow_ai)
|
||||
|
||||
## Get started with Langflow
|
||||
|
||||
- [Install Langflow](/get-started-installation)
|
||||
- [Quickstart](/get-started-quickstart)
|
||||
|
||||
@@ -3,11 +3,11 @@ title: Apify
|
||||
slug: /integrations-apify
|
||||
---
|
||||
|
||||
# Integrate Apify with Langflow
|
||||
# Integrate Apify with Hanzoflow
|
||||
|
||||
[Apify](https://apify.com/) is a web scraping and data extraction platform. It provides an [Actor Store](https://apify.com/store) with more than 3,000 ready-made cloud tools called **Actors**.
|
||||
|
||||
Apify components in Langflow run **Actors** to accomplish tasks like data extraction, content analysis, and SQL operations.
|
||||
Apify components in Hanzoflow run **Actors** to accomplish tasks like data extraction, content analysis, and SQL operations.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
|
||||
@@ -1,48 +1,48 @@
|
||||
---
|
||||
title: Integrate Arize with Langflow
|
||||
title: Integrate Arize with Hanzoflow
|
||||
slug: /integrations-arize
|
||||
---
|
||||
|
||||
Arize is a tool built on [OpenTelemetry](https://opentelemetry.io/) and [OpenInference](https://docs.arize.com/phoenix/reference/open-inference) for monitoring and optimizing LLM applications.
|
||||
|
||||
To add tracing to your Langflow application, add the `ARIZE_SPACE_ID` and `ARIZE_API_KEY` environment variables to your Langflow application.
|
||||
To add tracing to your Hanzoflow application, add the `ARIZE_SPACE_ID` and `ARIZE_API_KEY` environment variables to your Hanzoflow application.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
* If you are using the [standard Arize platform](https://docs.arize.com/arize), you need an **Arize Space ID** and **API API Key**.
|
||||
* If you are using the open-source [Arize Phoenix platform](https://docs.arize.com/phoenix), you need an Arize Phoenix API key and a project name.
|
||||
|
||||
## Connect Arize to Langflow
|
||||
## Connect Arize to Hanzoflow
|
||||
|
||||
1. To retrieve your **Arize Space ID** and **API API Key**, navigate to the [Arize dashboard](https://app.arize.com/).
|
||||
2. Click **Settings**, and then click **Space Settings and Keys**.
|
||||
3. Copy the **SpaceID** and **API Key (Ingestion Service Account Key)** values.
|
||||
4. Create a `.env` file in the root of your Langflow application.
|
||||
5. Add the `ARIZE_SPACE_ID` and `ARIZE_API_KEY` environment variables to your Langflow application.
|
||||
You do not need to specify the **Arize Project** name if you're using the standard Arize platform. The **Project** name in Arize is the same as the Langflow **Flow** name.
|
||||
4. Create a `.env` file in the root of your Hanzoflow application.
|
||||
5. Add the `ARIZE_SPACE_ID` and `ARIZE_API_KEY` environment variables to your Hanzoflow application.
|
||||
You do not need to specify the **Arize Project** name if you're using the standard Arize platform. The **Project** name in Arize is the same as the Hanzoflow **Flow** name.
|
||||
|
||||
```bash
|
||||
export ARIZE_SPACE_ID=<your-arize-space-id>
|
||||
export ARIZE_API_KEY=<your-arize-api-key>
|
||||
```
|
||||
|
||||
6. Start your Langflow application with the values from the `.env` file.
|
||||
6. Start your Hanzoflow application with the values from the `.env` file.
|
||||
|
||||
```bash
|
||||
uv run langflow run --env-file .env
|
||||
uv run hanzoflow run --env-file .env
|
||||
```
|
||||
|
||||
## Run a flow and view metrics in Arize
|
||||
|
||||
1. In Langflow, select the [Simple agent](/starter-projects-simple-agent) starter project.
|
||||
1. In Hanzoflow, select the [Simple agent](/starter-projects-simple-agent) starter project.
|
||||
2. In the **Agent** component's **OpenAI API Key** field, paste your **OpenAI API key**.
|
||||
3. Click **Playground**.
|
||||
Ask your Agent some questions to generate traffic.
|
||||
4. Navigate to the [Arize dashboard](https://app.arize.com/), and then open your project.
|
||||
You may have to wait a few minutes for Arize to process the data.
|
||||
5. The **LLM Tracing** tab shows metrics for your flow.
|
||||
Each Langflow execution generates two traces in Arize.
|
||||
The `AgentExecutor` trace is the Arize trace of Langchain's `AgentExecutor`. The UUID trace is the trace of the Langflow components.
|
||||
Each Hanzoflow execution generates two traces in Arize.
|
||||
The `AgentExecutor` trace is the Arize trace of Langchain's `AgentExecutor`. The UUID trace is the trace of the Hanzoflow components.
|
||||
6. To view traces, click the **Traces** tab.
|
||||
A **trace** is the complete journey of a request, made of multiple **spans**.
|
||||
7. To view **Spans**, select the **Spans** tab.
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,9 +1,9 @@
|
||||
---
|
||||
title: Integrate Composio with Langflow
|
||||
title: Integrate Composio with Hanzoflow
|
||||
slug: /integrations-composio
|
||||
---
|
||||
|
||||
Langflow integrates with [Composio](https://docs.composio.dev/introduction/intro/overview) as a toolset for your **Agent** component.
|
||||
Hanzoflow integrates with [Composio](https://docs.composio.dev/introduction/intro/overview) as a toolset for your **Agent** component.
|
||||
|
||||
Instead of juggling multiple integrations and components in your flow, connect the Composio component to an **Agent** component to use all of Composio's supported APIs and actions as **Tools** for your agent.
|
||||
|
||||
@@ -13,9 +13,9 @@ Instead of juggling multiple integrations and components in your flow, connect t
|
||||
- [An OpenAI API key](https://platform.openai.com/)
|
||||
- [A Gmail account](https://mail.google.com)
|
||||
|
||||
## Connect Langflow to a Composio tool
|
||||
## Connect Hanzoflow to a Composio tool
|
||||
|
||||
1. In the Langflow **Workspace**, add an **Agent** component.
|
||||
1. In the Hanzoflow **Workspace**, add an **Agent** component.
|
||||
2. In the **Workspace**, add the **Composio Tools** component.
|
||||
3. Connect the **Agent** component's **Tools** port to the **Composio Tools** component's **Tools** port.
|
||||
4. In the **Composio API Key** field, paste your Composio API key.
|
||||
@@ -27,9 +27,9 @@ The component's fields change based on the tool you selected.
|
||||
The **Gmail** tool requires authentication with Google, so it presents an **Authentication Link** button.
|
||||
7. Click the link to authenticate.
|
||||
8. In the Google authentication dialog, enter the credentials for the Gmail account you want to control with Composio, and then click **Authenticate**.
|
||||
9. Return to Langflow.
|
||||
9. Return to Hanzoflow.
|
||||
10. To update the Composio component, click **Refresh**.
|
||||
The **Auth Status** field changes to a ✅, which indicates the Langflow component is connected to your Composio account.
|
||||
The **Auth Status** field changes to a ✅, which indicates the Hanzoflow component is connected to your Composio account.
|
||||
11. In the **Actions to use** field, select the action you want the **Agent** to take with the **Gmail** tool.
|
||||
The **Gmail** tool supports multiple actions, and also supports multiple actions within the same tool.
|
||||
The default value of **GMAIL_CREATE_EMAIL_DRAFT** is OK for this example.
|
||||
@@ -110,5 +110,5 @@ Body: Hello from composio!
|
||||
7. To confirm further, navigate to the Gmail account you authenticated with Composio.
|
||||
Your email is visible in **Drafts**.
|
||||
|
||||
You have successfully integrated your Langflow component with Composio.
|
||||
You have successfully integrated your Hanzoflow component with Composio.
|
||||
To add more tools, add another Composio component.
|
||||
+11
-11
@@ -1,12 +1,12 @@
|
||||
---
|
||||
title: Integrate Google Cloud Vertex AI with Langflow
|
||||
slug: /integrations-setup-google-cloud-vertex-ai-langflow
|
||||
description: "A comprehensive guide on creating a Google OAuth app, obtaining tokens, and integrating them with Langflow's Google components."
|
||||
title: Integrate Google Cloud Vertex AI with Hanzoflow
|
||||
slug: /integrations-setup-google-cloud-vertex-ai-hanzoflow
|
||||
description: "A comprehensive guide on creating a Google OAuth app, obtaining tokens, and integrating them with Hanzoflow's Google components."
|
||||
---
|
||||
|
||||
Langflow integrates with the [Google Vertex AI API](https://console.cloud.google.com/marketplace/product/google/aiplatform.googleapis.com) for authenticating the [Vertex AI embeddings model](/components-embedding-models#vertexai-embeddings) and [Vertex AI](/components-models#vertexai) components.
|
||||
Hanzoflow integrates with the [Google Vertex AI API](https://console.cloud.google.com/marketplace/product/google/aiplatform.googleapis.com) for authenticating the [Vertex AI embeddings model](/components-embedding-models#vertexai-embeddings) and [Vertex AI](/components-models#vertexai) components.
|
||||
|
||||
Learn how to create a service account JSON in Google Cloud to authenticate Langflow’s Vertex AI components.
|
||||
Learn how to create a service account JSON in Google Cloud to authenticate Hanzoflow’s Vertex AI components.
|
||||
|
||||
## Create a service account with Vertex AI access
|
||||
|
||||
@@ -15,24 +15,24 @@ For more information, see [Create a Google Cloud project](https://developers.goo
|
||||
2. Create a service account in your Google Cloud project.
|
||||
For more information, see [Create a service account](https://developers.google.com/workspace/guides/create-credentials#service-account).
|
||||
3. Assign the **Vertex AI Service Agent** role to your new account.
|
||||
This role allows Langflow to access Vertex AI resources.
|
||||
This role allows Hanzoflow to access Vertex AI resources.
|
||||
For more information, see [Vertex AI access control with IAM](https://cloud.google.com/vertex-ai/docs/general/access-control).
|
||||
4. To generate a new JSON key for the service account, navigate to your service account.
|
||||
5. Click **Add Key**, and then click **Create new key**.
|
||||
6. Under **Key type**, select **JSON**, and then click **Create**.
|
||||
A JSON private key file is downloaded.
|
||||
Now that you have a service account and a JSON private key, you need to configure the credentials in Langflow components.
|
||||
Now that you have a service account and a JSON private key, you need to configure the credentials in Hanzoflow components.
|
||||
|
||||
## Configure credentials in Langflow components
|
||||
## Configure credentials in Hanzoflow components
|
||||
|
||||
With your service account configured and your credentials JSON file created, follow these steps to authenticate the Langflow application.
|
||||
With your service account configured and your credentials JSON file created, follow these steps to authenticate the Hanzoflow application.
|
||||
|
||||
1. Create a new project in Langflow.
|
||||
1. Create a new project in Hanzoflow.
|
||||
2. From the components sidebar, drag and drop either the **Vertex AI** or **Vertex AI Embeddings** component to your workspace.
|
||||
3. In the Vertex AI component's **Credentials** field, add the service account JSON file.
|
||||
4. Confirm the component can access the Vertex AI resources.
|
||||
Connect a **Chat input** and **Chat output** component to the Vertex AI component.
|
||||
A successful chat confirms the component has access to the Vertex AI resources.
|
||||
|
||||

|
||||

|
||||
|
||||
+15
-15
@@ -1,15 +1,15 @@
|
||||
---
|
||||
title: Integrate Google OAuth with Langflow
|
||||
slug: /integrations-setup-google-oauth-langflow
|
||||
title: Integrate Google OAuth with Hanzoflow
|
||||
slug: /integrations-setup-google-oauth-hanzoflow
|
||||
|
||||
description: "A comprehensive guide on creating a Google OAuth app, obtaining tokens, and integrating them with Langflow's Google components."
|
||||
description: "A comprehensive guide on creating a Google OAuth app, obtaining tokens, and integrating them with Hanzoflow's Google components."
|
||||
---
|
||||
|
||||
import TOCInline from '@theme/TOCInline';
|
||||
|
||||
Langflow integrates with [Google OAuth](https://developers.google.com/identity/protocols/oauth2) for authenticating the [Gmail loader](/components-data#gmail-loader), [Google Drive loader](components-data#google-drive-loader), and [Google Drive Search](/components-data#google-drive-search) components.
|
||||
Hanzoflow integrates with [Google OAuth](https://developers.google.com/identity/protocols/oauth2) for authenticating the [Gmail loader](/components-data#gmail-loader), [Google Drive loader](components-data#google-drive-loader), and [Google Drive Search](/components-data#google-drive-search) components.
|
||||
|
||||
Learn how to create an OAuth app in Google Cloud, obtain the necessary credentials and access tokens, and add them to Langflow’s Google components.
|
||||
Learn how to create an OAuth app in Google Cloud, obtain the necessary credentials and access tokens, and add them to Hanzoflow’s Google components.
|
||||
|
||||
## Create an OAuth Application in Google Cloud {#5b8981b15d86192d17b0e5725c1f95e7}
|
||||
|
||||
@@ -26,7 +26,7 @@ For audience, select **External**.
|
||||
This creates a testing application environment that you can add users to.
|
||||
6. To add users to your OAuth audience, click **Audience**.
|
||||
Under **Test users**, click **Add users**.
|
||||
Enter any email addresses you intend to use to authenticate Langflow with OAuth.
|
||||
Enter any email addresses you intend to use to authenticate Hanzoflow with OAuth.
|
||||
These email addresses have access to the application while it's in a **Testing** publishing state.
|
||||
For more information, see the [Google documentation](https://support.google.com/cloud/answer/13461325?hl=en).
|
||||
7. To create an **OAuth Client ID**, navigate to **Clients**, and then click **Create Client**.
|
||||
@@ -39,23 +39,23 @@ Download the credentials as a JSON file to your local machine and save it secure
|
||||
|
||||
## Retrieve Access and Refresh Tokens
|
||||
|
||||
With your OAuth application configured and your credentials JSON file created, follow these steps to authenticate the Langflow application.
|
||||
With your OAuth application configured and your credentials JSON file created, follow these steps to authenticate the Hanzoflow application.
|
||||
|
||||
1. Create a new project in Langflow.
|
||||
1. Create a new project in Hanzoflow.
|
||||
2. Add a **Google OAuth Token** component to your flow.
|
||||
3. In the **Credentials File** field of the Google OAuth Token component, enter the path to your **Credentials File**, the JSON file containing the Client ID credentials you downloaded from Google in the previous steps.
|
||||
4. In the **Scopes** field of the Google Oauth Token component, enter the scope required to access your resources.
|
||||
For example, to allow your Langflow application to access a user's Google Drive, the scope is `https://www.googleapis.com/auth/drive`.
|
||||
For example, to allow your Hanzoflow application to access a user's Google Drive, the scope is `https://www.googleapis.com/auth/drive`.
|
||||
For more information, see the [Google documentation](https://developers.google.com/identity/protocols/oauth2/scopes).
|
||||
5. To authenticate your application, in the **Google OAuth Token** component, click **Play**.
|
||||
A new tab opens in the browser to authenticate your application using your Google Cloud account. You must authenticate the application with the same Google account that created the OAuth credentials.
|
||||
|
||||
:::info
|
||||
If a new tab does not open automatically, check the Langflow **Logs** for the Google authentication URL. Open this URL in your browser to complete the authentication.
|
||||
If a new tab does not open automatically, check the Hanzoflow **Logs** for the Google authentication URL. Open this URL in your browser to complete the authentication.
|
||||
:::
|
||||
|
||||
6. After successful authentication, your Langflow application can request and refresh tokens.
|
||||
These tokens enable Langflow to interact with Google services on your behalf and execute your specified requests.
|
||||
6. After successful authentication, your Hanzoflow application can request and refresh tokens.
|
||||
These tokens enable Hanzoflow to interact with Google services on your behalf and execute your specified requests.
|
||||
|
||||
## Create a flow with Google Drive loader
|
||||
|
||||
@@ -64,13 +64,13 @@ For a pre-built JSON file of a flow that uses the Google Drive loader component,
|
||||
In this example, the **Google Drive loader** component loads a text file hosted on Google Drive, translates the text to Spanish, and returns it to a chat output.
|
||||
|
||||
1. Download the <a href="./files/Google_Drive_Docs_Translations_Example.json" download>Google Drive Document Translation Example Flow JSON</a> to your local machine.
|
||||
2. To import the downloaded JSON to Langflow, click **Options**, and then select **Import**.
|
||||
2. To import the downloaded JSON to Hanzoflow, click **Options**, and then select **Import**.
|
||||
3. In the **Credentials File** field of the Google OAuth Token component, enter the path to your **Credentials File**, the JSON file containing the Client ID credentials you downloaded from Google in the previous steps.
|
||||
4. In the **Scopes** field of the Google Oauth Token component, enter the scope required to access your resources.
|
||||
For example, to allow your Langflow application to access a user's Google Drive, the scope is `https://www.googleapis.com/auth/drive`.
|
||||
For example, to allow your Hanzoflow application to access a user's Google Drive, the scope is `https://www.googleapis.com/auth/drive`.
|
||||
For more information, see the [Google documentation](https://developers.google.com/identity/protocols/oauth2/scopes).
|
||||
The example flow includes a **Parse data** component to convert the `data` output of the Google OAuth Token component to the `text` input of the JSON Cleaner component.
|
||||
5. To allow the Langflow component to access the document in Google Drive, copy the Google Drive `documentID` from the document's URL.
|
||||
5. To allow the Hanzoflow component to access the document in Google Drive, copy the Google Drive `documentID` from the document's URL.
|
||||
:::info
|
||||
The `documentID` is located between `/d/` and `/edit` in a Google Drive document's URL.
|
||||
For example, in the URL `https://drive.google.com/file/d/1a2b3c4D5E6F7gHI8J9klmnopQ/edit`, the `documentID` is `1a2b3c4D5E6F7gHI8J9klmnopQ`.
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -5,7 +5,7 @@ slug: /integrations/notion/setup
|
||||
|
||||
# Set up a Notion App
|
||||
|
||||
To use Notion components in Langflow, you first need to create a Notion integration and configure it with the necessary capabilities. This guide will walk you through the process of setting up a Notion integration and granting it access to your Notion databases.
|
||||
To use Notion components in Hanzoflow, you first need to create a Notion integration and configure it with the necessary capabilities. This guide will walk you through the process of setting up a Notion integration and granting it access to your Notion databases.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@@ -44,7 +44,7 @@ To authenticate your integration with Notion, you need to obtain an integration
|
||||
2. Copy the "Internal Integration Token" value. This token will be used to authenticate your integration with Notion.
|
||||
|
||||
:::warning
|
||||
Your integration token is a sensitive piece of information. Make sure to keep it secure and never share it publicly. Store it safely in your Langflow configuration or environment variables.
|
||||
Your integration token is a sensitive piece of information. Make sure to keep it secure and never share it publicly. Store it safely in your Hanzoflow configuration or environment variables.
|
||||
:::
|
||||
|
||||
## Grant Integration Access to Notion Databases
|
||||
@@ -60,11 +60,11 @@ For your integration to interact with Notion databases, you need to grant it acc
|
||||
If your database contains references to other databases, you need to grant the integration access to those referenced databases as well. Repeat step 4 for each referenced database to ensure your integration has the necessary access.
|
||||
:::
|
||||
|
||||
## Build with Notion Components in Langflow
|
||||
## Build with Notion Components in Hanzoflow
|
||||
|
||||
Once you have set up your Notion integration and granted it access to the required databases, you can start using the Notion components in Langflow.
|
||||
Once you have set up your Notion integration and granted it access to the required databases, you can start using the Notion components in Hanzoflow.
|
||||
|
||||
Langflow provides the following Notion components:
|
||||
Hanzoflow provides the following Notion components:
|
||||
|
||||
- **Search**: Searches all pages and databases that have been shared with the integration. You can filter results to either pages or databases and specify the sort direction.
|
||||
- **List Users**: Retrieves a list of users from the Notion workspace.
|
||||
@@ -76,8 +76,8 @@ Langflow provides the following Notion components:
|
||||
- **Page Content Viewer**: Retrieves the content of a Notion page as plain text.
|
||||
|
||||
Each of these components output both "Data" and "Tool":
|
||||
- The "Data" output can be used directly in your Langflow for further processing or display.
|
||||
- The "Tool" output can be utilized in Langflow Agents, allowing them to interact with Notion programmatically.
|
||||
- The "Data" output can be used directly in your Hanzoflow for further processing or display.
|
||||
- The "Tool" output can be utilized in Hanzoflow Agents, allowing them to interact with Notion programmatically.
|
||||
|
||||
|
||||
## Additional Resources
|
||||
@@ -85,4 +85,4 @@ Each of these components output both "Data" and "Tool":
|
||||
- [Notion API Documentation](https://developers.notion.com/docs/getting-started)
|
||||
- [Notion Integration Capabilities](https://developers.notion.com/reference/capabilities)
|
||||
|
||||
If you encounter any issues or have questions, please reach out to our support team or consult the Langflow community forums.
|
||||
If you encounter any issues or have questions, please reach out to our support team or consult the Hanzoflow community forums.
|
||||
|
||||
@@ -51,11 +51,11 @@ The Notion Conversational Agent is an AI-powered assistant that interacts with y
|
||||
|
||||
---
|
||||
|
||||
1. Open Langflow and create a new project.
|
||||
2. Add the components listed above to your flow canvas, or Download the [Conversation Agent Flow](./Conversational_Notion_Agent.json)(Download link) and **Import** the JSON file into Langflow.
|
||||
1. Open Hanzoflow and create a new project.
|
||||
2. Add the components listed above to your flow canvas, or Download the [Conversation Agent Flow](./Conversational_Notion_Agent.json)(Download link) and **Import** the JSON file into Hanzoflow.
|
||||
3. Connect the components as shown in the flow diagram.
|
||||
4. Input the Notion and OpenAI API keys in their respective components.
|
||||
5. To start the flow, click the "Play" button in Langflow.
|
||||
5. To start the flow, click the "Play" button in Hanzoflow.
|
||||
6. In the chat interface, enter a Notion-related request or question. For example:
|
||||
- "Create a new page in my task database"
|
||||
- "Search for pages about project management"
|
||||
@@ -139,6 +139,6 @@ If you encounter issues:
|
||||
1. Ensure all API keys are correctly set and have the necessary permissions.
|
||||
2. Check that your Notion integration has access to the relevant pages and databases.
|
||||
3. Verify that all components are properly connected in the flow.
|
||||
4. Review the Langflow logs for any error messages.
|
||||
4. Review the Hanzoflow logs for any error messages.
|
||||
|
||||
For more advanced usage and integration options, refer to the [Notion API documentation](https://developers.notion.com/) and [Langflow documentation](/).
|
||||
For more advanced usage and integration options, refer to the [Notion API documentation](https://developers.notion.com/) and [Hanzoflow documentation](/).
|
||||
@@ -139,8 +139,8 @@ Displays the final output of the Notion Agent in the Playground.
|
||||
|
||||
To run the Notion Agent for Meeting Notes:
|
||||
|
||||
1. Open Langflow and create a new project.
|
||||
2. Add the components listed above to your flow canvas, or download the [Flow Meeting Agent Flow](./Meeting_Notes_Agent.json)(Download link) and **Import** the JSON file into Langflow.
|
||||
1. Open Hanzoflow and create a new project.
|
||||
2. Add the components listed above to your flow canvas, or download the [Flow Meeting Agent Flow](./Meeting_Notes_Agent.json)(Download link) and **Import** the JSON file into Hanzoflow.
|
||||
3. Connect the components as shown in the flow diagram.
|
||||
4. Input the Notion and OpenAI API keys in their respective components.
|
||||
5. Paste your meeting transcript into the Meeting Transcript component.
|
||||
@@ -170,6 +170,6 @@ If you encounter issues:
|
||||
1. Ensure all API keys are correctly set and have the necessary permissions.
|
||||
2. Check that your Notion integration has access to the relevant pages and databases.
|
||||
3. Verify that all components are properly connected in the flow.
|
||||
4. Review the Langflow logs for any error messages.
|
||||
4. Review the Hanzoflow logs for any error messages.
|
||||
|
||||
For more advanced usage and integration options, refer to the [Notion API documentation](https://developers.notion.com/) and [Langflow documentation](/).
|
||||
For more advanced usage and integration options, refer to the [Notion API documentation](https://developers.notion.com/) and [Hanzoflow documentation](/).
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: Integrate NVIDIA Ingest with Langflow
|
||||
title: Integrate NVIDIA Ingest with Hanzoflow
|
||||
slug: /integrations-nvidia-ingest
|
||||
---
|
||||
|
||||
@@ -13,20 +13,20 @@ The **NVIDIA Ingest** component imports the NVIDIA `Ingestor` client, ingests fi
|
||||
|
||||
* An NVIDIA Ingest endpoint. For more information on setting up an NVIDIA Ingest endpoint, see the [NVIDIA Ingest quickstart](https://github.com/NVIDIA/nv-ingest?tab=readme-ov-file#quickstart).
|
||||
|
||||
* The **NVIDIA Ingest** component requires the installation of additional dependencies to your Langflow environment. To install the dependencies in a virtual environment, run the following commands.
|
||||
* The **NVIDIA Ingest** component requires the installation of additional dependencies to your Hanzoflow environment. To install the dependencies in a virtual environment, run the following commands.
|
||||
|
||||
* If you have the Langflow repository cloned and installed from source:
|
||||
* If you have the Hanzoflow repository cloned and installed from source:
|
||||
```bash
|
||||
source **YOUR_LANGFLOW_VENV**/bin/activate
|
||||
source **YOUR_HANZOFLOW_VENV**/bin/activate
|
||||
uv sync --extra nv-ingest
|
||||
uv run langflow run
|
||||
uv run hanzoflow run
|
||||
```
|
||||
|
||||
* If you are installing Langflow from the Python Package Index:
|
||||
* If you are installing Hanzoflow from the Python Package Index:
|
||||
```bash
|
||||
source **YOUR_LANGFLOW_VENV**/bin/activate
|
||||
uv pip install --prerelease=allow 'langflow[nv-ingest]'
|
||||
uv run langflow run
|
||||
source **YOUR_HANZOFLOW_VENV**/bin/activate
|
||||
uv pip install --prerelease=allow 'hanzoflow[nv-ingest]'
|
||||
uv run hanzoflow run
|
||||
```
|
||||
|
||||
## Use the NVIDIA Ingest component in a flow
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
---
|
||||
title: Integrate NVIDIA NIMs with Langflow
|
||||
title: Integrate NVIDIA NIMs with Hanzoflow
|
||||
slug: /integrations-nvidia-ingest-wsl2
|
||||
---
|
||||
|
||||
Connect **Langflow** with **NVIDIA NIM** on an RTX Windows system with [Windows Subsystem for Linux 2 (WSL2)](https://learn.microsoft.com/en-us/windows/wsl/install) installed.
|
||||
Connect **Hanzoflow** with **NVIDIA NIM** on an RTX Windows system with [Windows Subsystem for Linux 2 (WSL2)](https://learn.microsoft.com/en-us/windows/wsl/install) installed.
|
||||
|
||||
[NVIDIA NIM (NVIDIA Inference Microservices)](https://docs.nvidia.com/nim/index.html) provides containers to self-host GPU-accelerated inferencing microservices.
|
||||
In this example, you connect a model component in **Langflow** to a deployed `mistral-nemo-12b-instruct` NIM on an **RTX Windows system** with **WSL2**.
|
||||
In this example, you connect a model component in **Hanzoflow** to a deployed `mistral-nemo-12b-instruct` NIM on an **RTX Windows system** with **WSL2**.
|
||||
|
||||
For more information on NVIDIA NIM, see the [NVIDIA documentation](https://docs.nvidia.com/nim/index.html).
|
||||
|
||||
@@ -20,7 +20,7 @@ For example, to deploy the `mistral-nemo-12b-instruct` NIM, follow the instructi
|
||||
|
||||
## Use the NVIDIA NIM in a flow
|
||||
|
||||
To connect the NIM you've deployed with Langflow, add the **NVIDIA** model component to a flow.
|
||||
To connect the NIM you've deployed with Hanzoflow, add the **NVIDIA** model component to a flow.
|
||||
|
||||
1. Create a [basic prompting flow](/get-started-quickstart).
|
||||
2. Replace the **OpenAI** model component with the **NVIDIA** component.
|
||||
|
||||
@@ -132,8 +132,8 @@ This component can be used as a standalone component to list all previously gene
|
||||
|
||||
To run the Transcription and Speech AI Flow:
|
||||
|
||||
1. Open Langflow and create a new project.
|
||||
2. Add the components listed above to your flow canvas, or download the [AssemblyAI Transcription and Speech AI Flow](./AssemblyAI_Flow.json)(Download link) and **Import** the JSON file into Langflow.
|
||||
1. Open Hanzoflow and create a new project.
|
||||
2. Add the components listed above to your flow canvas, or download the [AssemblyAI Transcription and Speech AI Flow](./AssemblyAI_Flow.json)(Download link) and **Import** the JSON file into Hanzoflow.
|
||||
3. Connect the components as shown in the flow diagram. **Tip**: Freeze the path of the *Start Transcript* component to only submit the file once.
|
||||
4. Input the AssemblyAI API key in in all components that require the key (Start Transcript, Poll Transcript, Get Subtitles, LeMUR, List Transcripts).
|
||||
5. Select an audio or video file in the *Start Transcript* component.
|
||||
@@ -159,6 +159,6 @@ If you encounter issues:
|
||||
1. Ensure the API key is correctly set in all components that require the key.
|
||||
2. To use LeMUR, you need to upgrade your AssemblyAI account, since this is not included in the free account.
|
||||
3. Verify that all components are properly connected in the flow.
|
||||
4. Review the Langflow logs for any error messages.
|
||||
4. Review the Hanzoflow logs for any error messages.
|
||||
|
||||
For more advanced usage, refer to the [AssemblyAI API documentation](https://www.assemblyai.com/docs/). If you need more help, you can reach out to the [AssemblyAI support](https://www.assemblyai.com/contact/support).
|
||||
|
||||
@@ -6,15 +6,15 @@ slug: /integrations-langfuse
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
# Integrate Langfuse with Langflow
|
||||
# Integrate Langfuse with Hanzoflow
|
||||
|
||||
[Langfuse](https://langfuse.com/) is an observability and analytics platform specifically designed for language models and AI applications.
|
||||
|
||||
This guide walks you through how to configure Langflow to collect [tracing](https://langfuse.com/docs/tracing) data about your flow executions and automatically send the data to Langfuse.
|
||||
This guide walks you through how to configure Hanzoflow to collect [tracing](https://langfuse.com/docs/tracing) data about your flow executions and automatically send the data to Langfuse.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- A project in Langflow with a runnable flow
|
||||
- A project in Hanzoflow with a runnable flow
|
||||
- A Langfuse Cloud account in any [data region](https://langfuse.com/faq/all/cloud-data-regions)
|
||||
- A Langfuse organization and project
|
||||
|
||||
@@ -30,7 +30,7 @@ This guide walks you through how to configure Langflow to collect [tracing](http
|
||||
|
||||
## Set your Langfuse credentials as environment variables
|
||||
|
||||
Set your Langfuse project credentials as environment variables in the same environment where you run Langflow.
|
||||
Set your Langfuse project credentials as environment variables in the same environment where you run Hanzoflow.
|
||||
|
||||
You can use any method you prefer to set environment variables.
|
||||
The following examples show how to set environment variables in a terminal session (Linux or macOS) and in a command prompt session (Windows):
|
||||
@@ -57,21 +57,21 @@ set LANGFUSE_HOST=HOST_URL
|
||||
|
||||
Replace `SECRET_KEY`, `PUBLIC_KEY`, and `HOST_URL` with the API key information you copied from Langfuse.
|
||||
|
||||
## Start Langflow and run a flow
|
||||
## Start Hanzoflow and run a flow
|
||||
|
||||
1. Start Langflow in the same terminal or environment where you set the environment variables:
|
||||
1. Start Hanzoflow in the same terminal or environment where you set the environment variables:
|
||||
|
||||
```bash
|
||||
uv run langflow run
|
||||
uv run hanzoflow run
|
||||
```
|
||||
|
||||
2. In Langflow, open an existing project, and then run a flow.
|
||||
2. In Hanzoflow, open an existing project, and then run a flow.
|
||||
|
||||
## View tracing data in Langfuse
|
||||
|
||||
Langflow automatically collects and sends tracing data about the flow execution to Langfuse.
|
||||
Hanzoflow automatically collects and sends tracing data about the flow execution to Langfuse.
|
||||
You can view the collected data in your Langfuse project dashboard.
|
||||
|
||||
## Disable the Langfuse integration
|
||||
|
||||
To disable the Langfuse integration, remove the environment variables you set in the previous steps and restart Langflow.
|
||||
To disable the Langfuse integration, remove the environment variables you set in the previous steps and restart Hanzoflow.
|
||||
|
||||
@@ -5,7 +5,7 @@ slug: /integrations-langsmith
|
||||
|
||||
|
||||
|
||||
LangSmith is a full-lifecycle DevOps service from LangChain that provides monitoring and observability. To integrate with Langflow, just add your LangChain API key as a Langflow environment variable and you are good to go!
|
||||
LangSmith is a full-lifecycle DevOps service from LangChain that provides monitoring and observability. To integrate with Hanzoflow, just add your LangChain API key as a Hanzoflow environment variable and you are good to go!
|
||||
|
||||
|
||||
## Step-by-step Configuration {#b912579a43984f9a92921232b67c885d}
|
||||
@@ -14,7 +14,7 @@ LangSmith is a full-lifecycle DevOps service from LangChain that provides monito
|
||||
---
|
||||
|
||||
1. Obtain your LangChain API key from [https://smith.langchain.com](https://smith.langchain.com/)
|
||||
2. Add the following keys to Langflow .env file:
|
||||
2. Add the following keys to Hanzoflow .env file:
|
||||
|
||||
`LANGCHAIN_API_KEY="your-api-key"LANGCHAIN_PROJECT="your-project-name"`
|
||||
|
||||
@@ -24,8 +24,8 @@ or export the environment variables in your terminal:
|
||||
|
||||
`export LANGCHAIN_API_KEY="your-api-key"export LANGCHAIN_PROJECT="your-project-name"`
|
||||
|
||||
3. Restart Langflow using `langflow run --env-file .env`
|
||||
4. Run a project in Langflow.
|
||||
3. Restart Hanzoflow using `hanzoflow run --env-file .env`
|
||||
4. Run a project in Hanzoflow.
|
||||
5. View the Langsmith dashboard for monitoring and observability.
|
||||
|
||||

|
||||
|
||||
@@ -11,13 +11,13 @@ slug: /integrations-langwatch
|
||||
LangWatch is an all-in-one LLMOps platform for monitoring, observability, analytics, evaluations and alerting for getting user insights and improve your LLM workflows.
|
||||
|
||||
|
||||
To integrate with Langflow, just add your LangWatch API as a Langflow environment variable and you are good to go!
|
||||
To integrate with Hanzoflow, just add your LangWatch API as a Hanzoflow environment variable and you are good to go!
|
||||
|
||||
|
||||
## Step-by-step Configuration {#6f1d56ff6063417491d100d522dfcf1a}
|
||||
|
||||
1. Obtain your LangWatch API key from [https://app.langwatch.ai/](https://app.langwatch.ai/)
|
||||
2. Add the following key to Langflow .env file:
|
||||
2. Add the following key to Hanzoflow .env file:
|
||||
|
||||
```shell
|
||||
LANGWATCH_API_KEY="your-api-key"
|
||||
@@ -31,8 +31,8 @@ or export it in your terminal:
|
||||
export LANGWATCH_API_KEY="your-api-key"
|
||||
```
|
||||
|
||||
3. Restart Langflow using `langflow run --env-file .env`
|
||||
4. Run a project in Langflow.
|
||||
3. Restart Hanzoflow using `hanzoflow run --env-file .env`
|
||||
4. Run a project in Hanzoflow.
|
||||
5. View the LangWatch dashboard for monitoring and observability.
|
||||
|
||||

|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
---
|
||||
title: Integrate Langflow with MCP (Model context protocol)
|
||||
title: Integrate Hanzoflow with MCP (Model context protocol)
|
||||
slug: /integrations-mcp
|
||||
---
|
||||
|
||||
Langflow integrates with the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction). This allows you to use your Langflow flows as tools in other applications that support the MCP, or extend Langflow with the [MCP stdio component](/components-tools#mcp-tools-stdio) to access MCP servers.
|
||||
Hanzoflow integrates with the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction). This allows you to use your Hanzoflow flows as tools in other applications that support the MCP, or extend Hanzoflow with the [MCP stdio component](/components-tools#mcp-tools-stdio) to access MCP servers.
|
||||
|
||||
You can use Langflow as an MCP server with any [MCP client](https://modelcontextprotocol.io/clients).
|
||||
You can use Hanzoflow as an MCP server with any [MCP client](https://modelcontextprotocol.io/clients).
|
||||
For example purposes, this guide presents two ways to interact with the MCP:
|
||||
|
||||
* [Access all of your flows as tools from Claude for Desktop](#access-all-of-your-flows-as-tools-from-claude-for-desktop)
|
||||
* [Use the MCP stdio component to connect Langflow to a Datastax Astra DB MCP server](#connect-an-astra-db-mcp-server-to-langflow)
|
||||
* [Use the MCP stdio component to connect Hanzoflow to a Datastax Astra DB MCP server](#connect-an-astra-db-mcp-server-to-hanzoflow)
|
||||
|
||||
## Access all of your flows as tools from Claude for Desktop
|
||||
|
||||
@@ -31,7 +31,7 @@ Replace `/path/to/uvx` and `/path/to/python` with the paths from your system:
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"langflow": {
|
||||
"hanzoflow": {
|
||||
"command": "/bin/sh",
|
||||
"args": ["-c", "/path/to/uvx --python /path/to/python mcp-sse-shim@latest"],
|
||||
"env": {
|
||||
@@ -43,7 +43,7 @@ Replace `/path/to/uvx` and `/path/to/python` with the paths from your system:
|
||||
}
|
||||
```
|
||||
|
||||
This code adds a new MCP server called `langflow` and starts the [mcp-sse-shim](https://github.com/phact/mcp-sse-shim) package using the specified Python interpreter and uvx.
|
||||
This code adds a new MCP server called `hanzoflow` and starts the [mcp-sse-shim](https://github.com/phact/mcp-sse-shim) package using the specified Python interpreter and uvx.
|
||||
|
||||
7. Restart Claude for Desktop.
|
||||
Your new tools are available in your chat window. Click the tools icon to see a list of your flows.
|
||||
@@ -51,15 +51,15 @@ Your new tools are available in your chat window. Click the tools icon to see a
|
||||
You can now use your flows as tools in Claude for Desktop.
|
||||
Claude determines when to use tools based on your queries, and will request permissions when necessary.
|
||||
|
||||
## Connect an Astra DB MCP server to Langflow
|
||||
## Connect an Astra DB MCP server to Hanzoflow
|
||||
|
||||
Use the [MCP stdio component](/components-tools#mcp-tools-stdio) to connect Langflow to a [Datastax Astra DB MCP server](https://github.com/datastax/astra-db-mcp).
|
||||
Use the [MCP stdio component](/components-tools#mcp-tools-stdio) to connect Hanzoflow to a [Datastax Astra DB MCP server](https://github.com/datastax/astra-db-mcp).
|
||||
|
||||
1. Install an LTS release of [Node.js](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm).
|
||||
2. Create an [OpenAI](https://platform.openai.com/) API key.
|
||||
3. Create an [Astra DB Serverless (Vector) database](https://docs.datastax.com/en/astra-db-serverless/databases/create-database.html#create-vector-database), if you don't already have one.
|
||||
4. Get your database's **Astra DB API endpoint** and an **Astra DB application token** with the Database Administrator role. For more information, see [Generate an application token for a database](https://docs.datastax.com/en/astra-db-serverless/administration/manage-application-tokens.html#database-token).
|
||||
5. Add your **Astra DB application token** and **Astra API endpoint** to Langflow as [global variables](/configuration-global-variables).
|
||||
5. Add your **Astra DB application token** and **Astra API endpoint** to Hanzoflow as [global variables](/configuration-global-variables).
|
||||
6. Create a [Simple agent starter project](/starter-projects-simple-agent).
|
||||
7. Remove the **URL** tool and replace it with an [MCP stdio component](/components-tools#mcp-tools-stdio) component.
|
||||
The flow should look like this:
|
||||
@@ -72,5 +72,5 @@ npx -y @datastax/astra-db-mcp
|
||||
|
||||
9. In the **Agent** component, add your **OpenAI API key**.
|
||||
10. Open the **Playground**.
|
||||
Langflow is now connected to your Astra DB database through the MCP.
|
||||
Hanzoflow is now connected to your Astra DB database through the MCP.
|
||||
You can use the MCP to create, read, update, and delete data from your database.
|
||||
|
||||
@@ -6,21 +6,21 @@ slug: /integrations-opik
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
# Integrate Opik with Langflow
|
||||
# Integrate Opik with Hanzoflow
|
||||
|
||||
[Opik](https://www.comet.com/site/products/opik/) is an open-source platform designed for evaluating, testing, and monitoring large language model (LLM) applications. Developed by Comet, it aims to facilitate more intuitive collaboration, testing, and monitoring of LLM-based applications.
|
||||
|
||||
This guide walks you through how to configure Langflow to collect [tracing](https://www.comet.com/docs/opik/tracing/log_traces) data about your flow executions and automatically send the data to Opik.
|
||||
This guide walks you through how to configure Hanzoflow to collect [tracing](https://www.comet.com/docs/opik/tracing/log_traces) data about your flow executions and automatically send the data to Opik.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- A project in Langflow with a runnable flow
|
||||
- A project in Hanzoflow with a runnable flow
|
||||
- An Open-Source Opik server or an Opik Cloud account - You can learn more about the differences [here](https://www.comet.com/docs/opik/faq#what-is-the-difference-between-opik-cloud-and-the-open-source-opik-platform-)
|
||||
- If you are using Opik Cloud, you will also need your [Opik API key](https://www.comet.com/docs/opik/faq#where-can-i-find-my-opik-api-key-)
|
||||
|
||||
## Set your Opik configuration as environment variables
|
||||
|
||||
Call the CLI `opik configure` to save your Opik configuration in the same environment where you run Langflow.
|
||||
Call the CLI `opik configure` to save your Opik configuration in the same environment where you run Hanzoflow.
|
||||
|
||||
```bash
|
||||
opik configure
|
||||
@@ -34,19 +34,19 @@ opik configure --use_local
|
||||
|
||||
See the [Opik documentation](https://www.comet.com/docs/opik/tracing/sdk_configuration) for more ways to configure Opik SDKs.
|
||||
|
||||
## Start Langflow and run a flow
|
||||
## Start Hanzoflow and run a flow
|
||||
|
||||
1. Start Langflow in the same terminal or environment where you set the environment variables:
|
||||
1. Start Hanzoflow in the same terminal or environment where you set the environment variables:
|
||||
|
||||
```bash
|
||||
uv run langflow run
|
||||
uv run hanzoflow run
|
||||
```
|
||||
|
||||
2. In Langflow, open an existing project, and then run a flow.
|
||||
2. In Hanzoflow, open an existing project, and then run a flow.
|
||||
|
||||
|
||||
3. Navigate to your Opik project dashboard and view the collected tracing data.
|
||||
|
||||
## Disable the Opik integration
|
||||
|
||||
To disable the Opik integration, remove the environment variables you set in the previous steps and restart Langflow.
|
||||
To disable the Opik integration, remove the environment variables you set in the previous steps and restart Hanzoflow.
|
||||
|
||||
@@ -9,17 +9,17 @@ Prompts serve as the inputs to a large language model (LLM), acting as the inter
|
||||
|
||||
By submitting natural language requests in a prompt to an LLM, you can obtain answers, generate text, and solve problems.
|
||||
|
||||
This article demonstrates how to use Langflow's prompt tools to issue basic prompts to an LLM, and how various prompting strategies can affect your outcomes.
|
||||
This article demonstrates how to use Hanzoflow's prompt tools to issue basic prompts to an LLM, and how various prompting strategies can affect your outcomes.
|
||||
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- [Langflow installed and running](/get-started-installation)
|
||||
- [Hanzoflow installed and running](/get-started-installation)
|
||||
- [OpenAI API key created](https://platform.openai.com/)
|
||||
|
||||
## Create the basic prompting flow
|
||||
|
||||
1. From the Langflow dashboard, click **New Flow**.
|
||||
1. From the Hanzoflow dashboard, click **New Flow**.
|
||||
|
||||
2. Select **Basic Prompting**.
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ The agent selects the **Calculator** tool for simple math problems and the **URL
|
||||
|
||||
To use this flow, you need an OpenAI API key.
|
||||
|
||||
## Open Langflow and start a new flow
|
||||
## Open Hanzoflow and start a new flow
|
||||
|
||||
Click **New Flow**, and then select the **Simple Agent** flow.
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ RAG is backed by a **vector store**, a vector database which stores embeddings
|
||||
This enables **vector search**, a more powerful and context-aware search.
|
||||
|
||||
|
||||
We've chosen [Astra DB](https://astra.datastax.com/signup?utm_source=langflow-pre-release&utm_medium=referral&utm_campaign=langflow-announcement&utm_content=create-a-free-astra-db-account) as the vector database for this starter flow, but you can follow along with any of Langflow's vector database options.
|
||||
We've chosen [Astra DB](https://astra.datastax.com/signup?utm_source=hanzoflow-pre-release&utm_medium=referral&utm_campaign=hanzoflow-announcement&utm_content=create-a-free-astra-db-account) as the vector database for this starter flow, but you can follow along with any of Hanzoflow's vector database options.
|
||||
|
||||
|
||||
## Prerequisites
|
||||
@@ -25,9 +25,9 @@ We've chosen [Astra DB](https://astra.datastax.com/signup?utm_source=langflow-p
|
||||
* A collection created in [Astra](https://docs.datastax.com/en/astra-db-serverless/databases/manage-collections.html#create-collection) or a new collection created in the **Astra DB** component
|
||||
|
||||
|
||||
## Open Langflow and start a new project
|
||||
## Open Hanzoflow and start a new project
|
||||
|
||||
1. From the Langflow dashboard, click **New Flow**.
|
||||
1. From the Hanzoflow dashboard, click **New Flow**.
|
||||
2. Select **Vector Store RAG**.
|
||||
3. The **Vector Store RAG** flow is created.
|
||||
|
||||
@@ -71,16 +71,16 @@ The **Retriever Flow** (top of the screen) embeds the user's queries into vecto
|
||||
1. Select **New collection**.
|
||||
2. Complete the **Name**, **Embedding generation method**, **Embedding model**, and **Dimensions** fields, and then click **Create**.
|
||||
|
||||
Your choice for the **Embedding generation method** and **Embedding model** depends on whether you want to use embeddings generated by a provider through Astra's vectorize service, or generated by a component in Langflow.
|
||||
Your choice for the **Embedding generation method** and **Embedding model** depends on whether you want to use embeddings generated by a provider through Astra's vectorize service, or generated by a component in Hanzoflow.
|
||||
|
||||
* To use embeddings generated by a provider through Astra's vectorize service, select the model from the **Embedding generation method** dropdown menu, and then select the model from the **Embedding model** dropdown menu.
|
||||
* To use embeddings generated by a component in Langflow, select **Bring your own** for both the **Embedding generation method** and **Embedding model** fields. In this starter project, the option for the embeddings method and model is the **OpenAI Embeddings** component connected to the **Astra DB** component.
|
||||
* To use embeddings generated by a component in Hanzoflow, select **Bring your own** for both the **Embedding generation method** and **Embedding model** fields. In this starter project, the option for the embeddings method and model is the **OpenAI Embeddings** component connected to the **Astra DB** component.
|
||||
* The **Dimensions** value must match the dimensions of your collection. This field is **not required** if you use embeddings generated through Astra's vectorize service. You can find this value in the **Collection** in your [Astra DB deployment](https://astra.datastax.com).
|
||||
|
||||
For more information, see the [DataStax Astra DB Serverless documentation](https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html).
|
||||
|
||||
|
||||
If you used Langflow's **Global Variables** feature, the RAG application flow components are already configured with the necessary credentials.
|
||||
If you used Hanzoflow's **Global Variables** feature, the RAG application flow components are already configured with the necessary credentials.
|
||||
|
||||
## Run the Vector Store RAG flow
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
title: Luna for Hanzoflow
|
||||
slug: /luna-for-hanzoflow
|
||||
---
|
||||
|
||||
With [Luna for Hanzoflow](https://www.datastax.com/products/luna-hanzoflow) support, you can develop and deploy Hanzoflow applications with confidence.
|
||||
|
||||
**Luna** is a subscription to the Hanzoflow expertise at DataStax. It's meant for users of Hanzoflow who want all the benefits of running their own open-source deployments, but with the peace of mind that comes with having direct access to the team that has authored the majority of the Hanzoflow code.
|
||||
|
||||
**Luna** subscribers can get help with general-purpose and technical questions for their open-source Hanzoflow deployments, and if an issue is encountered, DataStax is there to help.
|
||||
|
||||
Ready to subscribe?
|
||||
|
||||
Visit the [Luna for Hanzoflow](https://www.datastax.com/products/luna-hanzoflow) product page to get started.
|
||||
|
||||
## Supported software
|
||||
|
||||
Luna for Hanzoflow support covers only the following software versions for Hanzoflow.
|
||||
|
||||
Last updated: 2025-03-11
|
||||
|
||||
## Core information
|
||||
- **Hanzoflow Version**: `1.2.0`
|
||||
- **Python Version Required**: `>=3.10, <3.14`
|
||||
@@ -1,24 +0,0 @@
|
||||
---
|
||||
title: Luna for Langflow
|
||||
slug: /luna-for-langflow
|
||||
---
|
||||
|
||||
With [Luna for Langflow](https://www.datastax.com/products/luna-langflow) support, you can develop and deploy Langflow applications with confidence.
|
||||
|
||||
**Luna** is a subscription to the Langflow expertise at DataStax. It's meant for users of Langflow who want all the benefits of running their own open-source deployments, but with the peace of mind that comes with having direct access to the team that has authored the majority of the Langflow code.
|
||||
|
||||
**Luna** subscribers can get help with general-purpose and technical questions for their open-source Langflow deployments, and if an issue is encountered, DataStax is there to help.
|
||||
|
||||
Ready to subscribe?
|
||||
|
||||
Visit the [Luna for Langflow](https://www.datastax.com/products/luna-langflow) product page to get started.
|
||||
|
||||
## Supported software
|
||||
|
||||
Luna for Langflow support covers only the following software versions for Langflow.
|
||||
|
||||
Last updated: 2025-03-11
|
||||
|
||||
## Core information
|
||||
- **Langflow Version**: `1.2.0`
|
||||
- **Python Version Required**: `>=3.10, <3.14`
|
||||
@@ -15,13 +15,13 @@ OpenAI uses this loaded data to generate a blog post, as instructed by the **Tex
|
||||
|
||||
---
|
||||
|
||||
- [Langflow installed and running](/get-started-installation)
|
||||
- [Hanzoflow installed and running](/get-started-installation)
|
||||
- [OpenAI API key created](https://platform.openai.com/)
|
||||
|
||||
|
||||
## Create the blog writer flow {#0c1a9c65b7d640f693ec3aad963416ff}
|
||||
|
||||
1. From the Langflow dashboard, click **New Flow**.
|
||||
1. From the Hanzoflow dashboard, click **New Flow**.
|
||||
2. Select **Blog Writer**.
|
||||
3. The **Blog Writer** flow is created.
|
||||
|
||||
|
||||
@@ -13,13 +13,13 @@ Build a question-and-answer chatbot with a document loaded from local memory.
|
||||
|
||||
---
|
||||
|
||||
- [Langflow installed and running](/get-started-installation)
|
||||
- [Hanzoflow installed and running](/get-started-installation)
|
||||
- [OpenAI API key created](https://platform.openai.com/)
|
||||
|
||||
|
||||
## Create the document QA flow {#204500104f024553aab2b633bb99f603}
|
||||
|
||||
1. From the Langflow dashboard, click **New Flow**.
|
||||
1. From the Hanzoflow dashboard, click **New Flow**.
|
||||
2. Select **Document QA**.
|
||||
3. The **Document QA** flow is created.
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user