📝 docs(README.md): remove unnecessary empty line

📝 docs(README.md): update Table of Contents formatting
📝 docs(README.md): update Installation section formatting
📝 docs(README.md): update Command Line Interface (CLI) section formatting
📝 docs(README.md): update Deployment section formatting
📝 docs(README.md): update API Usage section formatting

🔧 chore(README.md): remove unnecessary whitespace and fix indentation in code block
📝 docs(README.md): update contributing section and add links to Discord server and contributing guidelines

🐛 fix(__main__.py): change envvar name from LANGFLOW_COMPONENT_PATH to LANGFLOW_COMPONENTS_PATH for consistency and clarity
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-07-31 17:46:38 -03:00
commit 868ecd86ab
2 changed files with 63 additions and 62 deletions

View file

@ -13,7 +13,6 @@
<img alt="Github License" src="https://img.shields.io/github/license/logspace-ai/langflow" /> <img alt="Github License" src="https://img.shields.io/github/license/logspace-ai/langflow" />
</p> </p>
<p> <p>
<a href="https://discord.gg/EqksyE2EX9"><img alt="Discord Server" src="https://dcbadge.vercel.app/api/server/EqksyE2EX9?compact=true&style=flat"/></a> <a href="https://discord.gg/EqksyE2EX9"><img alt="Discord Server" src="https://dcbadge.vercel.app/api/server/EqksyE2EX9?compact=true&style=flat"/></a>
<a href="https://huggingface.co/spaces/Logspace/Langflow"><img src="https://huggingface.co/datasets/huggingface/badges/raw/main/open-in-hf-spaces-sm.svg" alt="HuggingFace Spaces"></a> <a href="https://huggingface.co/spaces/Logspace/Langflow"><img src="https://huggingface.co/datasets/huggingface/badges/raw/main/open-in-hf-spaces-sm.svg" alt="HuggingFace Spaces"></a>
@ -22,11 +21,11 @@
<a href="https://github.com/logspace-ai/langflow"> <a href="https://github.com/logspace-ai/langflow">
<img width="100%" src="https://github.com/logspace-ai/langflow/blob/main/img/langflow-demo.gif?raw=true"></a> <img width="100%" src="https://github.com/logspace-ai/langflow/blob/main/img/langflow-demo.gif?raw=true"></a>
<p> <p>
</p> </p>
# Table of Contents # Table of Contents
- [⛓️ Langflow](#️-langflow) - [⛓️ Langflow](#️-langflow)
- [Table of Contents](#table-of-contents) - [Table of Contents](#table-of-contents)
- [📦 Installation](#-installation) - [📦 Installation](#-installation)
@ -45,9 +44,10 @@
- [👋 Contributing](#-contributing) - [👋 Contributing](#-contributing)
- [📄 License](#-license) - [📄 License](#-license)
# 📦 Installation # 📦 Installation
### <b>Locally</b> ### <b>Locally</b>
You can install Langflow from pip: You can install Langflow from pip:
```shell ```shell
@ -59,12 +59,15 @@ Next, run:
```shell ```shell
python -m langflow python -m langflow
``` ```
or or
```shell ```shell
langflow # or langflow --help langflow # or langflow --help
``` ```
### HuggingFace Spaces ### HuggingFace Spaces
You can also check it out on [HuggingFace Spaces](https://huggingface.co/spaces/Logspace/Langflow) and run it in your browser! You can even clone it and have your own copy of Langflow to play with. You can also check it out on [HuggingFace Spaces](https://huggingface.co/spaces/Logspace/Langflow) and run it in your browser! You can even clone it and have your own copy of Langflow to play with.
# 🖥️ Command Line Interface (CLI) # 🖥️ Command Line Interface (CLI)
@ -89,7 +92,7 @@ Each option is detailed below:
- `--config`: Defines the path to the configuration file. The default is `config.yaml`. - `--config`: Defines the path to the configuration file. The default is `config.yaml`.
- `--env-file`: Specifies the path to the .env file containing environment variables. The default is `.env`. - `--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`. - `--log-level`: Defines the logging level. Can be set using the `LANGFLOW_LOG_LEVEL` environment variable. The default is `critical`.
- `component-path`: Specifies the path to the directory containing custom components. Can be set using the `LANGFLOW_COMPONENT_PATH` environment variable. The default is `langflow/components`. - `--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`. - `--log-file`: Specifies the path to the log file. Can be set using the `LANGFLOW_LOG_FILE` environment variable. The default is `logs/langflow.log`.
- `--cache`: Selects the type of cache to use. Options are `InMemoryCache` and `SQLiteCache`. Can be set using the `LANGFLOW_LANGCHAIN_CACHE` environment variable. The default is `SQLiteCache`. - `--cache`: Selects the type of cache to use. Options are `InMemoryCache` and `SQLiteCache`. Can be set using the `LANGFLOW_LANGCHAIN_CACHE` environment variable. The default is `SQLiteCache`.
- `--jcloud/--no-jcloud`: Toggles the option to deploy on Jina AI Cloud. The default is `no-jcloud`. - `--jcloud/--no-jcloud`: Toggles the option to deploy on Jina AI Cloud. The default is `no-jcloud`.
@ -117,7 +120,6 @@ Alternatively, click the **"Open in Cloud Shell"** button below to launch Google
[![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.svg)](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/logspace-ai/langflow&working_dir=scripts&shellonly=true&tutorial=walkthroughtutorial_spot.md) [![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.svg)](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/logspace-ai/langflow&working_dir=scripts&shellonly=true&tutorial=walkthroughtutorial_spot.md)
## Deploy Langflow on [Jina AI Cloud](https://github.com/jina-ai/langchain-serve) ## Deploy Langflow on [Jina AI Cloud](https://github.com/jina-ai/langchain-serve)
Langflow integrates with langchain-serve to provide a one-command deployment to Jina AI Cloud. Langflow integrates with langchain-serve to provide a one-command deployment to Jina AI Cloud.
@ -226,9 +228,11 @@ print(run_flow("Your message", flow_id=FLOW_ID, tweaks=TWEAKS))
> Read more about resource customization, cost, and management of Langflow apps on Jina AI Cloud in the **[langchain-serve](https://github.com/jina-ai/langchain-serve)** repository. > Read more about resource customization, cost, and management of Langflow apps on Jina AI Cloud in the **[langchain-serve](https://github.com/jina-ai/langchain-serve)** repository.
## Deploy on Railway ## Deploy on Railway
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/Emy2sU?referralCode=MnPSdg) [![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/Emy2sU?referralCode=MnPSdg)
## Deploy on Render ## Deploy on Render
<a href="https://render.com/deploy?repo=https://github.com/logspace-ai/langflow/tree/main"> <a href="https://render.com/deploy?repo=https://github.com/logspace-ai/langflow/tree/main">
<img src="https://render.com/images/deploy-to-render-button.svg" alt="Deploy to Render" /> <img src="https://render.com/images/deploy-to-render-button.svg" alt="Deploy to Render" />
</a> </a>
@ -251,12 +255,10 @@ flow = load_flow_from_json("path/to/flow.json")
flow("Hey, have you heard of Langflow?") flow("Hey, have you heard of Langflow?")
``` ```
# 👋 Contributing # 👋 Contributing
We welcome contributions from developers of all levels to our open-source project on GitHub. If you'd like to contribute, please check our [contributing guidelines](./CONTRIBUTING.md) and help make Langflow more accessible. We welcome contributions from developers of all levels to our open-source project on GitHub. If you'd like to contribute, please check our [contributing guidelines](./CONTRIBUTING.md) and help make Langflow more accessible.
Join our [Discord](https://discord.com/invite/EqksyE2EX9) server to ask questions, make suggestions and showcase your projects! 🦾 Join our [Discord](https://discord.com/invite/EqksyE2EX9) server to ask questions, make suggestions and showcase your projects! 🦾
<p> <p>
@ -264,7 +266,6 @@ Join our [Discord](https://discord.com/invite/EqksyE2EX9) server to ask question
[![Star History Chart](https://api.star-history.com/svg?repos=logspace-ai/langflow&type=Timeline)](https://star-history.com/#logspace-ai/langflow&Date) [![Star History Chart](https://api.star-history.com/svg?repos=logspace-ai/langflow&type=Timeline)](https://star-history.com/#logspace-ai/langflow&Date)
# 📄 License # 📄 License
Langflow is released under the MIT License. See the LICENSE file for details. Langflow is released under the MIT License. See the LICENSE file for details.

View file

@ -129,7 +129,7 @@ def serve(
components_path: Optional[Path] = typer.Option( components_path: Optional[Path] = typer.Option(
Path(__file__).parent, Path(__file__).parent,
help="Path to the directory containing custom components.", help="Path to the directory containing custom components.",
envvar="LANGFLOW_COMPONENT_PATH", envvar="LANGFLOW_COMPONENTS_PATH",
), ),
config: str = typer.Option("config.yaml", help="Path to the configuration file."), config: str = typer.Option("config.yaml", help="Path to the configuration file."),
# .env file param # .env file param