Skip to content

Commit

Permalink
Merge branch 'main' into nd-integration
Browse files Browse the repository at this point in the history
  • Loading branch information
barabasicsongor committed Nov 12, 2024
2 parents a124504 + ae966ab commit 9c0e8a8
Show file tree
Hide file tree
Showing 133 changed files with 12,193 additions and 1,387 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
---
title: Intro to Components
title: How to build flows with components
sidebar_position: 0
slug: /components
slug: /components-overview
---



## Component {#0323a728d8314767adb907b998036bb4}


---


A component is a single building block within a flow. It consists of inputs, outputs, and parameters that define their functionality. These elements provide a convenient and straightforward way to compose LLM-based applications. Learn more about components and how they work below.


Expand All @@ -24,7 +16,7 @@ During the flow creation process, you will notice handles (colored circles) atta
On the top right corner of the component, you'll find the a play button to run a component. Once it runs, a status icon appears and you can hover over that to visualize success or error messages. Start interacting with your AI by clicking the **Playground** at the bottom right of the workspace.


### Component Menu {#7e3f2f8ff5074b2fb3eee97c9cfaabe7}
## Component menu {#7e3f2f8ff5074b2fb3eee97c9cfaabe7}


Each component is unique, but they all have a menu bar at the top that looks something like this.
Expand All @@ -42,7 +34,7 @@ It consists of options such as:
Click **All** (the "..." button) to see all options.


### Output Preview {#ed7b3c34e0774b8a916b0e68821c9a7a}
## Output preview {#ed7b3c34e0774b8a916b0e68821c9a7a}


Langflow includes an output visualizer for components that opens a pop-up screen. This allows you to easily inspect and monitor transmissions between components, providing instant feedback on your workflows.
Expand All @@ -51,7 +43,7 @@ Langflow includes an output visualizer for components that opens a pop-up screen
![](./987204819.png)


### Advanced Settings {#b6430d4903df44f0ba4618a558c83d7b}
## Advanced settings {#b6430d4903df44f0ba4618a558c83d7b}


Langflow components can be edited by clicking the **Advanced Settings** button.
Expand All @@ -63,7 +55,7 @@ Hide parameters with the **Show** button to reduce complexity and keep the wor
You can also double-click a component's name and description to modify those. Component descriptions accept markdown syntax.


### Group Components {#c3f5ed818e3b40ceb6534dc358e1a5f2}
## Group components {#c3f5ed818e3b40ceb6534dc358e1a5f2}


Multiple components can be grouped into a single component for reuse. This is useful when combining large flows into single components (like RAG with a vector database, for example) and saving space.
Expand All @@ -77,7 +69,7 @@ Multiple components can be grouped into a single component for reuse. This is us
[group video here]


### Component Version {#887fd587589448dc8c27336d1c235b9b}
## Component version {#887fd587589448dc8c27336d1c235b9b}


