Merge remote-tracking branch 'origin/cz/mergeAll' into fix/ui_adjustments
This commit is contained in:
commit
5b3a6551ae
434 changed files with 15291 additions and 9748 deletions
5
.gitattributes
vendored
5
.gitattributes
vendored
|
|
@ -11,12 +11,12 @@
|
|||
*.ts text
|
||||
*.tsx text
|
||||
*.md text
|
||||
*.mdx text
|
||||
*.mdx text working-tree-encoding = UTF-8
|
||||
*.yml text
|
||||
*.yaml text
|
||||
*.xml text
|
||||
*.csv text
|
||||
*.json text
|
||||
*.json text working-tree-encoding = UTF-8
|
||||
*.sh text
|
||||
*.Dockerfile text
|
||||
Dockerfile text
|
||||
|
|
@ -32,3 +32,4 @@ Dockerfile text
|
|||
*.mp4 binary
|
||||
*.svg binary
|
||||
*.csv binary
|
||||
|
||||
|
|
|
|||
7
.github/workflows/docker-build.yml
vendored
7
.github/workflows/docker-build.yml
vendored
|
|
@ -80,7 +80,10 @@ jobs:
|
|||
langflowai/langflow-frontend:1.0-alpha
|
||||
|
||||
restart-space:
|
||||
name: Restart HuggingFace Spaces
|
||||
if: ${{ inputs.release_type == 'main' }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: docker_build
|
||||
strategy:
|
||||
matrix:
|
||||
python-version:
|
||||
|
|
@ -100,6 +103,4 @@ jobs:
|
|||
|
||||
- name: Restart HuggingFace Spaces Build
|
||||
run: |
|
||||
poetry run python ./scripts/factory_restart_space.py
|
||||
env:
|
||||
HUGGINGFACE_API_TOKEN: ${{ secrets.HUGGINGFACE_API_TOKEN }}
|
||||
poetry run python ./scripts/factory_restart_space.py --space "Langflow/Langflow-Preview" --token ${{ secrets.HUGGINGFACE_API_TOKEN }}
|
||||
|
|
|
|||
4
.github/workflows/pre-release.yml
vendored
4
.github/workflows/pre-release.yml
vendored
|
|
@ -35,6 +35,10 @@ jobs:
|
|||
with:
|
||||
python-version: "3.10"
|
||||
cache: "poetry"
|
||||
- name: Set up Nodejs 20
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20"
|
||||
- name: Check Version
|
||||
id: check-version
|
||||
run: |
|
||||
|
|
|
|||
8
.vscode/launch.json
vendored
8
.vscode/launch.json
vendored
|
|
@ -3,7 +3,7 @@
|
|||
"configurations": [
|
||||
{
|
||||
"name": "Debug Backend",
|
||||
"type": "python",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"module": "uvicorn",
|
||||
"args": [
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
},
|
||||
{
|
||||
"name": "Debug CLI",
|
||||
"type": "python",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"module": "langflow",
|
||||
"args": [
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
},
|
||||
{
|
||||
"name": "Python: Remote Attach",
|
||||
"type": "python",
|
||||
"type": "debugpy",
|
||||
"request": "attach",
|
||||
"justMyCode": true,
|
||||
"connect": {
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
},
|
||||
{
|
||||
"name": "Python: Debug Tests",
|
||||
"type": "python",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"program": "${file}",
|
||||
"purpose": ["debug-test"],
|
||||
|
|
|
|||
1
Makefile
1
Makefile
|
|
@ -168,6 +168,7 @@ build_and_install:
|
|||
|
||||
build_frontend:
|
||||
cd src/frontend && CI='' npm run build
|
||||
rm -rf src/backend/base/langflow/frontend
|
||||
cp -r src/frontend/build src/backend/base/langflow/frontend
|
||||
|
||||
build:
|
||||
|
|
|
|||
171
README.PT.md
Normal file
171
README.PT.md
Normal file
|
|
@ -0,0 +1,171 @@
|
|||
<!-- markdownlint-disable MD030 -->
|
||||
|
||||
# [](https://www.langflow.org)
|
||||
|
||||
<p align="center"><strong>
|
||||
Um framework visual para criar apps de agentes autônomos e RAG
|
||||
</strong></p>
|
||||
<p align="center" style="font-size: 12px;">
|
||||
Open-source, construído em Python, totalmente personalizável, agnóstico em relação a modelos e databases
|
||||
</p>
|
||||
|
||||
<p align="center" style="font-size: 12px;">
|
||||
<a href="https://docs.langflow.org" style="text-decoration: underline;">Docs</a> -
|
||||
<a href="https://discord.com/invite/EqksyE2EX9" style="text-decoration: underline;">Junte-se ao nosso Discord</a> -
|
||||
<a href="https://twitter.com/langflow_ai" style="text-decoration: underline;">Siga-nos no X</a> -
|
||||
<a href="https://huggingface.co/spaces/Langflow/Langflow-Preview" style="text-decoration: underline;">Demonstração</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 em Inglês" src="https://img.shields.io/badge/English-d9d9d9"></a>
|
||||
<a href="./README.zh_CN.md"><img alt="README em Chinês Simplificado" src="https://img.shields.io/badge/简体中文-d9d9d9"></a>
|
||||
</div>
|
||||
|
||||
<p align="center">
|
||||
<img src="./docs/static/img/langflow_basic_howto.gif" alt="Seu GIF" style="border: 3px solid #211C43;">
|
||||
</p>
|
||||
|
||||
# 📝 Conteúdo
|
||||
|
||||
- [📝 Conteúdo](#-conteúdo)
|
||||
- [📦 Introdução](#-introdução)
|
||||
- [🎨 Criar Fluxos](#-criar-fluxos)
|
||||
- [Deploy](#deploy)
|
||||
- [Deploy usando Google Cloud Platform](#deploy-usando-google-cloud-platform)
|
||||
- [Deploy on Railway](#deploy-on-railway)
|
||||
- [Deploy on Render](#deploy-on-render)
|
||||
- [🖥️ Interface de Linha de Comando (CLI)](#️-interface-de-linha-de-comando-cli)
|
||||
- [Uso](#uso)
|
||||
- [Variáveis de Ambiente](#variáveis-de-ambiente)
|
||||
- [👋 Contribuir](#-contribuir)
|
||||
- [🌟 Contribuidores](#-contribuidores)
|
||||
- [📄 Licença](#-licença)
|
||||
|
||||
# 📦 Introdução
|
||||
|
||||
Você pode instalar o Langflow com pip:
|
||||
|
||||
```shell
|
||||
# Certifique-se de ter >=Python 3.10 instalado no seu sistema.
|
||||
# Instale a versão pré-lançamento (recomendada para as atualizações mais recentes)
|
||||
python -m pip install langflow --pre --force-reinstall
|
||||
|
||||
# ou versão estável
|
||||
python -m pip install langflow -U
|
||||
```
|
||||
|
||||
Então, execute o Langflow com:
|
||||
|
||||
```shell
|
||||
python -m langflow run
|
||||
```
|
||||
|
||||
Você também pode visualizar o Langflow no [HuggingFace Spaces](https://huggingface.co/spaces/Langflow/Langflow-Preview). [Clone o Space usando este link](https://huggingface.co/spaces/Langflow/Langflow-Preview?duplicate=true) para criar seu próprio workspace do Langflow em minutos.
|
||||
|
||||
# 🎨 Criar Fluxos
|
||||
|
||||
Criar fluxos com Langflow é fácil. Basta arrastar componentes da barra lateral para o canvas e conectá-los para começar a construir sua aplicação.
|
||||
|
||||
Explore editando os parâmetros do prompt, agrupando componentes e construindo seus próprios componentes personalizados (Custom Components).
|
||||
|
||||
Quando terminar, você pode exportar seu fluxo como um arquivo JSON.
|
||||
|
||||
Carregue o fluxo com:
|
||||
|
||||
```python
|
||||
from langflow.load import run_flow_from_json
|
||||
|
||||
results = run_flow_from_json("path/to/flow.json", input_value="Hello, World!")
|
||||
```
|
||||
|
||||
# Deploy
|
||||
|
||||
## Deploy usando Google Cloud Platform
|
||||
|
||||
Siga nosso passo a passo para fazer deploy do Langflow no Google Cloud Platform (GCP) usando o Google Cloud Shell. O guia está disponível no documento [**Langflow on Google Cloud Platform**](https://github.com/langflow-ai/langflow/blob/dev/docs/docs/deployment/gcp-deployment.md).
|
||||
|
||||
Alternativamente, clique no botão **"Open in Cloud Shell"** abaixo para iniciar o Google Cloud Shell, clonar o repositório do Langflow e começar um **tutorial interativo** que o guiará pelo processo de configuração dos recursos necessários e deploy do Langflow no seu projeto GCP.
|
||||
|
||||
[](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)
|
||||
|
||||
## Deploy on Railway
|
||||
|
||||
Use este template para implantar o Langflow 1.0 Preview no Railway:
|
||||
|
||||
[](https://railway.app/template/UsJ1uB?referralCode=MnPSdg)
|
||||
|
||||
Ou este para implantar o Langflow 0.6.x:
|
||||
|
||||
[](https://railway.app/template/JMXEWp?referralCode=MnPSdg)
|
||||
|
||||
## Deploy on 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>
|
||||
|
||||
# 🖥️ Interface de Linha de Comando (CLI)
|
||||
|
||||
O Langflow fornece uma interface de linha de comando (CLI) para fácil gerenciamento e configuração.
|
||||
|
||||
## Uso
|
||||
|
||||
Você pode executar o Langflow usando o seguinte comando:
|
||||
|
||||
```shell
|
||||
langflow run [OPTIONS]
|
||||
```
|
||||
|
||||
Cada opção é detalhada abaixo:
|
||||
|
||||
- `--help`: Exibe todas as opções disponíveis.
|
||||
- `--host`: Define o host para vincular o servidor. Pode ser configurado usando a variável de ambiente `LANGFLOW_HOST`. O padrão é `127.0.0.1`.
|
||||
- `--workers`: Define o número de processos. Pode ser configurado usando a variável de ambiente `LANGFLOW_WORKERS`. O padrão é `1`.
|
||||
- `--timeout`: Define o tempo limite do worker em segundos. O padrão é `60`.
|
||||
- `--port`: Define a porta para escutar. Pode ser configurado usando a variável de ambiente `LANGFLOW_PORT`. O padrão é `7860`.
|
||||
- `--env-file`: Especifica o caminho para o arquivo .env contendo variáveis de ambiente. O padrão é `.env`.
|
||||
- `--log-level`: Define o nível de log. Pode ser configurado usando a variável de ambiente `LANGFLOW_LOG_LEVEL`. O padrão é `critical`.
|
||||
- `--components-path`: Especifica o caminho para o diretório contendo componentes personalizados. Pode ser configurado usando a variável de ambiente `LANGFLOW_COMPONENTS_PATH`. O padrão é `langflow/components`.
|
||||
- `--log-file`: Especifica o caminho para o arquivo de log. Pode ser configurado usando a variável de ambiente `LANGFLOW_LOG_FILE`. O padrão é `logs/langflow.log`.
|
||||
- `--cache`: Seleciona o tipo de cache a ser usado. As opções são `InMemoryCache` e `SQLiteCache`. Pode ser configurado usando a variável de ambiente `LANGFLOW_LANGCHAIN_CACHE`. O padrão é `SQLiteCache`.
|
||||
- `--dev/--no-dev`: Alterna o modo de desenvolvimento. O padrão é `no-dev`.
|
||||
- `--path`: Especifica o caminho para o diretório frontend contendo os arquivos de build. Esta opção é apenas para fins de desenvolvimento. Pode ser configurado usando a variável de ambiente `LANGFLOW_FRONTEND_PATH`.
|
||||
- `--open-browser/--no-open-browser`: Alterna a opção de abrir o navegador após iniciar o servidor. Pode ser configurado usando a variável de ambiente `LANGFLOW_OPEN_BROWSER`. O padrão é `open-browser`.
|
||||
- `--remove-api-keys/--no-remove-api-keys`: Alterna a opção de remover as chaves de API dos projetos salvos no banco de dados. Pode ser configurado usando a variável de ambiente `LANGFLOW_REMOVE_API_KEYS`. O padrão é `no-remove-api-keys`.
|
||||
- `--install-completion [bash|zsh|fish|powershell|pwsh]`: Instala a conclusão para o shell especificado.
|
||||
- `--show-completion [bash|zsh|fish|powershell|pwsh]`: Exibe a conclusão para o shell especificado, permitindo que você copie ou personalize a instalação.
|
||||
- `--backend-only`: Este parâmetro, com valor padrão `False`, permite executar apenas o servidor backend sem o frontend. Também pode ser configurado usando a variável de ambiente `LANGFLOW_BACKEND_ONLY`.
|
||||
- `--store`: Este parâmetro, com valor padrão `True`, ativa os recursos da loja, use `--no-store` para desativá-los. Pode ser configurado usando a variável de ambiente `LANGFLOW_STORE`.
|
||||
|
||||
Esses parâmetros são importantes para usuários que precisam personalizar o comportamento do Langflow, especialmente em cenários de desenvolvimento ou deploy especializado.
|
||||
|
||||
### Variáveis de Ambiente
|
||||
|
||||
Você pode configurar muitas das opções de CLI usando variáveis de ambiente. Estas podem ser exportadas no seu sistema operacional ou adicionadas a um arquivo `.env` e carregadas usando a opção `--env-file`.
|
||||
|
||||
Um arquivo de exemplo `.env` chamado `.env.example` está incluído no projeto. Copie este arquivo para um novo arquivo chamado `.env` e substitua os valores de exemplo pelas suas configurações reais. Se você estiver definindo valores tanto no seu sistema operacional quanto no arquivo `.env`, as configurações do `.env` terão precedência.
|
||||
|
||||
# 👋 Contribuir
|
||||
|
||||
Aceitamos contribuições de desenvolvedores de todos os níveis para nosso projeto open-source no GitHub. Se você deseja contribuir, por favor, confira nossas [diretrizes de contribuição](./CONTRIBUTING.md) e ajude a tornar o Langflow mais acessível.
|
||||
|
||||
---
|
||||
|
||||
[](https://star-history.com/#langflow-ai/langflow&Date)
|
||||
|
||||
# 🌟 Contribuidores
|
||||
|
||||
[](https://github.com/langflow-ai/langflow/graphs/contributors)
|
||||
|
||||
# 📄 Licença
|
||||
|
||||
O Langflow é lançado sob a licença MIT. Veja o arquivo [LICENSE](LICENSE) para detalhes.
|
||||
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
<div align="center">
|
||||
<a href="./README.md"><img alt="README in English" src="https://img.shields.io/badge/English-d9d9d9"></a>
|
||||
<a href="./README.PT.md"><img alt="README in Portuguese" src="https://img.shields.io/badge/Portuguese-d9d9d9"></a>
|
||||
<a href="./README.zh_CN.md"><img alt="README in Simplified Chinese" src="https://img.shields.io/badge/简体中文-d9d9d9"></a>
|
||||
</div>
|
||||
|
||||
|
|
@ -36,7 +37,6 @@
|
|||
|
||||
# 📝 Content
|
||||
|
||||
- [](#)
|
||||
- [📝 Content](#-content)
|
||||
- [📦 Get Started](#-get-started)
|
||||
- [🎨 Create Flows](#-create-flows)
|
||||
|
|
|
|||
|
|
@ -86,11 +86,12 @@ 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) 文档中提供。
|
||||
请按照我们的分步指南使用 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。
|
||||
|
||||
|
|
@ -168,4 +169,4 @@ langflow run [OPTIONS]
|
|||
|
||||
# 📄 许可证
|
||||
|
||||
Langflow 以 MIT 许可证发布。有关详细信息,请参阅 [LICENSE](LICENSE) 文件。
|
||||
Langflow 以 MIT 许可证发布。有关详细信息,请参阅 [LICENSE](LICENSE) 文件。
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# syntax=docker/dockerfile:1
|
||||
# Keep this syntax directive! It's used to enable Docker BuildKit
|
||||
|
||||
|
||||
################################
|
||||
# BUILDER-BASE
|
||||
# Used to build deps + create our virtual environment
|
||||
|
|
@ -47,12 +48,10 @@ WORKDIR /app
|
|||
COPY pyproject.toml poetry.lock README.md ./
|
||||
COPY src/ ./src
|
||||
COPY scripts/ ./scripts
|
||||
|
||||
RUN python -m pip install requests --user && cd ./scripts && python update_dependencies.py
|
||||
RUN $POETRY_HOME/bin/poetry lock --no-update \
|
||||
&& $POETRY_HOME/bin/poetry install --no-interaction --no-ansi -E deploy \
|
||||
&& $POETRY_HOME/bin/poetry build -f wheel \
|
||||
&& $POETRY_HOME/bin/poetry run pip install dist/*.whl
|
||||
&& $POETRY_HOME/bin/poetry run pip install dist/*.whl --force-reinstall
|
||||
|
||||
################################
|
||||
# RUNTIME
|
||||
|
|
|
|||
|
|
@ -10,8 +10,7 @@ Langflow provides an API key functionality that allows users to access their ind
|
|||
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 values are `langflow` and `langflow`, respectively.
|
||||
|
||||
</Admonition>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,62 +1,51 @@
|
|||
# Command Line Interface (CLI)
|
||||
|
||||
## Overview
|
||||
|
||||
Langflow's Command Line Interface (CLI) is a powerful tool that allows you to interact with the Langflow server from the command line. The CLI provides a wide range of commands to help you shape Langflow to your needs.
|
||||
|
||||
Running the CLI without any arguments will display a list of available commands and options.
|
||||
The available commands are below. Navigate to their individual sections of this page to see the parameters.
|
||||
|
||||
- [langflow](#overview)
|
||||
- [langflow api-key](#langflow-api-key)
|
||||
- [langflow copy-db](#langflow-copy-db)
|
||||
- [langflow migration](#langflow-migration)
|
||||
- [langflow run](#langflow-run)
|
||||
- [langflow superuser](#langflow-superuser)
|
||||
|
||||
## Overview
|
||||
|
||||
Running the CLI without any arguments displays a list of available options and commands.
|
||||
|
||||
```bash
|
||||
python -m langflow run --help
|
||||
langflow
|
||||
# or
|
||||
python -m langflow run
|
||||
langflow --help
|
||||
# or
|
||||
python -m langflow
|
||||
```
|
||||
|
||||
Each option for `run` command are detailed below:
|
||||
| Command | Description |
|
||||
| ----------- | ---------------------------------------------------------------------- |
|
||||
| `api-key` | Creates an API key for the default superuser if AUTO_LOGIN is enabled. |
|
||||
| `copy-db` | Copy the database files to the current directory (`which langflow`). |
|
||||
| `migration` | Run or test migrations. |
|
||||
| `run` | Run the Langflow. |
|
||||
| `superuser` | Create a superuser. |
|
||||
|
||||
- `--help`: Displays all available options.
|
||||
- `--host`: Defines the host to bind the server to. Can be set using the `LANGFLOW_HOST` environment variable. The default is `127.0.0.1`.
|
||||
- `--workers`: Sets the number of worker processes. Can be set using the `LANGFLOW_WORKERS` environment variable. The default is `1`.
|
||||
- `--timeout`: Sets the worker timeout in seconds. The default is `60`.
|
||||
- `--port`: Sets the port to listen on. Can be set using the `LANGFLOW_PORT` environment variable. The default is `7860`.
|
||||
- `--env-file`: Specifies the path to the .env file containing environment variables. The default is `.env`.
|
||||
- `--log-level`: Defines the logging level. Can be set using the `LANGFLOW_LOG_LEVEL` environment variable. The default is `critical`.
|
||||
- `--components-path`: Specifies the path to the directory containing custom components. Can be set using the `LANGFLOW_COMPONENTS_PATH` environment variable. The default is `langflow/components`.
|
||||
- `--log-file`: Specifies the path to the log file. Can be set using the `LANGFLOW_LOG_FILE` environment variable. The default is `logs/langflow.log`.
|
||||
- `--cache`: Select the type of cache to use. Options are `InMemoryCache` and `SQLiteCache`. Can be set using the `LANGFLOW_LANGCHAIN_CACHE` environment variable. The default is `SQLiteCache`.
|
||||
- `--dev/--no-dev`: Toggles the development mode. The default is `no-dev`.
|
||||
- `--path`: Specifies the path to the frontend directory containing build files. This option is for development purposes only. Can be set using the `LANGFLOW_FRONTEND_PATH` environment variable.
|
||||
- `--open-browser/--no-open-browser`: Toggles the option to open the browser after starting the server. Can be set using the `LANGFLOW_OPEN_BROWSER` environment variable. The default is `open-browser`.
|
||||
- `--remove-api-keys/--no-remove-api-keys`: Toggles the option to remove API keys from the projects saved in the database. Can be set using the `LANGFLOW_REMOVE_API_KEYS` environment variable. The default is `no-remove-api-keys`.
|
||||
- `--install-completion [bash|zsh|fish|powershell|pwsh]`: Installs completion for the specified shell.
|
||||
- `--show-completion [bash|zsh|fish|powershell|pwsh]`: Shows completion for the specified shell, allowing you to copy it or customize the installation.
|
||||
- `--backend-only`: This parameter, with a default value of `False`, allows running only the backend server without the frontend. It can also be set using the `LANGFLOW_BACKEND_ONLY` environment variable.
|
||||
- `--store`: This parameter, with a default value of `True`, enables the store features, use `--no-store` to deactivate it. It can be configured using the `LANGFLOW_STORE` environment variable.
|
||||
### Options
|
||||
|
||||
These parameters are important for users who need to customize the behavior of Langflow, especially in development or specialized deployment scenarios.
|
||||
| Option | Description |
|
||||
| ---------------------- | -------------------------------------------------------------------------------- |
|
||||
| `--install-completion` | Install completion for the current shell. |
|
||||
| `--show-completion` | Show completion for the current shell, to copy it or customize the installation. |
|
||||
| `--help` | Show this message and exit. |
|
||||
|
||||
### API Key Command
|
||||
## langflow api-key
|
||||
|
||||
The `api-key` command allows you to create an API key for accessing Langflow's API when `LANGFLOW_AUTO_LOGIN` is set to `True`.
|
||||
|
||||
```bash
|
||||
python -m langflow api-key --help
|
||||
|
||||
Usage: langflow api-key [OPTIONS]
|
||||
|
||||
Creates an API key for the default superuser if AUTO_LOGIN is enabled.
|
||||
Args: log_level (str, optional): Logging level. Defaults to "error".
|
||||
Returns: None
|
||||
|
||||
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
||||
│ --log-level TEXT Logging level. [env var: LANGFLOW_LOG_LEVEL] [default: error] │
|
||||
│ --help Show this message and exit. │
|
||||
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||
```
|
||||
|
||||
Once you run the `api-key` command, it will create an API key for the default superuser if `LANGFLOW_AUTO_LOGIN` is set to `True`.
|
||||
Run the `api-key` command to create an API key for the default superuser if `LANGFLOW_AUTO_LOGIN` is set to `True`.
|
||||
|
||||
```bash
|
||||
langflow api-key
|
||||
# or
|
||||
python -m langflow api-key
|
||||
╭─────────────────────────────────────────────────────────────────────╮
|
||||
│ API Key Created Successfully: │
|
||||
|
|
@ -67,11 +56,98 @@ python -m langflow api-key
|
|||
│ Make sure to store it in a secure location. │
|
||||
│ │
|
||||
│ The API key has been copied to your clipboard. Cmd + V to paste it. │
|
||||
╰─────────────────────────────────────────────────────────────────────╯
|
||||
╰──────────────────────────────
|
||||
```
|
||||
|
||||
### Environment Variables
|
||||
### Options
|
||||
|
||||
| Option | Type | Description |
|
||||
| ----------- | ---- | ------------------------------------------------------------- |
|
||||
| --log-level | TEXT | Logging level. [env var: LANGFLOW_LOG_LEVEL] [default: error] |
|
||||
| --help | | Show this message and exit. |
|
||||
|
||||
## langflow copy-db
|
||||
|
||||
Run the `copy-db` command to copy the cached `langflow.db` and `langflow-pre.db` database files to the current directory.
|
||||
|
||||
If the files exist in the cache directory, they will be copied to the same directory as `__main__.py`, which can be found with `which langflow`.
|
||||
|
||||
### Options
|
||||
|
||||
None.
|
||||
|
||||
## langflow migration
|
||||
|
||||
Run or test migrations with the [Alembic](https://pypi.org/project/alembic/) database tool.
|
||||
|
||||
```bash
|
||||
langflow migration
|
||||
# or
|
||||
python -m langflow migration
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Description |
|
||||
| ------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `--test, --no-test` | Run migrations in test mode. [default: test] |
|
||||
| `--fix, --no-fix` | Fix migrations. This is a destructive operation, and should only be used if you know what you are doing. [default: no-fix] |
|
||||
| `--help` | Show this message and exit. |
|
||||
|
||||
## langflow run
|
||||
|
||||
Run Langflow.
|
||||
|
||||
```bash
|
||||
langflow run
|
||||
# or
|
||||
python -m langflow run
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Description |
|
||||
| ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `--help` | Displays all available options. |
|
||||
| `--host` | Defines the host to bind the server to. Can be set using the `LANGFLOW_HOST` environment variable. The default is `127.0.0.1`. |
|
||||
| `--workers` | Sets the number of worker processes. Can be set using the `LANGFLOW_WORKERS` environment variable. The default is `1`. |
|
||||
| `--timeout` | Sets the worker timeout in seconds. The default is `60`. |
|
||||
| `--port` | Sets the port to listen on. Can be set using the `LANGFLOW_PORT` environment variable. The default is `7860`. |
|
||||
| `--env-file` | Specifies the path to the .env file containing environment variables. The default is `.env`. |
|
||||
| `--log-level` | Defines the logging level. Can be set using the `LANGFLOW_LOG_LEVEL` environment variable. The default is `critical`. |
|
||||
| `--components-path` | Specifies the path to the directory containing custom components. Can be set using the `LANGFLOW_COMPONENTS_PATH` environment variable. The default is `langflow/components`. |
|
||||
| `--log-file` | Specifies the path to the log file. Can be set using the `LANGFLOW_LOG_FILE` environment variable. The default is `logs/langflow.log`. |
|
||||
| `--cache` | Select the type of cache to use. Options are `InMemoryCache` and `SQLiteCache`. Can be set using the `LANGFLOW_LANGCHAIN_CACHE` environment variable. The default is `SQLiteCache`. |
|
||||
| `--dev`/`--no-dev` | Toggles the development mode. The default is `no-dev`. |
|
||||
| `--path` | Specifies the path to the frontend directory containing build files. This option is for development purposes only. Can be set using the `LANGFLOW_FRONTEND_PATH` environment variable. |
|
||||
| `--open-browser`/`--no-open-browser` | Toggles the option to open the browser after starting the server. Can be set using the `LANGFLOW_OPEN_BROWSER` environment variable. The default is `open-browser`. |
|
||||
| `--remove-api-keys`/`--no-remove-api-keys` | Toggles the option to remove API keys from the projects saved in the database. Can be set using the `LANGFLOW_REMOVE_API_KEYS` environment variable. The default is `no-remove-api-keys`. |
|
||||
| `--install-completion [bash\|zsh\|fish\|powershell\|pwsh]` | Installs completion for the specified shell. |
|
||||
| `--show-completion [bash\|zsh\|fish\|powershell\|pwsh]` | Shows completion for the specified shell, allowing you to copy it or customize the installation. |
|
||||
| `--backend-only` | This parameter, with a default value of `False`, allows running only the backend server without the frontend. It can also be set using the `LANGFLOW_BACKEND_ONLY` environment variable. For more, see [Backend-only](../deployment/backend-only.md). |
|
||||
| `--store` | This parameter, with a default value of `True`, enables the store features, use `--no-store` to deactivate it. It can be configured using the `LANGFLOW_STORE` environment variable. |
|
||||
|
||||
#### Environment Variables
|
||||
|
||||
You can configure many of the CLI options using environment variables. These can be exported in your operating system or added to a `.env` file and loaded using the `--env-file` option.
|
||||
|
||||
A sample `.env` file named `.env.example` is included with the project. Copy this file to a new file named `.env` and replace the example values with your actual settings. If you're setting values in both your OS and the `.env` file, the `.env` settings will take precedence.
|
||||
|
||||
## langflow superuser
|
||||
|
||||
Create a superuser for Langflow.
|
||||
|
||||
```bash
|
||||
langflow superuser
|
||||
# or
|
||||
python -m langflow superuser
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Type | Description |
|
||||
| ------------- | ---- | ------------------------------------------------------------- |
|
||||
| `--username` | TEXT | Username for the superuser. [default: None] [required] |
|
||||
| `--password` | TEXT | Password for the superuser. [default: None] [required] |
|
||||
| `--log-level` | TEXT | Logging level. [env var: LANGFLOW_LOG_LEVEL] [default: error] |
|
||||
| `--help` | | Show this message and exit. |
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ Global Variables are a useful feature of Langflow, allowing you to define reusab
|
|||
- All Credential Global Variables are encrypted and accessible only by you.
|
||||
- Set _`LANGFLOW_STORE_ENVIRONMENT_VARIABLES`_ to _`true`_ in your `.env` file to add all variables in _`LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT`_ to your user's Global Variables.
|
||||
|
||||
|
||||
## Creating and Adding a Global Variable
|
||||
|
||||
To create and add a global variable, click the 🌐 button in a Text field, and then click **+ Add New Variable**.
|
||||
|
|
@ -25,18 +24,20 @@ To create and add a global variable, click the 🌐 button in a Text field, and
|
|||
Text fields are where you write text without opening a Text area, and are identified with the 🌐 icon.
|
||||
|
||||
For example, to create an environment variable for the **OpenAI** component:
|
||||
1. In the **OpenAI API Key** text field, click the 🌐 button, then **Add New Variable**.
|
||||
2. Enter `openai_api_key` in the **Variable Name** field.
|
||||
3. Paste your OpenAI API Key (`sk-...`) in the **Value** field.
|
||||
4. Select **Credential** for the **Type**.
|
||||
5. Choose **OpenAI API Key** in the **Apply to Fields** field to apply this variable to all fields named **OpenAI API Key**.
|
||||
6. Click **Save Variable**.
|
||||
|
||||
1. In the **OpenAI API Key** text field, click the 🌐 button, then **Add New Variable**.
|
||||
2. Enter `openai_api_key` in the **Variable Name** field.
|
||||
3. Paste your OpenAI API Key (`sk-...`) in the **Value** field.
|
||||
4. Select **Credential** for the **Type**.
|
||||
5. Choose **OpenAI API Key** in the **Apply to Fields** field to apply this variable to all fields named **OpenAI API Key**.
|
||||
6. Click **Save Variable**.
|
||||
|
||||
You now have a `openai_api_key` global environment variable for your Langflow project.
|
||||
Subsequently, clicking the 🌐 button in a Text field will display the new variable in the dropdown.
|
||||
|
||||
<Admonition type="tip">
|
||||
You can also create global variables in **Settings** > **Variables and Secrets**.
|
||||
You can also create global variables in **Settings** > **Variables and
|
||||
Secrets**.
|
||||
</Admonition>
|
||||
|
||||
<ZoomableImage
|
||||
|
|
@ -65,7 +66,8 @@ Setting `LANGFLOW_STORE_ENVIRONMENT_VARIABLES` to `true` in your `.env` file (de
|
|||
These variables are accessible like any other Global Variable.
|
||||
|
||||
<Admonition type="tip">
|
||||
To prevent this behavior, set `LANGFLOW_STORE_ENVIRONMENT_VARIABLES` to `false` in your `.env` file.
|
||||
To prevent this behavior, set `LANGFLOW_STORE_ENVIRONMENT_VARIABLES` to
|
||||
`false` in your `.env` file.
|
||||
</Admonition>
|
||||
|
||||
You can specify variables to get from the environment by listing them in `LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT`.
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
import Admonition from '@theme/Admonition';
|
||||
import Admonition from "@theme/Admonition";
|
||||
|
||||
# Agents
|
||||
|
||||
<Admonition type="caution" icon="🚧" title="ZONE UNDER CONSTRUCTION">
|
||||
<p>
|
||||
We appreciate your understanding as we polish our documentation – it may contain some rough edges. Share your feedback or report issues to help us improve! 🛠️📝
|
||||
</p>
|
||||
<p>
|
||||
We appreciate your understanding as we polish our documentation – it may
|
||||
contain some rough edges. Share your feedback or report issues to help us
|
||||
improve! 🛠️📝
|
||||
</p>
|
||||
</Admonition>
|
||||
|
||||
Agents are components that use reasoning to make decisions and take actions, designed to autonomously perform tasks or provide services with some degree of agency. LLM chains can only perform hardcoded sequences of actions, while agents use LLMs to reason through which actions to take, and in which order.
|
||||
|
|
@ -87,4 +89,4 @@ The `ZeroShotAgent` uses the ReAct framework to decide which tool to use based o
|
|||
**Parameters**:
|
||||
|
||||
- **Allowed Tools:** The tools accessible to the agent.
|
||||
- **LLM Chain:** The LLM Chain used by the agent.
|
||||
- **LLM Chain:** The LLM Chain used by the agent.
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ import Admonition from "@theme/Admonition";
|
|||
# Chains
|
||||
|
||||
<Admonition type="caution" icon="🚧" title="ZONE UNDER CONSTRUCTION">
|
||||
<p>
|
||||
Thank you for your patience while we enhance our documentation. It may
|
||||
have some imperfections. Share your feedback or report issues to help us
|
||||
improve! 🛠️📝
|
||||
</p>
|
||||
<p>
|
||||
Thank you for your patience while we enhance our documentation. It may have
|
||||
some imperfections. Share your feedback or report issues to help us improve!
|
||||
🛠️📝
|
||||
</p>
|
||||
</Admonition>
|
||||
|
||||
Chains, in the context of language models, refer to a series of calls made to a language model. This approach allows for using the output of one call as the input for another. Different chain types facilitate varying complexity levels, making them useful for creating pipelines and executing specific scenarios.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import Admonition from '@theme/Admonition';
|
||||
import Admonition from "@theme/Admonition";
|
||||
|
||||
# Data
|
||||
|
||||
|
|
|
|||
|
|
@ -4,113 +4,113 @@
|
|||
|
||||
Used to load embedding models from [Amazon Bedrock](https://aws.amazon.com/bedrock/).
|
||||
|
||||
| **Parameter** | **Type** | **Description** | **Default** |
|
||||
|-----------------------------|-------------------|------------------------------------------------------------------------------------------------------------------------------------|-------------|
|
||||
| `credentials_profile_name` | `str` | Name of the AWS credentials profile in ~/.aws/credentials or ~/.aws/config, which has access keys or role information. | |
|
||||
| `model_id` | `str` | ID of the model to call, e.g., `amazon.titan-embed-text-v1`. This is equivalent to the `modelId` property in the `list-foundation-models` API. | |
|
||||
| `endpoint_url` | `str` | URL to set a specific service endpoint other than the default AWS endpoint. | |
|
||||
| `region_name` | `str` | AWS region to use, e.g., `us-west-2`. Falls back to `AWS_DEFAULT_REGION` environment variable or region specified in ~/.aws/config if not provided. | |
|
||||
| **Parameter** | **Type** | **Description** | **Default** |
|
||||
| -------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
|
||||
| `credentials_profile_name` | `str` | Name of the AWS credentials profile in ~/.aws/credentials or ~/.aws/config, which has access keys or role information. | |
|
||||
| `model_id` | `str` | ID of the model to call, e.g., `amazon.titan-embed-text-v1`. This is equivalent to the `modelId` property in the `list-foundation-models` API. | |
|
||||
| `endpoint_url` | `str` | URL to set a specific service endpoint other than the default AWS endpoint. | |
|
||||
| `region_name` | `str` | AWS region to use, e.g., `us-west-2`. Falls back to `AWS_DEFAULT_REGION` environment variable or region specified in ~/.aws/config if not provided. | |
|
||||
|
||||
## Cohere Embeddings
|
||||
|
||||
Used to load embedding models from [Cohere](https://cohere.com/).
|
||||
|
||||
| **Parameter** | **Type** | **Description** | **Default** |
|
||||
|---------------------|-------------------|-------------------------------------------------------------------------------------------------------------------------------|-----------------------|
|
||||
| `cohere_api_key` | `str` | API key required to authenticate with the Cohere service. | |
|
||||
| `model` | `str` | Language model used for embedding text documents and performing queries. | `embed-english-v2.0` |
|
||||
| `truncate` | `bool` | Whether to truncate the input text to fit within the model's constraints. | `False` |
|
||||
| **Parameter** | **Type** | **Description** | **Default** |
|
||||
| ---------------- | -------- | ------------------------------------------------------------------------- | -------------------- |
|
||||
| `cohere_api_key` | `str` | API key required to authenticate with the Cohere service. | |
|
||||
| `model` | `str` | Language model used for embedding text documents and performing queries. | `embed-english-v2.0` |
|
||||
| `truncate` | `bool` | Whether to truncate the input text to fit within the model's constraints. | `False` |
|
||||
|
||||
## Azure OpenAI Embeddings
|
||||
|
||||
Generate embeddings using Azure OpenAI models.
|
||||
|
||||
| **Parameter** | **Type** | **Description** | **Default** |
|
||||
|---------------------|-------------------|-------------------------------------------------------------------------------------------------------------------------------|-----------------------|
|
||||
| `Azure Endpoint` | `str` | Your Azure endpoint, including the resource. Example: `https://example-resource.azure.openai.com/` | |
|
||||
| `Deployment Name` | `str` | The name of the deployment. | |
|
||||
| `API Version` | `str` | The API version to use, options include various dates. | |
|
||||
| `API Key` | `str` | The API key to access the Azure OpenAI service. | |
|
||||
| **Parameter** | **Type** | **Description** | **Default** |
|
||||
| ----------------- | -------- | -------------------------------------------------------------------------------------------------- | ----------- |
|
||||
| `Azure Endpoint` | `str` | Your Azure endpoint, including the resource. Example: `https://example-resource.azure.openai.com/` | |
|
||||
| `Deployment Name` | `str` | The name of the deployment. | |
|
||||
| `API Version` | `str` | The API version to use, options include various dates. | |
|
||||
| `API Key` | `str` | The API key to access the Azure OpenAI service. | |
|
||||
|
||||
## Hugging Face API Embeddings
|
||||
|
||||
Generate embeddings using Hugging Face Inference API models.
|
||||
|
||||
| **Parameter** | **Type** | **Description** | **Default** |
|
||||
|---------------------|-------------------|-------------------------------------------------------------------------------------------------------------------------------|-----------------------|
|
||||
| `API Key` | `str` | API key for accessing the Hugging Face Inference API. | |
|
||||
| `API URL` | `str` | URL of the Hugging Face Inference API. | `http://localhost:8080` |
|
||||
| `Model Name` | `str` | Name of the model to use for embeddings. | `BAAI/bge-large-en-v1.5` |
|
||||
| `Cache Folder` | `str` | Folder path to cache Hugging Face models. | |
|
||||
| `Encode Kwargs` | `dict` | Additional arguments for the encoding process. | |
|
||||
| `Model Kwargs` | `dict` | Additional arguments for the model. | |
|
||||
| `Multi Process` | `bool` | Whether to use multiple processes. | `False` |
|
||||
| **Parameter** | **Type** | **Description** | **Default** |
|
||||
| --------------- | -------- | ----------------------------------------------------- | ------------------------ |
|
||||
| `API Key` | `str` | API key for accessing the Hugging Face Inference API. | |
|
||||
| `API URL` | `str` | URL of the Hugging Face Inference API. | `http://localhost:8080` |
|
||||
| `Model Name` | `str` | Name of the model to use for embeddings. | `BAAI/bge-large-en-v1.5` |
|
||||
| `Cache Folder` | `str` | Folder path to cache Hugging Face models. | |
|
||||
| `Encode Kwargs` | `dict` | Additional arguments for the encoding process. | |
|
||||
| `Model Kwargs` | `dict` | Additional arguments for the model. | |
|
||||
| `Multi Process` | `bool` | Whether to use multiple processes. | `False` |
|
||||
|
||||
## Hugging Face Embeddings
|
||||
|
||||
Used to load embedding models from [HuggingFace](https://huggingface.co).
|
||||
|
||||
| **Parameter** | **Type** | **Description** | **Default** |
|
||||
|---------------------|-------------------|-------------------------------------------------------------------------------------------------------------------------------|-----------------------|
|
||||
| `Cache Folder` | `str` | Folder path to cache HuggingFace models. | |
|
||||
| `Encode Kwargs` | `dict` | Additional arguments for the encoding process. | |
|
||||
| `Model Kwargs` | `dict` | Additional arguments for the model. | |
|
||||
| `Model Name` | `str` | Name of the HuggingFace model to use. | `sentence-transformers/all-mpnet-base-v2` |
|
||||
| `Multi Process` | `bool` | Whether to use multiple processes. | `False` |
|
||||
| **Parameter** | **Type** | **Description** | **Default** |
|
||||
| --------------- | -------- | ---------------------------------------------- | ----------------------------------------- |
|
||||
| `Cache Folder` | `str` | Folder path to cache HuggingFace models. | |
|
||||
| `Encode Kwargs` | `dict` | Additional arguments for the encoding process. | |
|
||||
| `Model Kwargs` | `dict` | Additional arguments for the model. | |
|
||||
| `Model Name` | `str` | Name of the HuggingFace model to use. | `sentence-transformers/all-mpnet-base-v2` |
|
||||
| `Multi Process` | `bool` | Whether to use multiple processes. | `False` |
|
||||
|
||||
## OpenAI Embeddings
|
||||
|
||||
Used to load embedding models from [OpenAI](https://openai.com/).
|
||||
|
||||
| **Parameter** | **Type** | **Description** | **Default** |
|
||||
|-----------------------------|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|
|
||||
| `OpenAI API Key` | `str` | The API key to use for accessing the OpenAI API. | |
|
||||
| `Default Headers` | `Dict[str, str]` | Default headers for the HTTP requests. | |
|
||||
| `Default Query` | `NestedDict` | Default query parameters for the HTTP requests. | |
|
||||
| `Allowed Special` | `List[str]` | Special tokens allowed for processing. | `[]` |
|
||||
| `Disallowed Special` | `List[str]` | Special tokens disallowed for processing. | `["all"]` |
|
||||
| `Chunk Size` | `int` | Chunk size for processing. | `1000` |
|
||||
| `Client` | `Any` | HTTP client for making requests. | |
|
||||
| `Deployment` | `str` | Deployment name for the model. | `text-embedding-3-small` |
|
||||
| `Embedding Context Length` | `int` | Length of embedding context. | `8191` |
|
||||
| `Max Retries` | `int` | Maximum number of retries for failed requests. | `6` |
|
||||
| `Model` | `str` | Name of the model to use. | `text-embedding-3-small` |
|
||||
| `Model Kwargs` | `NestedDict` | Additional keyword arguments for the model. | |
|
||||
| `OpenAI API Base` | `str` | Base URL of the OpenAI API. | |
|
||||
| `OpenAI API Type` | `str` | Type of the OpenAI API. | |
|
||||
| `OpenAI API Version` | `str` | Version of the OpenAI API. | |
|
||||
| `OpenAI Organization` | `str` | Organization associated with the API key. | |
|
||||
| `OpenAI Proxy` | `str` | Proxy server for the requests. | |
|
||||
| `Request Timeout` | `float` | Timeout for the HTTP requests. | |
|
||||
| `Show Progress Bar` | `bool` | Whether to show a progress bar for processing. | `False` |
|
||||
| `Skip Empty` | `bool` | Whether to skip empty inputs. | `False` |
|
||||
| `TikToken Enable` | `bool` | Whether to enable TikToken. | `True` |
|
||||
| `TikToken Model Name` | `str` | Name of the TikToken model. | |
|
||||
| **Parameter** | **Type** | **Description** | **Default** |
|
||||
| -------------------------- | ---------------- | ------------------------------------------------ | ------------------------ |
|
||||
| `OpenAI API Key` | `str` | The API key to use for accessing the OpenAI API. | |
|
||||
| `Default Headers` | `Dict[str, str]` | Default headers for the HTTP requests. | |
|
||||
| `Default Query` | `NestedDict` | Default query parameters for the HTTP requests. | |
|
||||
| `Allowed Special` | `List[str]` | Special tokens allowed for processing. | `[]` |
|
||||
| `Disallowed Special` | `List[str]` | Special tokens disallowed for processing. | `["all"]` |
|
||||
| `Chunk Size` | `int` | Chunk size for processing. | `1000` |
|
||||
| `Client` | `Any` | HTTP client for making requests. | |
|
||||
| `Deployment` | `str` | Deployment name for the model. | `text-embedding-3-small` |
|
||||
| `Embedding Context Length` | `int` | Length of embedding context. | `8191` |
|
||||
| `Max Retries` | `int` | Maximum number of retries for failed requests. | `6` |
|
||||
| `Model` | `str` | Name of the model to use. | `text-embedding-3-small` |
|
||||
| `Model Kwargs` | `NestedDict` | Additional keyword arguments for the model. | |
|
||||
| `OpenAI API Base` | `str` | Base URL of the OpenAI API. | |
|
||||
| `OpenAI API Type` | `str` | Type of the OpenAI API. | |
|
||||
| `OpenAI API Version` | `str` | Version of the OpenAI API. | |
|
||||
| `OpenAI Organization` | `str` | Organization associated with the API key. | |
|
||||
| `OpenAI Proxy` | `str` | Proxy server for the requests. | |
|
||||
| `Request Timeout` | `float` | Timeout for the HTTP requests. | |
|
||||
| `Show Progress Bar` | `bool` | Whether to show a progress bar for processing. | `False` |
|
||||
| `Skip Empty` | `bool` | Whether to skip empty inputs. | `False` |
|
||||
| `TikToken Enable` | `bool` | Whether to enable TikToken. | `True` |
|
||||
| `TikToken Model Name` | `str` | Name of the TikToken model. | |
|
||||
|
||||
## Ollama Embeddings
|
||||
|
||||
Generate embeddings using Ollama models.
|
||||
|
||||
| **Parameter** | **Type** | **Description** | **Default** |
|
||||
|---------------------|-------------------|--------------------------------------------------------------------------------------------------------------------|---------------------------|
|
||||
| `Ollama Model` | `str` | Name of the Ollama model to use. | `llama2` |
|
||||
| `Ollama Base URL` | `str` | Base URL of the Ollama API. | `http://localhost:11434` |
|
||||
| `Model Temperature` | `float` | Temperature parameter for the model. Adjusts the randomness in the generated embeddings. | |
|
||||
| **Parameter** | **Type** | **Description** | **Default** |
|
||||
| ------------------- | -------- | ---------------------------------------------------------------------------------------- | ------------------------ |
|
||||
| `Ollama Model` | `str` | Name of the Ollama model to use. | `llama2` |
|
||||
| `Ollama Base URL` | `str` | Base URL of the Ollama API. | `http://localhost:11434` |
|
||||
| `Model Temperature` | `float` | Temperature parameter for the model. Adjusts the randomness in the generated embeddings. | |
|
||||
|
||||
## VertexAI Embeddings
|
||||
|
||||
Wrapper around [Google Vertex AI](https://cloud.google.com/vertex-ai) [Embeddings API](https://cloud.google.com/vertex-ai/docs/generative-ai/embeddings/get-text-embeddings).
|
||||
|
||||
| **Parameter** | **Type** | **Description** | **Default** |
|
||||
|-----------------------------|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|
|
||||
| `credentials` | `Credentials` | The default custom credentials to use. | |
|
||||
| `location` | `str` | The default location to use when making API calls. | `us-central1`|
|
||||
| `max_output_tokens` | `int` | Token limit determines the maximum amount of text output from one prompt. | `128` |
|
||||
| `model_name` | `str` | The name of the Vertex AI large language model. | `text-bison`|
|
||||
| `project` | `str` | The default GCP project to use when making Vertex API calls. | |
|
||||
| `request_parallelism` | `int` | The amount of parallelism allowed for requests issued to VertexAI models. | `5` |
|
||||
| `temperature` | `float` | Tunes the degree of randomness in text generations. Should be a non-negative value. | `0` |
|
||||
| `top_k` | `int` | How the model selects tokens for output, the next token is selected from the top `k` tokens. | `40` |
|
||||
| `top_p` | `float` | Tokens are selected from the most probable to least until the sum of their probabilities exceeds the top `p` value. | `0.95` |
|
||||
| `tuned_model_name` | `str` | The name of a tuned model. If provided, `model_name` is ignored. | |
|
||||
| `verbose` | `bool` | This parameter controls the level of detail in the output. When set to `True`, it prints internal states of the chain to help debug. | `False` |
|
||||
| **Parameter** | **Type** | **Description** | **Default** |
|
||||
| --------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ------------- |
|
||||
| `credentials` | `Credentials` | The default custom credentials to use. | |
|
||||
| `location` | `str` | The default location to use when making API calls. | `us-central1` |
|
||||
| `max_output_tokens` | `int` | Token limit determines the maximum amount of text output from one prompt. | `128` |
|
||||
| `model_name` | `str` | The name of the Vertex AI large language model. | `text-bison` |
|
||||
| `project` | `str` | The default GCP project to use when making Vertex API calls. | |
|
||||
| `request_parallelism` | `int` | The amount of parallelism allowed for requests issued to VertexAI models. | `5` |
|
||||
| `temperature` | `float` | Tunes the degree of randomness in text generations. Should be a non-negative value. | `0` |
|
||||
| `top_k` | `int` | How the model selects tokens for output, the next token is selected from the top `k` tokens. | `40` |
|
||||
| `top_p` | `float` | Tokens are selected from the most probable to least until the sum of their probabilities exceeds the top `p` value. | `0.95` |
|
||||
| `tuned_model_name` | `str` | The name of a tuned model. If provided, `model_name` is ignored. | |
|
||||
| `verbose` | `bool` | This parameter controls the level of detail in the output. When set to `True`, it prints internal states of the chain to help debug. | `False` |
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import Admonition from '@theme/Admonition';
|
||||
import Admonition from "@theme/Admonition";
|
||||
|
||||
# Experimental
|
||||
|
||||
|
|
@ -29,10 +29,12 @@ This component extracts specified keys from a record.
|
|||
**Parameters**
|
||||
|
||||
- **Record:**
|
||||
|
||||
- **Display Name:** Record
|
||||
- **Info:** The record from which to extract keys.
|
||||
|
||||
- **Keys:**
|
||||
|
||||
- **Display Name:** Keys
|
||||
- **Info:** The keys to be extracted.
|
||||
|
||||
|
|
@ -54,6 +56,7 @@ This component turns a function running a flow into a Tool.
|
|||
**Parameters**
|
||||
|
||||
- **Flow Name:**
|
||||
|
||||
- **Display Name:** Flow Name
|
||||
- **Info:** Select the flow to run.
|
||||
- **Options:** List of available flows.
|
||||
|
|
@ -61,10 +64,12 @@ This component turns a function running a flow into a Tool.
|
|||
- **Refresh Button:** True
|
||||
|
||||
- **Name:**
|
||||
|
||||
- **Display Name:** Name
|
||||
- **Description:** The tool's name.
|
||||
|
||||
- **Description:**
|
||||
|
||||
- **Display Name:** Description
|
||||
- **Description:** Describes the tool.
|
||||
|
||||
|
|
@ -127,10 +132,12 @@ This component generates a notification.
|
|||
**Parameters**
|
||||
|
||||
- **Name:**
|
||||
|
||||
- **Display Name:** Name
|
||||
- **Info:** The notification's name.
|
||||
|
||||
- **Record:**
|
||||
|
||||
- **Display Name:** Record
|
||||
- **Info:** Optionally, a record to store in the notification.
|
||||
|
||||
|
|
@ -151,10 +158,12 @@ This component runs a specified flow.
|
|||
**Parameters**
|
||||
|
||||
- **Input Value:**
|
||||
|
||||
- **Display Name:** Input Value
|
||||
- **Multiline:** True
|
||||
|
||||
- **Flow Name:**
|
||||
|
||||
- **Display Name:** Flow Name
|
||||
- **Info:** Select the flow to run.
|
||||
- **Options:** List of available flows.
|
||||
|
|
@ -177,14 +186,17 @@ This component executes a specified runnable.
|
|||
**Parameters**
|
||||
|
||||
- **Input Key:**
|
||||
|
||||
- **Display Name:** Input Key
|
||||
- **Info:** The input key.
|
||||
|
||||
- **Inputs:**
|
||||
|
||||
- **Display Name:** Inputs
|
||||
- **Info:** Inputs for the runnable.
|
||||
|
||||
- **Runnable:**
|
||||
|
||||
- **Display Name:** Runnable
|
||||
- **Info:** The runnable to execute.
|
||||
|
||||
|
|
@ -205,14 +217,17 @@ This component executes an SQL query.
|
|||
**Parameters**
|
||||
|
||||
- **Database URL:**
|
||||
|
||||
- **Display Name:** Database URL
|
||||
- **Info:** The database's URL.
|
||||
|
||||
- **Include Columns:**
|
||||
|
||||
- **Display Name:** Include Columns
|
||||
- **Info:** Whether to include columns in the result.
|
||||
|
||||
- **Passthrough:**
|
||||
|
||||
- **Display Name:** Passthrough
|
||||
- **Info:** Returns the query instead of raising an exception if an error occurs.
|
||||
|
||||
|
|
@ -233,10 +248,12 @@ This component dynamically generates a tool from a flow.
|
|||
**Parameters**
|
||||
|
||||
- **Input Value:**
|
||||
|
||||
- **Display Name:** Input Value
|
||||
- **Multiline:** True
|
||||
|
||||
- **Flow Name:**
|
||||
|
||||
- **Display Name:** Flow Name
|
||||
- **Info:** Select the flow to run.
|
||||
- **Options:** List of available flows.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import Admonition from '@theme/Admonition';
|
||||
import Admonition from "@theme/Admonition";
|
||||
|
||||
# Helpers
|
||||
|
||||
|
|
@ -49,9 +49,10 @@ Use this component as a template to create your custom component.
|
|||
- **Parameter:** Describe the purpose of this parameter.
|
||||
|
||||
<Admonition type="info" title="Info">
|
||||
<p>
|
||||
Customize the <code>build_config</code> and <code>build</code> methods according to your requirements.
|
||||
</p>
|
||||
<p>
|
||||
Customize the <code>build_config</code> and <code>build</code> methods
|
||||
according to your requirements.
|
||||
</p>
|
||||
</Admonition>
|
||||
|
||||
Learn more about creating custom components at [Custom Component](http://docs.langflow.org/components/custom).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import Admonition from '@theme/Admonition';
|
||||
import Admonition from "@theme/Admonition";
|
||||
import ZoomableImage from "/src/theme/ZoomableImage.js";
|
||||
|
||||
# Inputs and Outputs
|
||||
|
|
@ -29,9 +29,8 @@ This component collects user input from the chat.
|
|||
|
||||
<Admonition type="note" title="Note">
|
||||
<p>
|
||||
If `As Record` is `true` and the `Message` is a `Record`, the data
|
||||
of the `Record` will be updated with the `Sender`, `Sender Name`, and
|
||||
`Session ID`.
|
||||
If `As Record` is `true` and the `Message` is a `Record`, the data of the
|
||||
`Record` will be updated with the `Sender`, `Sender Name`, and `Session ID`.
|
||||
</p>
|
||||
</Admonition>
|
||||
|
||||
|
|
@ -112,9 +111,10 @@ This component sends a message to the chat.
|
|||
- **Message:** Specifies the text of the message.
|
||||
|
||||
<Admonition type="note" title="Note">
|
||||
<p>
|
||||
If `As Record` is `true` and the `Message` is a `Record`, the data in the `Record` is updated with the `Sender`, `Sender Name`, and `Session ID`.
|
||||
</p>
|
||||
<p>
|
||||
If `As Record` is `true` and the `Message` is a `Record`, the data in the
|
||||
`Record` is updated with the `Sender`, `Sender Name`, and `Session ID`.
|
||||
</p>
|
||||
</Admonition>
|
||||
|
||||
### Text Output
|
||||
|
|
@ -125,7 +125,6 @@ This component displays text data to the user. It is useful when you want to sho
|
|||
|
||||
- **Value:** Specifies the text data to be displayed. Defaults to an empty string.
|
||||
|
||||
|
||||
The `TextOutput` component provides a simple way to display text data. It allows textual data to be visible in the chat window during your interaction flow.
|
||||
|
||||
## Prompts
|
||||
|
|
@ -155,7 +154,8 @@ The `PromptTemplate` component enables users to create prompts and define variab
|
|||
|
||||
<Admonition type="info">
|
||||
After defining a variable in the prompt template, it acts as its own component
|
||||
input. See [Prompt Customization](../administration/prompt-customization) for more details.
|
||||
input. See [Prompt Customization](../administration/prompt-customization) for
|
||||
more details.
|
||||
</Admonition>
|
||||
|
||||
- **template:** The template used to format an individual request.
|
||||
- **template:** The template used to format an individual request.
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
import Admonition from '@theme/Admonition';
|
||||
import Admonition from "@theme/Admonition";
|
||||
|
||||
# Memories
|
||||
|
||||
<Admonition type="caution" icon="🚧" title="ZONE UNDER CONSTRUCTION">
|
||||
<p>
|
||||
Thanks for your patience as we improve our documentation—it might have some rough edges. Share your feedback or report issues to help us enhance it! 🛠️📝
|
||||
</p>
|
||||
<p>
|
||||
Thanks for your patience as we improve our documentation—it might have some
|
||||
rough edges. Share your feedback or report issues to help us enhance it!
|
||||
🛠️📝
|
||||
</p>
|
||||
</Admonition>
|
||||
|
||||
Memory is a concept in chat-based applications that allows the system to remember previous interactions. This capability helps maintain the context of the conversation and enables the system to understand new messages in light of past messages.
|
||||
|
|
@ -24,9 +26,13 @@ This component retrieves stored messages using various filters such as sender ty
|
|||
- **number_of_messages**: Specifies the number of messages to retrieve. Defaults to `5`. Determines the number of recent messages from the chat history to fetch.
|
||||
|
||||
<Admonition type="note" title="Note">
|
||||
<p>
|
||||
The component retrieves messages based on the provided criteria, including the specific file path for stored messages. If no specific criteria are provided, it returns the most recent messages up to the specified limit. This component can be used to review past interactions and analyze conversation flows.
|
||||
</p>
|
||||
<p>
|
||||
The component retrieves messages based on the provided criteria, including
|
||||
the specific file path for stored messages. If no specific criteria are
|
||||
provided, it returns the most recent messages up to the specified limit.
|
||||
This component can be used to review past interactions and analyze
|
||||
conversation flows.
|
||||
</p>
|
||||
</Admonition>
|
||||
|
||||
### ConversationBufferMemory
|
||||
|
|
@ -84,7 +90,8 @@ The `ConversationKGMemory` utilizes a knowledge graph to enhance memory capabili
|
|||
- **memory_key**: Specifies the prompt variable name where the memory stores and retrieves chat messages. Defaults to `chat_history`.
|
||||
- **output_key**: Identifies the key under which the generated response
|
||||
|
||||
is stored, enabling retrieval using this key.
|
||||
is stored, enabling retrieval using this key.
|
||||
|
||||
- **return_messages**: Controls whether the history is returned as a string or as a list of messages. Defaults to `False`.
|
||||
|
||||
---
|
||||
|
|
@ -124,4 +131,4 @@ The `VectorRetrieverMemory` retrieves vectors based on queries, facilitating vec
|
|||
- **Retriever**: The tool used to fetch documents.
|
||||
- **input_key**: Identifies where input messages are stored in the memory object, facilitating their retrieval and manipulation.
|
||||
- **memory_key**: Specifies the prompt variable name where the memory stores and retrieves chat messages. Defaults to `chat_history`.
|
||||
- **return_messages**: Controls whether the history is returned as a string or as a list of messages. Defaults to `False`.
|
||||
- **return_messages**: Controls whether the history is returned as a string or as a list of messages. Defaults to `False`.
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue