Merge branch 'dev' into SessionManagment
This commit is contained in:
commit
4692ed6844
8 changed files with 208 additions and 14 deletions
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)
|
||||
|
|
|
|||
|
|
@ -9,14 +9,11 @@ The `AddContentToPage` component converts markdown text to Notion blocks and app
|
|||
|
||||
[Notion Reference](https://developers.notion.com/reference/patch-block-children)
|
||||
|
||||
<Admonition type="tip" title="Component Functionality">
|
||||
|
||||
The `AddContentToPage` component enables you to:
|
||||
|
||||
- Convert markdown text to Notion blocks.
|
||||
- Append the converted blocks to a specified Notion page.
|
||||
- Seamlessly integrate Notion content creation into Langflow workflows.
|
||||
</Admonition>
|
||||
|
||||
## Component Usage
|
||||
|
||||
|
|
@ -100,8 +97,6 @@ class NotionPageCreator(CustomComponent):
|
|||
|
||||
## Example Usage
|
||||
|
||||
<Admonition type="info" title="Example Usage">
|
||||
|
||||
Example of using the `AddContentToPage` component in a Langflow flow using Markdown as input:
|
||||
|
||||
<ZoomableImage
|
||||
|
|
@ -115,8 +110,6 @@ style={{ width: "100%", margin: "20px 0" }}
|
|||
|
||||
In this example, the `AddContentToPage` component connects to a `MarkdownLoader` component to provide the markdown text input. The converted Notion blocks are appended to the specified Notion page using the provided `block_id` and `notion_secret`.
|
||||
|
||||
</Admonition>
|
||||
|
||||
## Best Practices
|
||||
|
||||
When using the `AddContentToPage` component:
|
||||
|
|
|
|||
|
|
@ -9,13 +9,11 @@ The `NotionUserList` component retrieves users from Notion. It provides a conven
|
|||
|
||||
[Notion Reference](https://developers.notion.com/reference/get-users)
|
||||
|
||||
<Admonition type="tip" title="Component Functionality">
|
||||
The `NotionUserList` component enables you to:
|
||||
|
||||
- Retrieve user data from Notion
|
||||
- Access user information such as ID, type, name, and avatar URL
|
||||
- Integrate Notion user data seamlessly into your Langflow workflows
|
||||
</Admonition>
|
||||
|
||||
## Component Usage
|
||||
|
||||
|
|
@ -95,7 +93,6 @@ class NotionUserList(CustomComponent):
|
|||
|
||||
## Example Usage
|
||||
|
||||
<Admonition type="info" title="Example Usage">
|
||||
Here's an example of how you can use the `NotionUserList` component in a Langflow flow and passing the outputs to the Prompt component:
|
||||
|
||||
<ZoomableImage
|
||||
|
|
@ -107,8 +104,6 @@ sources={{
|
|||
style={{ width: "100%", margin: "20px 0" }}
|
||||
/>
|
||||
|
||||
</Admonition>
|
||||
|
||||
## Best Practices
|
||||
|
||||
When using the `NotionUserList` component, consider the following best practices:
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ if not space:
|
|||
print("Please provide a space to restart.")
|
||||
exit()
|
||||
|
||||
if not parsed_args.api_token:
|
||||
if not parsed_args.token:
|
||||
print("Please provide an API token.")
|
||||
exit()
|
||||
|
||||
|
|
|
|||
25
src/frontend/src/icons/Streamlit/SvgStreamlit.jsx
Normal file
25
src/frontend/src/icons/Streamlit/SvgStreamlit.jsx
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
export default function SvgStreamlit(props) {
|
||||
return (
|
||||
<svg
|
||||
width="301"
|
||||
height="165"
|
||||
viewBox="0 0 301 165"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
{...props}
|
||||
>
|
||||
<path
|
||||
d="M150.731 101.547L98.1387 73.7471L6.84674 25.4969C6.7634 25.4136 6.59674 25.4136 6.51341 25.4136C3.18007 23.8303 -0.236608 27.1636 1.0134 30.497L47.5302 149.139L47.5385 149.164C47.5885 149.281 47.6302 149.397 47.6802 149.514C49.5885 153.939 53.7552 156.672 58.2886 157.747C58.6719 157.831 58.9461 157.906 59.4064 157.998C59.8645 158.1 60.5052 158.239 61.0552 158.281C61.1469 158.289 61.2302 158.289 61.3219 158.297H61.3886C61.4552 158.306 61.5219 158.306 61.5886 158.314H61.6802C61.7386 158.322 61.8052 158.322 61.8636 158.322H61.9719C62.0386 158.331 62.1052 158.331 62.1719 158.331V158.331C121.084 164.754 180.519 164.754 239.431 158.331V158.331C240.139 158.331 240.831 158.297 241.497 158.231C241.714 158.206 241.922 158.181 242.131 158.156C242.156 158.147 242.189 158.147 242.214 158.139C242.356 158.122 242.497 158.097 242.639 158.072C242.847 158.047 243.056 158.006 243.264 157.964C243.681 157.872 243.87 157.806 244.436 157.611C245.001 157.417 245.94 157.077 246.527 156.794C247.115 156.511 247.522 156.239 248.014 155.931C248.622 155.547 249.201 155.155 249.788 154.715C250.041 154.521 250.214 154.397 250.397 154.222L250.297 154.164L150.731 101.547Z"
|
||||
fill="#FF4B4B"
|
||||
/>
|
||||
<path
|
||||
d="M294.766 25.4981H294.683L203.357 73.7483L254.124 149.357L300.524 30.4981V30.3315C301.691 26.8314 298.108 23.6648 294.766 25.4981"
|
||||
fill="#7D353B"
|
||||
/>
|
||||
<path
|
||||
d="M155.598 2.55572C153.264 -0.852624 148.181 -0.852624 145.931 2.55572L98.1389 73.7477L150.731 101.548L250.398 154.222C251.024 153.609 251.526 153.012 252.056 152.381C252.806 151.456 253.506 150.465 254.123 149.356L203.356 73.7477L155.598 2.55572Z"
|
||||
fill="#BD4043"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
8
src/frontend/src/icons/Streamlit/index.tsx
Normal file
8
src/frontend/src/icons/Streamlit/index.tsx
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import React, { forwardRef } from "react";
|
||||
import SvgStreamlit from "./SvgStreamlit";
|
||||
|
||||
export const Streamlit = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
||||
(props, ref) => {
|
||||
return <SvgStreamlit className="icon" ref={ref} {...props} />;
|
||||
},
|
||||
);
|
||||
|
|
@ -195,6 +195,7 @@ import SvgWolfram from "../icons/Wolfram/Wolfram";
|
|||
import { HackerNewsIcon } from "../icons/hackerNews";
|
||||
import { SupabaseIcon } from "../icons/supabase";
|
||||
import { iconsType } from "../types/components";
|
||||
import { Streamlit } from "../icons/Streamlit";
|
||||
|
||||
export const gradients = [
|
||||
"bg-gradient-to-br from-gray-800 via-rose-700 to-violet-900",
|
||||
|
|
@ -530,4 +531,5 @@ export const nodeIconsLucide: iconsType = {
|
|||
Discord: FaDiscord,
|
||||
RotateCcw,
|
||||
Settings,
|
||||
Streamlit,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue