8 Commits
dev ... test9

Author SHA1 Message Date
d9297e9e4b Merge branch 'main' into test9 2025-10-27 02:15:02 +00:00
f5e1833d58 33 2025-10-22 06:06:27 +00:00
d3c6e6e449 上传文件至 / 2025-10-22 03:57:16 +00:00
9430de2292 99 2025-10-22 03:56:21 +00:00
90f12b74fd 11 2025-10-22 03:40:44 +00:00
32ae7b32e1 cs 2025-10-22 03:18:08 +00:00
5401903ed1 测试 2025-10-22 03:17:00 +00:00
e980783af3 测试提交上传 2025-10-22 02:35:07 +00:00
9 changed files with 58006 additions and 0 deletions

154
CLAUDE.md Normal file
View File

@@ -0,0 +1,154 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Project Overview
This is **Langflow** - a low-code app builder for RAG and multi-agent AI applications. It's a Python-based visual IDE that allows users to build, test, and deploy AI workflows through a drag-and-drop interface. The project combines a FastAPI backend with a React frontend.
## Architecture
### Backend Structure
- **Main Backend**: `src/backend/langflow/` - Entry point and versioning
- **Core Backend**: `src/backend/base/langflow/` - Main application logic with these key modules:
- `api/` - REST API endpoints and WebSocket handlers
- `graph/` - Flow graph processing and execution engine
- `components/` - Custom component definitions and implementations
- `services/` - Business logic services (database, auth, etc.)
- `processing/` - Data processing utilities
- `schema/` - Pydantic models and data structures
- `serialization/` - Flow import/export functionality
### Frontend Structure
- **Main Frontend**: `src/frontend/` - React application with:
- Modern React 18 with TypeScript
- Vite build system
- Tailwind CSS for styling
- React Flow for workflow visualization
- Chakra UI and Radix UI components
### Key Technologies
- **Backend**: FastAPI, SQLAlchemy, Pydantic, Celery (for async tasks)
- **Frontend**: React 18, TypeScript, Vite, React Flow, Zustand (state management)
- **Package Management**: UV (Python), NPM (Node.js)
## Development Commands
### Backend Development
```bash
# Install backend dependencies
make install_backend
# Run backend in development mode
make backend
# Run backend with specific settings
make backend log_level=debug host=0.0.0.0 port=7860
# Run backend tests
make unit_tests
make integration_tests
make tests
# Lint and format backend
make format_backend
make lint
```
### Frontend Development
```bash
# Install frontend dependencies
make install_frontend
# Run frontend in development mode
make frontend
# Build frontend for production
make build_frontend
# Run frontend tests
make tests_frontend
# Lint and format frontend
make format_frontend
```
### Full Development Workflow
```bash
# Initialize the entire development environment
make init
# Run both frontend and backend
make run_frontend
make run_backend
# Build and run the complete application
make build_and_run
# Format all code
make format
```
### Testing and Quality
```bash
# Run all tests with coverage
make coverage
# Run linters
make lint
# Format code
make format
# Check spelling
make codespell
```
## Environment Setup
1. **Python**: Requires Python 3.10-3.12
2. **Node.js**: Required for frontend development
3. **Virtual Environment**: Activated via `.venv/bin/activate`
4. **Environment Variables**: Copy from `.env.example` to `.env`
## Database and Storage
- **Database**: SQLAlchemy with PostgreSQL/SQLite support
- **Migrations**: Alembic for database migrations
- **Cache**: Redis for caching and session storage
## Key Features
- **Visual IDE**: Drag-and-drop workflow builder using React Flow
- **Multi-agent Support**: Orchestrates multiple AI agents and conversations
- **RAG Pipelines**: Complete RAG implementation with various vector stores
- **API Publish**: Export flows as APIs
- **Observability**: Integration with LangSmith, LangFuse, LangWatch
- **Component System**: Extensible component architecture for custom integrations
## Testing Structure
- **Unit Tests**: `src/backend/tests/unit/`
- **Integration Tests**: `src/backend/tests/integration/`
- **Frontend Tests**: `src/frontend/__tests__/`
- **Test Framework**: pytest with async support
- **Coverage**: Generated coverage reports with `make coverage`
## Custom Components
The project supports custom components through:
- `src/backend/base/langflow/custom/` - Custom component definitions
- Component registry system for dynamic loading
- Support for Python-based and API-based components
## Deployment
- **Docker**: Multi-stage Docker builds for production
- **Cloud**: DataStax Langflow cloud service integration
- **Self-hosted**: Complete Docker Compose setup available
## 数据库
- 当使用sqlite时数据库路径为src/backend/base/langflow/langflow.db
- 数据库路径为src/backend/base/langflow/langflow.db
- 使用中文回答

175
README.ES.md Normal file
View File

@@ -0,0 +1,175 @@
# [![Langflow](./docs/static/img/hero.png)](https://www.langflow.org)
<p align="center"><strong>
Un Framework visual para crear aplicaciones de agentes autónomos y RAG
</strong></p>
<p align="center" style="font-size: 12px;">
De código abierto, construido en Python, totalmente personalizable, agnóstico en cuanto a modelos y bases de datos
</p>
<p align="center" style="font-size: 12px;">
<a href="https://docs.langflow.org" style="text-decoration: underline;">Documentación</a> -
<a href="https://discord.com/invite/EqksyE2EX9" style="text-decoration: underline;">Únete a nuestro Discord</a> -
<a href="https://twitter.com/langflow_ai" style="text-decoration: underline;">Síguenos en X</a> -
<a href="https://huggingface.co/spaces/Langflow/Langflow" style="text-decoration: underline;">Demostración</a>
</p>
<p align="center">
<a href="https://github.com/langflow-ai/langflow">
<img src="https://img.shields.io/github/stars/langflow-ai/langflow">
</a>
<a href="https://discord.com/invite/EqksyE2EX9">
<img src="https://img.shields.io/discord/1116803230643527710?label=Discord">
</a>
</p>
<div align="center">
<a href="./README.md"><img alt="README en Inglés" src="https://img.shields.io/badge/English-d9d9d9"></a>
<a href="./README.PT.md"><img alt="README en Portugués" src="https://img.shields.io/badge/Português-d9d9d9"></a>
<a href="./README.ES.md"><img alt="README en Español" src="https://img.shields.io/badge/Español-d9d9d9"></a>
<a href="./README.zh_CN.md"><img alt="README en Chino Simplificado" src="https://img.shields.io/badge/简体中文-d9d9d9"></a>
<a href="./README.ja.md"><img alt="README en Japonés" src="https://img.shields.io/badge/日本語-d9d9d9"></a>
<a href="./README.KR.md"><img alt="README en Coreano" src="https://img.shields.io/badge/한국어-d9d9d9"></a>
<a href="./README.FR.md"><img alt="README en Francès" src="https://img.shields.io/badge/Français-d9d9d9"></a>
<a href="./README.RU.md"><img alt="README en Russian" src="https://img.shields.io/badge/Русский"></a>
</div>
<p align="center">
<img src="./docs/static/img/langflow_basic_howto.gif" alt="Tu GIF" style="border: 3px solid #211C43;">
</p>
# 📝 Contenido
- [📝 Contenido](#-contenido)
- [📦 Introducción](#-introducción)
- [🎨 Crear Flujos](#-crear-flujos)
- [Despliegue](#despliegue)
- [Despliegue usando Google Cloud Platform](#despliegue-usando-google-cloud-platform)
- [Despliegue en Railway](#despliegue-en-railway)
- [Despliegue en Render](#despliegue-en-render)
- [🖥️ Interfaz de Línea de Comandos (CLI)](#-interfaz-de-línea-de-comandos-cli)
- [Uso](#uso)
- [Variables de Entorno](#variables-de-entorno)
- [👋 Contribuir](#-contribuir)
- [🌟 Contribuidores](#-contribuidores)
- [📄 Licencia](#-licencia)
# 📦 Introducción
Puedes instalar Langflow con pip:
```shell
# Asegúrate de tener >=Python 3.10 instalado en tu sistema.
# Instala la versión pre-release (recomendada para las actualizaciones más recientes)
python -m pip install langflow --pre --force-reinstall
# o versión estable
python -m pip install langflow -U
```
Luego, ejecuta Langflow con:
```shell
python -m langflow run
```
También puedes ver Langflow en [HuggingFace Spaces](https://huggingface.co/spaces/Langflow/Langflow). [Clona el Space usando este enlace](https://huggingface.co/spaces/Langflow/Langflow?duplicate=true) para crear tu propio espacio de trabajo de Langflow en minutos.
# 🎨 Crear Flujos
Crear flujos con Langflow es fácil. Simplemente arrastra los componentes desde la barra lateral al espacio de trabajo y conéctalos para comenzar a construir tu aplicación.
Explora editando los parámetros del prompt, agrupando componentes y construyendo tus propios componentes personalizados (Custom Components).
Cuando hayas terminado, puedes exportar tu flujo como un archivo JSON.
Carga el flujo con:
```python
from langflow.load import run_flow_from_json
results = run_flow_from_json("ruta/al/flujo.json", input_value="¡Hola, Mundo!")
```
# Despliegue
## Despliegue usando Google Cloud Platform
Sigue nuestra guía paso a paso para desplegar Langflow en Google Cloud Platform (GCP) usando Google Cloud Shell. La guía está disponible en el documento [**Langflow en Google Cloud Platform**](https://github.com/langflow-ai/langflow/blob/dev/docs/docs/deployment/gcp-deployment.md).
Alternativamente, haz clic en el botón **"Abrir en Cloud Shell"** a continuación para iniciar Google Cloud Shell, clonar el repositorio de Langflow y comenzar un **tutorial interactivo** que te guiará a través del proceso de configuración de los recursos necesarios y despliegue de Langflow en tu proyecto GCP.
[![Abrir en Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.svg)](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/langflow-ai/langflow&working_dir=scripts/gcp&shellonly=true&tutorial=walkthroughtutorial_spot.md)
## Despliegue en Railway
Usa esta plantilla para desplegar Langflow 1.0 Preview en Railway:
[![Desplegar 1.0 Preview en Railway](https://railway.app/button.svg)](https://railway.app/template/UsJ1uB?referralCode=MnPSdg)
O esta para desplegar Langflow 0.6.x:
[![Desplegar en Railway](https://railway.app/button.svg)](https://railway.app/template/JMXEWp?referralCode=MnPSdg)
## Despliegue en Render
<a href="https://render.com/deploy?repo=https://github.com/langflow-ai/langflow/tree/dev">
<img src="https://render.com/images/deploy-to-render-button.svg" alt="Desplegar en Render" />
</a>
# 🖥️ Interfaz de Línea de Comandos (CLI)
Langflow proporciona una interfaz de línea de comandos (CLI) para una fácil gestión y configuración.
## Uso
Puedes ejecutar Langflow usando el siguiente comando:
```shell
langflow run [OPCIONES]
```
Cada opción se detalla a continuación:
- `--help`: Muestra todas las opciones disponibles.
- `--host`: Establece el host al que vincular el servidor. Se puede configurar usando la variable de entorno `LANGFLOW_HOST`. El valor predeterminado es `127.0.0.1`.
- `--workers`: Establece el número de procesos. Se puede configurar usando la variable de entorno `LANGFLOW_WORKERS`. El valor predeterminado es `1`.
- `--worker-timeout`: Establece el tiempo de espera del worker en segundos. El valor predeterminado es `60`.
- `--port`: Establece el puerto en el que escuchar. Se puede configurar usando la variable de entorno `LANGFLOW_PORT`. El valor predeterminado es `7860`.
- `--env-file`: Especifica la ruta al archivo .env que contiene variables de entorno. El valor predeterminado es `.env`.
- `--log-level`: Establece el nivel de registro. Se puede configurar usando la variable de entorno `LANGFLOW_LOG_LEVEL`. El valor predeterminado es `critical`.
- `--components-path`: Especifica la ruta al directorio que contiene componentes personalizados. Se puede configurar usando la variable de entorno `LANGFLOW_COMPONENTS_PATH`. El valor predeterminado es `langflow/components`.
- `--log-file`: Especifica la ruta al archivo de registro. Se puede configurar usando la variable de entorno `LANGFLOW_LOG_FILE`. El valor predeterminado es `logs/langflow.log`.
- `--cache`: Selecciona el tipo de caché a utilizar. Las opciones son `InMemoryCache` y `SQLiteCache`. Se puede configurar usando la variable de entorno `LANGFLOW_LANGCHAIN_CACHE`. El valor predeterminado es `SQLiteCache`.
- `--dev/--no-dev`: Alterna el modo de desarrollo. El valor predeterminado es `no-dev`.
- `--path`: Especifica la ruta al directorio frontend que contiene los archivos de compilación. Esta opción es solo para fines de desarrollo. Se puede configurar usando la variable de entorno `LANGFLOW_FRONTEND_PATH`.
- `--open-browser/--no-open-browser`: Alterna la opción de abrir el navegador después de iniciar el servidor. Se puede configurar usando la variable de entorno `LANGFLOW_OPEN_BROWSER`. El valor predeterminado es `open-browser`.
- `--remove-api-keys/--no-remove-api-keys`: Alterna la opción de eliminar las claves API de los proyectos guardados en la base de datos. Se puede configurar usando la variable de entorno `LANGFLOW_REMOVE_API_KEYS`. El valor predeterminado es `no-remove-api-keys`.
- `--install-completion [bash|zsh|fish|powershell|pwsh]`: Instala la función de autocompletar para el shell especificado.
- `--show-completion [bash|zsh|fish|powershell|pwsh]`: Muestra el código para la función de autocompletar para el shell especificado, permitiéndote copiar o personalizar la instalación.
- `--backend-only`: Este parámetro, con valor predeterminado `False`, permite ejecutar solo el servidor backend sin el frontend. También se puede configurar usando la variable de entorno `LANGFLOW_BACKEND_ONLY`.
- `--store`: Este parámetro, con valor predeterminado `True`, activa las funciones de la tienda, usa `--no-store` para desactivarlas. Se puede configurar usando la variable de entorno `LANGFLOW_STORE`.
Estos parámetros son importantes para los usuarios que necesitan personalizar el comportamiento de Langflow, especialmente en escenarios de desarrollo o despliegue especializado.
### Variables de Entorno
Puedes configurar muchas de las opciones de CLI usando variables de entorno. Estas se pueden exportar en tu sistema operativo o agregar a un archivo `.env` y cargarse usando la opción `--env-file`.
Se incluye un archivo de ejemplo `.env` llamado `.env.example` en el proyecto. Copia este archivo a un nuevo archivo llamado `.env` y reemplaza los valores de ejemplo con tus configuraciones reales. Si estás estableciendo valores tanto en tu sistema operativo como en el archivo `.env`, las configuraciones del `.env` tendrán prioridad.
# 👋 Contribuir
Aceptamos contribuciones de desarrolladores de todos los niveles para nuestro proyecto de código abierto en GitHub. Si deseas contribuir, por favor, consulta nuestras [directrices de contribución](./CONTRIBUTING.md) y ayuda a hacer que Langflow sea más accesible.
---
[![Historial de Estrellas](https://api.star-history.com/svg?repos=langflow-ai/langflow&type=Timeline)](https://star-history.com/#langflow-ai/langflow&Date)
# 🌟 Contribuidores
[![contribuidores de langflow](https://contrib.rocks/image?repo=langflow-ai/langflow)](https://github.com/langflow-ai/langflow/graphs/contributors)
# 📄 Licencia
Langflow se publica bajo la licencia MIT. Consulta el archivo [LICENSE](LICENSE) para más detalles.

154
upload/CLAUDE.md Normal file
View File

@@ -0,0 +1,154 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Project Overview
This is **Langflow** - a low-code app builder for RAG and multi-agent AI applications. It's a Python-based visual IDE that allows users to build, test, and deploy AI workflows through a drag-and-drop interface. The project combines a FastAPI backend with a React frontend.
## Architecture
### Backend Structure
- **Main Backend**: `src/backend/langflow/` - Entry point and versioning
- **Core Backend**: `src/backend/base/langflow/` - Main application logic with these key modules:
- `api/` - REST API endpoints and WebSocket handlers
- `graph/` - Flow graph processing and execution engine
- `components/` - Custom component definitions and implementations
- `services/` - Business logic services (database, auth, etc.)
- `processing/` - Data processing utilities
- `schema/` - Pydantic models and data structures
- `serialization/` - Flow import/export functionality
### Frontend Structure
- **Main Frontend**: `src/frontend/` - React application with:
- Modern React 18 with TypeScript
- Vite build system
- Tailwind CSS for styling
- React Flow for workflow visualization
- Chakra UI and Radix UI components
### Key Technologies
- **Backend**: FastAPI, SQLAlchemy, Pydantic, Celery (for async tasks)
- **Frontend**: React 18, TypeScript, Vite, React Flow, Zustand (state management)
- **Package Management**: UV (Python), NPM (Node.js)
## Development Commands
### Backend Development
```bash
# Install backend dependencies
make install_backend
# Run backend in development mode
make backend
# Run backend with specific settings
make backend log_level=debug host=0.0.0.0 port=7860
# Run backend tests
make unit_tests
make integration_tests
make tests
# Lint and format backend
make format_backend
make lint
```
### Frontend Development
```bash
# Install frontend dependencies
make install_frontend
# Run frontend in development mode
make frontend
# Build frontend for production
make build_frontend
# Run frontend tests
make tests_frontend
# Lint and format frontend
make format_frontend
```
### Full Development Workflow
```bash
# Initialize the entire development environment
make init
# Run both frontend and backend
make run_frontend
make run_backend
# Build and run the complete application
make build_and_run
# Format all code
make format
```
### Testing and Quality
```bash
# Run all tests with coverage
make coverage
# Run linters
make lint
# Format code
make format
# Check spelling
make codespell
```
## Environment Setup
1. **Python**: Requires Python 3.10-3.12
2. **Node.js**: Required for frontend development
3. **Virtual Environment**: Activated via `.venv/bin/activate`
4. **Environment Variables**: Copy from `.env.example` to `.env`
## Database and Storage
- **Database**: SQLAlchemy with PostgreSQL/SQLite support
- **Migrations**: Alembic for database migrations
- **Cache**: Redis for caching and session storage
## Key Features
- **Visual IDE**: Drag-and-drop workflow builder using React Flow
- **Multi-agent Support**: Orchestrates multiple AI agents and conversations
- **RAG Pipelines**: Complete RAG implementation with various vector stores
- **API Publish**: Export flows as APIs
- **Observability**: Integration with LangSmith, LangFuse, LangWatch
- **Component System**: Extensible component architecture for custom integrations
## Testing Structure
- **Unit Tests**: `src/backend/tests/unit/`
- **Integration Tests**: `src/backend/tests/integration/`
- **Frontend Tests**: `src/frontend/__tests__/`
- **Test Framework**: pytest with async support
- **Coverage**: Generated coverage reports with `make coverage`
## Custom Components
The project supports custom components through:
- `src/backend/base/langflow/custom/` - Custom component definitions
- Component registry system for dynamic loading
- Support for Python-based and API-based components
## Deployment
- **Docker**: Multi-stage Docker builds for production
- **Cloud**: DataStax Langflow cloud service integration
- **Self-hosted**: Complete Docker Compose setup available
## 数据库
- 当使用sqlite时数据库路径为src/backend/base/langflow/langflow.db
- 数据库路径为src/backend/base/langflow/langflow.db
- 使用中文回答

178
upload/README.zh_CN.md Normal file
View File

@@ -0,0 +1,178 @@
<!-- markdownlint-disable MD030 -->
# [![Langflow](./docs/static/img/hero.png)](https://www.langflow.org)
<p align="center"><strong>
一种用于构建多智能体和RAG应用的可视化框架
</strong></p>
<p align="center" style="font-size: 12px;">
开源、Python驱动、完全可定制、大模型且不依赖于特定的向量存储
</p>
<p align="center" style="font-size: 12px;">
<a href="https://docs.langflow.org" style="text-decoration: underline;">文档</a> -
<a href="https://discord.com/invite/EqksyE2EX9" style="text-decoration: underline;">加入我们的Discord社区</a> -
<a href="https://twitter.com/langflow_ai" style="text-decoration: underline;">在X上关注我们</a> -
<a href="https://huggingface.co/spaces/Langflow/Langflow-Preview" style="text-decoration: underline;">在线体验</a>
</p>
<p align="center">
<a href="https://github.com/langflow-ai/langflow">
<img src="https://img.shields.io/github/stars/langflow-ai/langflow">
</a>
<a href="https://discord.com/invite/EqksyE2EX9">
<img src="https://img.shields.io/discord/1116803230643527710?label=Discord">
</a>
</p>
<div align="center">
<a href="./README.md"><img alt="README in English" src="https://img.shields.io/badge/英文-d9d9d9"></a>
<a href="./README.PT.md"><img alt="README in Portuguese" src="https://img.shields.io/badge/Portuguese-d9d9d9"></a>
<a href="./README.ES.md"><img alt="README in Spanish" src="https://img.shields.io/badge/Spanish-d9d9d9"></a>
<a href="./README.zh_CN.md"><img alt="README in Simplified Chinese" src="https://img.shields.io/badge/简体中文-d9d9d9"></a>
<a href="./README.ja.md"><img alt="README in Japanese" src="https://img.shields.io/badge/日本語-d9d9d9"></a>
<a href="./README.KR.md"><img alt="README in KOREAN" src="https://img.shields.io/badge/한국어-d9d9d9"></a>
<a href="./README.FR.md"><img alt="README in French" src="https://img.shields.io/badge/Français-d9d9d9"></a>
<a href="./README.RU.md"><img alt="README in Russian" src="https://img.shields.io/badge/Русский"></a>
</div>
<p align="center">
<img src="./docs/static/img/langflow_basic_howto.gif" alt="Your GIF" style="border: 3px solid #211C43;">
</p>
# 📝 目录
- [📝 目录](#-目录)
- [📦 快速开始](#-快速开始)
- [🎨 创建工作流](#-创建工作流)
- [部署](#部署)
- [在 Google Cloud Platform 上部署 Langflow](#在google-cloud-platform上部署langflow)
- [在 Railway 上部署](#在railway上部署)
- [在 Render 上部署](#在render上部署)
- [🖥️ 命令行界面 (CLI)](#-命令行界面-cli)
- [用法](#用法)
- [环境变量](#环境变量)
- [👋 贡献](#-贡献)
- [🌟 贡献者](#-贡献者)
- [📄 许可证](#-许可证)
# 📦 快速开始
使用 pip 安装 Langflow
```shell
# 确保您的系统已经安装上>=Python 3.10
# 安装Langflow预发布版本
python -m pip install langflow --pre --force-reinstall
# 安装Langflow稳定版本
python -m pip install langflow -U
```
然后运行 Langflow
```shell
python -m langflow run
```
您可以在[HuggingFace Spaces](https://huggingface.co/spaces/Langflow/Langflow-Preview)中在线体验 Langflow也可以使用该链接[克隆空间](https://huggingface.co/spaces/Langflow/Langflow-Preview?duplicate=true),在几分钟内创建您自己的 Langflow 运行工作空间。
# 🎨 创建工作流
使用 Langflow 来创建工作流非常简单。只需从侧边栏拖动组件到画布上,然后连接组件即可开始构建应用程序。
您可以通过编辑提示参数、将组件分组到单个高级组件中以及构建您自己的自定义组件来展开探索。
完成后,可以将工作流导出为 JSON 文件。
然后使用以下脚本加载工作流:
```python
from langflow.load import run_flow_from_json
results = run_flow_from_json("path/to/flow.json", input_value="Hello, World!")
```
# 部署
## 在 Google Cloud Platform 上部署 Langflow
请按照我们的分步指南使用 Google Cloud Shell 在 Google Cloud Platform (GCP) 上部署 Langflow。该指南在 [**Langflow in Google Cloud Platform**](GCP_DEPLOYMENT.md) 文档中提供。
或者,点击下面的 "Open in Cloud Shell" 按钮,启动 Google Cloud Shell克隆 Langflow 仓库,并开始一个互动教程,该教程将指导您设置必要的资源并在 GCP 项目中部署 Langflow。
[![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.svg)](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/langflow-ai/langflow&working_dir=scripts/gcp&shellonly=true&tutorial=walkthroughtutorial_spot.md)
## 在 Railway 上部署
使用此模板在 Railway 上部署 Langflow 1.0 预览版:
[![Deploy 1.0 Preview on Railway](https://railway.app/button.svg)](https://railway.app/template/UsJ1uB?referralCode=MnPSdg)
或者使用此模板部署 Langflow 0.6.x
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/JMXEWp?referralCode=MnPSdg)
## 在 Render 上部署
<a href="https://render.com/deploy?repo=https://github.com/langflow-ai/langflow/tree/dev">
<img src="https://render.com/images/deploy-to-render-button.svg" alt="Deploy to Render" />
</a>
# 🖥️ 命令行界面 (CLI)
Langflow 提供了一个命令行界面以便于平台的管理和配置。
## 用法
您可以使用以下命令运行 Langflow
```shell
langflow run [OPTIONS]
```
命令行参数的详细说明:
- `--help`: 显示所有可用参数。
- `--host`: 定义绑定服务器的主机 host 参数,可以使用 LANGFLOW_HOST 环境变量设置,默认值为 127.0.0.1。
- `--workers`: 设置工作进程的数量,可以使用 LANGFLOW_WORKERS 环境变量设置,默认值为 1。
- `--worker-timeout`: 设置工作进程的超时时间(秒),默认值为 60。
- `--port`: 设置服务监听的端口,可以使用 LANGFLOW_PORT 环境变量设置,默认值为 7860。
- `--config`: 定义配置文件的路径,默认值为 config.yaml。
- `--env-file`: 指定包含环境变量的 .env 文件路径,默认值为 .env。
- `--log-level`: 定义日志记录级别,可以使用 LANGFLOW_LOG_LEVEL 环境变量设置,默认值为 critical。
- `--components-path`: 指定包含自定义组件的目录路径,可以使用 LANGFLOW_COMPONENTS_PATH 环境变量设置,默认值为 langflow/components。
- `--log-file`: 指定日志文件的路径,可以使用 LANGFLOW_LOG_FILE 环境变量设置,默认值为 logs/langflow.log。
- `--cache`: 选择要使用的缓存类型,可选项为 InMemoryCache 和 SQLiteCache可以使用 LANGFLOW_LANGCHAIN_CACHE 环境变量设置,默认值为 SQLiteCache。
- `--dev/--no-dev`: 切换开发/非开发模式,默认值为 no-dev 即非开发模式。
- `--path`: 指定包含前端构建文件的目录路径,此参数仅用于开发目的,可以使用 LANGFLOW_FRONTEND_PATH 环境变量设置。
- `--open-browser/--no-open-browser`: 切换启动服务器后是否打开浏览器,可以使用 LANGFLOW_OPEN_BROWSER 环境变量设置,默认值为 open-browser 即启动后打开浏览器。
- `--remove-api-keys/--no-remove-api-keys`: 切换是否从数据库中保存的项目中移除 API 密钥,可以使用 LANGFLOW_REMOVE_API_KEYS 环境变量设置,默认值为 no-remove-api-keys。
- `--install-completion [bash|zsh|fish|powershell|pwsh]`: 为指定的 shell 安装自动补全。
- `--show-completion [bash|zsh|fish|powershell|pwsh]`: 显示指定 shell 的自动补全,使您可以复制或自定义安装。
- `--backend-only`: 此参数默认为 False允许仅运行后端服务器而不运行前端也可以使用 LANGFLOW_BACKEND_ONLY 环境变量设置。
- `--store`: 此参数默认为 True启用存储功能使用 --no-store 可禁用它,可以使用 LANGFLOW_STORE 环境变量配置。
这些参数对于需要定制 Langflow 行为的用户尤其重要,特别是在开发或者特殊部署场景中。
### 环境变量
您可以使用环境变量配置许多 CLI 参数选项。这些变量可以在操作系统中导出,或添加到 .env 文件中,并使用 --env-file 参数加载。
项目中包含一个名为 .env.example 的示例 .env 文件。将此文件复制为新文件 .env并用实际设置值替换示例值。如果同时在操作系统和 .env 文件中设置值,则 .env 设置优先。
# 👋 贡献
我们欢迎各级开发者为我们的 GitHub 开源项目做出贡献,并帮助 Langflow 更加易用,如果您想参与贡献,请查看我们的贡献指南 [contributing guidelines](./CONTRIBUTING.md) 。
---
[![Star History Chart](https://api.star-history.com/svg?repos=langflow-ai/langflow&type=Timeline)](https://star-history.com/#langflow-ai/langflow&Date)
# 🌟 贡献者
[![langflow contributors](https://contrib.rocks/image?repo=langflow-ai/langflow)](https://github.com/langflow-ai/langflow/graphs/contributors)
# 📄 许可证
Langflow 以 MIT 许可证发布。有关详细信息,请参阅 [LICENSE](LICENSE) 文件。

0
upload/eslint.config.js Normal file
View File

1
upload/package.json Normal file
View File

@@ -0,0 +1 @@
{}

90
upload/src/.eslintrc.json Normal file
View File

@@ -0,0 +1,90 @@
{
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:prettier/recommended"
],
"plugins": [
"react",
"import-helpers",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": [
"./tsconfig.node.json",
"./tsconfig.json"
],
"extraFileExtensions:": [
".mdx"
],
"extensions:": [
".mdx"
]
},
"env": {
"browser": true,
"es2021": true
},
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"no-console": "warn",
"no-self-assign": "warn",
"no-self-compare": "warn",
"complexity": [
"error",
{
"max": 15
}
],
"indent": [
"error",
2,
{
"SwitchCase": 1
}
],
"no-dupe-keys": "error",
"no-invalid-regexp": "error",
"no-undef": "error",
"no-return-assign": "error",
"no-redeclare": "error",
"no-empty": "error",
"no-await-in-loop": "error",
"react/react-in-jsx-scope": 0,
"node/exports-style": [
"error",
"module.exports"
],
"node/file-extension-in-import": [
"error",
"always"
],
"node/prefer-global/buffer": [
"error",
"always"
],
"node/prefer-global/console": [
"error",
"always"
],
"node/prefer-global/process": [
"error",
"always"
],
"node/prefer-global/url-search-params": [
"error",
"always"
],
"node/prefer-global/url": [
"error",
"always"
],
"node/prefer-promises/dns": "error",
"node/prefer-promises/fs": "error"
}
}

28627
upload/swagger.v1.json Normal file

File diff suppressed because it is too large Load Diff

28627
upload/swagger.v1.zh.json Normal file

File diff suppressed because it is too large Load Diff