A component's state is stored in a database, while sidebar components are like starter templates. As soon as you drag a component from the sidebar to the workspace, the two components are no longer in parity.
Expand Down
104 changes: 0 additions & 104 deletions docs/docs/Configuration/My-Collection.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/docs/Configuration/configuration-api-keys.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: API Keys
title: API keys
sidebar_position: 1
slug: /configuration-api-keys
---
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/Configuration/configuration-backend-only.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ curl -X POST \
```

The flow ID in this example is `fff8dcaa-f0f6-4136-9df0-b7cb38de42e0`, a UUID generated by Langflow and used in the endpoint URL.
See [Project & General Settings](/settings-project-general-settings) to change the endpoint.
See [API](/configuration-api-keys) to change the endpoint.

3. To stop Langflow, press **Ctrl+C**.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Global Variables
sidebar_position: 0
slug: /settings-global-variables
title: Global variables
sidebar_position: 5
slug: /configuration-global-variables
---

import ReactPlayer from "react-player";
Expand Down Expand Up @@ -53,7 +53,7 @@ In **Settings > Global Variables**, the **Value** column shows the encrypted has

4. In the **Update Variable** dialog, you can edit the following fields: **Variable Name**, **Value**, and **Apply To Fields**.

5. Click **Update Variable**
5. Click **Update Variable**.

## Delete a global variable

Expand Down
10 changes: 4 additions & 6 deletions docs/docs/Configuration/environment-variables.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
---
title: Environment Variables
title: Environment variables
sidebar_position: 7
slug: /environment-variables
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Environment Variables

Langflow lets you configure a number of settings using environment variables.

## Configure environment variables
Expand Down Expand Up @@ -119,7 +117,7 @@ The following table lists the environment variables supported by Langflow.
| <a id="LANGFLOW_CONFIG_DIR"></a>`LANGFLOW_CONFIG_DIR` | String | | Set the Langflow configuration directory where files, logs, and the Langflow database are stored. |
| <a id="LANGFLOW_DATABASE_URL"></a>`LANGFLOW_DATABASE_URL` | String | | Set the database URL for Langflow. If you don't provide one, Langflow uses an SQLite database. |
| <a id="LANGFLOW_DEV"></a>`LANGFLOW_DEV` | Boolean | `false` | Run Langflow in development mode (may contain bugs).<br/>See [`--dev` option](./configuration-cli.md#run-dev). |
| <a id="LANGFLOW_FALLBACK_TO_ENV_VAR"></a>`LANGFLOW_FALLBACK_TO_ENV_VAR` | Boolean | `true` | If enabled, [global variables](../Settings/settings-global-variables.md) set in the Langflow UI fall back to an environment variable with the same name when Langflow fails to retrieve the variable value. |
| <a id="LANGFLOW_FALLBACK_TO_ENV_VAR"></a>`LANGFLOW_FALLBACK_TO_ENV_VAR` | Boolean | `true` | If enabled, [global variables](../Configuration/configuration-global-variables.md) set in the Langflow UI fall back to an environment variable with the same name when Langflow fails to retrieve the variable value. |
| <a id="LANGFLOW_FRONTEND_PATH"></a>`LANGFLOW_FRONTEND_PATH` | String | `./frontend` | Path to the frontend directory containing build files. This is for development purposes only.<br/>See [`--frontend-path` option](./configuration-cli.md#run-frontend-path). |
| <a id="LANGFLOW_HEALTH_CHECK_MAX_RETRIES"></a>`LANGFLOW_HEALTH_CHECK_MAX_RETRIES` | Integer | `5` | Set the maximum number of retries for the health check.<br/>See [`--health-check-max-retries` option](./configuration-cli.md#run-health-check-max-retries). |
| <a id="LANGFLOW_HOST"></a>`LANGFLOW_HOST` | String | `127.0.0.1` | The host on which the Langflow server will run.<br/>See [`--host` option](./configuration-cli.md#run-host). |
Expand All @@ -138,9 +136,9 @@ The following table lists the environment variables supported by Langflow.
| <a id="LANGFLOW_REMOVE_API_KEYS"></a>`LANGFLOW_REMOVE_API_KEYS` | Boolean | `false` | Remove API keys from the projects saved in the database.<br/> See [`--remove-api-keys` option](./configuration-cli.md#run-remove-api-keys). |
| <a id="LANGFLOW_SAVE_DB_IN_CONFIG_DIR"></a>`LANGFLOW_SAVE_DB_IN_CONFIG_DIR` | Boolean | `false` | Save the Langflow database in [`LANGFLOW_CONFIG_DIR`](#LANGFLOW_CONFIG_DIR) instead of in the Langflow package directory. Note, when this variable is set to default (`false`), the database isn't shared between different virtual environments and the database is deleted when you uninstall Langflow. |
| <a id="LANGFLOW_STORE"></a>`LANGFLOW_STORE` | Boolean | `true` | Enable the Langflow Store.<br/>See [`--store` option](./configuration-cli.md#run-store). |
| <a id="LANGFLOW_STORE_ENVIRONMENT_VARIABLES"></a>`LANGFLOW_STORE_ENVIRONMENT_VARIABLES` | Boolean | `true` | Store environment variables as [global variables](../Settings/settings-global-variables.md) in the database. |
| <a id="LANGFLOW_STORE_ENVIRONMENT_VARIABLES"></a>`LANGFLOW_STORE_ENVIRONMENT_VARIABLES` | Boolean | `true` | Store environment variables as [global variables](../Configuration/configuration-global-variables.md) in the database. |
| <a id="LANGFLOW_SUPERUSER"></a>`LANGFLOW_SUPERUSER` | String | Not set | Set the name for the superuser. Required if [`LANGFLOW_AUTO_LOGIN`](#LANGFLOW_AUTO_LOGIN) is set to `false`.<br/>See [`superuser --username` option](./configuration-cli.md#superuser-username). |
| <a id="LANGFLOW_SUPERUSER_PASSWORD"></a>`LANGFLOW_SUPERUSER_PASSWORD` | String | Not set | Set the password for the superuser. Required if [`LANGFLOW_AUTO_LOGIN`](#LANGFLOW_AUTO_LOGIN) is set to `false`.<br/>See [`superuser --password` option](./configuration-cli.md#superuser-password).|
| <a id="LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT"></a>`LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` | String | Not set | Comma-separated list of environment variables to get from the environment and store as [global variables](../Settings/settings-global-variables.md). |
| <a id="LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT"></a>`LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` | String | Not set | Comma-separated list of environment variables to get from the environment and store as [global variables](../Configuration/configuration-global-variables.md). |
| <a id="LANGFLOW_WORKER_TIMEOUT"></a>`LANGFLOW_WORKER_TIMEOUT` | Integer | `300` | Worker timeout in seconds.<br/>See [`--worker-timeout` option](./configuration-cli.md#run-worker-timeout). |
| <a id="LANGFLOW_WORKERS"></a>`LANGFLOW_WORKERS` | Integer | `1` | Number of worker processes.<br/>See [`--workers` option](./configuration-cli.md#run-workers). |
48 changes: 11 additions & 37 deletions docs/docs/Contributing/contributing-community.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,26 @@
---
title: Community
sidebar_position: 3
title: Join the Langflow community
sidebar_position: 5
slug: /contributing-community
---



## 🤖 Join **Langflow** Discord server {#80011e0bda004e83a8012c7ec6eab29a}
## Join the Langflow Discord server

Join the [Langflow Discord Server](https://discord.gg/EqksyE2EX9) to ask questions and showcase your projects.

---


Join us to ask questions and showcase your projects.


Let's bring together the building blocks of AI integration!


Langflow [Discord](https://discord.gg/EqksyE2EX9) server.


## 🐦 Stay tuned for **Langflow** on Twitter {#6a17ba5905ad4f7aa5347af7854779f6}


---
## Follow Langflow on X

Follow [@langflow_ai](https://twitter.com/langflow_ai) on X to get the latest news about Langflow.

Follow [@langflow_ai](https://twitter.com/langflow_ai) on **Twitter** to get the latest news about **Langflow**.
## Star Langflow on GitHub

You can [star Langflow in GitHub](https://github.com/langflow-ai/langflow).

## ⭐️ Star **Langflow** on GitHub {#c903a569934643799bf52b7d1b3514e1}


---


You can "star" **Langflow** in [GitHub](https://github.com/langflow-ai/langflow).


By adding a star, other users will be able to find it more easily and see that it has been already useful for others.


## 👀 Watch the GitHub repository for releases {#d0a089ed717742308bd17430e5ae6309}


---
By adding a star, other users will be able to find Langflow more easily, and see that it has been already useful for others.

## Watch the GitHub repository for releases

You can "watch**Langflow** in [GitHub](https://github.com/langflow-ai/langflow). If you select "Watching" instead of "Releases only" you will receive notifications when someone creates a new issue or question. You can also specify that you only want to be notified about new issues, discussions, PRs, etc. so you can try and help them solve those questions.
You can [watch Langflow in GitHub](https://github.com/langflow-ai/langflow). If you select **Watching** instead of **Releases only** you will receive notifications when someone creates a new issue or question. You can also specify that you want to be notified only about new issues, discussions, and PRs so you can try to help solve those issues.

24 changes: 24 additions & 0 deletions docs/docs/Contributing/contributing-components.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: Contribute components
sidebar_position: 4
slug: /contributing-components
---


New components are added as objects of the [CustomComponent](https://github.com/langflow-ai/langflow/blob/dev/src/backend/base/langflow/custom/custom_component/custom_component.py) class.

Any dependencies are added to the [pyproject.toml](https://github.com/langflow-ai/langflow/blob/main/pyproject.toml#L148) file.

### Contribute an example component to Langflow

Anyone can contribute an example component. For example, if you created a new document loader called **MyCustomDocumentLoader**, you can follow these steps to contribute it to Langflow.

1. Write your loader as an object of the [CustomComponent](https://github.com/langflow-ai/langflow/blob/dev/src/backend/base/langflow/custom/custom_component/custom_component.py) class. You'll create a new class, `MyCustomDocumentLoader`, that will inherit from `CustomComponent` and override the base class's methods.
2. Define optional attributes like `display_name``description`, and `documentation` to provide information about your custom component.
3. Implement the `build_config` method to define the configuration options for your custom component.
4. Implement the `build` method to define the logic for taking input parameters specified in the `build_config` method and returning the desired output.
5. Add the code to the [/components/documentloaders](https://github.com/langflow-ai/langflow/tree/dev/src/backend/base/langflow/components) folder.
6. Add the dependency to [/documentloaders/__init__.py](https://github.com/langflow-ai/langflow/blob/dev/src/backend/base/langflow/components/documentloaders/__init__.py) as `from .MyCustomDocumentLoader import MyCustomDocumentLoader`.
7. Add any new dependencies to the [pyproject.toml](https://github.com/langflow-ai/langflow/blob/main/pyproject.toml#L148) file.
8. Submit documentation for your component. For this example, you'd submit documentation to the [loaders page](https://github.com/langflow-ai/langflow/blob/main/docs/docs/Components/components-loaders.md).
9. Submit your changes as a pull request. The Langflow team will have a look, suggest changes, and add your component to Langflow.
13 changes: 13 additions & 0 deletions docs/docs/Contributing/contributing-github-discussion-board.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Ask for help on the Discussions board
sidebar_position: 3
slug: /contributing-github-discussions
---

If you're looking for help with your code, consider posting a question on the Langflow [GitHub Discussions board](https://github.com/langflow-ai/langflow/discussions). The Langflow team cannot provide individual support via email. The team also believes that help is much more valuable if it's shared publicly, so that more people can benefit from it.

Since the Discussions board is public, please follow this guidance when posting your code questions.

* When describing your issue, try to provide as many details as possible. What exactly goes wrong? _How_ is it failing? Is there an error? "XY doesn't work" usually isn't that helpful for tracking down problems. Always remember to include the code you ran and if possible, extract only the relevant parts and don't just dump your entire script. This will make it easier for us to reproduce the error.

* When you include long code, logs, or tracebacks, wrap them in `<details>` and `</details>` tags. This [collapses the content](https://developer.mozilla.org/en/docs/Web/HTML/Element/details) so the contents only becomes visible on click, making the issue easier to read and follow.
Loading

0 comments on commit 9c0e8a8

Please sign in to comment.