mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-23 18:57:09 +08:00
docs: 1.6 feature branch (#9521)
* docs: update file size limit to 1024 mb (#9397)
* update-file-size-limit-to-1024-mb
* docs: clarify available API endpoints and their use cases (#9382)
* available-endpoints
* asterisk
* structure-into-tabs-and-confirm-login-endpoint
* reorg and clarify some usage
---------
Co-authored-by: April M <april.murphy@datastax.com>
---------
Co-authored-by: April M <april.murphy@datastax.com>
* add-lfx-kb-agent-struct-out
* update-release-notes
* docs: docling integration into file component (#9481)
* init
* ui-package-manager
* more-content
* components-page
* dependency-included-for-1.6
* remove-package-management-feature
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* clarify-file-extension-behavior
* config-dir-not-in-1.6
* clarify-outputs
* add-links-andupdate-parameters
* more-params
* clarify-supported-filetypes
* installation-in-bundle
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* Apply suggestions from code review
---------
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* docs: Traceloop SDK integration documentation (#9514)
* Added documentation file for langflow-traceloop-instana integration
* updated sidebar.js
* Updated documentation with metrics integration instructions
* Update docs/docs/Integrations/integrations-instana-traceloop.mdx
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* Update docs/docs/Integrations/integrations-instana-traceloop.mdx
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* update doc
* Format correction
* Formatting correction
* Updated Slug title
* style-edit
* Split configure environment variables into steps
* Formatted as per Google developer style guide
* Update docs/docs/Integrations/integrations-instana-traceloop.mdx
Co-authored-by: Edwin Jose <edwinjose900@gmail.com>
* More context added on OTLP security
* Added screenshots of Instana dashboards
* Updated as per the review comments
* Update docs/docs/Integrations/integrations-instana-traceloop.mdx
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
* Update docs/docs/Integrations/integrations-instana-traceloop.mdx
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
* Update docs/docs/Integrations/integrations-instana-traceloop.mdx
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
* Update docs/docs/Integrations/integrations-instana-traceloop.mdx
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
* updated refer documentation links
---------
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwinjose900@gmail.com>
* docling-and-traceloop-links-for-release-notes-remove-duplicates
* traceloop-touchup
* add-component-release-notes
* docs: 1.6 knowledge base feature (#9381)
* sidebars-and-content
* add-kb-components
* completed-basic-outline
* updates-and-new-names
* kb-tutorial-content
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* move-component-docs-to-main-page
* code-review
* reorganize-content
* add-link-to-agents
* fix links, create components-kb
* move and revise kb content
* missing import
---------
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
Co-authored-by: April M <april.murphy@datastax.com>
* docs: Component documentation updates for 1.6.0 (#9627)
* bundles icon
* component menu and bundle icons
* mcp icon extension
* more bundle icon
* workspace gestures and locking
* mcp server stuff
* fix typo and move serper component
* g-assist edit
* simplify hidden param text and update cohere
* amazon components
* nvidia system assist
* use partial for hidden param text
* fix import, add partial for agent summary
* style changes to prep for separating vector page
* rework llm and embedding model pages
* handle legacy components
* remove memories page
* tools page
* applied partials to vector stores before moving
* move redis and ds, fix links
* astra db component updates
* c vector stores
* traceloop copyedits
* advanced parsing
* elastic page and ocr engine edit
* q-w vector stores
* rest of vector stores
* fix build errors
* Revert "mcp icon extension"
This reverts commit 4d1582793a.
* unused imports and build errors
* build errors
* better icon reference
* tip edits
* fixing after preview
* more touchup
* small style edits for ts client page
* replicate pr 9676
* fix style
* KB comments
* Update docs/docs/Components/bundles-mongodb.mdx
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
---------
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
* add deprecated component to release notes
* knowledge and message history
* wording
* legacy components
* capitalization
* docs: OpenAI responses endpoint (#9539)
* init
* more-content-and-examples
* cleanup
* add-response-tabs-and-streaming-example
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* requires-agent-component-to-emit-message
* [autofix.ci] apply automated fixes
* test-and-explain-more
* global-var-and-fallback
* bash-not-curl-codeblock
* tighten-up-intro-para
* add-entry-to-concepts-publish-page
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* fix-merge-mistake
* flow-id-or-endpoint-name
* reformat
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* standardize-table-codefont
---------
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* fix build
* code rabbit comments
* docs: remove knowledge base content from 1.6 (#9784)
* remove-kb-content
* broken links
* random change to restart build
---------
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
Co-authored-by: April M <april.murphy@datastax.com>
* docs: update composio bundle page (#9442)
* update-composio-integrations
* update-doc-to-be-general
* trailing-space
* add-tool-script
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* global-variable
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* reorder-steps-and-move-script
* clarify-connection
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* [autofix.ci] apply automated fixes (attempt 3/3)
* tools slug/name
* test composio steps
* remove unnecessary import
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
---------
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: April M <april.murphy@datastax.com>
* chore: small misses and sync with 9-Sep-25 release build (#9792)
* io page
* fix slug
* custom models and canvas controls
* message history
* composio slack
* move a flow
* vlm option for docling
* docs: add oauth for mcp (#9626)
* oauth-and-none-options
* mcp-composer-for-server
* updates-from-testing
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* clarify-client-update
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* code-review
* clarify-oauth-values
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* code-review
* double-words
---------
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* docs: include guidance for openai client dummy key (#9871)
* test-client-calls
* less-prose
* clearer-intro
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* remove-indentation-and-correct-example-key-value
* comment-syntax
---------
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* docs: mcp tools troubleshooting (#9866)
* move-mcp-troubleshooting-from-server-page-and-add-issue
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* Apply suggestions from code review
* Apply suggestions from code review
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
---------
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
* docs: auth changes (#9731)
* initial-content
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* code-review
* Apply suggestions from code review
---------
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* docs: CORS configuration (#9773)
* initial-content
* title
* clarify-default
* cleanup
* cors-defaults-with-warning-for-1.7
* docs-and-code-review
* clarify-cors-in-future-release
* code-review
* developer mode for docling
* auto login
* cors
* auth variables
* environment variables pt 1
* env var pt 2
* env var pt 3
* env var pt 5
* align CLI page with env var
* autologin
* docs: clarify log format behavior (#9945)
clarify-log-format-behavior
* docling dependency exceptions
---------
Co-authored-by: April M <april.murphy@datastax.com>
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
Co-authored-by: Sandesh R <115570766+2getsandesh@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwinjose900@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
This commit is contained in:
@ -58,7 +58,7 @@ Not all file types are supported.
|
||||
|
||||
Send image files to Langflow to use them in flows.
|
||||
|
||||
The default file limit is 100 MB.
|
||||
The default file limit is 1024 MB.
|
||||
To change this limit, set the `LANGFLOW_MAX_FILE_SIZE_UPLOAD` [environment variable](/environment-variables).
|
||||
|
||||
1. Attach the image to a `POST /v1/files/upload/$FLOW_ID` request with `--form` (`-F`) and the file path:
|
||||
@ -237,7 +237,7 @@ To send image files to your flows through the API, see [Upload image files (v1)]
|
||||
This endpoint uploads files to your Langflow server's file management system.
|
||||
To use an uploaded file in a flow, send the file path to a flow with a [**File** component](/components-data#file).
|
||||
|
||||
The default file limit is 100 MB. To configure this value, change the `LANGFLOW_MAX_FILE_SIZE_UPLOAD` [environment variable](/environment-variables).
|
||||
The default file limit is 1024 MB. To configure this value, change the `LANGFLOW_MAX_FILE_SIZE_UPLOAD` [environment variable](/environment-variables).
|
||||
|
||||
1. To send a file to your flow with the API, POST the file to the `/api/v2/files` endpoint.
|
||||
|
||||
|
||||
@ -3,31 +3,23 @@ title: Logs endpoints
|
||||
slug: /api-logs
|
||||
---
|
||||
|
||||
Retrieve logs for your Langflow flow.
|
||||
Retrieve logs for your Langflow flows and server.
|
||||
|
||||
## Enable log retrieval
|
||||
|
||||
The `/logs` endpoint requires log retrieval to be enabled in your Langflow instance.
|
||||
|
||||
1. To enable log retrieval, include these values in your `.env` file:
|
||||
To enable log retrieval, include set the following [environment variables](/environment-variables) in your Langflow `.env` file, and then start Langflow with `uv run langflow run --env-file .env`:
|
||||
|
||||
```text
|
||||
LANGFLOW_ENABLE_LOG_RETRIEVAL=True
|
||||
LANGFLOW_LOG_RETRIEVER_BUFFER_SIZE=10000
|
||||
LANGFLOW_LOG_LEVEL=DEBUG
|
||||
```
|
||||
|
||||
Log retrieval requires that `LANGFLOW_LOG_RETRIEVER_BUFFER_SIZE` is greater than 0. The default value is `10000`.
|
||||
|
||||
2. Start Langflow with the updated `.env`:
|
||||
|
||||
```text
|
||||
uv run langflow run --env-file .env
|
||||
```
|
||||
```text
|
||||
LANGFLOW_ENABLE_LOG_RETRIEVAL=True
|
||||
LANGFLOW_LOG_RETRIEVER_BUFFER_SIZE=10000. // Must be greater than 0
|
||||
LANGFLOW_LOG_LEVEL=DEBUG. // Can be DEBUG, ERROR, INFO, WARNING, or CRITICAL
|
||||
```
|
||||
|
||||
## Stream logs
|
||||
|
||||
Stream logs in real-time using Server Sent Events (SSE).
|
||||
Stream logs in real-time using Server Sent Events (SSE):
|
||||
|
||||
```bash
|
||||
curl -X GET \
|
||||
|
||||
599
docs/docs/API-Reference/api-openai-responses.mdx
Normal file
599
docs/docs/API-Reference/api-openai-responses.mdx
Normal file
@ -0,0 +1,599 @@
|
||||
---
|
||||
title: OpenAI Responses API
|
||||
slug: /api-openai-responses
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
Langflow includes an endpoint that is compatible with the [OpenAI Responses API](https://platform.openai.com/docs/api-reference/responses).
|
||||
It is available at `POST /api/v1/responses`.
|
||||
|
||||
This endpoint allows you to use existing OpenAI client libraries with minimal code changes.
|
||||
You only need to replace the `model` name, such as `gpt-4`, with your `flow_id`.
|
||||
You can find Flow IDs in the code snippets on the [**API access** pane](/concepts-publish#api-access) or in a flow's URL.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
To be compatible with Langflow's OpenAI Responses API endpoint, your flow and request must adhere to the following requirements:
|
||||
|
||||
- **Chat Input**: Your flow must contain a **Chat Input** component.
|
||||
Flows without this component return an error when passed to this endpoint.
|
||||
The component types `ChatInput` and `Chat Input` are recognized as chat inputs.
|
||||
- **Tools**: The `tools` parameter isn't supported, and returns an error if provided.
|
||||
- **Model Names**: In your request, the `model` field must contain a valid flow ID or endpoint name.
|
||||
- **Authentication**: All requests require an API key passed in the `x-api-key` header.
|
||||
For more information, see [API keys and authentication](/api-keys-and-authentication).
|
||||
|
||||
### Additional configuration for OpenAI client libraries
|
||||
|
||||
This endpoint is compatible with OpenAI's API, but requires special configuration when using OpenAI client libraries.
|
||||
Langflow uses `x-api-key` headers for authentication, while OpenAI uses `Authorization: Bearer` headers.
|
||||
When sending requests to Langflow with OpenAI client libraries, you must configure custom headers and include an `api_key` configuration.
|
||||
The `api_key` parameter can have any value, such as `"dummy-api-key"` in the client examples, as the actual authentication is handled through the `default_headers` configuration.
|
||||
|
||||
In the following examples, replace the values for `LANGFLOW_SERVER_URL`, `LANGFLOW_API_KEY`, and `FLOW_ID` with values from your deployment.
|
||||
<Tabs groupId="client">
|
||||
<TabItem value="Python" label="OpenAI Python Client" default>
|
||||
|
||||
```python
|
||||
from openai import OpenAI
|
||||
|
||||
client = OpenAI(
|
||||
base_url="LANGFLOW_SERVER_URL/api/v1/",
|
||||
default_headers={"x-api-key": "LANGFLOW_API_KEY"},
|
||||
api_key="dummy-api-key" # Required by OpenAI SDK but not used by Langflow
|
||||
)
|
||||
|
||||
response = client.responses.create(
|
||||
model="FLOW_ID",
|
||||
input="There is an event that happens on the second wednesday of every month. What are the event dates in 2026?",
|
||||
)
|
||||
|
||||
print(response.output_text)
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="OpenAI TypeScript Client">
|
||||
|
||||
```typescript
|
||||
import OpenAI from "openai";
|
||||
|
||||
const client = new OpenAI({
|
||||
baseURL: "LANGFLOW_SERVER_URL/api/v1/",
|
||||
defaultHeaders: {
|
||||
"x-api-key": "LANGFLOW_API_KEY"
|
||||
},
|
||||
apiKey: "dummy-api-key" // Required by OpenAI SDK but not used by Langflow
|
||||
});
|
||||
|
||||
const response = await client.responses.create({
|
||||
model: "FLOW_ID",
|
||||
input: "There is an event that happens on the second wednesday of every month. What are the event dates in 2026?"
|
||||
});
|
||||
|
||||
console.log(response.output_text);
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
<details closed>
|
||||
<summary>Response</summary>
|
||||
```text
|
||||
Here are the event dates for the second Wednesday of each month in 2026:
|
||||
- January 14, 2026
|
||||
- February 11, 2026
|
||||
- March 11, 2026
|
||||
- April 8, 2026
|
||||
- May 13, 2026
|
||||
- June 10, 2026
|
||||
- July 8, 2026
|
||||
- August 12, 2026
|
||||
- September 9, 2026
|
||||
- October 14, 2026
|
||||
- November 11, 2026
|
||||
- December 9, 2026
|
||||
If you need these in a different format or want a downloadable calendar, let me know!
|
||||
```
|
||||
</details>
|
||||
|
||||
## Example request
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
"$LANGFLOW_SERVER_URL/api/v1/responses" \
|
||||
-H "x-api-key: $LANGFLOW_API_KEY" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"model": "$YOUR_FLOW_ID",
|
||||
"input": "Hello, how are you?",
|
||||
"stream": false
|
||||
}'
|
||||
```
|
||||
|
||||
### Headers
|
||||
|
||||
| Header | Required | Description | Example |
|
||||
|--------|----------|-------------|---------|
|
||||
| `x-api-key` | Yes | Your Langflow API key for authentication | `"sk-..."` |
|
||||
| `Content-Type` | Yes | Specifies the JSON format | `"application/json"` |
|
||||
| `X-LANGFLOW-GLOBAL-VAR-*` | No | Global variables for the flow | `"X-LANGFLOW-GLOBAL-VAR-API_KEY: sk-..."` For more, see [Pass global variables to your flows in headers](#global-var). |
|
||||
|
||||
### Request body
|
||||
|
||||
| Field | Type | Required | Default | Description |
|
||||
|-------|------|----------|---------|-------------|
|
||||
| `model` | `string` | Yes | - | The flow ID or endpoint name to execute. |
|
||||
| `input` | `string` | Yes | - | The input text to process. |
|
||||
| `stream` | `boolean` | No | `false` | Whether to stream the response. |
|
||||
| `background` | `boolean` | No | `false` | Whether to process in background. |
|
||||
| `tools` | `list[Any]` | No | `null` | Tools are not supported yet. |
|
||||
| `previous_response_id` | `string` | No | `null` | ID of previous response to continue conversation. For more, see [Continue conversations with response and session IDs](#response-id). |
|
||||
| `include` | `list[string]` | No | `null` | Additional response data to include, such as `['tool_call.results']`. For more, see [Retrieve tool call results](#tool-call-results). |
|
||||
|
||||
## Example response
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "e5e8ef8a-7efd-4090-a110-6aca082bceb7",
|
||||
"object": "response",
|
||||
"created_at": 1756837941,
|
||||
"status": "completed",
|
||||
"model": "ced2ec91-f325-4bf0-8754-f3198c2b1563",
|
||||
"output": [
|
||||
{
|
||||
"type": "message",
|
||||
"id": "msg_e5e8ef8a-7efd-4090-a110-6aca082bceb7",
|
||||
"status": "completed",
|
||||
"role": "assistant",
|
||||
"content": [
|
||||
{
|
||||
"type": "output_text",
|
||||
"text": "Hello! I'm here and ready to help. How can I assist you today?",
|
||||
"annotations": []
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"parallel_tool_calls": true,
|
||||
"previous_response_id": null,
|
||||
"reasoning": {"effort": null, "summary": null},
|
||||
"store": true,
|
||||
"temperature": 1.0,
|
||||
"text": {"format": {"type": "text"}},
|
||||
"tool_choice": "auto",
|
||||
"tools": [],
|
||||
"top_p": 1.0,
|
||||
"truncation": "disabled",
|
||||
"usage": null,
|
||||
"user": null,
|
||||
"metadata": {}
|
||||
}
|
||||
```
|
||||
|
||||
### Response body
|
||||
|
||||
The response contains fields that Langflow sets dynamically and fields that use OpenAI-compatible defaults.
|
||||
|
||||
The OpenAI-compatible default values shown above are currently fixed and cannot be modified via the request.
|
||||
They are included to maintain API compatibility and provide a consistent response format.
|
||||
|
||||
For your requests, you will only be setting the dynamic fields.
|
||||
The default values are documented here for completeness and to show the full response structure.
|
||||
|
||||
Fields set dynamically by Langflow:
|
||||
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `id` | `string` | Unique response identifier. |
|
||||
| `created_at` | `int` | Unix timestamp of response creation. |
|
||||
| `model` | `string` | The flow ID that was executed. |
|
||||
| `output` | `list[dict]` | Array of output items (messages, tool calls, etc.). |
|
||||
| `previous_response_id` | `string` | ID of previous response if continuing conversation. |
|
||||
|
||||
<details>
|
||||
<summary>Fields with OpenAI-compatible default values</summary>
|
||||
|
||||
| Field | Type | Default Value | Description |
|
||||
|-------|------|---------------|-------------|
|
||||
| `object` | `string` | `"response"` | Always `"response"`. |
|
||||
| `status` | `string` | `"completed"` | Response status: `"completed"`, `"in_progress"`, or `"failed"`. |
|
||||
| `error` | `dict` | `null` | Error details (if any). |
|
||||
| `incomplete_details` | `dict` | `null` | Incomplete response details (if any). |
|
||||
| `instructions` | `string` | `null` | Response instructions (if any). |
|
||||
| `max_output_tokens` | `int` | `null` | Maximum output tokens (if any). |
|
||||
| `parallel_tool_calls` | `boolean` | `true` | Whether parallel tool calls are enabled. |
|
||||
| `reasoning` | `dict` | `{"effort": null, "summary": null}` | Reasoning information with effort and summary. |
|
||||
| `store` | `boolean` | `true` | Whether response is stored. |
|
||||
| `temperature` | `float` | `1.0` | Temperature setting. |
|
||||
| `text` | `dict` | `{"format": {"type": "text"}}` | Text format configuration. |
|
||||
| `tool_choice` | `string` | `"auto"` | Tool choice setting. |
|
||||
| `tools` | `list[dict]` | `[]` | Available tools. |
|
||||
| `top_p` | `float` | `1.0` | Top-p setting. |
|
||||
| `truncation` | `string` | `"disabled"` | Truncation setting. |
|
||||
| `usage` | `dict` | `null` | Usage statistics (if any). |
|
||||
| `user` | `string` | `null` | User identifier (if any). |
|
||||
| `metadata` | `dict` | `{}` | Additional metadata. |
|
||||
|
||||
</details>
|
||||
|
||||
## Example streaming request
|
||||
|
||||
When you set `"stream": true` with your request, the API returns a stream where each chunk contains a small piece of the response as it's generated. This provides a real-time experience where users can see the AI's output appear word by word, similar to ChatGPT's typing effect.
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
"$LANGFLOW_SERVER_URL/api/v1/responses" \
|
||||
-H "x-api-key: $LANGFLOW_API_KEY" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"model": "$FLOW_ID",
|
||||
"input": "Tell me a story about a robot",
|
||||
"stream": true
|
||||
}'
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "f7fcea36-f128-41c4-9ac1-e683137375d5",
|
||||
"object": "response.chunk",
|
||||
"created": 1756838094,
|
||||
"model": "ced2ec91-f325-4bf0-8754-f3198c2b1563",
|
||||
"delta": {
|
||||
"content": "Once"
|
||||
},
|
||||
"status": null
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Streaming response body
|
||||
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `id` | `string` | Unique response identifier. |
|
||||
| `object` | `string` | Always `"response.chunk"`. |
|
||||
| `created` | `int` | Unix timestamp of chunk creation. |
|
||||
| `model` | `string` | The flow ID that was executed. |
|
||||
| `delta` | `dict` | The new content chunk. |
|
||||
| `status` | `string` | Response status: `"completed"`, `"in_progress"`, or `"failed"` (optional). |
|
||||
|
||||
The stream continues until a final chunk with `"status": "completed"` indicates the response is finished.
|
||||
|
||||
<details>
|
||||
<summary>Final completion chunk</summary>
|
||||
|
||||
```
|
||||
{
|
||||
"id": "f7fcea36-f128-41c4-9ac1-e683137375d5",
|
||||
"object": "response.chunk",
|
||||
"created": 1756838094,
|
||||
"model": "ced2ec91-f325-4bf0-8754-f3198c2b1563",
|
||||
"delta": {},
|
||||
"status": "completed"
|
||||
}
|
||||
```
|
||||
</details>
|
||||
|
||||
## Continue conversations with response and session IDs {#response-id}
|
||||
|
||||
Conversation continuity allows you to maintain context across multiple API calls, enabling multi-turn conversations with your flows. This is essential for building chat applications where users can have ongoing conversations.
|
||||
|
||||
When you make a request, the API returns a response with an `id` field. You can use this `id` as the `previous_response_id` in your next request to continue the conversation from where it left off.
|
||||
|
||||
First Message:
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
"http://$LANGFLOW_SERVER_URL/api/v1/responses" \
|
||||
-H "x-api-key: $LANGFLOW_API_KEY" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"model": "$FLOW_ID",
|
||||
"input": "Hello, my name is Alice"
|
||||
}'
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "c45f4ac8-772b-4675-8551-c560b1afd590",
|
||||
"object": "response",
|
||||
"created_at": 1756839042,
|
||||
"status": "completed",
|
||||
"model": "ced2ec91-f325-4bf0-8754-f3198c2b1563",
|
||||
"output": [
|
||||
{
|
||||
"type": "message",
|
||||
"id": "msg_c45f4ac8-772b-4675-8551-c560b1afd590",
|
||||
"status": "completed",
|
||||
"role": "assistant",
|
||||
"content": [
|
||||
{
|
||||
"type": "output_text",
|
||||
"text": "Hello, Alice! How can I assist you today?",
|
||||
"annotations": []
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"previous_response_id": null
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Follow-up message:
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
"http://$LANGFLOW_SERVER_URL/api/v1/responses" \
|
||||
-H "x-api-key: $LANGFLOW_API_KEY" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"model": "ced2ec91-f325-4bf0-8754-f3198c2b1563",
|
||||
"input": "What's my name?",
|
||||
"previous_response_id": "c45f4ac8-772b-4675-8551-c560b1afd590"
|
||||
}'
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "c45f4ac8-772b-4675-8551-c560b1afd590",
|
||||
"object": "response",
|
||||
"created_at": 1756839043,
|
||||
"status": "completed",
|
||||
"model": "ced2ec91-f325-4bf0-8754-f3198c2b1563",
|
||||
"output": [
|
||||
{
|
||||
"type": "message",
|
||||
"id": "msg_c45f4ac8-772b-4675-8551-c560b1afd590",
|
||||
"status": "completed",
|
||||
"role": "assistant",
|
||||
"content": [
|
||||
{
|
||||
"type": "output_text",
|
||||
"text": "Your name is Alice. How can I help you today?",
|
||||
"annotations": []
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"previous_response_id": "c45f4ac8-772b-4675-8551-c560b1afd590"
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Optionally, you can use your own session ID values for the `previous_response_id`:
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
"http://$LANGFLOW_SERVER_URL/api/v1/responses" \
|
||||
-H "x-api-key: $LANGFLOW_API_KEY" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"model": "ced2ec91-f325-4bf0-8754-f3198c2b1563",
|
||||
"input": "What's my name?",
|
||||
"previous_response_id": "session-alice-1756839048"
|
||||
}'
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
This example uses the same flow as the other `previous_response_id` examples, but the LLM had not yet been introduced to Alice in the specified session:
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "session-alice-1756839048",
|
||||
"object": "response",
|
||||
"created_at": 1756839048,
|
||||
"status": "completed",
|
||||
"model": "ced2ec91-f325-4bf0-8754-f3198c2b1563",
|
||||
"output": [
|
||||
{
|
||||
"type": "message",
|
||||
"id": "msg_session-alice-1756839048",
|
||||
"status": "completed",
|
||||
"role": "assistant",
|
||||
"content": [
|
||||
{
|
||||
"type": "output_text",
|
||||
"text": "I don't have access to your name unless you tell me. If you'd like, you can share your name, and I'll remember it for this conversation!",
|
||||
"annotations": []
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"previous_response_id": "session-alice-1756839048"
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## Retrieve tool call results {#tool-call-results}
|
||||
|
||||
When you send a request to the `/api/v1/responses` endpoint to run a flow that includes tools or function calls, you can retrieve the raw tool execution details by adding `"include": ["tool_call.results"]` to the request payload.
|
||||
|
||||
Without the `include` parameter, tool calls return basic function call information, but not the raw tool results.
|
||||
For example:
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "fc_1",
|
||||
"type": "function_call",
|
||||
"status": "completed",
|
||||
"name": "evaluate_expression",
|
||||
"arguments": "{\"expression\": \"15*23\"}"
|
||||
},
|
||||
```
|
||||
|
||||
To get the raw `results` of each tool execution, add `include: ["tool_call.results"]` to the request payload:
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
"http://$LANGFLOW_SERVER_URL/api/v1/responses" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "x-api-key: $LANGFLOW_API_KEY" \
|
||||
-d '{
|
||||
"model": "FLOW_ID",
|
||||
"input": "Calculate 23 * 15 and show me the result",
|
||||
"stream": false,
|
||||
"include": ["tool_call.results"]
|
||||
}'
|
||||
```
|
||||
|
||||
|
||||
The response now includes the tool call's results.
|
||||
For example:
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "evaluate_expression_1",
|
||||
"type": "tool_call",
|
||||
"tool_name": "evaluate_expression",
|
||||
"queries": ["15*23"],
|
||||
"results": {"result": "345"}
|
||||
}
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "a6e5511e-71f8-457a-88d2-7d8c6ea34e36",
|
||||
"object": "response",
|
||||
"created_at": 1756835379,
|
||||
"status": "completed",
|
||||
"error": null,
|
||||
"incomplete_details": null,
|
||||
"instructions": null,
|
||||
"max_output_tokens": null,
|
||||
"model": "ced2ec91-f325-4bf0-8754-f3198c2b1563",
|
||||
"output": [
|
||||
{
|
||||
"id": "evaluate_expression_1",
|
||||
"queries": [
|
||||
"15*23"
|
||||
],
|
||||
"status": "completed",
|
||||
"tool_name": "evaluate_expression",
|
||||
"type": "tool_call",
|
||||
"results": {
|
||||
"result": "345"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "message",
|
||||
"id": "msg_a6e5511e-71f8-457a-88d2-7d8c6ea34e36",
|
||||
"status": "completed",
|
||||
"role": "assistant",
|
||||
"content": [
|
||||
{
|
||||
"type": "output_text",
|
||||
"text": "The result of 23 * 15 is 345.",
|
||||
"annotations": []
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"parallel_tool_calls": true,
|
||||
"previous_response_id": null,
|
||||
"reasoning": {
|
||||
"effort": null,
|
||||
"summary": null
|
||||
},
|
||||
"store": true,
|
||||
"temperature": 1.0,
|
||||
"text": {
|
||||
"format": {
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
"tool_choice": "auto",
|
||||
"tools": [],
|
||||
"top_p": 1.0,
|
||||
"truncation": "disabled",
|
||||
"usage": null,
|
||||
"user": null,
|
||||
"metadata": {}
|
||||
}
|
||||
```
|
||||
</details>
|
||||
|
||||
## Pass global variables to your flows in headers {#global-var}
|
||||
|
||||
Global variables allow you to pass dynamic values to your flows that can be used by components within that flow run.
|
||||
This is useful for passing API keys, user IDs, or any other configuration that might change between requests.
|
||||
|
||||
The `/responses` endpoint accepts global variables as custom HTTP headers with the format `X-LANGFLOW-GLOBAL-VAR-{VARIABLE_NAME}`.
|
||||
Variables are only available during this specific request execution and aren't persisted.
|
||||
Variable names are automatically converted to uppercase.
|
||||
|
||||
This example demonstrates passing an `OPENAI_API_KEY` variable, which is a variable Langflow automatically detects from environment variables, with two custom variables for `USER_ID` and `ENVIRONMENT`. The variables don't have to be created in Langflow's Global Variables section - you can pass any variable name in the `X-LANGFLOW-GLOBAL-VAR-{VARIABLE_NAME}` header format.
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
"$LANGFLOW_SERVER_URL/api/v1/responses" \
|
||||
-H "x-api-key: $LANGFLOW_API_KEY" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-LANGFLOW-GLOBAL-VAR-OPENAI_API_KEY: sk-..." \
|
||||
-H "X-LANGFLOW-GLOBAL-VAR-USER_ID: user123" \
|
||||
-H "X-LANGFLOW-GLOBAL-VAR-ENVIRONMENT: production" \
|
||||
-d '{
|
||||
"model": "your-flow-id",
|
||||
"input": "Hello"
|
||||
}'
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "4a4d2f24-bb45-4a55-a499-0191305264be",
|
||||
"object": "response",
|
||||
"created_at": 1756839935,
|
||||
"status": "completed",
|
||||
"model": "ced2ec91-f325-4bf0-8754-f3198c2b1563",
|
||||
"output": [
|
||||
{
|
||||
"type": "message",
|
||||
"id": "msg_4a4d2f24-bb45-4a55-a499-0191305264be",
|
||||
"status": "completed",
|
||||
"role": "assistant",
|
||||
"content": [
|
||||
{
|
||||
"type": "output_text",
|
||||
"text": "Hello! How can I assist you today?",
|
||||
"annotations": []
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"previous_response_id": null
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Variables passed with `X-LANGFLOW-GLOBAL-VAR-{VARIABLE_NAME}` are always available to your flow, regardless of whether they exist in the database.
|
||||
|
||||
If your flow components reference variables that aren't provided in headers or your Langflow database, the flow fails by default.
|
||||
To avoid this, you can set the `FALLBACK_TO_ENV_VARS` environment variable is `true`, which allows the flow to use values from the `.env` file if they aren't otherwise specified.
|
||||
|
||||
In the above example, `OPENAI_API_KEY` will fall back to the database variable if not provided in the header.
|
||||
`USER_ID` and `ENVIRONMENT` will fall back to environment variables if `FALLBACK_TO_ENV_VARS` is enabled.
|
||||
Otherwise, the flow fails.
|
||||
@ -169,7 +169,7 @@ curl -X GET \
|
||||
"auto_saving": true,
|
||||
"auto_saving_interval": 1000,
|
||||
"health_check_max_retries": 5,
|
||||
"max_file_size_upload": 100
|
||||
"max_file_size_upload": 1024
|
||||
}
|
||||
```
|
||||
|
||||
@ -209,6 +209,9 @@ Other endpoints are helpful for specific use cases, such as administration and f
|
||||
* POST `/v1/run/advanced/{flow_id}`: Advanced run with explicit `inputs`, `outputs`, `tweaks`, and optional `session_id`.
|
||||
* POST `/v1/webhook/{flow_id_or_name}`: Trigger a flow via webhook payload.
|
||||
|
||||
* [OpenAI Responses API](/api-openai-responses):
|
||||
* POST `/v1/responses`: Execute flows using an OpenAI-compatible request format.
|
||||
|
||||
* Deployment details:
|
||||
* GET `/v1/version`: Return Langflow version. See [Get version](/api-reference-api-examples#get-version).
|
||||
* GET `/v1/config`: Return deployment configuration. See [Get configuration](/api-reference-api-examples#get-configuration).
|
||||
@ -269,47 +272,11 @@ Other endpoints are helpful for specific use cases, such as administration and f
|
||||
* PATCH `/v1/users/{user_id}/reset-password`: Reset own password.
|
||||
* DELETE `/v1/users/{user_id}`: Delete a user (cannot delete yourself).
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="Custom components" label="Custom components">
|
||||
|
||||
You might use these endpoints when developing custom Langflow components for your own use or to share with the Langflow community:
|
||||
|
||||
* Develop custom components:
|
||||
* GET `/v1/all`: Return all available Langflow component types. See [Get all components](/api-reference-api-examples#get-all-components).
|
||||
* POST `/v1/custom_component`: Build a custom component from code and return its node.
|
||||
* POST `/v1/custom_component/update`: Update an existing custom component's build config and outputs.
|
||||
* POST `/v1/validate/code`: Validate a Python code snippet for a custom component.
|
||||
|
||||
* Langflow Store:
|
||||
* GET `/v1/store/check/`: Return whether the Store feature is enabled.
|
||||
* GET `/v1/store/check/api_key`: Check if a Store API key exists and is valid.
|
||||
* POST `/v1/store/components/`: Share a component to the Store.
|
||||
* PATCH `/v1/store/components/{component_id}`: Update a shared component.
|
||||
* GET `/v1/store/components/`: List available Store components (filters supported).
|
||||
* GET `/v1/store/components/{component_id}`: Download a component from the Store.
|
||||
* GET `/v1/store/tags`: List Store tags.
|
||||
* GET `/v1/store/users/likes`: List components liked by the current user.
|
||||
* POST `/v1/store/users/likes/{component_id}`: Like a component.
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="MCP" label="MCP servers and clients">
|
||||
|
||||
The following endpoints are for managing Langflow MCP servers, both Langflow-hosted MCP servers and external MCP server connections:
|
||||
|
||||
* **MCP (global)**:
|
||||
* HEAD `/v1/mcp/sse`: Health check for MCP SSE.
|
||||
* GET `/v1/mcp/sse`: Open SSE stream for MCP server events.
|
||||
* POST `/v1/mcp/`: Post messages to the MCP server.
|
||||
|
||||
* **MCP (project-specific)**:
|
||||
* GET `/v1/mcp/project/{project_id}`: List MCP-enabled tools and project auth settings.
|
||||
* HEAD `/v1/mcp/project/{project_id}/sse`: Health check for project SSE.
|
||||
* GET `/v1/mcp/project/{project_id}/sse`: Open project-scoped MCP SSE.
|
||||
* POST `/v1/mcp/project/{project_id}`: Post messages to project MCP server.
|
||||
* POST `/v1/mcp/project/{project_id}/` (trailing slash): Same as above.
|
||||
* PATCH `/v1/mcp/project/{project_id}`: Update MCP settings for flows and project auth settings.
|
||||
* POST `/v1/mcp/project/{project_id}/install`: Install MCP client config for Cursor/Windsurf/Claude (local only).
|
||||
* GET `/v1/mcp/project/{project_id}/installed`: Check which clients have MCP config installed.
|
||||
* Custom components: You might use these endpoints when developing custom Langflow components for your own use or to share with the Langflow community:
|
||||
* GET `/v1/all`: Return all available Langflow component types. See [Get all components](/api-reference-api-examples#get-all-components).
|
||||
* POST `/v1/custom_component`: Build a custom component from code and return its node.
|
||||
* POST `/v1/custom_component/update`: Update an existing custom component's build config and outputs.
|
||||
* POST `/v1/validate/code`: Validate a Python code snippet for a custom component.
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="Codebase contribution" label="Codebase development">
|
||||
@ -359,6 +326,26 @@ The following endpoints are most often used when contributing to the Langflow co
|
||||
* WS `/v1/voice/ws/flow_tts/{flow_id}/{session_id}`: Same as above with explicit session ID.
|
||||
* GET `/v1/voice/elevenlabs/voice_ids`: List available ElevenLabs voice IDs for the user.
|
||||
|
||||
* MCP servers: The following endpoints are for managing Langflow MCP servers and MCP server connections.
|
||||
They aren't typically called directly; instead, they are used to drive internal functionality in the Langflow frontend and when running flows that call MCP servers.
|
||||
* HEAD `/v1/mcp/sse`: Health check for MCP SSE.
|
||||
* GET `/v1/mcp/sse`: Open SSE stream for MCP server events.
|
||||
* POST `/v1/mcp/`: Post messages to the MCP server.
|
||||
* GET `/v1/mcp/project/{project_id}`: List MCP-enabled tools and project auth settings.
|
||||
* HEAD `/v1/mcp/project/{project_id}/sse`: Health check for project SSE.
|
||||
* GET `/v1/mcp/project/{project_id}/sse`: Open project-scoped MCP SSE.
|
||||
* POST `/v1/mcp/project/{project_id}`: Post messages to project MCP server.
|
||||
* POST `/v1/mcp/project/{project_id}/` (trailing slash): Same as above.
|
||||
* PATCH `/v1/mcp/project/{project_id}`: Update MCP settings for flows and project auth settings.
|
||||
* POST `/v1/mcp/project/{project_id}/install`: Install MCP client config for Cursor/Windsurf/Claude (local only).
|
||||
* GET `/v1/mcp/project/{project_id}/installed`: Check which clients have MCP config installed.
|
||||
|
||||
* Custom components: You might use these endpoints when developing custom Langflow components for your own use or to share with the Langflow community:
|
||||
* GET `/v1/all`: Return all available Langflow component types. See [Get all components](/api-reference-api-examples#get-all-components).
|
||||
* POST `/v1/custom_component`: Build a custom component from code and return its node.
|
||||
* POST `/v1/custom_component/update`: Update an existing custom component's build config and outputs.
|
||||
* POST `/v1/validate/code`: Validate a Python code snippet for a custom component.
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="Deprecated" label="Deprecated">
|
||||
|
||||
@ -371,6 +358,15 @@ The following endpoints are deprecated:
|
||||
* POST `/v1/build/{flow_id}/vertices`: Replaced by [`/monitor/builds`](/api-monitor).
|
||||
* POST `/v1/build/{flow_id}/vertices/{vertex_id}`: Replaced by [`/monitor/builds`](/api-monitor).
|
||||
* GET `/v1/build/{flow_id}/{vertex_id}/stream`: Replaced by [`/monitor/builds`](/api-monitor).
|
||||
* GET `/v1/store/check/`: Return whether the Store feature is enabled.
|
||||
* GET `/v1/store/check/api_key`: Check if a Store API key exists and is valid.
|
||||
* POST `/v1/store/components/`: Share a component to the Store.
|
||||
* PATCH `/v1/store/components/{component_id}`: Update a shared component.
|
||||
* GET `/v1/store/components/`: List available Store components (filters supported).
|
||||
* GET `/v1/store/components/{component_id}`: Download a component from the Store.
|
||||
* GET `/v1/store/tags`: List Store tags.
|
||||
* GET `/v1/store/users/likes`: List components liked by the current user.
|
||||
* POST `/v1/store/users/likes/{component_id}`: Like a component.
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
@ -5,17 +5,32 @@ slug: /agents-tools
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
|
||||
Configure tools connected to agents to extend their capabilities.
|
||||
By default, [Langflow agents](/agents) only include the functionality built-in to their base LLM.
|
||||
|
||||
## Edit a tool's actions {#edit-a-tools-actions}
|
||||
You can attach tools to agents to provide access to additional, targeted functionality.
|
||||
For example, tools can be used to create domain-specific agents, such as a customer support agent that can access a company's knowledge base, a financial agent that can retrieve stock prices, or a math tutor agent that can use advanced math functions to solve complex equations.
|
||||
|
||||
When you set any component to **Tool Mode** or **Tool** output, an agent can use the actions (functions) provided by that component.
|
||||
Available actions are listed in the tool component's **Actions** list.
|
||||
## Attach tools
|
||||
|
||||
To attach a tool to an agent, you connect any component's **Tool** output to the **Agent** component's **Tools** input.
|
||||
|
||||
Some components emit **Tool** output by default.
|
||||
For all other components, you must enable **Tool Mode** in the [component's header menu](/concepts-components#component-menus).
|
||||
Then, you can connect the tool to the agent.
|
||||
|
||||
You can connect multiple tools to one agent, and each tool can have multiple actions (functions) that the agent can call.
|
||||
|
||||
When you run your flow, the agent decides when to call on certain tools, if it determines that a tool can help it respond to the user's prompt.
|
||||
|
||||
### Edit a tool's actions {#edit-a-tools-actions}
|
||||
|
||||
When you attach components to an agent as tools, each tool can have multiple actions (functions) that the agent can call.
|
||||
Available actions are listed in each tool component's **Actions** list.
|
||||
|
||||
You can change each action's labels, descriptions, and availability to help the agent understand how to use the tool and prevent it from using irrelevant or undesired actions.
|
||||
|
||||
:::tip
|
||||
If an agent seems to be using a tool incorrectly, try editing the action metadata to clarify the tool's purpose and disable unnecessary actions.
|
||||
If an agent seems to be using a tool incorrectly, try editing the actions metadata to clarify the tool's purpose and disable unnecessary actions.
|
||||
|
||||
You can also try using a **Prompt Template** component to pass additional instructions or examples to the agent.
|
||||
:::
|
||||
@ -25,26 +40,22 @@ To view and edit a tool's actions, click <Icon name="Settings2" aria-hidden="tru
|
||||
The following information is provided for each action:
|
||||
|
||||
* **Enabled**: A checkbox that determines whether the action is available to the agent.
|
||||
If checked, the action is enabled.
|
||||
If unchecked, the action is disabled.
|
||||
If selected, the action is enabled.
|
||||
If not selected, the action is disabled.
|
||||
|
||||
* **Name**: A human-readable string name for the action, such as `Fetch Content`. This cannot be changed.
|
||||
|
||||
* **Description**: A human-readable description of the action's purpose, such as `Fetch content from web pages recursively`.
|
||||
|
||||
To edit this value, double-click the action's row to open the edit pane.
|
||||
Changes are saved automatically when you click out of the field or close the dialog.
|
||||
To edit this value, double-click the action's row to open the edit pane.
|
||||
Changes are saved automatically when you click out of the field or close the dialog.
|
||||
|
||||
* **Slug**: An encoded name for the action, usually the same as the name but in snake case, such as `fetch_content`.
|
||||
To edit this value, double-click the action's row to open the edit pane.
|
||||
Changes are saved automatically when you click out of the field or close the dialog.
|
||||
|
||||
To edit this value, double-click the action's row to open the edit pane.
|
||||
Changes are saved automatically when you click out of the field or close the dialog.
|
||||
|
||||
To edit the **Description** or **Slug**, double-click anywhere on the action's row to open the edit pane.
|
||||
Note that the **Name** field on the edit page maps to the **Slug** column.
|
||||
Changes are saved automatically when you click out of a field or close the dialog.
|
||||
|
||||
Optionally, you can provide fixed values for an action's inputs. Typically you want to leave these blank so the agent can provide its own values. You might use a fixed value if you're trying to debug an agent's behavior or your use case requires a fixed input for an action.
|
||||
Some actions allow you to provide fixed values for their inputs.
|
||||
Typically, you want to leave these blank so the agent can provide its own values.
|
||||
However, you might use a fixed value if you're trying to debug an agent's behavior or your use case requires a fixed input for an action.
|
||||
|
||||
## Use an agent as a tool
|
||||
|
||||
@ -58,7 +69,7 @@ To try this for yourself, add an additional agent to the **Simple Agent** templa
|
||||
4. In the second **Agent** component, change the model to `gpt-4.1`, and then enable **Tool Mode**.
|
||||
5. Click <Icon name="Settings2" aria-hidden="true"/> **Edit Tool Actions** to [edit the tool's actions](#edit-a-tools-actions).
|
||||
|
||||
For this example, change the action **Slug** to `Agent-gpt-41` and set the description to `Use the gpt-4.1 model for complex problem solving`.
|
||||
For this example, change the action's slug to `Agent-gpt-41`, and set the description to `Use the gpt-4.1 model for complex problem solving`.
|
||||
This lets the primary agent know that this tool uses the `gpt-4.1` model, which could be helpful for tasks requiring a larger context window, such as large scrape and search tasks.
|
||||
|
||||
As another example, you could attach several specialized models to a primary agent, such as agents that are trained on certain tasks or domains, and then the primary agent would call each specialized agent as needed to respond to queries.
|
||||
@ -73,7 +84,7 @@ To try this for yourself, add an additional agent to the **Simple Agent** templa
|
||||
|
||||
An agent can use [custom components](/components-custom-components) as tools.
|
||||
|
||||
1. To add a custom component to an agent flow, click **New Custom Component** in the **Components** menu.
|
||||
1. To add a custom component to an agent flow, click **New Custom Component** in the <Icon name="Component" aria-hidden="true" /> **Core components** or <Icon name="Blocks" aria-hidden="true" /> **Bundles** menus.
|
||||
|
||||
2. Enter Python code into the **Code** pane to create the custom component.
|
||||
|
||||
@ -203,7 +214,6 @@ The connected flow returns an answer based on your question.
|
||||
|
||||
## See also
|
||||
|
||||
* [**Agent** and **MCP Tools** components](/components-agents)
|
||||
* [Use Langflow agents](/agents)
|
||||
* [Agent components](/components-agents)
|
||||
* [Use Langflow as an MCP client](/mcp-client)
|
||||
* [Use Langflow as an MCP server](/mcp-server)
|
||||
@ -86,9 +86,9 @@ You can configure the **Agent** component to use your preferred provider and mod
|
||||
Use the **Model Provider** (`agent_llm`) and **Model Name** (`llm_model`) settings to select the model provider and LLM that you want the agent to use.
|
||||
|
||||
The **Agent** component includes many models from several popular model providers.
|
||||
To access other providers and models, set **Model Provider** to **Custom**, and then connect any [**Language Model** component](/components-models).
|
||||
To access other providers and models, set **Model Provider** to **Connect other models**, and then connect any [language model component](/components-models).
|
||||
|
||||
If you need to generate embeddings in your flow, use an [**Embedding Model** component](/components-embedding-models).
|
||||
If you need to generate embeddings in your flow, use an [embedding model component](/components-embedding-models).
|
||||
|
||||
### Model provider API key
|
||||
|
||||
@ -99,7 +99,7 @@ You can enter the key directly, but it is recommended that you follow industry b
|
||||
For example, you can use a <Icon name="Globe" aria-hidden="true"/> [global variable](/configuration-global-variables) or [environment variables](/environment-variables).
|
||||
For more information, see [Add component API keys to Langflow](/api-keys-and-authentication#component-api-keys).
|
||||
|
||||
If you select **Custom** as the model provider, authentication is handled in the incoming **Language Model** component.
|
||||
If you select **Connect other models** as the model provider, authentication is handled in the incoming language model component.
|
||||
|
||||
### Agent instructions and input
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ slug: /bundles-aiml
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **AI/ML** bundle.
|
||||
|
||||
@ -15,12 +15,11 @@ This page describes the components that are available in the **AI/ML** bundle.
|
||||
This component creates a `ChatOpenAI` model instance using the AI/ML API.
|
||||
The output is exclusively a **Language Model** ([`LanguageModel`](/data-types#languagemodel)) that you can connect to another LLM-driven component, such as a **Smart Function** component.
|
||||
|
||||
For more information, see the [AI/ML API Langflow integration documentation](https://docs.aimlapi.com/integrations/langflow) and [**Language Model** components](/components-models).
|
||||
For more information, see the [AI/ML API Langflow integration documentation](https://docs.aimlapi.com/integrations/langflow) and [Language model components](/components-models).
|
||||
|
||||
### AI/ML API text generation parameters
|
||||
|
||||
Many component input parameters are hidden by default in the visual editor.
|
||||
You can toggle parameters through the <Icon name="SlidersHorizontal" aria-hidden="true"/> **Controls** in the [component's header menu](/concepts-components#component-menus).
|
||||
<PartialParams />
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
@ -38,7 +37,7 @@ The **AI/ML API Embeddings** component generates embeddings using the [AI/ML API
|
||||
The output is [`Embeddings`](/data-types#embeddings).
|
||||
Specifically, an instance of `AIMLEmbeddingsImpl`.
|
||||
|
||||
For more information about using embedding model components in flows, see [**Embedding Model** components](/components-embedding-models).
|
||||
For more information about using embedding model components in flows, see [Embedding model components](/components-embedding-models).
|
||||
|
||||
### AI/ML API Embeddings parameters
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ slug: /bundles-amazon
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Amazon** bundle.
|
||||
|
||||
@ -19,7 +19,7 @@ Specifically, the **Language Model** output is an instance of [`ChatBedrock`](ht
|
||||
|
||||
Use the **Language Model** output when you want to use an Amazon Bedrock model as the LLM for another LLM-driven component, such as an **Agent** or **Smart Function** component.
|
||||
|
||||
For more information, see [**Language Model** components](/components-models).
|
||||
For more information, see [Language model components](/components-models).
|
||||
|
||||
### Amazon Bedrock parameters
|
||||
|
||||
@ -43,7 +43,7 @@ For more information, see [**Language Model** components](/components-models).
|
||||
|
||||
The **Amazon Bedrock Embeddings** component is used to load embedding models from [Amazon Bedrock](https://aws.amazon.com/bedrock/).
|
||||
|
||||
For more information about using embedding model components in flows, see [**Embedding Model** components](/components-embedding-models).
|
||||
For more information about using embedding model components in flows, see [Embedding model components](/components-embedding-models).
|
||||
|
||||
### Amazon Bedrock Embeddings parameters
|
||||
|
||||
@ -57,4 +57,28 @@ For more information about using embedding model components in flows, see [**Emb
|
||||
| aws_session_token | SecretString | Input parameter. The session key for your AWS account. |
|
||||
| credentials_profile_name | String | Input parameter. The name of the AWS credentials profile in `~/.aws/credentials` or `~/.aws/config`, which has access keys or role information. |
|
||||
| region_name | String | Input parameter. The AWS region to use, such as `us-west-2`. Falls back to the `AWS_DEFAULT_REGION` environment variable or region specified in `~/.aws/config` if not provided. |
|
||||
| endpoint_url | String | Input parameter. The URL to set a specific service endpoint other than the default AWS endpoint. |
|
||||
| endpoint_url | String | Input parameter. The URL to set a specific service endpoint other than the default AWS endpoint. |
|
||||
|
||||
## S3 Bucket Uploader
|
||||
|
||||
The **S3 Bucket Uploader** component uploads files to an Amazon S3 bucket.
|
||||
It is designed to process `Data` input from a **File** or **Directory** component.
|
||||
If you upload `Data` from other components, test the results before running the flow in production.
|
||||
|
||||
Requires the `boto3` package, which is included in your Langflow installation.
|
||||
|
||||
The component produces logs but it doesn't emit output to the flow.
|
||||
|
||||
### S3 Bucket Uploader parameters
|
||||
|
||||
<PartialParams />
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| **AWS Access Key ID** | SecretString | Input parameter. AWS Access Key ID for authentication. |
|
||||
| **AWS Secret Key** | SecretString | Input parameter. AWS Secret Key for authentication. |
|
||||
| **Bucket Name** | String | Input parameter. The name of the S3 bucket to upload files to. |
|
||||
| **Strategy for file upload** | String | Input parameter. The file upload strategy. **Store Data** (default) iterates over `Data` inputs, logs the file path and text content, and uploads each file to the specified S3 bucket if both file path and text content are available. **Store Original File** iterates through the list of data inputs, retrieves the file path from each data item, uploads the file to the specified S3 bucket if the file path is available, and logs the file path being uploaded. |
|
||||
| **Data Inputs** | Data | Input parameter. The `Data` input to iterate over and upload as files in the specified S3 bucket. |
|
||||
| **S3 Prefix** | String | Input parameter. Optional prefix (folder path) within the S3 bucket where files will be uploaded. |
|
||||
| **Strip Path** | Boolean | Input parameter. Whether to strip the file path when uploading. Default: false. |
|
||||
@ -6,7 +6,7 @@ slug: /bundles-anthropic
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Anthropic** bundle.
|
||||
|
||||
@ -21,7 +21,7 @@ Specifically, the **Language Model** output is an instance of [`ChatAnthropic`](
|
||||
|
||||
Use the **Language Model** output when you want to use an Anthropic model as the LLM for another LLM-driven component, such as an **Agent** or **Smart Function** component.
|
||||
|
||||
For more information, see [**Language Model** components](/components-models).
|
||||
For more information, see [Language model components](/components-models).
|
||||
|
||||
### Anthropic text generation parameters
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ slug: /bundles-arxiv
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **arXiv** bundle.
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ slug: /bundles-azure
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Azure** bundle.
|
||||
|
||||
@ -19,7 +19,7 @@ Specifically, the **Language Model** output is an instance of [`AzureChatOpenAI`
|
||||
|
||||
Use the **Language Model** output when you want to use an Azure OpenAI model as the LLM for another LLM-driven component, such as an **Agent** or **Smart Function** component.
|
||||
|
||||
For more information, see [**Language Model** components](/components-models).
|
||||
For more information, see [Language model components](/components-models).
|
||||
|
||||
### Azure OpenAI parameters
|
||||
|
||||
@ -41,7 +41,7 @@ For more information, see [**Language Model** components](/components-models).
|
||||
|
||||
The **Azure OpenAI Embeddings** component generates embeddings using Azure OpenAI models.
|
||||
|
||||
For more information about using embedding model components in flows, see [**Embedding Model** components](/components-embedding-models).
|
||||
For more information about using embedding model components in flows, see [Embedding model components](/components-embedding-models).
|
||||
|
||||
### Azure OpenAI Embeddings parameters
|
||||
|
||||
|
||||
@ -3,7 +3,9 @@ title: Baidu
|
||||
slug: /bundles-baidu
|
||||
---
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
import Icon from "@site/src/components/icon";
|
||||
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Baidu** bundle.
|
||||
|
||||
@ -15,4 +17,4 @@ It can output either a **Model Response** ([`Message`](/data-types#message)) or
|
||||
|
||||
Use the **Language Model** output when you want to use a Qianfan model as the LLM for another LLM-driven component, such as an **Agent** or **Smart Function** component.
|
||||
|
||||
For more information, see [**Language Model** components](/components-models) and [Qianfan documentation](https://github.com/baidubce/bce-qianfan-sdk).
|
||||
For more information, see [Language model components](/components-models) and the [Qianfan documentation](https://github.com/baidubce/bce-qianfan-sdk).
|
||||
@ -6,7 +6,7 @@ slug: /bundles-bing
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Bing** bundle.
|
||||
|
||||
|
||||
118
docs/docs/Components/bundles-cassandra.mdx
Normal file
118
docs/docs/Components/bundles-cassandra.mdx
Normal file
@ -0,0 +1,118 @@
|
||||
---
|
||||
title: Cassandra
|
||||
slug: /bundles-cassandra
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
import PartialConditionalParams from '@site/docs/_partial-conditional-params.mdx';
|
||||
import PartialVectorSearchResults from '@site/docs/_partial-vector-search-results.mdx';
|
||||
import PartialVectorStoreInstance from '@site/docs/_partial-vector-store-instance.mdx';
|
||||
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Cassandra** bundle, including components that read and write to Apache Cassandra clusters, such as OSS Cassandra and Astra DB databases.
|
||||
|
||||
## Cassandra vector store
|
||||
|
||||
Use the **Cassandra** component to read or write to a Cassandra-based vector store using a `CassandraVectorStore` instance.
|
||||
|
||||
<details>
|
||||
<summary>About vector store instances</summary>
|
||||
|
||||
<PartialVectorStoreInstance />
|
||||
|
||||
</details>
|
||||
|
||||
<PartialVectorSearchResults />
|
||||
|
||||
:::tip
|
||||
For a tutorial using a vector database in a flow, see [Create a vector RAG chatbot](/chat-with-rag).
|
||||
:::
|
||||
|
||||
### Cassandra parameters
|
||||
|
||||
You can inspect a vector store component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it.
|
||||
|
||||
<PartialParams />
|
||||
|
||||
<PartialConditionalParams />
|
||||
|
||||
For information about accepted values and functionality, see [Vector search in Cassandra](https://cassandra.apache.org/doc/latest/cassandra/vector-search/overview.html) or inspect [component code](/concepts-components#component-code).
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| database_ref | String | Input parameter. Contact points for the database or an Astra database ID. |
|
||||
| username | String | Input parameter. Username for the database. Leave empty for Astra DB. |
|
||||
| token | SecretString | Input parameter. User password for the database or an Astra application token. |
|
||||
| keyspace | String | Input parameter. The name of the keyspace containing the vector store specified in **Table Name** (`table_name`). |
|
||||
| table_name | String | Input parameter. The name of the table or collection that is the vector store. |
|
||||
| ttl_seconds | Integer | Input parameter. Time-to-live for added texts, if supported by the cluster. Only relevant for writes. |
|
||||
| batch_size | Integer | Input parameter. Amount of records to process in a single batch. |
|
||||
| setup_mode | String | Input parameter. Configuration mode for setting up a Cassandra table. |
|
||||
| cluster_kwargs | Dict | Input parameter. Additional keyword arguments for a Cassandra cluster. |
|
||||
| search_query | String | Input parameter. Query string for similarity search. Only relevant for reads. |
|
||||
| ingest_data | Data | Input parameter. Data to be loaded into the vector store as raw chunks and embeddings. Only relevant for writes. |
|
||||
| embedding | Embeddings | Input parameter. Embedding function to use. |
|
||||
| number_of_results | Integer | Input parameter. Number of results to return in search. Only relevant for reads. |
|
||||
| search_type | String | Input parameter. Type of search to perform. Only relevant for reads. |
|
||||
| search_score_threshold | Float | Input parameter. Minimum similarity score for search results. Only relevant for reads. |
|
||||
| search_filter | Dict | Input parameter. An optional dictionary of metadata search filters to apply in addition to vector search. Only relevant for reads. |
|
||||
| body_search | String | Input parameter. Document textual search terms. Only relevant for reads. |
|
||||
| enable_body_search | Boolean | Input parameter. Flag to enable body search. Only relevant for reads. |
|
||||
|
||||
## Cassandra Chat Memory
|
||||
|
||||
The **Cassandra Chat Memory** component retrieves and stores chat messages using an Apache Cassandra-based database.
|
||||
|
||||
Chat memories are passed between memory storage components as the [`Memory`](/data-types#memory) data type.
|
||||
Specifically, the component creates an instance of `CassandraChatMessageHistory`, which is a LangChain chat message history class that uses a Cassandra database for storage.
|
||||
|
||||
For more information about using external chat memory in flows, see the [**Message History** component](/components-helpers#message-history).
|
||||
|
||||
### Cassandra Chat Memory parameters
|
||||
|
||||
<PartialParams />
|
||||
|
||||
| Name | Type | Description |
|
||||
|----------------|---------------|-----------------------------|
|
||||
| database_ref | MessageText | Input parameter. The contact points for the Cassandra database or Astra DB database ID. Required. |
|
||||
| username | MessageText | Input parameter. The username for Cassandra. Leave empty for Astra DB. |
|
||||
| token | SecretString | Input parameter. The password for Cassandra or the token for Astra DB. Required. |
|
||||
| keyspace | MessageText | Input parameter. The keyspace in Cassandra or namespace in Astra DB. Required. |
|
||||
| table_name | MessageText | Input parameter. The name of the table or collection for storing messages. Required. |
|
||||
| session_id | MessageText | Input parameter. The unique identifier for the chat session. Optional. |
|
||||
| cluster_kwargs | Dictionary | Input parameter. Additional keyword arguments for the Cassandra cluster configuration. Optional. |
|
||||
|
||||
## Cassandra Graph
|
||||
|
||||
The **Cassandra Graph** component uses `CassandraGraphVectorStore`, an instance of [LangChain graph vector store](https://python.langchain.com/api_reference/community/graph_vectorstores.html), for graph traversal and graph-based document retrieval in a compatible Cassandra-based cluster.
|
||||
It also supports writing to the vector store.
|
||||
|
||||
<PartialVectorSearchResults />
|
||||
|
||||
### Cassandra Graph parameters
|
||||
|
||||
<PartialParams />
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
| database_ref | Contact Points / Astra Database ID | Input parameter. The contact points for the database or an Astra database ID. Required. |
|
||||
| username | Username | Input parameter. The username for the database. Leave empty for Astra DB. |
|
||||
| token | Password / Astra DB Token | Input parameter. The user password for the database or an Astra application token. Required. |
|
||||
| keyspace | Keyspace | Input parameter. The name of the keyspace containing the vector store specified in **Table Name** (`table_name`). Required. |
|
||||
| table_name | Table Name | Input parameter. The name of the table or collection that is the vector store. Required. |
|
||||
| setup_mode | Setup Mode | Input parameter. The configuration mode for setting up the Cassandra table. The options are `Sync` (default) or `Off`. |
|
||||
| cluster_kwargs | Cluster arguments | Input parameter. An optional dictionary of additional keyword arguments for the Cassandra cluster. |
|
||||
| search_query | Search Query | Input parameter. The query string for similarity search. Only relevant for reads. |
|
||||
| ingest_data | Ingest Data | Input parameter. Data to be loaded into the vector store as raw chunks and embeddings. Only relevant for writes. |
|
||||
| embedding | Embedding | Input parameter. The embedding model to use. |
|
||||
| number_of_results | Number of Results | Input parameter. The number of results to return in similarity search. Only relevant for reads. Default: 4. |
|
||||
| search_type | Search Type | Input parameter. The search type to use. The options are `Traversal` (default), `MMR Traversal`, `Similarity`, `Similarity with score threshold`, or `MMR (Max Marginal Relevance)`. |
|
||||
| depth | Depth of traversal | Input parameter. The maximum depth of edges to traverse. Only relevant if **Search Type** (`search_type`) is `Traversal` or `MMR Traversal`. Default: 1. |
|
||||
| search_score_threshold | Search Score Threshold | Input parameter. The minimum similarity score threshold for search results. Only relevant for reads using the `Similarity with score threshold` search type. |
|
||||
| search_filter | Search Metadata Filter | Input parameter. An optional dictionary of metadata search filters to apply in addition to graph traversal and similarity search. |
|
||||
|
||||
### See also
|
||||
|
||||
* [**DataStax** bundle](/bundles-datastax)
|
||||
80
docs/docs/Components/bundles-chroma.mdx
Normal file
80
docs/docs/Components/bundles-chroma.mdx
Normal file
@ -0,0 +1,80 @@
|
||||
---
|
||||
title: Chroma
|
||||
slug: /bundles-chroma
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
import PartialConditionalParams from '@site/docs/_partial-conditional-params.mdx';
|
||||
import PartialVectorSearchResults from '@site/docs/_partial-vector-search-results.mdx';
|
||||
import PartialVectorStoreInstance from '@site/docs/_partial-vector-store-instance.mdx';
|
||||
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Chroma** bundle.
|
||||
|
||||
## Chroma DB
|
||||
|
||||
You can use the **Chroma DB** component to read and write to a Chroma database using an instance of `Chroma` vector store.
|
||||
Includes support for remote or in-memory instances with or without persistence.
|
||||
|
||||
<details>
|
||||
<summary>About vector store instances</summary>
|
||||
|
||||
<PartialVectorStoreInstance />
|
||||
|
||||
</details>
|
||||
|
||||
When writing, the component can create a new database or collection at the specified location.
|
||||
|
||||
:::tip
|
||||
An ephemeral (non-persistent) local Chroma vector store is helpful for testing vector search flows where you don't need to retain the database.
|
||||
:::
|
||||
|
||||
<PartialVectorSearchResults />
|
||||
|
||||
### Use the Chroma DB component in a flow
|
||||
|
||||
The following example flow uses one **Chroma DB** component for both reads and writes:
|
||||
|
||||

|
||||
|
||||
* When writing, it splits `Data` from a [**URL** component](/components-data#url) into chunks, computes embeddings with attached **Embedding Model** component, and then loads the chunks and embeddings into the Chroma vector store.
|
||||
To trigger writes, click <Icon name="Play" aria-hidden="true"/> **Run component** on the **Chroma DB** component.
|
||||
|
||||
* When reading, it uses chat input to perform a similarity search on the vector store, and then print the search results to the chat.
|
||||
To trigger reads, open the **Playground** and enter a chat message.
|
||||
|
||||
After running the flow once, you can click <Icon name="TextSearch" aria-hidden="true"/> **Inspect Output** on each component to understand how the data transformed as it passed from component to component.
|
||||
|
||||
### Chroma DB parameters
|
||||
|
||||
You can inspect a vector store component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it.
|
||||
|
||||
<PartialParams />
|
||||
|
||||
<PartialConditionalParams />
|
||||
|
||||
For information about accepted values and functionality, see the provider's documentation or inspect [component code](/concepts-components#component-code).
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| **Collection Name** (`collection_name`) | String | Input parameter. The name of your Chroma vector store collection. Default: `langflow`. |
|
||||
| **Persist Directory** (`persist_directory`) | String | Input parameter. To persist the Chroma database, enter a relative or absolute path to a directory to store the `chroma.sqlite3` file. Leave empty for an ephemeral database. When reading or writing to an existing persistent database, specify the path to the persistent directory. |
|
||||
| **Ingest Data** (`ingest_data`) | Data or DataFrame | Input parameter. `Data` or `DataFrame` input containing the records to write to the vector store. Only relevant for writes. |
|
||||
| **Search Query** (`search_query`) | String | Input parameter. The query to use for vector search. Only relevant for reads. |
|
||||
| **Cache Vector Store** (`cache_vector_store`) | Boolean | Input parameter. If true, the component caches the vector store in memory for faster reads. Default: Enabled (true). |
|
||||
| **Embedding** (`embedding`) | Embeddings | Input parameter. The embedding function to use for the vector store. By default, Chroma DB uses its built-in embeddings model, or you can attach an **Embedding Model** component to use a different provider or model. |
|
||||
| **CORS Allow Origins** (`chroma_server_cors_allow_origins`) | String | Input parameter. The allowed CORS origins for the Chroma server. |
|
||||
| **Chroma Server Host** (`chroma_server_host`) | String | Input parameter. The host for the Chroma server. |
|
||||
| **Chroma Server HTTP Port** (`chroma_server_http_port`) | Integer | Input parameter. The HTTP port for the Chroma server. |
|
||||
| **Chroma Server gRPC Port** (`chroma_server_grpc_port`) | Integer | Input parameter. The gRPC port for the Chroma server. |
|
||||
| **Chroma Server SSL Enabled** (`chroma_server_ssl_enabled`) | Boolean | Input parameter. Enable SSL for the Chroma server. |
|
||||
| **Allow Duplicates** (`allow_duplicates`) | Boolean | Input parameter. If true (default), writes don't check for existing duplicates in the collection, allowing you to store multiple copies of the same content. If false, writes won't add documents that match existing documents already present in the collection. If false, it can strictly enforce deduplication by searching the entire collection or only search the number of records, specified in `limit`. Only relevant for writes.|
|
||||
| **Search Type** (`search_type`) | String | Input parameter. The type of search to perform, either `Similarity` or `MMR`. Only relevant for reads. |
|
||||
| **Number of Results** (`number_of_results`) | Integer | Input parameter. The number of search results to return. Default: `10`. Only relevant for reads. |
|
||||
| **Limit** (`limit`) | Integer | Input parameter. Limit the number of records to compare when **Allow Duplicates** is false. This can help improve performance when writing to large collections, but it can result in some duplicate records. Only relevant for writes. |
|
||||
|
||||
## See also
|
||||
|
||||
* [**Local DB** component](/components-bundle-components#vector-stores-bundle)
|
||||
61
docs/docs/Components/bundles-clickhouse.mdx
Normal file
61
docs/docs/Components/bundles-clickhouse.mdx
Normal file
@ -0,0 +1,61 @@
|
||||
---
|
||||
title: ClickHouse
|
||||
slug: /bundles-clickhouse
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
import PartialConditionalParams from '@site/docs/_partial-conditional-params.mdx';
|
||||
import PartialVectorSearchResults from '@site/docs/_partial-vector-search-results.mdx';
|
||||
import PartialVectorStoreInstance from '@site/docs/_partial-vector-store-instance.mdx';
|
||||
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **ClickHouse** bundle.
|
||||
|
||||
## ClickHouse vector store
|
||||
|
||||
The **ClickHouse** component reads and writes to a ClickHouse vector store using an instance of `ClickHouse` vector store.
|
||||
|
||||
<details>
|
||||
<summary>About vector store instances</summary>
|
||||
|
||||
<PartialVectorStoreInstance />
|
||||
|
||||
</details>
|
||||
|
||||
<PartialVectorSearchResults />
|
||||
|
||||
:::tip
|
||||
For a tutorial using a vector database in a flow, see [Create a vector RAG chatbot](/chat-with-rag).
|
||||
:::
|
||||
|
||||
### ClickHouse parameters
|
||||
|
||||
You can inspect a vector store component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it.
|
||||
|
||||
<PartialParams />
|
||||
|
||||
<PartialConditionalParams />
|
||||
|
||||
For information about accepted values and functionality, see the [ClickHouse Documentation](https://clickhouse.com/docs/en/intro) or inspect [component code](/concepts-components#component-code).
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
| host | hostname | Input parameter. The ClickHouse server hostname. Required. Default: `localhost`. |
|
||||
| port | port | Input parameter. The ClickHouse server port. Required. Default: `8123`. |
|
||||
| database | database | Input parameter. The ClickHouse database name. Required. |
|
||||
| table | Table name | Input parameter. The ClickHouse table name. Required. |
|
||||
| username | Username | Input parameter. ClickHouse username for authentication. Required. |
|
||||
| password | Password | Input parameter. ClickHouse password for authentication. Required. |
|
||||
| index_type | index_type | Input parameter. Type of the index, either `annoy` (default) or `vector_similarity`. |
|
||||
| metric | metric | Input parameter. Metric to compute distance for similarity search. The options are `angular` (default), `euclidean`, `manhattan`, `hamming`, `dot`. |
|
||||
| secure | Use HTTPS/TLS | Input parameter. If true, enables HTTPS/TLS for the ClickHouse server and overrides inferred values for interface or port arguments. Default: false. |
|
||||
| index_param | Param of the index | Input parameter. Index parameters. Default: `100,'L2Distance'`. |
|
||||
| index_query_params | index query params | Input parameter. Additional index query parameters. |
|
||||
| search_query | Search Query | Input parameter. The query string for similarity search. Only relevant for reads. |
|
||||
| ingest_data | Ingest Data | Input parameter. The records to load into the vector store. |
|
||||
| cache_vector_store | Cache Vector Store | Input parameter. If true, the component caches the vector store in memory for faster reads. Default: Enabled (true). |
|
||||
| embedding | Embedding | Input parameter. The embedding model to use. |
|
||||
| number_of_results | Number of Results | Input parameter. The number of search results to return. Default: `4`. Only relevant for reads. |
|
||||
| score_threshold | Score threshold | Input parameter. The threshold for similarity score comparison. Default: Unset (no threshold). Only relevant for reads. |
|
||||
@ -6,7 +6,7 @@ slug: /bundles-cloudflare
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Cloudflare** bundle.
|
||||
|
||||
@ -14,7 +14,7 @@ This page describes the components that are available in the **Cloudflare** bund
|
||||
|
||||
The **Cloudflare Workers AI Embeddings** component generates embeddings using [Cloudflare Workers AI models](https://developers.cloudflare.com/workers-ai/).
|
||||
|
||||
For more information about using embedding model components in flows, see [**Embedding Model** components](/components-embedding-models).
|
||||
For more information about using embedding model components in flows, see [Embedding model components](/components-embedding-models).
|
||||
|
||||
### Cloudflare Workers AI Embeddings parameters
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ slug: /bundles-cohere
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Cohere** bundle.
|
||||
|
||||
@ -20,7 +20,7 @@ It can output either a **Model Response** ([`Message`](/data-types#message)) or
|
||||
|
||||
Use the **Language Model** output when you want to use a Cohere model as the LLM for another LLM-driven component, such as an **Agent** or **Smart Function** component.
|
||||
|
||||
For more information, see [**Language Model** components](/components-models).
|
||||
For more information, see [Language model components](/components-models).
|
||||
|
||||
### Cohere text generation parameters
|
||||
|
||||
@ -38,7 +38,7 @@ For more information, see [**Language Model** components](/components-models).
|
||||
|
||||
The **Cohere Embeddings** component is used to load embedding models from Cohere.
|
||||
|
||||
For more information about using embedding model components in flows, see [**Embedding Model** components](/components-embedding-models).
|
||||
For more information about using embedding model components in flows, see [Embedding model components](/components-embedding-models).
|
||||
|
||||
### Cohere Embeddings parameters
|
||||
|
||||
@ -51,4 +51,22 @@ For more information about using embedding model components in flows, see [**Emb
|
||||
| truncate | Boolean | Input parameter. How to handle input that exceeds the model's token limit. One of `NONE`, `START`, or `END` (default). For more information, see the [Cohere `truncate` API reference](https://docs.cohere.com/reference/embed#request.body.truncate). |
|
||||
| max_retries | Integer | Input parameter. The maximum number of retry attempts for failed requests. Default: `3` |
|
||||
| user_agent | String | Input parameter. A user agent string to include in requests. Default: `langchain`|
|
||||
| request_timeout | Float | Input parameter. The timeout duration for requests in milliseconds. Default: `10000` |
|
||||
| request_timeout | Float | Input parameter. The timeout duration for requests in seconds. Default: None |
|
||||
|
||||
## Cohere Rerank
|
||||
|
||||
This component finds and reranks documents using the Cohere API.
|
||||
|
||||
Outputs `Data` containing the reranked documents, limited by the **Top N** parameter.
|
||||
|
||||
### Cohere Rerank parameters
|
||||
|
||||
<PartialParams />
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| **Search Query** | String | Input parameter. The search query for reranking documents. |
|
||||
| **Search Results** | Data | Input parameter. Connect search results output from a vector store component. Use this parameter to apply reranking after running a similarity search on your vector database. |
|
||||
| **Top N** | Integer | Input parameter. The number of documents to return after reranking. Default: `3`. |
|
||||
| **Cohere API Key** | SecretString | Input parameter. Your Cohere API key. |
|
||||
| **Model** | String | Input parameter. The re-ranker model to use. Default: `rerank-english-v3.0` |
|
||||
56
docs/docs/Components/bundles-couchbase.mdx
Normal file
56
docs/docs/Components/bundles-couchbase.mdx
Normal file
@ -0,0 +1,56 @@
|
||||
---
|
||||
title: Couchbase
|
||||
slug: /bundles-couchbase
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
import PartialConditionalParams from '@site/docs/_partial-conditional-params.mdx';
|
||||
import PartialVectorSearchResults from '@site/docs/_partial-vector-search-results.mdx';
|
||||
import PartialVectorStoreInstance from '@site/docs/_partial-vector-store-instance.mdx';
|
||||
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Couchbase** bundle.
|
||||
|
||||
## Couchbase vector store
|
||||
|
||||
The **Couchbase** component reads and writes to a Couchbase vector store using an instance of `CouchbaseSearchVectorStore`.
|
||||
|
||||
<details>
|
||||
<summary>About vector store instances</summary>
|
||||
|
||||
<PartialVectorStoreInstance />
|
||||
|
||||
</details>
|
||||
|
||||
<PartialVectorSearchResults />
|
||||
|
||||
:::tip
|
||||
For a tutorial using a vector database in a flow, see [Create a vector RAG chatbot](/chat-with-rag).
|
||||
:::
|
||||
|
||||
### Couchbase parameters
|
||||
|
||||
You can inspect a vector store component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it.
|
||||
|
||||
<PartialParams />
|
||||
|
||||
<PartialConditionalParams />
|
||||
|
||||
For information about accepted values and functionality, see the [Couchbase documentation](https://docs.couchbase.com/home/index.html) or inspect [component code](/concepts-components#component-code).
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| couchbase_connection_string | SecretString | Input parameter. Couchbase Cluster connection string. Required. |
|
||||
| couchbase_username | String | Input parameter. Couchbase username for authentication. Required. |
|
||||
| couchbase_password | SecretString | Input parameter. Couchbase password for authentication. Required. |
|
||||
| bucket_name | String | Input parameter. Name of the Couchbase bucket. Required. |
|
||||
| scope_name | String | Input parameter. Name of the Couchbase scope. Required. |
|
||||
| collection_name | String | Input parameter. Name of the Couchbase collection. Required. |
|
||||
| index_name | String | Input parameter. Name of the Couchbase index. Required. |
|
||||
| ingest_data | Data | Input parameter. The records to load into the vector store. Only relevant for writes. |
|
||||
| search_query | String | Input parameter. The query string for vector search. Only relevant for reads. |
|
||||
| cache_vector_store | Boolean | Input parameter. If true, the component caches the vector store in memory for faster reads. Default: Enabled (true). |
|
||||
| embedding | Embeddings | Input parameter. The embedding function to use for the vector store. |
|
||||
| number_of_results | Integer | Input parameter. Maximum number of search results to return. Default: 4. Only relevant for reads. |
|
||||
@ -4,40 +4,171 @@ slug: /bundles-datastax
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
import PartialConditionalParams from '@site/docs/_partial-conditional-params.mdx';
|
||||
import PartialVectorSearchResults from '@site/docs/_partial-vector-search-results.mdx';
|
||||
import PartialVectorStoreInstance from '@site/docs/_partial-vector-store-instance.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **DataStax** bundle.
|
||||
This page describes the components that are available in the **DataStax** bundle, including components that read and write to Astra DB databases.
|
||||
|
||||
## Astra DB Chat Memory
|
||||
|
||||
The **Astra DB Chat Memory** component retrieves and stores chat messages using an Astra DB database.
|
||||
|
||||
Chat memories are passed between memory storage components as the [`Memory`](/data-types#memory) data type.
|
||||
Specifically, the component creates an instance of `AstraDBChatMessageHistory`, which is a LangChain chat message history class that uses Astra DB for storage.
|
||||
## Astra DB
|
||||
|
||||
:::important
|
||||
The **Astra DB Chat Memory** component isn't recommended for most memory storage because memories tend to be long JSON objects or strings, often exceeding the maximum size of a document or object supported by Astra DB.
|
||||
It is recommended that you create any databases, keyspaces, and collections you need before configuring the **Astra DB** component.
|
||||
|
||||
However, Langflow's **Agent** component includes built-in chat memory that is enabled by default.
|
||||
Your agentic flows don't need an external database to store chat memory.
|
||||
For more information, see [Memory management options](/memory).
|
||||
You can create new databases and collections through this component, but this is only possible in the Langflow visual editor (not at runtime), and you must wait while the database or collection initializes before proceeding with flow configuration.
|
||||
Additionally, not all database and collection configuration options are available through the **Astra DB** component, such as hybrid search options, PCU groups, vectorize integration management, and multi-region deployments.
|
||||
:::
|
||||
|
||||
For more information about using external chat memory in flows, see the [**Message History** component](/components-helpers#message-history).
|
||||
The **Astra DB** component reads and writes to Astra DB Serverless databases, using an instance of `AstraDBVectorStore` to call the Data API and DevOps API.
|
||||
|
||||
### Astra DB Chat Memory parameters
|
||||
<details>
|
||||
<summary>About vector store instances</summary>
|
||||
|
||||
Some component input parameters are hidden by default in the visual editor.
|
||||
You can toggle parameters through the <Icon name="SlidersHorizontal" aria-hidden="true"/> **Controls** in the [component's header menu](/concepts-components#component-menus).
|
||||
<PartialVectorStoreInstance />
|
||||
|
||||
| Name | Type | Description |
|
||||
|------------------|---------------|-----------------------------------------------------------------------|
|
||||
| collection_name | String | Input parameter. The name of the Astra DB collection for storing messages. Required. |
|
||||
| token | SecretString | Input parameter. The authentication token for Astra DB access. Required. |
|
||||
| api_endpoint | SecretString | Input parameter. The API endpoint URL for the Astra DB service. Required. |
|
||||
| namespace | String | Input parameter. The optional namespace within Astra DB for the collection. |
|
||||
| session_id | MessageText | Input parameter. The unique identifier for the chat session. Uses the current session ID if not provided. |
|
||||
</details>
|
||||
|
||||
### Astra DB parameters
|
||||
|
||||
You can inspect a vector store component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it.
|
||||
|
||||
<PartialParams />
|
||||
|
||||
<PartialConditionalParams />
|
||||
|
||||
For information about accepted values and functionality, see the [Astra DB Serverless documentation](https://docs.datastax.com/en/astra-db-serverless/index.html) or inspect [component code](/concepts-components#component-code).
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
| token | Astra DB Application Token | Input parameter. An Astra application token with permission to access your vector database. Once the connection is verified, additional fields are populated with your existing databases and collections. If you want to create a database through this component, the application token must have Organization Administrator permissions. |
|
||||
| environment | Environment | Input parameter. The environment for the Astra DB API endpoint. Typically always `prod`. |
|
||||
| database_name | Database | Input parameter. The name of the database that you want this component to connect to. Or, you can select **New Database** to create a new database, and then wait for the database to initialize before setting the remaining parameters. |
|
||||
| endpoint | Astra DB API Endpoint | Input parameter. For multi-region databases, select the API endpoint for your nearest datacenter. To get the list of regions for a multi-region database, see [List database regions](https://docs.datastax.com/en/astra-db-serverless/databases/manage-regions.html#list-db-regions). This field is automatically populated when you select a database, and it defaults to the primary region's endpoint. |
|
||||
| keyspace | Keyspace | Input parameter. The keyspace in your database that contains the collection specified in `collection_name`. Default: `default_keyspace`. |
|
||||
| collection_name | Collection | Input parameter. The name of the collection that you want to use with this flow. Or, select **New Collection** to create a new collection with limited configuration options. To ensure your collection is configured with the correct embedding provider and search capabilities, it is recommended to create the collection in the Astra Portal or with the Data API *before* configuring this component. For more information, see [Manage collections in Astra DB Serverless](https://docs.datastax.com/en/astra-db-serverless/databases/manage-collections.html). |
|
||||
| embedding_model | Embedding Model | Input parameter. Attach an [embedding model component](/components-embedding-models) to generate embeddings. Only available if the specified collection doesn't have a [vectorize integration](https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html). If a vectorize integration exists, the component automatically uses the collection's integrated model. |
|
||||
| ingest_data | Ingest Data | Input parameter. The documents to load into the specified collection. Accepts `Data` or `DataFrame` input. |
|
||||
| search_query | Search Query | Input parameter. The query string for vector search. |
|
||||
| cache_vector_store | Cache Vector Store | Input parameter. Whether to cache the vector store in Langflow memory for faster reads. Default: Enabled (true). |
|
||||
| search_method | Search Method | Input parameter. The search methods to use, either `Hybrid Search` or `Vector Search`. Your collection must be configured to support the chosen option, and the default depends on what your collection supports. All vector-enabled collections in Astra DB Serverless (Vector) databases support vector search, but hybrid search requires that you set specific collection settings when creating the collection. These options are only available when creating a collection programmatically. For more information, see [Ways to find data in Astra DB Serverless](https://docs.datastax.com/en/astra-db-serverless/databases/about-search.html) and [Create a collection that supports hybrid search](https://docs.datastax.com/en/astra-db-serverless/api-reference/collection-methods/create-collection.html#example-hybrid). |
|
||||
| reranker | Reranker | Input parameter. The re-ranker model to use for hybrid search, depending on the collection configuration. This parameter is only available for collections that support hybrid search. To determine if a collection supports hybrid search, [get collection metadata](https://docs.datastax.com/en/astra-db-serverless/api-reference/collection-methods/list-collection-metadata.html), and then check that `lexical` and `rerank` both have `"enabled": true`. |
|
||||
| lexical_terms | Lexical Terms | Input parameter. A space-separated string of keywords for hybrid search, like `features, data, attributes, characteristics`. This parameter is only available if the collection supports hybrid search. For more information, see the [Hybrid search example](#astra-db-examples). |
|
||||
| number_of_results | Number of Search Results | Input parameter. The number of search results to return. Default: 4. |
|
||||
| search_type | Search Type | Input parameter. The search type to use, either `Similarity` (default), `Similarity with score threshold`, and `MMR (Max Marginal Relevance)`. |
|
||||
| search_score_threshold | Search Score Threshold | Input parameter. The minimum similarity score threshold for vector search results with the `Similarity with score threshold` search type. Default: 0. |
|
||||
| advanced_search_filter | Search Metadata Filter | Input parameter. An optional dictionary of metadata filters to apply in addition to vector or hybrid search. |
|
||||
| autodetect_collection | Autodetect Collection | Input parameter. Whether to automatically fetch a list of available collections after providing an application token and API endpoint. |
|
||||
| content_field | Content Field | Input parameter. For writes, this parameter specifies the name of the field in the documents that contains text strings for which you want to generate embeddings. |
|
||||
| deletion_field | Deletion Based On Field | Input parameter. When provided, documents in the target collection with metadata field values matching the input metadata field value are deleted before new records are loaded. Use this setting for writes with upserts (overwrites). |
|
||||
| ignore_invalid_documents | Ignore Invalid Documents | Input parameter. Whether to ignore invalid documents during writes. If disabled (false), then an error is raised for invalid documents. Default: Enabled (true). |
|
||||
| astradb_vectorstore_kwargs | AstraDBVectorStore Parameters | Input parameter. An optional dictionary of additional parameters for the `AstraDBVectorStore` instance. |
|
||||
|
||||
### Astra DB examples
|
||||
|
||||
<details>
|
||||
<summary>Example: Vector RAG</summary>
|
||||
|
||||
import PartialVectorRagFlow from '@site/docs/_partial-vector-rag-flow.mdx';
|
||||
|
||||
<PartialVectorRagFlow />
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Example: Hybrid search</summary>
|
||||
|
||||
The **Astra DB** component supports the Data API's [hybrid search](https://docs.datastax.com/en/astra-db-serverless/databases/hybrid-search.html) feature.
|
||||
Hybrid search performs a vector similarity search and a lexical search, compares the results of both searches, and then returns the most relevant results overall.
|
||||
|
||||
To use hybrid search through the **Astra DB** component, do the following:
|
||||
|
||||
1. Use the Data API to [create a collection that supports hybrid search](https://docs.datastax.com/en/astra-db-serverless/api-reference/collection-methods/create-collection.html#example-hybrid) if you don't already have one.
|
||||
|
||||
Although you can create a collection through the **Astra DB** component, you have more control and insight into the collection settings when using the Data API for this operation.
|
||||
|
||||
2. Create a flow based on the **Hybrid Search RAG** template, which includes an **Astra DB** component that is pre-configured for hybrid search.
|
||||
|
||||
After loading the template, check for **Upgrade available** alerts on the components.
|
||||
If any components have an upgrade pending, upgrade and reconnect them before continuing.
|
||||
|
||||
3. In the **Language Model** components, add your OpenAI API key.
|
||||
If you want to use a different provider or model, see [Language model components](/components-models).
|
||||
|
||||
4. Delete the **Language Model** component that is connected to the **Structured Output** component's **Input Message** port, and then connect the **Chat Input** component to that port.
|
||||
|
||||
5. Configure the **Astra DB** vector store component:
|
||||
|
||||
1. Enter your Astra DB application token.
|
||||
2. In the **Database** field, select your database.
|
||||
3. In the **Collection** field, select your collection with hybrid search enabled.
|
||||
|
||||
Once you select a collection that supports hybrid search, the other parameters automatically update to allow hybrid search options.
|
||||
|
||||
6. Connect the first **Parser** component's **Parsed Text** output to the **Astra DB** component's **Lexical Terms** input.
|
||||
This input only appears after connecting a collection that support hybrid search with reranking.
|
||||
|
||||
7. Update the **Structured Output** template:
|
||||
|
||||
1. Click the **Structured Output** component to expose the [component's header menu](/concepts-components#component-menus), and then click <Icon name="SlidersHorizontal" aria-hidden="true"/> **Controls**.
|
||||
2. Find the **Format Instructions** row, click <Icon name="Expand" aria-hidden="true"/> **Expand**, and then replace the prompt with the following text:
|
||||
|
||||
```text
|
||||
You are a database query planner that takes a user's requests, and then converts to a search against the subject matter in question.
|
||||
You should convert the query into:
|
||||
1. A list of keywords to use against a Lucene text analyzer index, no more than 4. Strictly unigrams.
|
||||
2. A question to use as the basis for a QA embedding engine.
|
||||
Avoid common keywords associated with the user's subject matter.
|
||||
```
|
||||
|
||||
3. Click **Finish Editing**, and then click **Close** to save your changes to the component.
|
||||
|
||||
8. Open the **Playground**, and then enter a natural language question that you would ask about your database.
|
||||
|
||||
In this example, your input is sent to both the **Astra DB** and **Structured Output** components:
|
||||
|
||||
* The input sent directly to the **Astra DB** component's **Search Query** port is used as a string for similarity search.
|
||||
An embedding is generated from the query string using the collection's Astra DB vectorize integration.
|
||||
|
||||
* The input sent to the **Structured Output** component is processed by the **Structured Output**, **Language Model**, and **Parser** components to extract space-separated `keywords` used for the lexical search portion of the hybrid search.
|
||||
|
||||
The complete hybrid search query is executed against your database using the Data API's `find_and_rerank` command.
|
||||
The API's response is output as a `DataFrame` that is transformed into a text string `Message` by another **Parser** component.
|
||||
Finally, the **Chat Output** component prints the `Message` response to the **Playground**.
|
||||
|
||||
9. Optional: Exit the **Playground**, and then click <Icon name="TextSearch" aria-hidden="true"/> **Inspect Output** on each individual component to understand how lexical keywords were constructed and view the raw response from the Data API.
|
||||
This is helpful for debugging flows where a certain component isn't receiving input as expected from another component.
|
||||
|
||||
* **Structured Output component**: The output is the `Data` object produced by applying the output schema to the LLM's response to the input message and format instructions.
|
||||
The following example is based on the aforementioned instructions for keyword extraction:
|
||||
|
||||
```
|
||||
1. Keywords: features, data, attributes, characteristics
|
||||
2. Question: What characteristics can be identified in my data?
|
||||
```
|
||||
|
||||
* **Parser component**: The output is the string of keywords extracted from the structured output `Data`, and then used as lexical terms for the hybrid search.
|
||||
|
||||
* **Astra DB component**: The output is the `DataFrame` containing the results of the hybrid search as returned by the Data API.
|
||||
|
||||
</details>
|
||||
|
||||
### Astra DB output
|
||||
|
||||
<PartialVectorSearchResults />
|
||||
|
||||
<details>
|
||||
<summary>Vector Store Connection port</summary>
|
||||
|
||||
The **Astra DB** component has an additional **Vector Store Connection** output.
|
||||
This output can only connect to a `VectorStore` input port, and it was intended for use with dedicated Graph RAG components.
|
||||
|
||||
The only non-legacy component that supports this input is the [**Graph RAG** component](#graph-rag), which can be a Graph RAG extension to the **Astra DB** component.
|
||||
Instead, use the **Astra DB Graph** component that includes both the vector store connection and Graph RAG functionality.
|
||||
|
||||
</details>
|
||||
|
||||
## Astra DB CQL
|
||||
|
||||
@ -47,8 +178,7 @@ The output is a list of [`Data`](/data-types#data) objects containing the query
|
||||
|
||||
### Astra DB CQL parameters
|
||||
|
||||
Some component input parameters are hidden by default in the visual editor.
|
||||
You can toggle parameters through the <Icon name="SlidersHorizontal" aria-hidden="true"/> **Controls** in the [component's header menu](/concepts-components#component-menus).
|
||||
<PartialParams />
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
@ -94,9 +224,9 @@ The values for **Collection Name**, **Astra DB Application Token**, and **Astra
|
||||
| Tool Parameters | Dict | Input parameter. [Astra DB Data API `find` filters](https://docs.datastax.com/en/astra-db-serverless/api-reference/document-methods/find-many.html#parameters) that become tools for an agent. These Filters _may_ be used in a search, if the agent selects them. See [Define tool-specific parameters](#define-tool-specific-parameters). |
|
||||
| Static Filters | Dict | Input parameter. Attribute-value pairs used to filter query results. Equivalent to [Astra DB Data API `find` filters](https://docs.datastax.com/en/astra-db-serverless/api-reference/document-methods/find-many.html#parameters). **Static Filters** are included with _every_ query. Use **Static Filters** without semantic search to perform a regular filter search. |
|
||||
| Number of Results | Int | Input parameter. The maximum number of documents to return. |
|
||||
| Semantic Search | Boolean | Input parameter. Whether to run a similarity search by generating a vector embedding from the chat input and following the **Semantic Search Instruction**. Default: false. If true, you must attach an [**Embedding Model** component](/components-embedding-models) or have vectorize pre-enabled on your collection. |
|
||||
| Semantic Search | Boolean | Input parameter. Whether to run a similarity search by generating a vector embedding from the chat input and following the **Semantic Search Instruction**. Default: false. If true, you must attach an [embedding model component](/components-embedding-models) or have vectorize pre-enabled on your collection. |
|
||||
| Use Astra DB Vectorize | Boolean | Input parameter. Whether to use the Astra DB vectorize feature for embedding generation when running a semantic search. Default: false. If true, you must have vectorize pre-enabled on your collection. |
|
||||
| Embedding Model | Embedding | Input parameter. A port to attach an **Embedding Model** component to generate a vector from input text for semantic search. This can be used when **Semantic Search** is true, with or without vectorize. Be sure to use a model that aligns with the dimensions of the embeddings already present in the collection. |
|
||||
| Embedding Model | Embedding | Input parameter. A port to attach an embedding model component to generate a vector from input text for semantic search. This can be used when **Semantic Search** is true, with or without vectorize. Be sure to use a model that aligns with the dimensions of the embeddings already present in the collection. |
|
||||
| Semantic Search Instruction | String | Input parameter. The query to use for similarity search. Default: `"Find documents similar to the query."`. This instruction is used to guide the model in performing semantic search. |
|
||||
|
||||
### Define tool-specific parameters
|
||||
@ -141,31 +271,163 @@ The following fields are available for each row in the **Tool Parameters** pane:
|
||||
| Is Timestamp | For date or time-based filters, enable this option to automatically convert values to the timestamp format that the Astrapy client expects. This ensures compatibility with the underlying API without requiring manual formatting. |
|
||||
| Operator | Defines the filtering logic applied to the attribute. You can use any valid [Data API filter operator](https://docs.datastax.com/en/astra-db-serverless/api-reference/filter-operator-collections.html). For example, to filter a time range on the timestamp attribute, use two parameters: one with the `$gt` operator for "greater than", and another with the `$lt` operator for "less than". |
|
||||
|
||||
## Cassandra Chat Memory
|
||||
## Astra DB Graph
|
||||
|
||||
The **Cassandra Chat Memory** component retrieves and stores chat messages using an Apache Cassandra-based database, including Astra DB and Hyper-Converged Database (HCD).
|
||||
The **Astra DB Graph** component uses `AstraDBGraphVectorStore`, an instance of [LangChain graph vector store](https://python.langchain.com/api_reference/community/graph_vectorstores.html), for graph traversal and graph-based document retrieval in an Astra DB collection. It also supports writing to the vector store.
|
||||
For more information, see [Build a Graph RAG system with LangChain and GraphRetriever](https://docs.datastax.com/en/astra-db-serverless/tutorials/graph-rag.html).
|
||||
|
||||
<PartialVectorSearchResults />
|
||||
|
||||
### Astra DB Graph parameters
|
||||
|
||||
You can inspect a vector store component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it.
|
||||
|
||||
<PartialParams />
|
||||
|
||||
<PartialConditionalParams />
|
||||
|
||||
For information about accepted values and functionality, see the [Astra DB Serverless documentation](https://docs.datastax.com/en/astra-db-serverless/index.html) or inspect [component code](/concepts-components#component-code).
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
| token | Astra DB Application Token | Input parameter. An Astra application token with permission to access your vector database. Once the connection is verified, additional fields are populated with your existing databases and collections. If you want to create a database through this component, the application token must have Organization Administrator permissions. |
|
||||
| api_endpoint | API Endpoint | Input parameter. Your database's API endpoint. |
|
||||
| keyspace | Keyspace | Input parameter. The keyspace in your database that contains the collection specified in `collection_name`. Default: `default_keyspace`. |
|
||||
| collection_name | Collection | Input parameter. The name of the collection that you want to use with this flow. For write operations, if a matching collection doesn't exist, a new one is created. |
|
||||
| metadata_incoming_links_key | Metadata Incoming Links Key | Input parameter. The metadata key for the incoming links in the vector store. |
|
||||
| ingest_data | Ingest Data | Input parameter. Records to load into the vector store. Only relevant for writes. |
|
||||
| search_input | Search Query | Input parameter. Query string for similarity search. Only relevant for reads. |
|
||||
| cache_vector_store | Cache Vector Store | Input parameter. Whether to cache the vector store in Langflow memory for faster reads. Default: Enabled (true). |
|
||||
| embedding_model | Embedding Model | Input parameter. Attach an [embedding model component](/components-embedding-models) to generate embeddings. If the collection has a [vectorize integration](https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html), don't attach an embedding model component. |
|
||||
| metric | Metric | Input parameter. The metrics to use for similarity search calculations, either `cosine` (default), `dot_product`, or `euclidean`. This is a collection setting. |
|
||||
| batch_size | Batch Size | Input parameter. Optional number of records to process in a single batch. |
|
||||
| bulk_insert_batch_concurrency | Bulk Insert Batch Concurrency | Input parameter. Optional concurrency level for bulk write operations. |
|
||||
| bulk_insert_overwrite_concurrency | Bulk Insert Overwrite Concurrency | Input parameter. Optional concurrency level for bulk write operations that allow upserts (overwriting existing records). |
|
||||
| bulk_delete_concurrency | Bulk Delete Concurrency | Input parameter. Optional concurrency level for bulk delete operations. |
|
||||
| setup_mode | Setup Mode | Input parameter. Configuration mode for setting up the vector store, either `Sync` (default) or `Off`. |
|
||||
| pre_delete_collection | Pre Delete Collection | Input parameter. Whether to delete the collection before creating a new one. Default: Disabled (false). |
|
||||
| metadata_indexing_include | Metadata Indexing Include | Input parameter. A list of metadata fields to index if you want to enable [selective indexing](https://docs.datastax.com/en/astra-db-serverless/api-reference/collection-indexes.html) *only* when creating a collection. Doesn't apply to existing collections. Only one `*_indexing_*` parameter can be set per collection. If all `*_indexing_*` parameters are unset, then all fields are indexed (default indexing). |
|
||||
| metadata_indexing_exclude | Metadata Indexing Exclude | Input parameter. A list of metadata fields to exclude from indexing if you want to enable selective indexing *only* when creating a collection. Doesn't apply to existing collections. Only one `*_indexing_*` parameter can be set per collection. If all `*_indexing_*` parameters are unset, then all fields are indexed (default indexing). |
|
||||
| collection_indexing_policy | Collection Indexing Policy | Input parameter. A dictionary to define the indexing policy if you want to enable selective indexing *only* when creating a collection. Doesn't apply to existing collections. Only one `*_indexing_*` parameter can be set per collection. If all `*_indexing_*` parameters are unset, then all fields are indexed (default indexing). The `collection_indexing_policy` dictionary is used when you need to set indexing on subfields or a complex indexing definition that isn't compatible as a list. |
|
||||
| number_of_results | Number of Results | Input parameter. Number of search results to return. Default: 4. Only relevant to reads. |
|
||||
| search_type | Search Type | Input parameter. Search type to use, either `Similarity`, `Similarity with score threshold`, or `MMR (Max Marginal Relevance)`, `Graph Traversal`, or `MMR (Max Marginal Relevance) Graph Traversal` (default). Only relevant to reads. |
|
||||
| search_score_threshold | Search Score Threshold | Input parameter. Minimum similarity score threshold for search results if the `search_type` is `Similarity with score threshold`. Default: 0. |
|
||||
| search_filter | Search Metadata Filter | Input parameter. Optional dictionary of metadata filters to apply in addition to vector search. |
|
||||
|
||||
## Graph RAG
|
||||
|
||||
The **Graph RAG** component uses an instance of [`GraphRetriever`](https://datastax.github.io/graph-rag/reference/langchain_graph_retriever/) for Graph RAG traversal enabling graph-based document retrieval in an Astra DB vector store.
|
||||
For more information, see the [DataStax Graph RAG documentation](https://datastax.github.io/graph-rag/).
|
||||
|
||||
:::info
|
||||
This component can be a Graph RAG extension for the [**Astra DB** vector store component](#astra-db).
|
||||
However, the [**Astra DB Graph** component](#astra-db-graph) includes both the vector store connection and Graph RAG functionality.
|
||||
:::
|
||||
|
||||
### Graph RAG parameters
|
||||
|
||||
You can inspect a vector store component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it.
|
||||
|
||||
<PartialParams />
|
||||
|
||||
<PartialConditionalParams />
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
| embedding_model | Embedding Model | Input parameter. Specify the embedding model to use. Not required if the connected vector store has a [vectorize integration](https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html). |
|
||||
| vector_store | Vector Store Connection | Input parameter. An instance of `AstraDbVectorStore` inherited from the [**Astra DB** component](#astra-db)'s **Vector Store Connection** output. |
|
||||
| edge_definition | Edge Definition | Input parameter. [Edge definition](https://datastax.github.io/graph-rag/reference/graph_retriever/edges/) for the graph traversal. |
|
||||
| strategy | Traversal Strategies | Input parameter. The strategy to use for graph traversal. Strategy options are dynamically loaded from available strategies. |
|
||||
| search_query | Search Query | Input parameter. The query to search for in the vector store. |
|
||||
| graphrag_strategy_kwargs | Strategy Parameters | Input parameter. Optional dictionary of additional parameters for the [retrieval strategy](https://datastax.github.io/graph-rag/reference/graph_retriever/strategies/). |
|
||||
| search_results | **Search Results** or **DataFrame** | Output parameter. The results of the graph-based document retrieval as a list of [`Data`](/data-types#data) objects or as a tabular [`DataFrame`](/data-types#dataframe). You can set the desired output type near the component's output port. |
|
||||
|
||||
## Hyper-Converged Database (HCD)
|
||||
|
||||
The **Hyper-Converged Database (HCD)** component uses your cluster's Data API server to read and write to your HCD vector store.
|
||||
Because the underlying functions call the Data API, which originated from Astra DB, the component uses an instance of `AstraDBVectorStore`.
|
||||
|
||||

|
||||
|
||||
<details>
|
||||
<summary>About vector store instances</summary>
|
||||
|
||||
<PartialVectorStoreInstance />
|
||||
|
||||
</details>
|
||||
|
||||
<PartialVectorSearchResults />
|
||||
|
||||
For more information about HCD, see [Get started with HCD 1.2](https://docs.datastax.com/en/hyper-converged-database/1.2/get-started/get-started-hcd.html) and [Get started with the Data API in HCD 1.2](https://docs.datastax.com/en/hyper-converged-database/1.2/api-reference/dataapiclient.html).
|
||||
|
||||
### HCD parameters
|
||||
|
||||
You can inspect a vector store component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it.
|
||||
|
||||
<PartialParams />
|
||||
|
||||
<PartialConditionalParams />
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
| collection_name | Collection Name | Input parameter. The name of a vector store collection in HCD. For write operations, if the collection doesn't exist, then a new one is created. Required. |
|
||||
| username | HCD Username | Input parameter. Username for authenticating to your HCD deployment. Default: `hcd-superuser`. Required. |
|
||||
| password | HCD Password | Input parameter. Password for authenticating to your HCD deployment. Required. |
|
||||
| api_endpoint | HCD API Endpoint | Input parameter. Your deployment's HCD Data API endpoint, formatted as `http[s]://CLUSTER_HOST:GATEWAY_PORT` where `CLUSTER_HOST` is the IP address of any node in your cluster and `GATEWAY_PORT` is the port number for your API gateway service. For example, `http://192.0.2.250:8181`. Required. |
|
||||
| ingest_data | Ingest Data | Input parameter. Records to load into the vector store. Only relevant for writes. |
|
||||
| search_input | Search Input | Input parameter. Query string for similarity search. Only relevant for reads. |
|
||||
| namespace | Namespace | Input parameter. The namespace in HCD that contains or will contain the collection specified in `collection_name`. Default: `default_namespace`. |
|
||||
| ca_certificate | CA Certificate | Input parameter. Optional CA certificate for TLS connections to HCD. |
|
||||
| metric | Metric | Input parameter. The metrics to use for similarity search calculations, either `cosine`, `dot_product`, or `euclidean`. This is a collection setting. If calling an existing collection, leave unset to use the collection's metric. If a write operation creates a new collection, specify the desired similarity metric setting. |
|
||||
| batch_size | Batch Size | Input parameter. Optional number of records to process in a single batch. |
|
||||
| bulk_insert_batch_concurrency | Bulk Insert Batch Concurrency | Input parameter. Optional concurrency level for bulk write operations. |
|
||||
| bulk_insert_overwrite_concurrency | Bulk Insert Overwrite Concurrency | Input parameter. Optional concurrency level for bulk write operations that allow upserts (overwriting existing records). |
|
||||
| bulk_delete_concurrency | Bulk Delete Concurrency | Input parameter. Optional concurrency level for bulk delete operations. |
|
||||
| setup_mode | Setup Mode | Input parameter. Configuration mode for setting up the vector store, either `Sync` (default), `Async`, or `Off`. |
|
||||
| pre_delete_collection | Pre Delete Collection | Input parameter. Whether to delete the collection before creating a new one. |
|
||||
| metadata_indexing_include | Metadata Indexing Include | Input parameter. A list of metadata fields to index if you want to enable [selective indexing](https://docs.datastax.com/en/hyper-converged-database/1.2/api-reference/collection-indexes.html) *only* when creating a collection. Doesn't apply to existing collections. Only one `*_indexing_*` parameter can be set per collection. If all `*_indexing_*` parameters are unset, then all fields are indexed (default indexing). |
|
||||
| metadata_indexing_exclude | Metadata Indexing Exclude | Input parameter. A list of metadata fields to exclude from indexing if you want to enable selective indexing *only* when creating a collection. Doesn't apply to existing collections. Only one `*_indexing_*` parameter can be set per collection. If all `*_indexing_*` parameters are unset, then all fields are indexed (default indexing). |
|
||||
| collection_indexing_policy | Collection Indexing Policy | Input parameter. A dictionary to define the indexing policy if you want to enable selective indexing *only* when creating a collection. Doesn't apply to existing collections. Only one `*_indexing_*` parameter can be set per collection. If all `*_indexing_*` parameters are unset, then all fields are indexed (default indexing). The `collection_indexing_policy` dictionary is used when you need to set indexing on subfields or a complex indexing definition that isn't compatible as a list. |
|
||||
| embedding | Embedding or Astra Vectorize | Input parameter. The embedding model to use by attaching an **Embedding Model** component. This component doesn't support additional vectorize authentication headers, so it isn't possible to use a vectorize integration with this component, even if you have enabled one on an existing HCD collection. |
|
||||
| number_of_results | Number of Results | Input parameter. Number of search results to return. Default: 4. Only relevant to reads. |
|
||||
| search_type | Search Type | Input parameter. Search type to use, either `Similarity` (default), `Similarity with score threshold`, or `MMR (Max Marginal Relevance)`. Only relevant to reads. |
|
||||
| search_score_threshold | Search Score Threshold | Input parameter. Minimum similarity score threshold for search results if the `search_type` is `Similarity with score threshold`. Default: 0. |
|
||||
| search_filter | Search Metadata Filter | Input parameter. Optional dictionary of metadata filters to apply in addition to vector search. |
|
||||
|
||||
## Other DataStax components
|
||||
|
||||
The following components are also included in the **DataStax** bundle.
|
||||
|
||||
### Astra DB Chat Memory
|
||||
|
||||
The **Astra DB Chat Memory** component retrieves and stores chat messages using an Astra DB database.
|
||||
|
||||
Chat memories are passed between memory storage components as the [`Memory`](/data-types#memory) data type.
|
||||
Specifically, the component creates an instance of `CassandraChatMessageHistory`, which is a LangChain chat message history class that uses a Cassandra database for storage.
|
||||
Specifically, the component creates an instance of `AstraDBChatMessageHistory`, which is a LangChain chat message history class that uses Astra DB for storage.
|
||||
|
||||
:::important
|
||||
The **Astra DB Chat Memory** component isn't recommended for most memory storage because memories tend to be long JSON objects or strings, often exceeding the maximum size of a document or object supported by Astra DB.
|
||||
|
||||
However, Langflow's **Agent** component includes built-in chat memory that is enabled by default.
|
||||
Your agentic flows don't need an external database to store chat memory.
|
||||
For more information, see [Memory management options](/memory).
|
||||
:::
|
||||
|
||||
For more information about using external chat memory in flows, see the [**Message History** component](/components-helpers#message-history).
|
||||
|
||||
### Cassandra Chat Memory parameters
|
||||
#### Astra DB Chat Memory parameters
|
||||
|
||||
Some component input parameters are hidden by default in the visual editor.
|
||||
You can toggle parameters through the <Icon name="SlidersHorizontal" aria-hidden="true"/> **Controls** in the [component's header menu](/concepts-components#component-menus).
|
||||
<PartialParams />
|
||||
|
||||
| Name | Type | Description |
|
||||
|----------------|---------------|-----------------------------|
|
||||
| database_ref | MessageText | Input parameter. The contact points for the Cassandra database or Astra DB database ID. Required. |
|
||||
| username | MessageText | Input parameter. The username for Cassandra. Leave empty for Astra DB. |
|
||||
| token | SecretString | Input parameter. The password for Cassandra or the token for Astra DB. Required. |
|
||||
| keyspace | MessageText | Input parameter. The keyspace in Cassandra or namespace in Astra DB. Required. |
|
||||
| table_name | MessageText | Input parameter. The name of the table or collection for storing messages. Required. |
|
||||
| session_id | MessageText | Input parameter. The unique identifier for the chat session. Optional. |
|
||||
| cluster_kwargs | Dictionary | Input parameter. Additional keyword arguments for the Cassandra cluster configuration. Optional. |
|
||||
| Name | Type | Description |
|
||||
|------------------|---------------|-----------------------------------------------------------------------|
|
||||
| collection_name | String | Input parameter. The name of the Astra DB collection for storing messages. Required. |
|
||||
| token | SecretString | Input parameter. The authentication token for Astra DB access. Required. |
|
||||
| api_endpoint | SecretString | Input parameter. The API endpoint URL for the Astra DB service. Required. |
|
||||
| namespace | String | Input parameter. The optional namespace within Astra DB for the collection. |
|
||||
| session_id | MessageText | Input parameter. The unique identifier for the chat session. Uses the current session ID if not provided. |
|
||||
|
||||
## DataStax assistant components
|
||||
### Assistants API
|
||||
|
||||
The following DataStax components are used to create and manage Assistants API functions in a flow:
|
||||
|
||||
@ -176,7 +438,7 @@ The following DataStax components are used to create and manage Assistants API f
|
||||
* **List Assistants**
|
||||
* **Run Assistant**
|
||||
|
||||
## DataStax environment variable components
|
||||
## Environment variables
|
||||
|
||||
The following DataStax components are used to load and retrieve environment variables in a flow:
|
||||
|
||||
@ -185,20 +447,26 @@ The following DataStax components are used to load and retrieve environment vari
|
||||
|
||||
## Legacy DataStax components
|
||||
|
||||
The following components are considered legacy or deprecated.
|
||||
These components are no longer being developed and can be removed in future releases.
|
||||
import PartialLegacy from '@site/docs/_partial-legacy.mdx';
|
||||
|
||||
Replace them with the suggested alternatives as soon as possible.
|
||||
<PartialLegacy />
|
||||
|
||||
The following DataStax components are in legacy status:
|
||||
|
||||
<details>
|
||||
<summary>Astra DB Vectorize</summary>
|
||||
<summary>Astra Vectorize</summary>
|
||||
|
||||
This component was deprecated in Langflow version 1.1.2.
|
||||
Replace it with the [**Astra DB** vector store component](/components-vector-stores#astra-db) as soon as possible.
|
||||
Replace it with the [**Astra DB** component](#astra-db).
|
||||
|
||||
The **Astra DB Vectorize** component was used to generate embeddings with Astra DB's vectorize feature in conjunction with an **Astra DB** vector store component.
|
||||
The **Astra DB Vectorize** component was used to generate embeddings with Astra DB's vectorize feature in conjunction with an **Astra DB** component.
|
||||
|
||||
The vectorize functionality is now built into the **Astra DB** vector store component.
|
||||
The vectorize functionality is now built into the **Astra DB** component.
|
||||
You no longer need a separate component for vectorize embedding generation.
|
||||
|
||||
</details>
|
||||
</details>
|
||||
|
||||
## See also
|
||||
|
||||
* [**Cassandra** bundle](/bundles-cassandra)
|
||||
* [Create a vector RAG chatbot](/chat-with-rag)
|
||||
@ -6,7 +6,7 @@ slug: /bundles-deepseek
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **DeepSeek** bundle.
|
||||
|
||||
@ -20,7 +20,7 @@ It can output either a **Model Response** ([`Message`](/data-types#message)) or
|
||||
|
||||
Use the **Language Model** output when you want to use a DeepSeek model as the LLM for another LLM-driven component, such as an **Agent** or **Smart Function** component.
|
||||
|
||||
For more information, see [**Language Model** components](/components-models).
|
||||
For more information, see [Language model components](/components-models).
|
||||
|
||||
### DeepSeek text generation parameters
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ slug: /bundles-duckduckgo
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **DuckDuckGo** bundle.
|
||||
|
||||
|
||||
106
docs/docs/Components/bundles-elastic.mdx
Normal file
106
docs/docs/Components/bundles-elastic.mdx
Normal file
@ -0,0 +1,106 @@
|
||||
---
|
||||
title: Elastic
|
||||
slug: /bundles-elastic
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
import PartialConditionalParams from '@site/docs/_partial-conditional-params.mdx';
|
||||
import PartialVectorSearchResults from '@site/docs/_partial-vector-search-results.mdx';
|
||||
import PartialVectorStoreInstance from '@site/docs/_partial-vector-store-instance.mdx';
|
||||
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Elastic** bundle.
|
||||
|
||||
## Elasticsearch
|
||||
|
||||
The **Elasticsearch** component reads and writes to an Elasticsearch instance using [`ElasticsearchStore`](https://python.langchain.com/docs/integrations/vectorstores/elasticsearch/).
|
||||
|
||||
<details>
|
||||
<summary>About vector store instances</summary>
|
||||
|
||||
<PartialVectorStoreInstance />
|
||||
|
||||
</details>
|
||||
|
||||
<PartialVectorSearchResults />
|
||||
|
||||
### Elasticsearch parameters
|
||||
|
||||
You can inspect a vector store component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it.
|
||||
|
||||
<PartialParams />
|
||||
|
||||
<PartialConditionalParams />
|
||||
|
||||
For information about accepted values and functionality, see the [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/dense-vector.html) or inspect [component code](/concepts-components#component-code).
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| elasticsearch_url | String | Input parameter. Elasticsearch server URL. |
|
||||
| cloud_id | String | Input parameter. Elasticsearch Cloud ID. |
|
||||
| index_name | String | Input parameter. Name of the Elasticsearch index. |
|
||||
| ingest_data | Data | Input parameter. Records to load into the vector store. |
|
||||
| search_query | String | Input parameter. Query string for similarity search. |
|
||||
| cache_vector_store | Boolean | Input parameter. If true, the component caches the vector store in memory for faster reads. Default: Enabled (true). |
|
||||
| username | String | Input parameter. Username for Elasticsearch authentication. Required for all local deployments. Required for cloud deployments if `api_key` is empty. |
|
||||
| password | SecretString | Input parameter. Password for Elasticsearch authentication. Required for all local deployments. Required for cloud deployments if `api_key` is empty |
|
||||
| embedding | Embeddings | Input parameter. The embedding model to use. |
|
||||
| search_type | String | Input parameter. The type of search to perform. Options are `similarity` (default) or `mmr`. |
|
||||
| number_of_results | Integer | Input parameter. Number of search results to return. Default: 4. |
|
||||
| search_score_threshold | Float | Input parameter. The minimum similarity score threshold for search results. Default: 0. |
|
||||
| api_key | SecretString | Input parameter. API key for Elastic Cloud authentication. If provided, `username` and `password` aren't required. |
|
||||
| verify_certs | Boolean | Input parameter. Whether to verify SSL certificates when connecting to Elasticsearch. Default: Enabled (true). |
|
||||
|
||||
## OpenSearch
|
||||
|
||||
The **OpenSearch** component reads and writes to OpenSearch instances using [`OpenSearchVectorSearch`](https://python.langchain.com/docs/integrations/vectorstores/opensearch/).
|
||||
|
||||
<details>
|
||||
<summary>About vector store instances</summary>
|
||||
|
||||
<PartialVectorStoreInstance />
|
||||
|
||||
</details>
|
||||
|
||||
### OpenSearch parameters
|
||||
|
||||
You can inspect a vector store component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it.;
|
||||
|
||||
<PartialParams />
|
||||
|
||||
<PartialConditionalParams />
|
||||
|
||||
For information about accepted values and functionality, see the [OpenSearch documentation](https://opensearch.org/platform/search/vector-database.html) or inspect [component code](/concepts-components#component-code).
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| opensearch_url | String | Input parameter. URL for OpenSearch cluster, such as `https://192.168.1.1:9200`. |
|
||||
| index_name | String | Input parameter. The index name where the vectors are stored in OpenSearch cluster. Default: `langflow`. |
|
||||
| ingest_data | Data | Input parameter. The data to be ingested into the vector store. |
|
||||
| search_input | String | Input parameter. Enter a search query. Leave empty to retrieve all documents or if hybrid search is being used. |
|
||||
| cache_vector_store | Boolean | Input parameter. If true, the component caches the vector store in memory for faster reads. Default: Enabled (true). |
|
||||
| embedding | Embeddings | Input parameter. Attach an [embedding model component](/components-embedding-models) to use to generate an embedding from the search query. |
|
||||
| search_type | String | Input parameter. The type of search to perform. Options are `similarity` (default), `similarity_score_threshold`, `mmr`. |
|
||||
| number_of_results | Integer | Input parameter. The number of results to return in search. Default: 4. |
|
||||
| search_score_threshold | Float | Input parameter. The minimum similarity score threshold for search results. Default: 0. |
|
||||
| username | String | Input parameter. The username for the OpenSearch cluster. Default: `admin`.|
|
||||
| password | SecretString | Input parameter. The password for the OpenSearch cluster. |
|
||||
| use_ssl | Boolean | Input parameter. Whether to use SSL. Default: Enabled (true). |
|
||||
| verify_certs | Boolean | Input parameter. Whether to verify SSL certificates. Default: Disabled (false). |
|
||||
| hybrid_search_query | String | Input parameter. Provide a custom hybrid search query in JSON format. This allows you to combine vector similarity and keyword matching. |
|
||||
|
||||
### OpenSearch output
|
||||
|
||||
<PartialVectorSearchResults />
|
||||
|
||||
<details>
|
||||
<summary>Vector Store Connection port</summary>
|
||||
|
||||
The **OpenSearch** component has an additional deprecated **Vector Store Connection** output.
|
||||
This output can only connect to a `VectorStore` input port, and it was intended for use with dedicated Graph RAG components.
|
||||
|
||||
The **OpenSearch** component doesn't require a separate Graph RAG component because OpenSearch instances support Graph traversal through built-in RAG functionality and plugins.
|
||||
|
||||
</details>
|
||||
@ -5,7 +5,7 @@ slug: /bundles-exa
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Exa** bundle.
|
||||
|
||||
|
||||
47
docs/docs/Components/bundles-faiss.mdx
Normal file
47
docs/docs/Components/bundles-faiss.mdx
Normal file
@ -0,0 +1,47 @@
|
||||
---
|
||||
title: FAISS
|
||||
slug: /bundles-faiss
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
import PartialConditionalParams from '@site/docs/_partial-conditional-params.mdx';
|
||||
import PartialVectorSearchResults from '@site/docs/_partial-vector-search-results.mdx';
|
||||
import PartialVectorStoreInstance from '@site/docs/_partial-vector-store-instance.mdx';
|
||||
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **FAISS** bundle.
|
||||
|
||||
## FAISS vector store
|
||||
|
||||
The **FAISS** component provides access to the Facebook AI Similarity Search (FAISS) library through an instance of `FAISS` vector store.
|
||||
|
||||
<details>
|
||||
<summary>About vector store instances</summary>
|
||||
|
||||
<PartialVectorStoreInstance />
|
||||
|
||||
</details>
|
||||
|
||||
<PartialVectorSearchResults />
|
||||
|
||||
### FAISS vector store parameters
|
||||
|
||||
You can inspect a vector store component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it.
|
||||
|
||||
<PartialParams />
|
||||
|
||||
<PartialConditionalParams />
|
||||
|
||||
For information about accepted values and functionality, see the [FAISS documentation](https://faiss.ai/index.html) or inspect [component code](/concepts-components#component-code).
|
||||
|
||||
| Name | Type | Description |
|
||||
|---------------------------|---------------|--------------------------------------------------|
|
||||
| index_name | String | Input parameter. The name of the FAISS index. Default: "langflow_index". |
|
||||
| persist_directory | String | Input parameter. Path to save the FAISS index. It is relative to where Langflow is running. |
|
||||
| search_query | String | Input parameter. The query to search for in the vector store. |
|
||||
| ingest_data | Data | Input parameter. The list of data to ingest into the vector store. |
|
||||
| allow_dangerous_deserialization | Boolean | Input parameter. Set to True to allow loading pickle files from untrusted sources. Default: True. |
|
||||
| embedding | Embeddings | Input parameter. The embedding function to use for the vector store. |
|
||||
| number_of_results | Integer | Input parameter. Number of results to return from the search. Default: 4. |
|
||||
@ -6,7 +6,7 @@ slug: /bundles-glean
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Glean** bundle.
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ slug: /bundles-google
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Google** bundle.
|
||||
|
||||
@ -34,7 +34,7 @@ This component generates text using [Google Generative AI models](https://cloud.
|
||||
|
||||
The **Google Generative AI Embeddings** component connects to Google's generative AI embedding service using the GoogleGenerativeAIEmbeddings class from the `langchain-google-genai` package.
|
||||
|
||||
For more information about using embedding model components in flows, see [**Embedding Model** components](/components-embedding-models).
|
||||
For more information about using embedding model components in flows, see [Embedding model components](/components-embedding-models).
|
||||
|
||||
### Google Generative AI Embeddings parameters
|
||||
|
||||
@ -59,19 +59,15 @@ This component allows you to call the Google Search API.
|
||||
| results | List[Data] | Output parameter. A list of search results. |
|
||||
| tool | Tool | Output parameter. A Google Search tool for use in LangChain. |
|
||||
|
||||
## Serper Google Search API
|
||||
### Other Google Search components
|
||||
|
||||
This component allows you to call the Serper.dev Google Search API.
|
||||
Langflow includes multiple components that support Google Search, such as the following:
|
||||
|
||||
### Google Serper API parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| serper_api_key | SecretString | Input parameter. An API key for Serper.dev authentication. |
|
||||
| input_value | String | Input parameter. The search query input. |
|
||||
| k | Integer | Input parameter. The number of search results to return. |
|
||||
| results | List[Data] | Output parameter. A list of search results. |
|
||||
| tool | Tool | Output parameter. A Serper Google Search tool for use in LangChain. |
|
||||
* [**Apify Actors** component](/integrations-apify)
|
||||
* [**SearchApi** component](/bundles-searchapi)
|
||||
* [**Serper Google Search API** component](/bundles-serper)
|
||||
* [**News Search** component](/components-data#news-search)
|
||||
* [**Web Search** component](/components-data#web-search)
|
||||
|
||||
## Google Vertex AI
|
||||
|
||||
@ -79,10 +75,11 @@ For information about Vertex AI components, see the [**Vertex AI** bundle](/bund
|
||||
|
||||
## Legacy Google components
|
||||
|
||||
The following Google components are considered legacy components.
|
||||
You can still use them in your flows, but they are no longer supported and can be removed in future releases.
|
||||
import PartialLegacy from '@site/docs/_partial-legacy.mdx';
|
||||
|
||||
As an alternative to these components, you can use [Composio components](/integrations-composio) to connect your flows to Google services.
|
||||
<PartialLegacy />
|
||||
|
||||
The following Google components are in legacy status:
|
||||
|
||||
<details>
|
||||
<summary>Google OAuth Token</summary>
|
||||
|
||||
@ -5,7 +5,7 @@ slug: /bundles-groq
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Groq** bundle.
|
||||
|
||||
@ -20,7 +20,7 @@ Specifically, the **Language Model** output is an instance of [`ChatGroq`](https
|
||||
|
||||
Use the **Language Model** output when you want to use a Groq model as the LLM for another LLM-driven component, such as an **Agent** or **Smart Function** component.
|
||||
|
||||
For more information, see [**Language Model** components](/components-models).
|
||||
For more information, see [Language model components](/components-models).
|
||||
|
||||

|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ slug: /bundles-huggingface
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
The components in the **Hugging Face** bundle require access to Hugging Face APIs.
|
||||
|
||||
@ -22,7 +22,7 @@ Specifically, the **Language Model** output is an instance of [`HuggingFaceHub`]
|
||||
|
||||
Use the **Language Model** output when you want to use a Hugging Face model as the LLM for another LLM-driven component, such as an **Agent** or **Smart Function** component.
|
||||
|
||||
For more information, see [**Language Model** components](/components-models).
|
||||
For more information, see [Language model components](/components-models).
|
||||
|
||||
### Hugging Face text generation parameters
|
||||
|
||||
@ -45,7 +45,7 @@ Use the **Hugging Face Embeddings Inference** component to create embeddings wit
|
||||
The component generates embeddings using [Hugging Face Inference API models](https://huggingface.co/models).
|
||||
Authentication is required when not using a local model.
|
||||
|
||||
For more information about using embedding model components in flows, see [**Embedding Model** components](/components-embedding-models) and [Use a local Hugging Face embeddings model](#local-hugging-face-model).
|
||||
For more information about using embedding model components in flows, see [Embedding model components](/components-embedding-models) and [Use a local Hugging Face embeddings model](#local-hugging-face-model).
|
||||
|
||||
### Hugging Face Embeddings Inference parameters
|
||||
|
||||
@ -65,9 +65,9 @@ To connect the local Hugging Face model to the **Hugging Face Embeddings Inferen
|
||||
|
||||
3. Replace the two **OpenAI Embeddings** components with **Hugging Face Embeddings Inference** components.
|
||||
|
||||
Make sure to reconnect the **Embedding Model** ports from each **Embeddings Inference** component to its corresponding **Astra DB** vector store component.
|
||||
Make sure to reconnect the **Embedding Model** ports from each **Embeddings Inference** component to its corresponding **Astra DB** component.
|
||||
|
||||
4. Configure the **Astra DB** vector store components to connect to your Astra organization, or replace both **Astra DB** vector store components with other [**Vector Store** components](/components-vector-stores).
|
||||
4. Configure the **Astra DB** components to connect to your Astra organization, or replace both **Astra DB** components with other vector store components.
|
||||
|
||||
5. Connect each **Hugging Face Embeddings Inference** component to your local inference model:
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ slug: /bundles-ibm
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
The **IBM** bundle provides access to IBM watsonx.ai models for text and embedding generation.
|
||||
These components require an IBM watsonx.ai deployment and watsonx API credentials.
|
||||
@ -45,7 +45,7 @@ You can use this component anywhere you need a language model in a flow.
|
||||
The **IBM watsonx.ai** component can output either a **Model Response** ([`Message`](/data-types#message)) or a **Language Model** ([`LanguageModel`](/data-types#languagemodel)).
|
||||
|
||||
Use the **Language Model** output when you want to use an IBM watsonx.ai model as the LLM for another LLM-driven component, such as an **Agent** or **Smart Function** component.
|
||||
For more information, see [**Language Model** components](/components-models).
|
||||
For more information, see [Language model components](/components-models).
|
||||
|
||||
The `LanguageModel` output from the **IBM watsonx.ai** component is an instance of [ChatWatsonx](https://python.langchain.com/docs/integrations/chat/ibm_watsonx/) configured according to the [component's parameters](#ibm-watsonxai-parameters).
|
||||
|
||||
@ -55,7 +55,7 @@ The **IBM watsonx.ai Embeddings** component uses the [supported foundation model
|
||||
|
||||
The output is [`Embeddings`](/data-types#embeddings) generated with [`WatsonxEmbeddings`](https://python.langchain.com/docs/integrations/text_embedding/ibm_watsonx/).
|
||||
|
||||
For more information about using embedding model components in flows, see [**Embedding Model** components](/components-embedding-models).
|
||||
For more information about using embedding model components in flows, see [Embedding model components](/components-embedding-models).
|
||||
|
||||

|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ slug: /bundles-icosacomputing
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
The **Icosa Computing** components require access to Icosa Computing services.
|
||||
For more information and to request access, see the [Icosa Computing site](https://www.icosacomputing.com/).
|
||||
|
||||
@ -5,7 +5,7 @@ slug: /bundles-langchain
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **LangChain** bundle.
|
||||
|
||||
@ -167,8 +167,11 @@ Other components in the **LangChain** bundle include the following:
|
||||
|
||||
## Legacy LangChain components
|
||||
|
||||
The following LangChain components are considered legacy.
|
||||
You can still use these components in your flows, but they are no longer maintained and they can be removed in future releases.
|
||||
import PartialLegacy from '@site/docs/_partial-legacy.mdx';
|
||||
|
||||
<PartialLegacy />
|
||||
|
||||
The following LangChain components are in legacy status:
|
||||
|
||||
* **Conversation Chain**
|
||||
* **LLM Checker Chain**
|
||||
|
||||
@ -6,7 +6,7 @@ slug: /bundles-lmstudio
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
The components in the **LM Studio** bundle let you use models from a local or hosted instance of LM Studio.
|
||||
Components can require authentication with an LM Studio API key. For information about LM Studio models, connections, and credentials, see the [LM Studio documentation](https://lmstudio.ai/docs).
|
||||
@ -19,7 +19,7 @@ It can output either a **Model Response** ([`Message`](/data-types#message)) or
|
||||
|
||||
Use the **Language Model** output when you want to use an LM Studio model as the LLM for another LLM-driven component, such as an **Agent** or **Smart Function** component.
|
||||
|
||||
For more information, see [**Language Model** components](/components-models).
|
||||
For more information, see [Language model components](/components-models).
|
||||
|
||||
### LM Studio text generation parameters
|
||||
|
||||
@ -41,7 +41,7 @@ For more information, see [**Language Model** components](/components-models).
|
||||
|
||||
The **LM Studio Embeddings** component generates embeddings using LM Studio models.
|
||||
|
||||
For more information about using embedding model components in flows, see [**Embedding Model** components](/components-embedding-models).
|
||||
For more information about using embedding model components in flows, see [Embedding model components](/components-embedding-models).
|
||||
|
||||
### LM Studio Embeddings parameters
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ slug: /bundles-maritalk
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **MariTalk** bundle.
|
||||
|
||||
@ -20,7 +20,7 @@ It can output either a **Model Response** ([`Message`](/data-types#message)) or
|
||||
|
||||
Use the **Language Model** output when you want to use a MariTalk model as the LLM for another LLM-driven component, such as an **Agent** or **Smart Function** component.
|
||||
|
||||
For more information, see [**Language Model** components](/components-models).
|
||||
For more information, see [Language model components](/components-models).
|
||||
|
||||
### MariTalk text generation parameters
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ slug: /bundles-mem0
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Mem0** bundle.
|
||||
|
||||
|
||||
60
docs/docs/Components/bundles-milvus.mdx
Normal file
60
docs/docs/Components/bundles-milvus.mdx
Normal file
@ -0,0 +1,60 @@
|
||||
---
|
||||
title: Milvus
|
||||
slug: /bundles-milvus
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
import PartialConditionalParams from '@site/docs/_partial-conditional-params.mdx';
|
||||
import PartialVectorSearchResults from '@site/docs/_partial-vector-search-results.mdx';
|
||||
import PartialVectorStoreInstance from '@site/docs/_partial-vector-store-instance.mdx';
|
||||
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Milvus** bundle.
|
||||
|
||||
## Milvus vector store
|
||||
|
||||
The **Milvus** component reads and writes to Milvus vector stores using an instance of `Milvus` vector store.
|
||||
|
||||
<details>
|
||||
<summary>About vector store instances</summary>
|
||||
|
||||
<PartialVectorStoreInstance />
|
||||
|
||||
</details>
|
||||
|
||||
<PartialVectorSearchResults />
|
||||
|
||||
:::tip
|
||||
For a tutorial using a vector database in a flow, see [Create a vector RAG chatbot](/chat-with-rag).
|
||||
:::
|
||||
|
||||
### Milvus vector store parameters
|
||||
|
||||
You can inspect a vector store component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it.
|
||||
|
||||
<PartialParams />
|
||||
|
||||
<PartialConditionalParams />
|
||||
|
||||
For information about accepted values and functionality, see the [Milvus documentation](https://milvus.io/docs) or inspect [component code](/concepts-components#component-code).
|
||||
|
||||
| Name | Type | Description |
|
||||
|-------------------------|---------------|--------------------------------------------------|
|
||||
| collection_name | String | Input parameter. Name of the Milvus collection. |
|
||||
| collection_description | String | Input parameter. Description of the Milvus collection. |
|
||||
| uri | String | Input parameter. Connection URI for Milvus. |
|
||||
| password | SecretString | Input parameter. Password for Milvus. |
|
||||
| username | SecretString | Input parameter. Username for Milvus. |
|
||||
| batch_size | Integer | Input parameter. Number of data to process in a single batch. |
|
||||
| search_query | String | Input parameter. Query for similarity search. |
|
||||
| ingest_data | Data | Input parameter. Data to be ingested into the vector store. |
|
||||
| embedding | Embeddings | Input parameter. Embedding function to use. |
|
||||
| number_of_results | Integer | Input parameter. Number of results to return in search. |
|
||||
| search_type | String | Input parameter. Type of search to perform. |
|
||||
| search_score_threshold | Float | Input parameter. Minimum similarity score for search results. |
|
||||
| search_filter | Dict | Input parameter. Metadata filters for search query. |
|
||||
| setup_mode | String | Input parameter. Configuration mode for setting up the vector store. |
|
||||
| vector_dimensions | Integer | Input parameter. Number of dimensions of the vectors. |
|
||||
| pre_delete_collection | Boolean | Input parameter. Whether to delete the collection before creating a new one. |
|
||||
@ -6,7 +6,7 @@ slug: /bundles-mistralai
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **MistralAI** bundle.
|
||||
|
||||
@ -20,7 +20,7 @@ It can output either a **Model Response** ([`Message`](/data-types#message)) or
|
||||
|
||||
Use the **Language Model** output when you want to use a MistralAI model as the LLM for another LLM-driven component, such as an **Agent** or **Smart Function** component.
|
||||
|
||||
For more information, see [**Language Model** components](/components-models).
|
||||
For more information, see [Language model components](/components-models).
|
||||
|
||||
### MistralAI text generation parameters
|
||||
|
||||
@ -44,7 +44,7 @@ For more information, see [**Language Model** components](/components-models).
|
||||
|
||||
The **MistralAI Embeddings** component generates embeddings using MistralAI models.
|
||||
|
||||
For more information about using embedding model components in flows, see [**Embedding Model** components](/components-embedding-models).
|
||||
For more information about using embedding model components in flows, see [Embedding model components](/components-embedding-models).
|
||||
|
||||
### MistralAI Embeddings parameters
|
||||
|
||||
|
||||
54
docs/docs/Components/bundles-mongodb.mdx
Normal file
54
docs/docs/Components/bundles-mongodb.mdx
Normal file
@ -0,0 +1,54 @@
|
||||
---
|
||||
title: MongoDB
|
||||
slug: /bundles-mongodb
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
import PartialConditionalParams from '@site/docs/_partial-conditional-params.mdx';
|
||||
import PartialVectorSearchResults from '@site/docs/_partial-vector-search-results.mdx';
|
||||
import PartialVectorStoreInstance from '@site/docs/_partial-vector-store-instance.mdx';
|
||||
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **MongoDB** bundle.
|
||||
|
||||
## MongoDB Atlas
|
||||
|
||||
The **MongoDB Atlas** component reads and writes to MongoDB Atlas vector stores using an instance of [`MongoDBAtlasVectorSearch`](https://python.langchain.com/docs/integrations/vectorstores/mongodb_atlas/).
|
||||
|
||||
<details>
|
||||
<summary>About vector store instances</summary>
|
||||
|
||||
<PartialVectorStoreInstance />
|
||||
|
||||
</details>
|
||||
|
||||
<PartialVectorSearchResults />
|
||||
|
||||
### MongoDB Atlas parameters
|
||||
|
||||
You can inspect a vector store component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it.
|
||||
|
||||
<PartialParams />
|
||||
|
||||
<PartialConditionalParams />
|
||||
|
||||
For information about accepted values and functionality, see the [MongoDB Atlas documentation](https://www.mongodb.com/docs/atlas/atlas-vector-search/tutorials/vector-search-quick-start/) or inspect [component code](/concepts-components#component-code).
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------------------------- | ------------ | ----------------------------------------- |
|
||||
| mongodb_atlas_cluster_uri | SecretString | Input parameter. The connection URI for your MongoDB Atlas cluster. Required. |
|
||||
| enable_mtls | Boolean | Input parameter. Enable mutual TLS authentication. Default: false. |
|
||||
| mongodb_atlas_client_cert | SecretString | Input parameter. Client certificate combined with private key for mTLS authentication. Required if mTLS is enabled. |
|
||||
| db_name | String | Input parameter. The name of the database to use. Required. |
|
||||
| collection_name | String | Input parameter. The name of the collection to use. Required. |
|
||||
| index_name | String | Input parameter. The name of the Atlas Search index, it should be a Vector Search. Required. |
|
||||
| insert_mode | String | Input parameter. How to insert new documents into the collection. The options are "append" or "overwrite". Default: "append". |
|
||||
| embedding | Embeddings | Input parameter. The embedding model to use. |
|
||||
| number_of_results | Integer | Input parameter. Number of results to return in similarity search. Default: 4. |
|
||||
| index_field | String | Input parameter. The field to index. Default: "embedding". |
|
||||
| filter_field | String | Input parameter. The field to filter the index. |
|
||||
| number_dimensions | Integer | Input parameter. Embedding vector dimension count. Default: 1536. |
|
||||
| similarity | String | Input parameter. The method used to measure similarity between vectors. The options are "cosine", "euclidean", or "dotProduct". Default: "cosine". |
|
||||
| quantization | String | Input parameter. Quantization reduces memory costs by converting 32-bit floats to smaller data types. The options are "scalar" or "binary". |
|
||||
@ -6,7 +6,7 @@ slug: /bundles-novita
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Novita** bundle.
|
||||
|
||||
@ -18,7 +18,7 @@ It can output either a **Model Response** ([`Message`](/data-types#message)) or
|
||||
|
||||
Use the **Language Model** output when you want to use a Novita model as the LLM for another LLM-driven component, such as a **Language Model** or **Smart Function** component.
|
||||
|
||||
For more information, see [**Language Model** components](/components-models).
|
||||
For more information, see [Language model components](/components-models).
|
||||
|
||||
### Novita AI parameters
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ slug: /bundles-nvidia
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **NVIDIA** bundle.
|
||||
|
||||
@ -32,7 +32,7 @@ For an example of this component in a flow, see [Integrate NVIDIA NIMs with Lang
|
||||
|
||||
The **NVIDIA Embeddings** component generates embeddings using [NVIDIA models](https://docs.nvidia.com).
|
||||
|
||||
For more information about using embedding model components in flows, see [**Embedding Model** components](/components-embedding-models).
|
||||
For more information about using embedding model components in flows, see [Embedding model components](/components-embedding-models).
|
||||
|
||||
### NVIDIA Embeddings parameters
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ slug: /bundles-ollama
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Ollama** bundle.
|
||||
|
||||
@ -32,7 +32,7 @@ To use the **Ollama** component in a flow, connect Langflow to your locally runn
|
||||
|
||||
5. Connect the **Ollama** component to other components in the flow, depending on how you want to use the model.
|
||||
|
||||
Language model components can output either a **Model Response** ([`Message`](/data-types#message)) or a **Language Model** ([`LanguageModel`](/data-types#languagemodel)). Use the **Language Model** output when you want to use an Ollama model as the LLM for another LLM-driven component, such as an **Agent** or **Smart Function** component. For more information, see [**Language Model** components](/components-models).
|
||||
Language model components can output either a **Model Response** ([`Message`](/data-types#message)) or a **Language Model** ([`LanguageModel`](/data-types#languagemodel)). Use the **Language Model** output when you want to use an Ollama model as the LLM for another LLM-driven component, such as an **Agent** or **Smart Function** component. For more information, see [Language model components](/components-models).
|
||||
|
||||
In the following example, the flow uses `LanguageModel` output to use an Ollama model as the LLM for an [**Agent** component](/components-agents).
|
||||
|
||||
@ -59,7 +59,7 @@ To use this component in a flow, connect Langflow to your locally running Ollama
|
||||
Available parameters depend on the selected model.
|
||||
|
||||
5. Connect the **Ollama Embeddings** component to other components in the flow.
|
||||
For more information about using embedding model components in flows, see [**Embedding Model** components](/components-embedding-models).
|
||||
For more information about using embedding model components in flows, see [Embedding model components](/components-embedding-models).
|
||||
|
||||
This example connects the **Ollama Embeddings** component to generate embeddings for text chunks extracted from a PDF file, and then stores the embeddings and chunks in a Chroma DB vector store.
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ slug: /bundles-openai
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **OpenAI** bundle.
|
||||
|
||||
@ -22,7 +22,7 @@ It can output either a **Model Response** ([`Message`](/data-types#message)) or
|
||||
|
||||
Use the **Language Model** output when you want to use a specific OpenAI model configuration as the LLM for another LLM-driven component, such as an **Agent** or **Smart Function** component.
|
||||
|
||||
For more information, see [**Language Model** components](/components-models).
|
||||
For more information, see [Language model components](/components-models).
|
||||
|
||||
### OpenAI text generation parameters
|
||||
|
||||
@ -44,7 +44,7 @@ The **OpenAI Embeddings** component uses [OpenAI embedding models](https://platf
|
||||
|
||||
It provides access to the same OpenAI models that are available in the core **Embedding Model** component, but the **OpenAI Embeddings** component provides additional parameters for customizing the request to the OpenAI embedding API.
|
||||
|
||||
For more information about using embedding model components in flows, see [**Embedding Model** components](/components-embedding-models).
|
||||
For more information about using embedding model components in flows, see [Embedding model components](/components-embedding-models).
|
||||
|
||||
### OpenAI Embeddings parameters
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ slug: /bundles-openrouter
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **OpenRouter** bundle.
|
||||
|
||||
@ -20,7 +20,7 @@ It can output either a **Model Response** ([`Message`](/data-types#message)) or
|
||||
|
||||
Use the **Language Model** output when you want to use an OpenRouter model as the LLM for another LLM-driven component, such as an **Agent** or **Smart Function** component.
|
||||
|
||||
For more information, see [**Language Model** components](/components-models).
|
||||
For more information, see [Language model components](/components-models).
|
||||
|
||||
### OpenRouter text generation parameters
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ slug: /bundles-perplexity
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Perplexity** bundle.
|
||||
|
||||
@ -20,7 +20,7 @@ It can output either a **Model Response** ([`Message`](/data-types#message)) or
|
||||
|
||||
Use the **Language Model** output when you want to use a Perplexity model as the LLM for another LLM-driven component, such as an **Agent** or **Smart Function** component.
|
||||
|
||||
For more information, see [**Language Model** components](/components-models).
|
||||
For more information, see [Language model components](/components-models).
|
||||
|
||||
### Perplexity text generation parameters
|
||||
|
||||
|
||||
50
docs/docs/Components/bundles-pgvector.mdx
Normal file
50
docs/docs/Components/bundles-pgvector.mdx
Normal file
@ -0,0 +1,50 @@
|
||||
---
|
||||
title: pgvector
|
||||
slug: /bundles-pgvector
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
import PartialConditionalParams from '@site/docs/_partial-conditional-params.mdx';
|
||||
import PartialVectorSearchResults from '@site/docs/_partial-vector-search-results.mdx';
|
||||
import PartialVectorStoreInstance from '@site/docs/_partial-vector-store-instance.mdx';
|
||||
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **pgvector** bundle.
|
||||
|
||||
## pgvector vector store
|
||||
|
||||
The **PGVector** component reads and writes to PostgreSQL vector stores using an instance of [`PGVector`](https://python.langchain.com/docs/integrations/vectorstores/pgvector/).
|
||||
|
||||
<details>
|
||||
<summary>About vector store instances</summary>
|
||||
|
||||
<PartialVectorStoreInstance />
|
||||
|
||||
</details>
|
||||
|
||||
<PartialVectorSearchResults />
|
||||
|
||||
:::tip
|
||||
For a tutorial using a vector database in a flow, see [Create a vector RAG chatbot](/chat-with-rag).
|
||||
:::
|
||||
|
||||
### pgvector vector store parameters
|
||||
|
||||
You can inspect a vector store component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it.
|
||||
|
||||
<PartialParams />
|
||||
|
||||
<PartialConditionalParams />
|
||||
|
||||
For information about accepted values and functionality, see the [PGVector documentation](https://github.com/pgvector/pgvector) or inspect [component code](/concepts-components#component-code).
|
||||
|
||||
| Name | Type | Description |
|
||||
| --------------- | ------------ | ----------------------------------------- |
|
||||
| pg_server_url | SecretString | Input parameter. The PostgreSQL server connection string. |
|
||||
| collection_name | String | Input parameter. The table name for the vector store. |
|
||||
| search_query | String | Input parameter. The query for similarity search. |
|
||||
| ingest_data | Data | Input parameter. The data to be ingested into the vector store. |
|
||||
| embedding | Embeddings | Input parameter. The embedding function to use. |
|
||||
| number_of_results | Integer | Input parameter. The number of results to return in search. |
|
||||
53
docs/docs/Components/bundles-pinecone.mdx
Normal file
53
docs/docs/Components/bundles-pinecone.mdx
Normal file
@ -0,0 +1,53 @@
|
||||
---
|
||||
title: Pinecone
|
||||
slug: /bundles-pinecone
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
import PartialConditionalParams from '@site/docs/_partial-conditional-params.mdx';
|
||||
import PartialVectorSearchResults from '@site/docs/_partial-vector-search-results.mdx';
|
||||
import PartialVectorStoreInstance from '@site/docs/_partial-vector-store-instance.mdx';
|
||||
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Pinecone** bundle.
|
||||
|
||||
## Pinecone vector store
|
||||
|
||||
The **Pinecone** component reads and writes to Pinecone vector stores using an instance of `PineconeVectorStore`.
|
||||
|
||||
<details>
|
||||
<summary>About vector store instances</summary>
|
||||
|
||||
<PartialVectorStoreInstance />
|
||||
|
||||
</details>
|
||||
|
||||
<PartialVectorSearchResults />
|
||||
|
||||
:::tip
|
||||
For a tutorial using a vector database in a flow, see [Create a vector RAG chatbot](/chat-with-rag).
|
||||
:::
|
||||
|
||||
### Pinecone vector store parameters
|
||||
|
||||
You can inspect a vector store component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it.
|
||||
|
||||
<PartialParams />
|
||||
|
||||
<PartialConditionalParams />
|
||||
|
||||
For information about accepted values and functionality, see the [Pinecone documentation](https://docs.pinecone.io/home) or inspect [component code](/concepts-components#component-code).
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----------------- | ------------ | ----------------------------------------- |
|
||||
| index_name | String | Input parameter. The name of the Pinecone index. |
|
||||
| namespace | String | Input parameter. The namespace for the index. |
|
||||
| distance_strategy | String | Input parameter. The strategy for calculating distance between vectors. |
|
||||
| pinecone_api_key | SecretString | Input parameter. The API key for Pinecone. |
|
||||
| text_key | String | Input parameter. The key in the record to use as text. |
|
||||
| search_query | String | Input parameter. The query for similarity search. |
|
||||
| ingest_data | Data | Input parameter. The data to be ingested into the vector store. |
|
||||
| embedding | Embeddings | Input parameter. The embedding function to use. |
|
||||
| number_of_results | Integer | Input parameter. The number of results to return in search. |
|
||||
60
docs/docs/Components/bundles-qdrant.mdx
Normal file
60
docs/docs/Components/bundles-qdrant.mdx
Normal file
@ -0,0 +1,60 @@
|
||||
---
|
||||
title: Qdrant
|
||||
slug: /bundles-qdrant
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
import PartialConditionalParams from '@site/docs/_partial-conditional-params.mdx';
|
||||
import PartialVectorSearchResults from '@site/docs/_partial-vector-search-results.mdx';
|
||||
import PartialVectorStoreInstance from '@site/docs/_partial-vector-store-instance.mdx';
|
||||
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Qdrant** bundle.
|
||||
|
||||
## Qdrant vector store
|
||||
|
||||
The **Qdrant** component reads and writes to Qdrant vector stores using an instance of `QdrantVectorStore`.
|
||||
|
||||
<details>
|
||||
<summary>About vector store instances</summary>
|
||||
|
||||
<PartialVectorStoreInstance />
|
||||
|
||||
</details>
|
||||
|
||||
<PartialVectorSearchResults />
|
||||
|
||||
:::tip
|
||||
For a tutorial using a vector database in a flow, see [Create a vector RAG chatbot](/chat-with-rag).
|
||||
:::
|
||||
|
||||
### Qdrant vector store parameters
|
||||
|
||||
You can inspect a vector store component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it.
|
||||
|
||||
<PartialParams />
|
||||
|
||||
<PartialConditionalParams />
|
||||
|
||||
For information about accepted values and functionality, see the [Qdrant documentation](https://qdrant.tech/documentation/) or inspect [component code](/concepts-components#component-code).
|
||||
|
||||
| Name | Type | Description |
|
||||
| -------------------- | ------------ | ----------------------------------------- |
|
||||
| collection_name | String | Input parameter. The name of the Qdrant collection. |
|
||||
| host | String | Input parameter. The Qdrant server host. |
|
||||
| port | Integer | Input parameter. The Qdrant server port. |
|
||||
| grpc_port | Integer | Input parameter. The Qdrant gRPC port. |
|
||||
| api_key | SecretString | Input parameter. The API key for Qdrant. |
|
||||
| prefix | String | Input parameter. The prefix for Qdrant. |
|
||||
| timeout | Integer | Input parameter. The timeout for Qdrant operations. |
|
||||
| path | String | Input parameter. The path for Qdrant. |
|
||||
| url | String | Input parameter. The URL for Qdrant. |
|
||||
| distance_func | String | Input parameter. The distance function for vector similarity. |
|
||||
| content_payload_key | String | Input parameter. The content payload key. |
|
||||
| metadata_payload_key | String | Input parameter. The metadata payload key. |
|
||||
| search_query | String | Input parameter. The query for similarity search. |
|
||||
| ingest_data | Data | Input parameter. The data to be ingested into the vector store. |
|
||||
| embedding | Embeddings | Input parameter. The embedding function to use. |
|
||||
| number_of_results | Integer | Input parameter. The number of results to return in search. |
|
||||
@ -6,7 +6,7 @@ slug: /bundles-redis
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Redis** bundle.
|
||||
|
||||
@ -34,4 +34,44 @@ For more information about using external chat memory in flows, see the [**Messa
|
||||
|
||||
## Redis vector store
|
||||
|
||||
See [**Redis** vector store component](/components-vector-stores#redis).
|
||||
The **Redis** vector store component reads and writes to Redis vector stores using an instance of [`RedisVectorStore`](https://python.langchain.com/docs/integrations/vectorstores/redis/).
|
||||
|
||||
<details>
|
||||
<summary>About vector store instances</summary>
|
||||
|
||||
import PartialVectorStoreInstance from '@site/docs/_partial-vector-store-instance.mdx';
|
||||
|
||||
<PartialVectorStoreInstance />
|
||||
|
||||
</details>
|
||||
|
||||
import PartialVectorSearchResults from '@site/docs/_partial-vector-search-results.mdx';
|
||||
|
||||
<PartialVectorSearchResults />
|
||||
|
||||
:::tip
|
||||
For a tutorial using a vector database in a flow, see [Create a vector RAG chatbot](/chat-with-rag).
|
||||
:::
|
||||
|
||||
### Redis vector store parameters
|
||||
|
||||
You can inspect a vector store component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it.
|
||||
|
||||
<PartialParams />
|
||||
|
||||
import PartialConditionalParams from '@site/docs/_partial-conditional-params.mdx';
|
||||
|
||||
<PartialConditionalParams />
|
||||
|
||||
For information about accepted values and functionality, see the [Redis documentation](https://redis.io/docs/latest/develop/interact/search-and-query/advanced-concepts/vectors/) or inspect [component code](/concepts-components#component-code).
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----------------- | ------------ | ----------------------------------------- |
|
||||
| redis_server_url | SecretString | Input parameter. The Redis server connection string. |
|
||||
| redis_index_name | String | Input parameter. The name of the Redis index. |
|
||||
| code | String | Input parameter. Additional custom code for Redis, if supported. |
|
||||
| schema | String | Input parameter. The schema for Redis index. |
|
||||
| ingest_data | Data | Input parameter. The data to be ingested into the vector store. |
|
||||
| search_query | String | Input parameter. The query for similarity search. |
|
||||
| embedding | Embeddings | Input parameter. The embedding function to use. |
|
||||
| number_of_results | Integer | Input parameter. The number of results to return in search. |
|
||||
@ -6,7 +6,7 @@ slug: /bundles-sambanova
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **SambaNova** bundle.
|
||||
|
||||
@ -20,7 +20,7 @@ It can output either a **Model Response** ([`Message`](/data-types#message)) or
|
||||
|
||||
Use the **Language Model** output when you want to use a SambaNova model as the LLM for another LLM-driven component, such as an **Agent** or **Smart Function** component.
|
||||
|
||||
For more information, see [**Language Model** components](/components-models).
|
||||
For more information, see [Language model components](/components-models).
|
||||
|
||||
### SambaNova text generation parameters
|
||||
|
||||
|
||||
@ -3,9 +3,10 @@ title: SearchApi
|
||||
slug: /bundles-searchapi
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **SearchApi** bundle.
|
||||
|
||||
|
||||
33
docs/docs/Components/bundles-serper.mdx
Normal file
33
docs/docs/Components/bundles-serper.mdx
Normal file
@ -0,0 +1,33 @@
|
||||
---
|
||||
title: Serper
|
||||
slug: /bundles-serper
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Serper** bundle.
|
||||
|
||||
For more information, see the [Serper documentation](https://serper.dev/).
|
||||
|
||||
## Serper Google Search API
|
||||
|
||||
This component allows you to call the Serper.dev Google Search API.
|
||||
|
||||
It returns a list of search results as a [`DataFrame`](/data-types#dataframe).
|
||||
|
||||
### Google Serper API parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| **Serper API Key** (`serper_api_key`) | SecretString | Input parameter. An API key for Serper.dev API authentication. |
|
||||
| **Input Value** (`input_value`) | String | Input parameter. The search query input. |
|
||||
| **Number of Results** (`k`) | Integer | Input parameter. The number of search results to return. |
|
||||
|
||||
## See also
|
||||
|
||||
* [**Web Search** component](/components-data#web-search)
|
||||
* [**Google** bundle](/bundles-google)
|
||||
* [**Bing** bundle](/bundles-bing)
|
||||
* [**DuckDuckGo** bundle](/bundles-duckduckgo)
|
||||
52
docs/docs/Components/bundles-supabase.mdx
Normal file
52
docs/docs/Components/bundles-supabase.mdx
Normal file
@ -0,0 +1,52 @@
|
||||
---
|
||||
title: Supabase
|
||||
slug: /bundles-supabase
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
import PartialConditionalParams from '@site/docs/_partial-conditional-params.mdx';
|
||||
import PartialVectorSearchResults from '@site/docs/_partial-vector-search-results.mdx';
|
||||
import PartialVectorStoreInstance from '@site/docs/_partial-vector-store-instance.mdx';
|
||||
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Supabase** bundle.
|
||||
|
||||
## Supabase vector store
|
||||
|
||||
The **Supabase** component reads and writes to Supabase vector stores using an instance of `SupabaseVectorStore`.
|
||||
|
||||
<details>
|
||||
<summary>About vector store instances</summary>
|
||||
|
||||
<PartialVectorStoreInstance />
|
||||
|
||||
</details>
|
||||
|
||||
<PartialVectorSearchResults />
|
||||
|
||||
:::tip
|
||||
For a tutorial using a vector database in a flow, see [Create a vector RAG chatbot](/chat-with-rag).
|
||||
:::
|
||||
|
||||
### Supabase vector store parameters
|
||||
|
||||
You can inspect a vector store component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it.
|
||||
|
||||
<PartialParams />
|
||||
|
||||
<PartialConditionalParams />
|
||||
|
||||
For information about accepted values and functionality, see the [Supabase documentation](https://supabase.com/docs/guides/ai) or inspect [component code](/concepts-components#component-code).
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------------------- | ------------ | ----------------------------------------- |
|
||||
| supabase_url | String | Input parameter. The URL of the Supabase instance. |
|
||||
| supabase_service_key| SecretString | Input parameter. The service key for Supabase authentication. |
|
||||
| table_name | String | Input parameter. The name of the table in Supabase. |
|
||||
| query_name | String | Input parameter. The name of the query to use. |
|
||||
| search_query | String | Input parameter. The query for similarity search. |
|
||||
| ingest_data | Data | Input parameter. The data to be ingested into the vector store. |
|
||||
| embedding | Embeddings | Input parameter. The embedding function to use. |
|
||||
| number_of_results | Integer | Input parameter. The number of results to return in search. |
|
||||
53
docs/docs/Components/bundles-upstash.mdx
Normal file
53
docs/docs/Components/bundles-upstash.mdx
Normal file
@ -0,0 +1,53 @@
|
||||
---
|
||||
title: Upstash
|
||||
slug: /bundles-upstash
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
import PartialConditionalParams from '@site/docs/_partial-conditional-params.mdx';
|
||||
import PartialVectorSearchResults from '@site/docs/_partial-vector-search-results.mdx';
|
||||
import PartialVectorStoreInstance from '@site/docs/_partial-vector-store-instance.mdx';
|
||||
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Upstash** bundle.
|
||||
|
||||
## Upstash vector store
|
||||
|
||||
The **Upstash** component reads and writes to Upstash vector stores using an instance of `UpstashVectorStore`.
|
||||
|
||||
<details>
|
||||
<summary>About vector store instances</summary>
|
||||
|
||||
<PartialVectorStoreInstance />
|
||||
|
||||
</details>
|
||||
|
||||
<PartialVectorSearchResults />
|
||||
|
||||
:::tip
|
||||
For a tutorial using a vector database in a flow, see [Create a vector RAG chatbot](/chat-with-rag).
|
||||
:::
|
||||
|
||||
### Upstash vector store parameters
|
||||
|
||||
You can inspect a vector store component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it.
|
||||
|
||||
<PartialParams />
|
||||
|
||||
<PartialConditionalParams />
|
||||
|
||||
For information about accepted values and functionality, see the [Upstash documentation](https://upstash.com/docs/introduction) or inspect [component code](/concepts-components#component-code).
|
||||
|
||||
| Name | Type | Description |
|
||||
| --------------- | ------------ | ----------------------------------------- |
|
||||
| index_url | String | Input parameter. The URL of the Upstash index. |
|
||||
| index_token | SecretString | Input parameter. The token for the Upstash index. |
|
||||
| text_key | String | Input parameter. The key in the record to use as text. |
|
||||
| namespace | String | Input parameter. The namespace for the index. |
|
||||
| search_query | String | Input parameter. The query for similarity search. |
|
||||
| metadata_filter | String | Input parameter. Filter documents by metadata. |
|
||||
| ingest_data | Data | Input parameter. The data to be ingested into the vector store. |
|
||||
| embedding | Embeddings | Input parameter. The embedding function to use. |
|
||||
| number_of_results | Integer | Input parameter. The number of results to return in search. |
|
||||
60
docs/docs/Components/bundles-vectara.mdx
Normal file
60
docs/docs/Components/bundles-vectara.mdx
Normal file
@ -0,0 +1,60 @@
|
||||
---
|
||||
title: Vectara
|
||||
slug: /bundles-vectara
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
import PartialConditionalParams from '@site/docs/_partial-conditional-params.mdx';
|
||||
import PartialVectorSearchResults from '@site/docs/_partial-vector-search-results.mdx';
|
||||
import PartialVectorStoreInstance from '@site/docs/_partial-vector-store-instance.mdx';
|
||||
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Vectara** bundle.
|
||||
|
||||
## Vectara vector store
|
||||
|
||||
The **Vectara** component reads and writes to Vectara vector stores using an instance of `Vectara` vector store.
|
||||
|
||||
<details>
|
||||
<summary>About vector store instances</summary>
|
||||
|
||||
<PartialVectorStoreInstance />
|
||||
|
||||
</details>
|
||||
|
||||
<PartialVectorSearchResults />
|
||||
|
||||
### Vectara vector store parameters
|
||||
|
||||
You can inspect a vector store component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it.
|
||||
|
||||
<PartialParams />
|
||||
|
||||
<PartialConditionalParams />
|
||||
|
||||
For information about accepted values and functionality, see the [Vectara documentation](https://docs.vectara.com/docs/) or inspect [component code](/concepts-components#component-code).
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---------------- | ------------ | ----------------------------------------- |
|
||||
| vectara_customer_id | String | Input parameter. The Vectara customer ID. |
|
||||
| vectara_corpus_id | String | Input parameter. The Vectara corpus ID. |
|
||||
| vectara_api_key | SecretString | Input parameter. The Vectara API key. |
|
||||
| embedding | Embeddings | Input parameter. The embedding function to use (optional). |
|
||||
| ingest_data | List[Document/Data] | Input parameter. The data to be ingested into the vector store. |
|
||||
| search_query | String | Input parameter. The query for similarity search. |
|
||||
| number_of_results | Integer | Input parameter. The number of results to return in search. |
|
||||
|
||||
## Vectara RAG
|
||||
|
||||
This component enables Vectara's full end-to-end RAG capabilities with reranking options.
|
||||
|
||||
This component uses a `Vectara` vector store to execute the vector search and reranking functions, and then outputs an **Answer** string in [`Message`](/data-types#message) format.
|
||||
|
||||
<details>
|
||||
<summary>About vector store instances</summary>
|
||||
|
||||
<PartialVectorStoreInstance />
|
||||
|
||||
</details>
|
||||
@ -6,7 +6,7 @@ slug: /bundles-vertexai
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Vertex AI** bundle.
|
||||
|
||||
@ -22,7 +22,7 @@ It can output either a **Model Response** ([`Message`](/data-types#message)) or
|
||||
|
||||
Use the **Language Model** output when you want to use a Vertex AI model as the LLM for another LLM-driven component, such as an **Agent** or **Smart Function** component.
|
||||
|
||||
For more information, see [**Language Model** components](/components-models).
|
||||
For more information, see [Language model components](/components-models).
|
||||
|
||||
### Vertex AI text generation parameters
|
||||
|
||||
@ -47,7 +47,7 @@ For more information about Vertex AI text generation parameters, see the [Vertex
|
||||
|
||||
The **Vertex AI Embeddings** component is a wrapper around the [Google Vertex AI Embeddings API](https://cloud.google.com/vertex-ai/docs/generative-ai/embeddings/get-text-embeddings) for embedding generation.
|
||||
|
||||
For more information about using embedding model components in flows, see [**Embedding Model** components](/components-embedding-models).
|
||||
For more information about using embedding model components in flows, see [Embedding model components](/components-embedding-models).
|
||||
|
||||
### Vertex AI Embeddings parameters
|
||||
|
||||
|
||||
53
docs/docs/Components/bundles-weaviate.mdx
Normal file
53
docs/docs/Components/bundles-weaviate.mdx
Normal file
@ -0,0 +1,53 @@
|
||||
---
|
||||
title: Weaviate
|
||||
slug: /bundles-weaviate
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
import PartialConditionalParams from '@site/docs/_partial-conditional-params.mdx';
|
||||
import PartialVectorSearchResults from '@site/docs/_partial-vector-search-results.mdx';
|
||||
import PartialVectorStoreInstance from '@site/docs/_partial-vector-store-instance.mdx';
|
||||
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Weaviate** bundle.
|
||||
|
||||
## Weaviate vector store
|
||||
|
||||
The **Weaviate** component reads and writes to Weaviate vector stores using an instance of `Weaviate` vector store.
|
||||
|
||||
<details>
|
||||
<summary>About vector store instances</summary>
|
||||
|
||||
<PartialVectorStoreInstance />
|
||||
|
||||
</details>
|
||||
|
||||
<PartialVectorSearchResults />
|
||||
|
||||
:::tip
|
||||
For a tutorial using a vector database in a flow, see [Create a vector RAG chatbot](/chat-with-rag).
|
||||
:::
|
||||
|
||||
### Weaviate parameters
|
||||
|
||||
You can inspect a vector store component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it.
|
||||
|
||||
<PartialParams />
|
||||
|
||||
<PartialConditionalParams />
|
||||
|
||||
For information about accepted values and functionality, see the [Weaviate documentation](https://weaviate.io/developers/weaviate) or inspect [component code](/concepts-components#component-code).
|
||||
|
||||
| Name | Type | Description |
|
||||
|---------------|--------------|-------------------------------------------|
|
||||
| weaviate_url | String | Input parameter. The default instance URL. |
|
||||
| api_key | SecretString | Input parameter. The optional API key for authentication. |
|
||||
| index_name | String | Input parameter. The optional index name. |
|
||||
| text_key | String | Input parameter. The default text extraction key. |
|
||||
| input | Data or DataFrame | Input parameter. The document or record. |
|
||||
| cache_vector_store | Cache Vector Store | Input parameter. If true, the component caches the vector store in memory for faster reads. Default: Enabled (true). |
|
||||
| embedding | Embeddings | Input parameter. Connect an [embedding model component](/components-embedding-models). |
|
||||
| number_of_results | Integer | Input parameter. The number of search results to return. Default: `4`. |
|
||||
| search_by_text | Boolean | Input parameter. Indicates whether to search by text. Default: Disabled (false). |
|
||||
@ -6,7 +6,7 @@ slug: /bundles-wikipedia
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Wikipedia** bundle.
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ slug: /bundles-xai
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **xAI** bundle.
|
||||
|
||||
@ -20,7 +20,7 @@ It can output either a **Model Response** ([`Message`](/data-types#message)) or
|
||||
|
||||
Use the **Language Model** output when you want to use an xAI model as the LLM for another LLM-driven component, such as an **Agent** or **Smart Function** component.
|
||||
|
||||
For more information, see [**Language Model** components](/components-models).
|
||||
For more information, see [Language model components](/components-models).
|
||||
|
||||
### xAI text generation parameters
|
||||
|
||||
|
||||
@ -50,113 +50,6 @@ For more information, see [Use Langflow as an MCP client](/mcp-client) and [Use
|
||||
|
||||
</details>
|
||||
|
||||
## Legacy Agent components
|
||||
|
||||
The following components are legacy components.
|
||||
You can still use these components in your flows, but they are no longer maintained and they can be removed in future releases.
|
||||
|
||||
Replace these components with the **Agent** component or other Langflow components, depending on your use case.
|
||||
|
||||
* **CrewAI Hierarchical Task**
|
||||
* **CrewAI Sequential Task**
|
||||
|
||||
<details>
|
||||
<summary>CrewAI Agent</summary>
|
||||
|
||||
This component represents CrewAI agents, allowing for the creation of specialized AI agents with defined roles goals and capabilities within a crew.
|
||||
For more information, see the [CrewAI agents documentation](https://docs.crewai.com/core-concepts/Agents/).
|
||||
|
||||
This component accepts the following parameters:
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
| role | Role | Input parameter. The role of the agent. |
|
||||
| goal | Goal | Input parameter. The objective of the agent. |
|
||||
| backstory | Backstory | Input parameter. The backstory of the agent. |
|
||||
| tools | Tools | Input parameter. The tools at the agent's disposal. |
|
||||
| llm | Language Model | Input parameter. The language model that runs the agent. |
|
||||
| memory | Memory | Input parameter. This determines whether the agent should have memory or not. |
|
||||
| verbose | Verbose | Input parameter. This enables verbose output. |
|
||||
| allow_delegation | Allow Delegation | Input parameter. This determines whether the agent is allowed to delegate tasks to other agents. |
|
||||
| allow_code_execution | Allow Code Execution | Input parameter. This determines whether the agent is allowed to execute code. |
|
||||
| kwargs | kwargs | Input parameter. Additional keyword arguments for the agent. |
|
||||
| output | Agent | Output parameter. The constructed CrewAI Agent object. |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>CrewAI Hierarchical Crew</summary>
|
||||
|
||||
This component represents a group of agents managing how they should collaborate and the tasks they should perform in a hierarchical structure. This component allows for the creation of a crew with a manager overseeing the task execution.
|
||||
For more information, see the [CrewAI hierarchical crew documentation](https://docs.crewai.com/how-to/Hierarchical/).
|
||||
|
||||
It accepts the following parameters:
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
| agents | Agents | Input parameter. The list of Agent objects representing the crew members. |
|
||||
| tasks | Tasks | Input parameter. The list of HierarchicalTask objects representing the tasks to be executed. |
|
||||
| manager_llm | Manager LLM | Input parameter. The language model for the manager agent. |
|
||||
| manager_agent | Manager Agent | Input parameter. The specific agent to act as the manager. |
|
||||
| verbose | Verbose | Input parameter. This enables verbose output for detailed logging. |
|
||||
| memory | Memory | Input parameter. The memory configuration for the crew. |
|
||||
| use_cache | Use Cache | Input parameter. This enables caching of results. |
|
||||
| max_rpm | Max RPM | Input parameter. This sets the maximum requests per minute. |
|
||||
| share_crew | Share Crew | Input parameter. This determines if the crew information is shared among agents. |
|
||||
| function_calling_llm | Function Calling LLM | Input parameter. The language model for function calling. |
|
||||
| crew | Crew | Output parameter. The constructed Crew object with hierarchical task execution. |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>CrewAI Sequential Crew</summary>
|
||||
|
||||
This component represents a group of agents with tasks that are executed sequentially. This component allows for the creation of a crew that performs tasks in a specific order.
|
||||
For more information, see the [CrewAI sequential crew documentation](https://docs.crewai.com/how-to/Sequential/).
|
||||
|
||||
It accepts the following parameters:
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
| tasks | Tasks | Input parameter. The list of SequentialTask objects representing the tasks to be executed. |
|
||||
| verbose | Verbose | Input parameter. This enables verbose output for detailed logging. |
|
||||
| memory | Memory | Input parameter. The memory configuration for the crew. |
|
||||
| use_cache | Use Cache | Input parameter. This enables caching of results. |
|
||||
| max_rpm | Max RPM | Input parameter. This sets the maximum requests per minute. |
|
||||
| share_crew | Share Crew | Input parameter. This determines if the crew information is shared among agents. |
|
||||
| function_calling_llm | Function Calling LLM | Input parameter. The language model for function calling. |
|
||||
| crew | Crew | Output parameter. The constructed Crew object with sequential task execution. |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>CrewAI Sequential Task Agent</summary>
|
||||
|
||||
This component creates a CrewAI Task and its associated agent allowing for the definition of sequential tasks with specific agent roles and capabilities.
|
||||
For more information, see the [CrewAI sequential agents documentation](https://docs.crewai.com/how-to/Sequential/).
|
||||
|
||||
It accepts the following parameters:
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
| role | Role | Input parameter. The role of the agent. |
|
||||
| goal | Goal | Input parameter. The objective of the agent. |
|
||||
| backstory | Backstory | Input parameter. The backstory of the agent. |
|
||||
| tools | Tools | Input parameter. The tools at the agent's disposal. |
|
||||
| llm | Language Model | Input parameter. The language model that runs the agent. |
|
||||
| memory | Memory | Input parameter. This determines whether the agent should have memory or not. |
|
||||
| verbose | Verbose | Input parameter. This enables verbose output. |
|
||||
| allow_delegation | Allow Delegation | Input parameter. This determines whether the agent is allowed to delegate tasks to other agents. |
|
||||
| allow_code_execution | Allow Code Execution | Input parameter. This determines whether the agent is allowed to execute code. |
|
||||
| agent_kwargs | Agent kwargs | Input parameter. The additional kwargs for the agent. |
|
||||
| task_description | Task Description | Input parameter. The descriptive text detailing the task's purpose and execution. |
|
||||
| expected_output | Expected Task Output | Input parameter. The clear definition of the expected task outcome. |
|
||||
| async_execution | Async Execution | Input parameter. Boolean flag indicating asynchronous task execution. |
|
||||
| previous_task | Previous Task | Input parameter. The previous task in the sequence for chaining. |
|
||||
| task_output | Sequential Task | Output parameter. The list of SequentialTask objects representing the created tasks. |
|
||||
|
||||
</details>
|
||||
|
||||
## See also
|
||||
|
||||
* [**Message History** component](/components-helpers#message-history)
|
||||
|
||||
@ -4,10 +4,14 @@ slug: /components-bundle-components
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
Bundles contain custom components that support specific third-party integrations with Langflow.
|
||||
You add them to your flows and configure them in the same way as Langflow's core components.
|
||||
|
||||
To browse bundles, click <Icon name="Blocks" aria-hidden="true" /> **Bundles** in the visual editor.
|
||||
|
||||
## Bundle maintenance and documentation
|
||||
|
||||
Many bundled components are developed by third-party contributors to the Langflow codebase.
|
||||
@ -36,28 +40,207 @@ import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
:::tip
|
||||
The Langflow documentation doesn't list all bundles or components in bundles.
|
||||
For the most accurate and up-to-date list of bundles and components for your version of Langflow, check the **Components** menu in Langflow.
|
||||
For the most accurate and up-to-date list of bundles and components for your version of Langflow, check <Icon name="Blocks" aria-hidden="true" /> **Bundles** in the visual editor.
|
||||
|
||||
If you can't find a component that you used in an earlier version of Langflow, it may have been removed or marked as a [legacy component](#legacy-components).
|
||||
If you can't find a component that you used in an earlier version of Langflow, it may have been removed or marked as a [legacy component](#legacy-bundles).
|
||||
:::
|
||||
|
||||
Langflow offers core components in addition to third-party, provider-specific bundles.
|
||||
Langflow offers generic <Icon name="Component" aria-hidden="true" /> **Core components** in addition to third-party, provider-specific bundles.
|
||||
|
||||
Core components are meant to support a wide range of use cases and typically aren't tied to a specific provider.
|
||||
Exceptions include the [**Embedding Model** core component](/components-embedding-models), [**Language Model** core component](/components-models), and [**Vector Store** components](/components-vector-stores), which are integrated with one or more specific providers.
|
||||
|
||||
If you are looking for a specific service or integration, try searching the **Components** menu or browsing both the core components and bundles.
|
||||
If you are looking for a specific service or integration, you can <Icon name="Search" aria-hidden="true" /> **Search** components in the visual editor.
|
||||
|
||||
If all else fails, you can always create your own [custom components](/components-custom-components).
|
||||
|
||||
## Legacy components
|
||||
## Legacy bundles
|
||||
|
||||
Legacy components are no longer maintained and can be removed in a future release.
|
||||
import PartialLegacy from '@site/docs/_partial-legacy.mdx';
|
||||
|
||||
You can still use them in your flows, but you should replace them with non-legacy components as soon as possible.
|
||||
Components marked `[DEPRECATED]` should be replaced immediately.
|
||||
<PartialLegacy />
|
||||
|
||||
In the **Components** menu, you must enable the **Legacy components** toggle to view legacy components.
|
||||
The following bundles include only legacy components.
|
||||
|
||||
### CrewAI bundle
|
||||
|
||||
Replace the following legacy CrewAI components with other agentic components, such as the [**Agent** component](/components-agents).
|
||||
|
||||
<details>
|
||||
<summary>CrewAI Agent</summary>
|
||||
|
||||
This component represents CrewAI agents, allowing for the creation of specialized AI agents with defined roles goals and capabilities within a crew.
|
||||
For more information, see the [CrewAI agents documentation](https://docs.crewai.com/core-concepts/Agents/).
|
||||
|
||||
This component accepts the following parameters:
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
| role | Role | Input parameter. The role of the agent. |
|
||||
| goal | Goal | Input parameter. The objective of the agent. |
|
||||
| backstory | Backstory | Input parameter. The backstory of the agent. |
|
||||
| tools | Tools | Input parameter. The tools at the agent's disposal. |
|
||||
| llm | Language Model | Input parameter. The language model that runs the agent. |
|
||||
| memory | Memory | Input parameter. This determines whether the agent should have memory or not. |
|
||||
| verbose | Verbose | Input parameter. This enables verbose output. |
|
||||
| allow_delegation | Allow Delegation | Input parameter. This determines whether the agent is allowed to delegate tasks to other agents. |
|
||||
| allow_code_execution | Allow Code Execution | Input parameter. This determines whether the agent is allowed to execute code. |
|
||||
| kwargs | kwargs | Input parameter. Additional keyword arguments for the agent. |
|
||||
| output | Agent | Output parameter. The constructed CrewAI Agent object. |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>CrewAI Hierarchical Crew, CrewAI Hierarchical Task</summary>
|
||||
|
||||
The **CrewAI Hierarchical Crew** component represents a group of agents managing how they should collaborate and the tasks they should perform in a hierarchical structure. This component allows for the creation of a crew with a manager overseeing the task execution.
|
||||
For more information, see the [CrewAI hierarchical crew documentation](https://docs.crewai.com/how-to/Hierarchical/).
|
||||
|
||||
It accepts the following parameters:
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
| agents | Agents | Input parameter. The list of Agent objects representing the crew members. |
|
||||
| tasks | Tasks | Input parameter. The list of HierarchicalTask objects representing the tasks to be executed. |
|
||||
| manager_llm | Manager LLM | Input parameter. The language model for the manager agent. |
|
||||
| manager_agent | Manager Agent | Input parameter. The specific agent to act as the manager. |
|
||||
| verbose | Verbose | Input parameter. This enables verbose output for detailed logging. |
|
||||
| memory | Memory | Input parameter. The memory configuration for the crew. |
|
||||
| use_cache | Use Cache | Input parameter. This enables caching of results. |
|
||||
| max_rpm | Max RPM | Input parameter. This sets the maximum requests per minute. |
|
||||
| share_crew | Share Crew | Input parameter. This determines if the crew information is shared among agents. |
|
||||
| function_calling_llm | Function Calling LLM | Input parameter. The language model for function calling. |
|
||||
| crew | Crew | Output parameter. The constructed Crew object with hierarchical task execution. |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>CrewAI Sequential Crew, CrewAI Sequential Task</summary>
|
||||
|
||||
The **CrewAI Sequential Crew** component represents a group of agents with tasks that are executed sequentially. This component allows for the creation of a crew that performs tasks in a specific order.
|
||||
For more information, see the [CrewAI sequential crew documentation](https://docs.crewai.com/how-to/Sequential/).
|
||||
|
||||
It accepts the following parameters:
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
| tasks | Tasks | Input parameter. The list of SequentialTask objects representing the tasks to be executed. |
|
||||
| verbose | Verbose | Input parameter. This enables verbose output for detailed logging. |
|
||||
| memory | Memory | Input parameter. The memory configuration for the crew. |
|
||||
| use_cache | Use Cache | Input parameter. This enables caching of results. |
|
||||
| max_rpm | Max RPM | Input parameter. This sets the maximum requests per minute. |
|
||||
| share_crew | Share Crew | Input parameter. This determines if the crew information is shared among agents. |
|
||||
| function_calling_llm | Function Calling LLM | Input parameter. The language model for function calling. |
|
||||
| crew | Crew | Output parameter. The constructed Crew object with sequential task execution. |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>CrewAI Sequential Task Agent</summary>
|
||||
|
||||
This component creates a CrewAI Task and its associated agent allowing for the definition of sequential tasks with specific agent roles and capabilities.
|
||||
For more information, see the [CrewAI sequential agents documentation](https://docs.crewai.com/how-to/Sequential/).
|
||||
|
||||
It accepts the following parameters:
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
| role | Role | Input parameter. The role of the agent. |
|
||||
| goal | Goal | Input parameter. The objective of the agent. |
|
||||
| backstory | Backstory | Input parameter. The backstory of the agent. |
|
||||
| tools | Tools | Input parameter. The tools at the agent's disposal. |
|
||||
| llm | Language Model | Input parameter. The language model that runs the agent. |
|
||||
| memory | Memory | Input parameter. This determines whether the agent should have memory or not. |
|
||||
| verbose | Verbose | Input parameter. This enables verbose output. |
|
||||
| allow_delegation | Allow Delegation | Input parameter. This determines whether the agent is allowed to delegate tasks to other agents. |
|
||||
| allow_code_execution | Allow Code Execution | Input parameter. This determines whether the agent is allowed to execute code. |
|
||||
| agent_kwargs | Agent kwargs | Input parameter. The additional kwargs for the agent. |
|
||||
| task_description | Task Description | Input parameter. The descriptive text detailing the task's purpose and execution. |
|
||||
| expected_output | Expected Task Output | Input parameter. The clear definition of the expected task outcome. |
|
||||
| async_execution | Async Execution | Input parameter. Boolean flag indicating asynchronous task execution. |
|
||||
| previous_task | Previous Task | Input parameter. The previous task in the sequence for chaining. |
|
||||
| task_output | Sequential Task | Output parameter. The list of SequentialTask objects representing the created tasks. |
|
||||
|
||||
</details>
|
||||
|
||||
### Embeddings bundle
|
||||
|
||||
* **Embedding Similarity**: Replaced by built-in similarity search functionality in vector store components.
|
||||
* **Text Embedder**: Replaced by the embedding model components.
|
||||
|
||||
### Vector Stores bundle
|
||||
|
||||
This bundle contains only the legacy **Local DB** component.
|
||||
All other vector store components can be found within their respective provider-specific bundles, such as the [**DataStax** bundle](/bundles-datastax).
|
||||
|
||||
<details>
|
||||
<summary>Local DB</summary>
|
||||
|
||||
Replace the **Local DB** component with the **Chroma DB** vector store component (in the **Chroma** bundle) or another vector store component.
|
||||
|
||||
The **Local DB** component reads and writes to a persistent, in-memory Chroma DB instance intended for use with Langflow.
|
||||
It has separate modes for reads and writes, automatic collection management, and default persistence in your Langflow cache directory.
|
||||
|
||||

|
||||
|
||||
Set the **Mode** parameter to reflect the operation you want the component to perform, and then configure the other parameters accordingly.
|
||||
Some parameters are only available for one mode.
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="ingest" label="Ingest">
|
||||
|
||||
To create or write to your local Chroma vector store, use **Ingest** mode.
|
||||
|
||||
The following parameters are available in **Ingest** mode:
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| **Name Your Collection** (`collection_name`) | String | Input parameter. The name for your Chroma vector store collection. Default: `langflow`. Only available in **Ingest** mode. |
|
||||
| **Persist Directory** (`persist_directory`) | String | Input parameter. The base directory where you want to create and persist the vector store. If you use the **Local DB** component in multiple flows or to create multiple collections, collections are stored at `$PERSISTENT_DIRECTORY/vector_stores/$COLLECTION_NAME`. If not specified, the default location is your Langflow configuration directory. For more information, see [Memory management options](/memory). |
|
||||
| **Embedding** (`embedding`) | Embeddings | Input parameter. The embedding function to use for the vector store. |
|
||||
| **Allow Duplicates** (`allow_duplicates`) | Boolean | Input parameter. If true (default), writes don't check for existing duplicates in the collection, allowing you to store multiple copies of the same content. If false, writes won't add documents that match existing documents already present in the collection. If false, it can strictly enforce deduplication by searching the entire collection or only search the number of records, specified in `limit`. Only available in **Ingest** mode. |
|
||||
| **Ingest Data** (`ingest_data`) | Data or DataFrame | Input parameter. The records to write to the collection. Records are embedded and indexed for semantic search. Only available in **Ingest** mode. |
|
||||
| **Limit** (`limit`) | Integer | Input parameter. Limit the number of records to compare when **Allow Duplicates** is false. This can help improve performance when writing to large collections, but it can result in some duplicate records. Only available in **Ingest** mode. |
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="retrieve" label="Retrieve">
|
||||
|
||||
To read from your local Chroma vector store, use **Retrieve** mode.
|
||||
|
||||
The following parameters are available in **Retrieve** mode:
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| **Persist Directory** (`persist_directory`) | String | Input parameter. The base directory where you want to create and persist the vector store. If you use the **Local DB** component in multiple flows or to create multiple collections, collections are stored at `$PERSISTENT_DIRECTORY/vector_stores/$COLLECTION_NAME`. If not specified, the default location is your Langflow configuration directory. For more information, see [Memory management options](/memory). |
|
||||
| **Existing Collections** (`existing_collections`) | String | Input parameter. Select a previously-created collection to search. Only available in **Retrieve** mode. |
|
||||
| **Embedding** (`embedding`) | Embeddings | Input parameter. The embedding function to use for the vector store. |
|
||||
| **Search Type** (`search_type`) | String | Input parameter. The type of search to perform, either `Similarity` or `MMR`. Only available in **Retrieve** mode. |
|
||||
| **Search Query** (`search_query`) | String | Input parameter. Enter a query for similarity search. Only available in **Retrieve** mode. |
|
||||
| **Number of Results** (`number_of_results`) | Integer | Input parameter. Number of search results to return. Default: 10. Only available in **Retrieve** mode. |
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
</details>
|
||||
|
||||
### Zep bundle
|
||||
|
||||
<details>
|
||||
<summary>Zep Chat Memory</summary>
|
||||
|
||||
The **Zep Chat Memory** component is a legacy component.
|
||||
Replace this component with the [**Message History** component](/components-helpers#message-history).
|
||||
|
||||
This component creates a `ZepChatMessageHistory` instance, enabling storage and retrieval of chat messages using Zep, a memory server for LLMs.
|
||||
|
||||
It accepts the following parameters:
|
||||
|
||||
| Name | Type | Description |
|
||||
|---------------|---------------|-----------------------------------------------------------|
|
||||
| url | MessageText | Input parameter. The URL of the Zep instance. Required. |
|
||||
| api_key | SecretString | Input parameter. The API Key for authentication with the Zep instance. |
|
||||
| api_base_path | Dropdown | Input parameter. The API version to use. Options include api/v1 or api/v2. |
|
||||
| session_id | MessageText | Input parameter. The unique identifier for the chat session. Optional. |
|
||||
| message_history | BaseChatMessageHistory | Output parameter. An instance of ZepChatMessageHistory for the session. |
|
||||
|
||||
</details>
|
||||
|
||||
## See also
|
||||
|
||||
|
||||
@ -255,7 +255,7 @@ This is a Python package requirement that ensures the directory is treated as a
|
||||
|
||||
Components must be placed inside category folders, not directly in the base directory.
|
||||
|
||||
The category folder name determines where the component appears in the Langflow **Components** menu.
|
||||
The category folder name determines where the component appears in the Langflow <Icon name="Component" aria-hidden="true" /> **Core components** menu.
|
||||
For example, to add a component to the **Helpers** category, place it in the `helpers` subfolder:
|
||||
|
||||
```
|
||||
|
||||
@ -7,8 +7,9 @@ import Icon from "@site/src/components/icon";
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
import PartialDevModeWindows from '@site/docs/_partial-dev-mode-windows.mdx';
|
||||
|
||||
You can use Langflow's **Data** components to bring data into your flows from various sources like files, API endpoints, and URLs.
|
||||
Data components bring data into your flows from various sources like files, API endpoints, and URLs.
|
||||
For example:
|
||||
|
||||
* **Load files**: Import data from a file or directory with the [**File** component](#file) and [**Directory** component](#directory).
|
||||
@ -25,14 +26,14 @@ Additionally, some components return raw data, whereas others can convert, restr
|
||||
This means that some similar components might produce different results.
|
||||
|
||||
:::tip
|
||||
**Data** components pair well with [**Processing** components](/components-processing) that can perform additional parsing, transformation, and validation after retrieving the data.
|
||||
Data components pair well with [Processing components](/components-processing) that can perform additional parsing, transformation, and validation after retrieving the data.
|
||||
|
||||
This can include basic operations, like saving a file in a specific format, or more complex tasks, like using a **Text Splitter** component to break down a large document into smaller chunks before generating embeddings for vector search.
|
||||
:::
|
||||
|
||||
## Use Data components in flows
|
||||
|
||||
**Data** components are used often in flows because they offer a versatile way to perform common, basic functions.
|
||||
Data components are used often in flows because they offer a versatile way to perform common functions.
|
||||
|
||||
You can use these components to perform their base functions as isolated steps in your flow, or you can connect them to an **Agent** component as tools.
|
||||
|
||||
@ -62,7 +63,7 @@ You can enable additional request options and fields in the component's paramete
|
||||
|
||||
Returns a [`Data` object](/data-types#data) containing the response.
|
||||
|
||||
For provider-specific API components, see [Bundles](/components-bundle-components).
|
||||
For provider-specific API components, see <Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components).
|
||||
|
||||
### API Request parameters
|
||||
|
||||
@ -108,15 +109,15 @@ Outputs either a [`Data`](/data-types#data) or [`DataFrame`](/data-types#datafra
|
||||
## File
|
||||
|
||||
The **File** component loads and parses files, converts the content into a `Data`, `DataFrame`, or `Message` object.
|
||||
It supports multiple file types and provides parameters for parallel processing and error handling.
|
||||
It supports multiple file types, provides parameters for parallel processing and error handling, and supports advanced parsing with the Docling library.
|
||||
|
||||
You can add files to the **File** component in the visual editor or at runtime, and you can upload multiple files at once.
|
||||
For more information about uploading files and working with files in flows, see [File management](/concepts-file-management) and [Create a chatbot that can ingest files](/chat-with-files).
|
||||
|
||||
### File type and size limits
|
||||
|
||||
By default, the maximum file size is 100 MB.
|
||||
To modify this value, change the `--max-file-size-upload` [environment variable](/environment-variables).
|
||||
By default, the maximum file size is 1024 MB.
|
||||
To modify this value, change the `LANGFLOW_MAX_FILE_SIZE_UPLOAD` [environment variable](/environment-variables).
|
||||
|
||||
<details>
|
||||
<summary>Supported file types</summary>
|
||||
@ -154,7 +155,7 @@ If you need to load an unsupported file type, you must use a different component
|
||||
|
||||
For images, see [Upload images](/concepts-file-management#upload-images).
|
||||
|
||||
For videos, see the **Twelve Labs** and **YouTube** [bundles](/components-bundle-components) in the Langflow **Components** menu.
|
||||
For videos, see the **Twelve Labs** and **YouTube** <Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components).
|
||||
|
||||
### File parameters
|
||||
|
||||
@ -169,33 +170,109 @@ For videos, see the **Twelve Labs** and **YouTube** [bundles](/components-bundle
|
||||
| delete_server_file_after_processing | Delete Server File After Processing | Input parameter. If true (default), the **Server File Path** (`file_path`) is deleted after processing. |
|
||||
| ignore_unsupported_extensions | Ignore Unsupported Extensions | Input parameter. If enabled (true), files with unsupported extensions are accepted but not processed. If disabled (false), the **File** component either can throw an error if an unsupported file type is provided. The default is true. |
|
||||
| ignore_unspecified_files | Ignore Unspecified Files | Input parameter. If true, `Data` with no `file_path` property is ignored. If false (default), the component errors when a file isn't specified. |
|
||||
| concurrency_multithreading | Processing Concurrency | Input parameter. The number of files to process concurrently if multiple files are uploaded. Default is 1. Values greater than 1 enable parallel processing for 2 or more files. |
|
||||
| concurrency_multithreading | Processing Concurrency | Input parameter. The number of files to process concurrently if multiple files are uploaded. Default is 1. Values greater than 1 enable parallel processing for 2 or more files. Ignored for single-file uploads and advanced parsing. |
|
||||
| advanced_parser | Advanced Parser | Input parameter. If true, enables [advanced parsing](#advanced-parsing). Only available for single-file uploads of compatible file types. Default: Disabled (false). |
|
||||
|
||||
### Advanced parsing
|
||||
|
||||
Starting in Langflow version 1.6, the **File** component supports advanced document parsing using the [Docling](https://docling-project.github.io/docling/) library for supported file types.
|
||||
|
||||
To use advanced parsing, do the following:
|
||||
|
||||
1. Complete the following prerequisites, if applicable:
|
||||
|
||||
* **Install Langflow version 1.6 or later**: Earlier versions don't support advanced parsing with the **File** component. For upgrade guidance, see the [Release notes](/release-notes).
|
||||
|
||||
* **Install Docling dependency on macOS Intel (x86_64)**: The Docling dependency isn't installed by default for macOS Intel (x86_64). Use the [Docling installation guide](https://docling-project.github.io/docling/installation/) to install the Docling dependency.
|
||||
|
||||
For all other operating systems, the Docling dependency is installed by default.
|
||||
|
||||
* **Enable Developer Mode for Windows**:
|
||||
<PartialDevModeWindows />
|
||||
|
||||
Developer Mode isn't required for Langflow OSS on Windows.
|
||||
|
||||
2. Add one valid file to the **File** component.
|
||||
|
||||
:::info Advanced parsing limitations
|
||||
* Advanced parsing processes only one file.
|
||||
If you select multiple files, the **File** component processes the first file only, ignoring any additional files.
|
||||
To process multiple files with advanced parsing, pass each file to a separate **File** components, or use the dedicated [**Docling** components](/integrations-docling).
|
||||
|
||||
* Advanced parsing can process any of the **File** component's supported file types except `.csv`, `.xlsx`, and `.parquet` files because it is designed for document processing, such as extracting text from PDFs.
|
||||
For structured data analysis, use the [**Parser** component](/components-processing#parser).
|
||||
:::
|
||||
|
||||
3. Enable **Advanced Parsing**.
|
||||
|
||||
4. Click <Icon name="SlidersHorizontal" aria-hidden="true"/> **Controls** in the [component's header menu](/concepts-components#component-menus) to configure advanced parsing parameters, which are hidden by default:
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
| pipeline | Pipeline | Input parameter, advanced parsing. The Docling pipeline to use, either `standard` (default, recommended) or `vlm` (may produce inconsistent results). |
|
||||
| ocr_engine | OCR Engine | Input parameter, advanced parsing. The OCR parser to use if `pipeline` is `standard`. Options are `None` (default) or [`EasyOCR`](https://pypi.org/project/easyocr/). `None` means that no OCR engine is used, and this can produce inconsistent or broken results for some documents. This setting has no effect with the `vlm` pipeline. |
|
||||
| md_image_placeholder | Markdown Image Placeholder | Input parameter, advanced parsing. Defines the placeholder for image files if the output type is **Markdown**. Default: `<!-- image -->`. |
|
||||
| md_page_break_placeholder | Markdown Page Break Placeholder | Input parameter, advanced parsing. Defines the placeholder for page breaks if the output type is **Markdown**. Default: `""` (empty string). |
|
||||
| doc_key | Document Key | Input parameter, advanced parsing. The key to use for the `DoclingDocument` column, which holds the structured information extracted from the source document. See [Docling Document](https://docling-project.github.io/docling/concepts/docling_document/) for details. Default: `doc`. |
|
||||
|
||||
:::tip
|
||||
For additional Docling features, including other components and OCR parsers, use the [**Docling** bundle](/integrations-docling).
|
||||
:::
|
||||
|
||||
### File output
|
||||
|
||||
The output of the **File** component depends on the number and type of files loaded:
|
||||
The output of the **File** component depends on the number of files loaded and whether advanced parsing is enabled.
|
||||
If multiple options are available, you can set the output type near the component's output port.
|
||||
|
||||
- **No files**: Throws an error or, if **Silent Errors** is enabled, produces no output.
|
||||
<Tabs>
|
||||
<TabItem value="zero" label="No files">
|
||||
|
||||
- **One file**: Produces one of the following depending on the file type. If multiple types are available, you can select the output type by clicking the output field (near the component's output port).
|
||||
If you run the **File** component with no file selected, it throws an error, or, if **Silent Errors** is enabled, produces no output.
|
||||
|
||||
- **Structured Content**: Available for some tabular and structured data.
|
||||
For `.csv` files, produces a [`DataFrame`](/data-types#dataframe) representing the table data.
|
||||
For `.json` files, produces a [`Data`](/data-types#data) object with the parsed JSON data.
|
||||
- **Raw Content**: A [`Message`](/data-types#message) containing the file's raw text content.
|
||||
- **File Path**: A [`Message`](/data-types#message) containing the path to the file in [Langflow file management](/concepts-file-management).
|
||||
</TabItem>
|
||||
<TabItem value="one-false" label="One file without advanced parsing">
|
||||
|
||||
- **Multiple files**: Produces a **Files** [`DataFrame`](/data-types#dataframe) containing the content and metadata of all selected files.
|
||||
If advanced parsing is disabled and you upload one file, the following output types are available:
|
||||
|
||||
- **Structured Content**: Available only for `.csv`, `.xlsx`, `.parquet`, and `.json` files.
|
||||
|
||||
- For `.csv` files, produces a [`DataFrame`](/data-types#dataframe) representing the table data.
|
||||
- For `.json` files, produces a [`Data`](/data-types#data) object with the parsed JSON data.
|
||||
|
||||
- **Raw Content**: A [`Message`](/data-types#message) containing the file's raw text content.
|
||||
|
||||
- **File Path**: A [`Message`](/data-types#message) containing the path to the file in [Langflow file management](/concepts-file-management).
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="one-true" label="One file with advanced parsing">
|
||||
|
||||
If advanced parsing is enabled and you upload one file, the following output types are available:
|
||||
|
||||
- **Structured Output**: A [`DataFrame`](/data-types#dataframe) containing the Docling-processed document data with text elements, page numbers, and metadata.
|
||||
|
||||
- **Markdown**: A [`Message`](/data-types#message) containing the uploaded document contents in Markdown format with image placeholders.
|
||||
|
||||
- **File Path**: A [`Message`](/data-types#message) containing the path to the file in [Langflow file management](/concepts-file-management).
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="multi" label="Multiple files">
|
||||
|
||||
If you upload multiple files, the component outputs **Files**, which is a [`DataFrame`](/data-types#dataframe) containing the content and metadata of all selected files.
|
||||
|
||||
[Advanced parsing](#advanced-parsing) doesn't support multiple files; it processes only the first file.
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## News Search
|
||||
|
||||
The **News Search** component searches Google News through RSS, and then returns clean article data as a [`DataFrame`](/data-types#dataframe) containing article titles, links, publication dates, and summaries.
|
||||
The component's `clean_html` method parses the HTML content with the BeautifulSoup library, removes HTML markup, and strips whitespace to output clean data.
|
||||
|
||||
For other RSS feeds, use the [**RSS Reader** component](#rss-reader), and for other searches use the [**Web Search** component](#web-search) or a provider-specific [bundle](/components-bundle-components).
|
||||
For other RSS feeds, use the [**RSS Reader** component](#rss-reader), and for other searches use the [**Web Search** component](#web-search) or provider-specific <Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components).
|
||||
|
||||
When used as a standard component in a flow, the **News Search** component must be connected to a component that accepts `DataFrame` input.
|
||||
You can connect the **News Search** component directly to a compatible component, or you can use a [**Processing** component](/components-processing) to convert or extract data of a different type between components.
|
||||
You can connect the **News Search** component directly to a compatible component, or you can use a [Processing component](/components-processing) to convert or extract data of a different type between components.
|
||||
|
||||
When used in **Tool Mode** with an **Agent** component, the **News Search** component can be connected directly to the **Agent** component's **Tools** port without converting the data.
|
||||
The agent decides whether to use the **News Search** component based on the user's query, and it can process the `DataFrame` output directly.
|
||||
@ -220,7 +297,7 @@ The agent decides whether to use the **News Search** component based on the user
|
||||
The **RSS Reader** component fetches and parses RSS feeds from any valid RSS feed URL, and then returns the feed content as a [`DataFrame`](/data-types#dataframe) containing article titles, links, publication dates, and summaries.
|
||||
|
||||
When used as a standard component in a flow, the **RSS Reader** component must be connected to a component that accepts `DataFrame` input.
|
||||
You can connect the **RSS Reader** component directly to a compatible component, or you can use a [**Processing** component](/components-processing) to convert or extract data of a different type between components.
|
||||
You can connect the **RSS Reader** component directly to a compatible component, or you can use a [Processing component](/components-processing) to convert or extract data of a different type between components.
|
||||
|
||||
When used in **Tool Mode** with an **Agent** component, the **RSS Reader** component can be connected directly to the **Agent** component's **Tools** port without converting the data.
|
||||
The agent decides whether to use the **RSS Reader** component based on the user's query, and it can process the `DataFrame` output directly.
|
||||
@ -317,7 +394,7 @@ Instead, you only need to provide enough context for the agent to understand tha
|
||||
If you want to use a different model, edit the **Model Provider**, **Model Name**, and **API Key** fields accordingly.
|
||||
|
||||
If you need to execute highly specialized queries, consider selecting a model that is trained for tasks like advanced SQL queries.
|
||||
If your preferred model isn't in the **Agent** component's built-in model list, select the **Custom** model provider, and then use a [**Language Model** component](/components-models) to attach a specific model.
|
||||
If your preferred model isn't in the **Agent** component's built-in model list, set **Model Provider** to **Connect other models**, and then connect any [language model component](/components-models).
|
||||
|
||||
6. Connect the **SQL Database** component's **Toolset** output to the **Agent** component's **Tools** input.
|
||||
|
||||
@ -393,7 +470,7 @@ There are two settings that control the output of the **URL** component at diffe
|
||||
When used as a standard component in a flow, the **URL** component must be connected to a component that accepts the selected output data type (`DataFrame` or `Message`).
|
||||
You can connect the **URL** component directly to a compatible component, or you can use a [**Type Convert** component](/components-processing#type-convert) to convert the output to another type before passing the data to other components if the data types aren't directly compatible.
|
||||
|
||||
**Processing** components like the **Type Convert** component are useful with the **URL** component because it can extract a large amount of data from the crawled pages.
|
||||
Processing components like the **Type Convert** component are useful with the **URL** component because it can extract a large amount of data from the crawled pages.
|
||||
For example, if you only want to pass specific fields to other components, you can use a [**Parser** component](/components-processing#parser) to extract only that data from the crawled pages before passing the data to other components.
|
||||
|
||||
When used in **Tool Mode** with an **Agent** component, the **URL** component can be connected directly to the **Agent** component's **Tools** port without converting the data.
|
||||
@ -402,7 +479,7 @@ The agent decides whether to use the **URL** component based on the user's query
|
||||
## Web Search
|
||||
|
||||
The **Web Search** component performs a basic web search using DuckDuckGo's HTML scraping interface.
|
||||
For other search APIs, see [Bundles](/components-bundle-components).
|
||||
For other search APIs, see <Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components).
|
||||
|
||||
:::important
|
||||
The **Web Search** component uses web scraping that can be subject to rate limits.
|
||||
@ -503,14 +580,20 @@ For more information, see [Trigger flows with webhooks](/webhook).
|
||||
Langflow's core components are meant to be generic and support a range of use cases.
|
||||
Core components typically aren't limited to a single provider.
|
||||
|
||||
If the core **Data** components don't meet your needs, you can find provider-specific components in the [**Bundles**](/components-bundle-components) section of the **Components** menu.
|
||||
If the core components don't meet your needs, you can find provider-specific components in <Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components).
|
||||
|
||||
For example, the [**DataStax** bundle](/bundles-datastax) includes components for CQL queries, and the [**Google** bundle](/bundles-google) includes components for Google Search APIs.
|
||||
|
||||
## Legacy Data components
|
||||
|
||||
The **Load CSV** and **Load JSON** components are legacy components.
|
||||
You can still use them in your flows, but they are no longer maintained and can be removed in a future release.
|
||||
import PartialLegacy from '@site/docs/_partial-legacy.mdx';
|
||||
|
||||
<PartialLegacy />
|
||||
|
||||
The following Data components are in legacy status:
|
||||
|
||||
* **Load CSV**
|
||||
* **Load JSON**
|
||||
|
||||
Replace these components with the **File** component, which supports loading CSV and JSON files, as well as many other file types.
|
||||
|
||||
|
||||
@ -5,47 +5,47 @@ slug: /components-embedding-models
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
|
||||
**Embedding Model** components in Langflow generate text embeddings using a specified Large Language Model (LLM).
|
||||
Embedding model components in Langflow generate text embeddings using a specified Large Language Model (LLM).
|
||||
|
||||
Langflow includes an **Embedding Model** core component that has built-in support for some LLMs.
|
||||
Alternatively, you can use [additional embedding models](#additional-embedding-model-components) in place of the core **Embedding Model** component.
|
||||
Alternatively, you can use any [additional embedding model](#additional-embedding-models) in place of the **Embedding Model** core component.
|
||||
|
||||
## Use Embedding Model components in a flow
|
||||
## Use embedding model components in a flow
|
||||
|
||||
Use **Embedding Model** components anywhere you need to generate embeddings in a flow.
|
||||
Use embedding model components anywhere you need to generate embeddings in a flow.
|
||||
|
||||
This example shows how to use an **Embedding Model** component in a flow to create a semantic search system.
|
||||
This flow loads a text file, splits the text into chunks, generates embeddings for each chunk, and then loads the chunks and embeddings into a vector store. The **Input and Output** components allow a user to query the vector store through a chat interface.
|
||||
This example shows how to use an embedding model component in a flow to create a semantic search system.
|
||||
This flow loads a text file, splits the text into chunks, generates embeddings for each chunk, and then loads the chunks and embeddings into a vector store. The input and output components allow a user to query the vector store through a chat interface.
|
||||
|
||||

|
||||
|
||||
1. Create a flow, add a **File** component, and then select a file containing text data, such as a PDF, that you can use to test the flow.
|
||||
|
||||
2. Add an **Embedding Model** component, and then provide a valid OpenAI API key.
|
||||
2. Add the **Embedding Model** core component, and then provide a valid OpenAI API key.
|
||||
You can enter the API key directly or use a <Icon name="Globe" aria-hidden="true"/> [global variable](/configuration-global-variables).
|
||||
|
||||
:::tip
|
||||
If your preferred embedding model provider or model isn't supported by the **Embedding Model** core component, you can use [additional embedding models](#additional-embedding-model-components) in place of the core component.
|
||||
:::tip My preferred provider or model isn't listed
|
||||
If your preferred embedding model provider or model isn't supported by the **Embedding Model** core component, you can use any [additional embedding models](#additional-embedding-models) in place of the core component.
|
||||
|
||||
Search the **Components** menu for your preferred provider to find additional embedding models, such as the [**Hugging Face Embeddings Inference** component](/bundles-huggingface#hugging-face-embeddings-inference).
|
||||
Browse <Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) or <Icon name="Search" aria-hidden="true" /> **Search** for your preferred provider to find additional embedding models, such as the [**Hugging Face Embeddings Inference** component](/bundles-huggingface#hugging-face-embeddings-inference).
|
||||
:::
|
||||
|
||||
3. Add a [**Split Text** component](/components-processing#split-text) to your flow.
|
||||
This component splits text input into smaller chunks to be processed into embeddings.
|
||||
|
||||
4. Add a [**Vector Store** component](/components-vector-stores), such as the **Chroma DB** component, to your flow, and then configure the component to connect to your vector store database.
|
||||
4. Add a vector store component, such as the **Chroma DB** component, to your flow, and then configure the component to connect to your vector database.
|
||||
This component stores the generated embeddings so they can be used for similarity search.
|
||||
|
||||
5. Connect the components:
|
||||
|
||||
* Connect the **File** component's **Loaded Files** output to the **Split Text** component's **Data or DataFrame** input.
|
||||
* Connect the **Split Text** component's **Chunks** output to the **Vector Store** component's **Ingest Data** input.
|
||||
* Connect the **Embedding Model** component's **Embeddings** output to the **Vector Store** component's **Embedding** input.
|
||||
* Connect the **Split Text** component's **Chunks** output to the vector store component's **Ingest Data** input.
|
||||
* Connect the **Embedding Model** component's **Embeddings** output to the vector store component's **Embedding** input.
|
||||
|
||||
6. To query the vector store, add [**Chat Input and Output** components](/components-io#chat-io):
|
||||
|
||||
* Connect the **Chat Input** component to the **Vector Store** component's **Search Query** input.
|
||||
* Connect the **Vector Store** component's **Search Results** output to the **Chat Output** component.
|
||||
* Connect the **Chat Input** component to the vector store component's **Search Query** input.
|
||||
* Connect the vector store component's **Search Results** output to the **Chat Output** component.
|
||||
|
||||
7. Click **Playground**, and then enter a search query to retrieve text chunks that are most semantically similar to your query.
|
||||
|
||||
@ -72,45 +72,23 @@ import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
| model_kwargs | Model Kwargs | Dictionary | Input parameter. Additional keyword arguments to pass to the model. |
|
||||
| embeddings | Embeddings | Embeddings | Output parameter. An instance for generating embeddings using the selected provider. |
|
||||
|
||||
## Additional embedding models {#additional-embedding-model-components}
|
||||
## Additional embedding models
|
||||
|
||||
If your provider or model isn't supported by the **Embedding Model** core component, additional provider-specific **Embedding Model** components are available in the [**Bundles**](/components-bundle-components) section of the **Components** menu.
|
||||
If your provider or model isn't supported by the **Embedding Model** core component, you can replace this component with any other component that generates embeddings.
|
||||
|
||||
## Legacy embedding components
|
||||
To find additional embedding model components, browse <Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) or <Icon name="Search" aria-hidden="true" /> **Search** for your preferred provider.
|
||||
|
||||
The following components are legacy components.
|
||||
You can still use them in your flows, but they are no longer maintained and they can be removed in future releases.
|
||||
## Pair models with vector stores
|
||||
|
||||
import PartialVectorRagBlurb from '@site/docs/_partial-vector-rag-blurb.mdx';
|
||||
|
||||
<PartialVectorRagBlurb />
|
||||
|
||||
<details>
|
||||
<summary>Embedding Similarity</summary>
|
||||
<summary>Example: Vector search flow</summary>
|
||||
|
||||
The **Embedding Similarity** component is replaced by built-in similarity search functionality in [**Vector Store** components](/components-vector-stores).
|
||||
import PartialVectorRagFlow from '@site/docs/_partial-vector-rag-flow.mdx';
|
||||
|
||||
This component calculates similarity scores for two embedding vectors.
|
||||
|
||||
It accepts the following parameters:
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
| embedding_vectors | Embedding Vectors | Input parameter. A list containing exactly two data objects with embedding vectors to compare. |
|
||||
| similarity_metric | Similarity Metric | Input parameter. Select the similarity metric to use. Options: "Cosine Similarity", "Euclidean Distance", "Manhattan Distance". |
|
||||
| similarity_data | Similarity Data | Output parameter. A data object containing the computed similarity score and additional information. |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Text Embedder</summary>
|
||||
|
||||
The **Text Embedder** component is replaced by the **Embedding Model** component.
|
||||
|
||||
This component generates embeddings for a given message using a specified embedding model.
|
||||
|
||||
It accepts the following parameters:
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
| embedding_model | Embedding Model | Input parameter. The embedding model to use for generating embeddings. |
|
||||
| message | Message | Input parameter. The message for which to generate embeddings. |
|
||||
| embeddings | Embedding Data | Output parameter. A data object containing the original text and its embedding vector. |
|
||||
<PartialVectorRagFlow />
|
||||
|
||||
</details>
|
||||
@ -7,7 +7,7 @@ import Icon from "@site/src/components/icon";
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
**Helper** components provide utility functions to help manage data and perform simple tasks in your flow.
|
||||
Helper components provide utility functions to help manage data and perform simple tasks in your flow.
|
||||
|
||||
## Calculator
|
||||
|
||||
@ -112,8 +112,8 @@ The following steps explain how to create a chat-based flow that uses **Message
|
||||
|
||||
To store and retrieve chat memory from a dedicated, external chat memory database, use the **Message History** component _and_ a provider-specific chat memory component.
|
||||
|
||||
The following steps explain how to create a flow that stores and retrieves chat memory with a [**Redis Chat Memory** component](/bundles-redis).
|
||||
Other options include the [**Mem0 Chat Memory** component](/bundles-mem0) and [**Cassandra Chat Memory** component](/bundles-datastax#cassandra-chat-memory).
|
||||
The following steps explain how to create a flow that stores and retrieves chat memory from a [**Redis Chat Memory** component](/bundles-redis).
|
||||
Other options include the [**Mem0 Chat Memory** component](/bundles-mem0) and [**Cassandra Chat Memory** component](/bundles-cassandra#cassandra-chat-memory).
|
||||
|
||||
1. Create or edit a flow where you want to use chat memory.
|
||||
|
||||
@ -148,7 +148,7 @@ Other options include the [**Mem0 Chat Memory** component](/bundles-mem0) and [*
|
||||
|
||||
4. Connect the **Prompt Template** component's output to a **Language Model** component's **System Message** input.
|
||||
|
||||
This example uses a **Language Model** component as the central chat driver, but you can also use an **Agent** component.
|
||||
This example uses the **Language Model** core component as the central chat driver, but you can also use another language model component or the **Agent** component.
|
||||
|
||||
5. Add a **Chat Input** component, and then connect it to the **Language Model** component's **Input** input.
|
||||
|
||||
@ -175,96 +175,69 @@ Other options include the [**Mem0 Chat Memory** component](/bundles-mem0) and [*
|
||||
|
||||
### Message History parameters
|
||||
|
||||
Many **Message History** component input parameters are hidden by default in the visual editor.
|
||||
You can toggle parameters through the <Icon name="SlidersHorizontal" aria-hidden="true"/> **Controls** in the [component's header menu](/concepts-components#component-menus).
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
<PartialParams />
|
||||
|
||||
The available parameters depend on whether the component is in **Retrieve** or **Store** mode.
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="retrieve" label="Retrieve mode">
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| memory | Memory | Input parameter. Retrieve messages from an external memory. If empty, the Langflow tables are used. |
|
||||
| sender | String | Input parameter. Filter by sender type. |
|
||||
| sender_name | String | Input parameter. Filter by sender name. |
|
||||
| n_messages | Integer | Input parameter. The number of messages to retrieve. |
|
||||
| session_id | String | Input parameter. The [session ID](/session-id) of the chat memories to store or retrieve. If omitted or empty, the current session ID for the flow run is used. Use custom session IDs if you need to segregate chat memory for different users or applications that run the same flow. |
|
||||
| order | String | Input parameter. The order of the messages. |
|
||||
| template | String | Input parameter. The template to use for formatting the data. It can contain the keys `{text}`, `{sender}` or any other key in the message data. |
|
||||
| messages | Message | Output parameter. The retrieved memories as `Message` objects, including `messages_text` containing retrieved chat message text. This is the typical output format used to pass memories _as chat messages_ to another component. |
|
||||
| dataframe | DataFrame | Output parameter. A `DataFrame` containing the message data. Useful for cases where you need to retrieve memories in a tabular format rather than as chat messages. |
|
||||
| **Template** (`template`) | String | Input parameter. The template to use for formatting the data. It can contain the keys `{text}`, `{sender}` or any other key in the message data. |
|
||||
| **External Memory** (`memory`) | External Memory | Input parameter. Retrieve messages from an external memory. If empty, Langflow storage is used. |
|
||||
| **Number of Messages** (`n_messages`) | Integer | Input parameter. The number of messages to retrieve. Default: 100. |
|
||||
| **Order** (`order`) | String | Input parameter. The order of the messages. Default: `Ascending`. |
|
||||
| **Sender Type** (`sender_type`) | String | Input parameter. Filter by sender type, one of `User`, `Machine`, or `Machine and User` (default). |
|
||||
| **Session ID** (`session_id`) | String | Input parameter. The [session ID](/session-id) of the chat memories to retrieve. If omitted or empty, the current session ID for the flow run is used. |
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="store" label="Store mode">
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| **Template** (`template`) | String | Input parameter. The template to use for formatting the data. It can contain the keys `{text}`, `{sender}` or any other key in the message data. |
|
||||
| **Message** (`message`) | String | Input parameter. The message to store, typically provided by connecting a **Chat Output** component. |
|
||||
| **External Memory** (`memory`) | External Memory | Input parameter. Store messages in external memory. If empty, Langflow storage is used. |
|
||||
| **Sender** (`sender`) | String | Input parameter. Choose which messages to store based on sender, one of `User`, `Machine`, or `Machine and User` (default). |
|
||||
| **Sender Name** (`sender_name`) | String | Input parameter. A backup `sender` label to use if a message doesn't have sender metadata. |
|
||||
| **Session ID** (`session_id`) | String | Input parameter. The [session ID](/session-id) of the chat memories to store. If omitted or empty, the current session ID for the flow run is used. Use custom session IDs if you need to segregate chat memory for different users or applications that run the same flow. |
|
||||
| **Sender Type** (`sender_type`) | String | Input parameter. Filter by sender type, one of `User`, `Machine`, or `Machine and User` (default). |
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
### Message History output
|
||||
|
||||
Memories can be retrieved in one of two formats:
|
||||
|
||||
* **Message**: Retrieve memories as `Message` objects, including `messages_text` containing retrieved chat message text.
|
||||
This is the typical output format used to pass memories _as chat messages_ to another component.
|
||||
|
||||
* **DataFrame**: Returns memories as a `DataFrame` containing the message data.
|
||||
Useful for cases where you need to retrieve memories in a tabular format rather than as chat messages.
|
||||
|
||||
You can set the output type near the component's output port.
|
||||
|
||||
## Legacy Helper components
|
||||
|
||||
The following components are legacy components.
|
||||
You can use these components in your flows, but they are no longer maintained and may be removed in a future release.
|
||||
It is recommended that you replace legacy components with the recommended alternatives as soon as possible.
|
||||
import PartialLegacy from '@site/docs/_partial-legacy.mdx';
|
||||
|
||||
<PartialLegacy />
|
||||
|
||||
The following Helper components are in legacy status:
|
||||
|
||||
* **Chat History**: Replaced by the [**Message History** component](#message-history)
|
||||
* **Message Store**: Replaced by the [**Message History** component](#message-history)
|
||||
|
||||
<details>
|
||||
<summary>Create List</summary>
|
||||
|
||||
This component dynamically creates a record with a specified number of fields.
|
||||
|
||||
It accepts the following parameters:
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| n_fields | Integer | Input parameter. The number of fields to be added to the record. |
|
||||
| text_key | String | Input parameter. The key used as text. |
|
||||
| list | List | Output parameter. The dynamically created list with the specified number of fields. |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>ID Generator</summary>
|
||||
|
||||
This component generates a unique ID.
|
||||
|
||||
It accepts the following parameters:
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| unique_id | String | Input parameter. The generated unique ID. |
|
||||
| id | String | Output parameter. The generated unique ID. |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Output Parser</summary>
|
||||
|
||||
Replace the legacy **Output Parser** component with the [**Structured Output** component](/components-processing#structured-output) and [**Parser** component](/components-processing#parser).
|
||||
* **Create List**: Replace with [Processing components](/components-processing)
|
||||
* **ID Generator**: Replace with a component that executes arbitrary code to generate an ID or embed an ID generator script your application code (external to your Langflow flows).
|
||||
* **Output Parser**: Replace with the [**Structured Output** component](/components-processing#structured-output) and [**Parser** component](/components-processing#parser).
|
||||
The components you need depend on the data types and complexity of the parsing task.
|
||||
|
||||
The **Output Parser** component transforms the output of a language model into comma-separated values (CSV) format, such as `["item1", "item2", "item3"]`, using LangChain's `CommaSeparatedListOutputParser`.
|
||||
The **Structured Output** component is a good alternative for this component because it also formats LLM responses with support for custom schemas and more complex parsing.
|
||||
The **Output Parser** component transformed the output of a language model into comma-separated values (CSV) format, such as `["item1", "item2", "item3"]`, using LangChain's `CommaSeparatedListOutputParser`.
|
||||
The **Structured Output** component is a good alternative for this component because it also formats LLM responses with support for custom schemas and more complex parsing.
|
||||
|
||||
**Parsing** components only provide formatting instructions and parsing functionality.
|
||||
_They don't include prompts._
|
||||
You must connect parsers to **Prompt Template** components to create prompts that LLMs can use.
|
||||
|
||||
1. Open a flow that has a **Chat Input**, **Language Model**, and **Chat Output** components.
|
||||
|
||||
2. Add **Output Parser** and **Prompt Template** components to your flow.
|
||||
|
||||
3. Define your LLM's prompt in the **Prompt Template** component's **Template**, including all instructions and pre-loaded context.
|
||||
Make sure to include a `{format_instructions}` variable where you will inject the formatting instructions from the **Output Parser** component.
|
||||
For example:
|
||||
|
||||
```
|
||||
You are a helpful assistant that provides lists of information.
|
||||
|
||||
{format_instructions}
|
||||
```
|
||||
|
||||
Variables in the template dynamically add fields to the **Prompt Template** component so that your flow can receive definitions for those values from other components, Langflow global variables, or fixed input.
|
||||
|
||||
4. Connect the **Output Parser** component's output to the **Prompt Template** component's **format instructions** input.
|
||||
|
||||
The **Output Parser** component accepts the following parameters:
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| parser_type | String | Input parameter. Sets the parser type as "CSV". |
|
||||
| format_instructions | String | Output parameter. Pass to a prompt template to include formatting instructions for LLM responses. |
|
||||
| output_parser | Parser | Output parameter. The constructed output parser that can be used to parse LLM responses. |
|
||||
|
||||
</details>
|
||||
**Parsing** components only provide formatting instructions and parsing functionality.
|
||||
_They don't include prompts._
|
||||
You must connect parsers to **Prompt Template** components to create prompts that LLMs can use.
|
||||
@ -6,7 +6,7 @@ slug: /components-io
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
Langflow's **Input and Output** components define where data enters and exits your flow, but they don't have identical functionality.
|
||||
Input and output components define where data enters and exits your flow, but they don't have identical functionality.
|
||||
|
||||
Specifically, **Chat Input and Output** components are designed to facilitate conversational interactions where messages are exchanged in a cumulative dialogue.
|
||||
The data handled by these components includes the message text plus additional metadata like senders, session IDs, and timestamps.
|
||||
@ -34,8 +34,6 @@ Initial input should _not_ be provided as a complete `Message` object because th
|
||||
|
||||
<PartialParams />
|
||||
|
||||
For information about the resulting `Message` object, including input parameters that are directly mapped to `Message` attributes, see [`Message` data](/data-types#message).
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
|input_value|Input Text| Input parameter. The message text string to be passed as input. |
|
||||
@ -47,7 +45,8 @@ For information about the resulting `Message` object, including input parameters
|
||||
|chat_icon|Icon| Input parameter. The icon of the message.|
|
||||
|should_store_message|Store Messages| Input parameter. Whether to store the message in chat history.|
|
||||
|text_color|Text Color| Input parameter. The text color of the name.|
|
||||
|message|Message|Output parameter. The resulting chat `Message` object with all specified properties.|
|
||||
|
||||
For information about the resulting `Message` object, including input parameters that are directly mapped to `Message` attributes, see [`Message` data](/data-types#message).
|
||||
|
||||
<details>
|
||||
<summary>Message method for Chat Input</summary>
|
||||
@ -88,8 +87,6 @@ For an example, see the [Langflow quickstart](/get-started-quickstart).
|
||||
|
||||
<PartialParams />
|
||||
|
||||
For information about the resulting `Message` object, including input parameters that are directly mapped to `Message` attributes, see [`Message` data](/data-types#message).
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
|input_value|Inputs| Input parameter. The message text string to be passed as output. |
|
||||
@ -102,7 +99,8 @@ For information about the resulting `Message` object, including input parameters
|
||||
|chat_icon|Icon| Input parameter. The icon of the message.|
|
||||
|text_color|Text Color| Input parameter. The text color of the name.|
|
||||
|clean_data|Basic Clean Data| Input parameter. When enabled, [`DataFrame` input](/data-types#dataframe) is cleaned when converted to text. Cleaning removes empty rows, empty lines in cells, and multiple newlines.|
|
||||
|message|Message|Output parameter. The resulting chat `Message` object with all specified properties.|
|
||||
|
||||
For information about the resulting `Message` object, including input parameters that are directly mapped to `Message` attributes, see [`Message` data](/data-types#message).
|
||||
|
||||
### Use Chat Input and Output components in a flow
|
||||
|
||||
@ -173,24 +171,16 @@ Passing chat-like metadata to a **Text Input and Output** component doesn't chan
|
||||
|
||||
### Text Input
|
||||
|
||||
The **Text Input** component accepts a text string input that is passed to other components as [`Message` data](/data-types) containing only the provided text string.
|
||||
The **Text Input** component accepts a text string input that is passed to other components as [`Message` data](/data-types) containing only the provided input text string in the `text` attribute.
|
||||
|
||||
Initial input should _not_ be provided as a complete `Message` object because the **Text Input** component constructs the `Message` object that is then passed to other components in the flow.
|
||||
It accepts only **Text** (`input_value`), which is the text supplied as input to the component.
|
||||
This can be entered directly into the component or passed as `Message` data from other components.
|
||||
|
||||
#### Text Input parameters
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
|input_value|Text|Input parameter. Text supplied as input to the component. Can be entered directly or passed as `Message` data from other components.|
|
||||
|text|Text|Output parameter. The resulting `Message` object containing the input text in the `text` attribute.|
|
||||
Initial input _shouldn't_ be provided as a complete `Message` object because the **Text Input** component constructs the `Message` object that is then passed to other components in the flow.
|
||||
|
||||
### Text Output
|
||||
|
||||
The **Text Output** component ingests [`Message` data](/data-types#message) from other components, emitting only the `text` attribute in a simplified `Message` object.
|
||||
|
||||
#### Text Output parameters
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
|input_value|Text|Input parameter. Text to be ingested and output as a string. Can be entered directly or passed as `Message` data from other components.|
|
||||
|text|Text|Output parameter. The resulting `Message` object containing the output text in the `text` attribute.|
|
||||
It accepts only **Text** (`input_value`), which is the text to be ingested and output as a string.
|
||||
This can be entered directly into the component or passed as `Message` data from other components.
|
||||
@ -6,7 +6,7 @@ slug: /components-logic
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
Langflow's **Logic** components provide functionalities for routing, conditional processing, and flow management.
|
||||
Logic components provide functionalities for routing, conditional processing, and flow management.
|
||||
|
||||
## If-Else (conditional router) {#if-else}
|
||||
|
||||
@ -194,14 +194,14 @@ When you select a flow for the **Run Flow** component, it uses the target flow's
|
||||
|
||||
## Legacy Logic components
|
||||
|
||||
The following **Logic** components are legacy components.
|
||||
You can still use them in your flows, but they are no longer supported and can be removed in a future release.
|
||||
import PartialLegacy from '@site/docs/_partial-legacy.mdx';
|
||||
|
||||
Replace these components with suggested alternatives as soon as possible.
|
||||
Components marked deprecated in addition to legacy should be replaced immediately.
|
||||
<PartialLegacy />
|
||||
|
||||
The following Logic components are in legacy status:
|
||||
|
||||
<details>
|
||||
<summary>Condition/Data Conditional Router</summary>
|
||||
<summary>Condition</summary>
|
||||
|
||||
As an alternative to this legacy component, see the [**If-Else** component](#if-else).
|
||||
|
||||
@ -259,7 +259,7 @@ It accepts the following parameters:
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Flow As Tool (deprecated)</summary>
|
||||
<summary>Flow As Tool</summary>
|
||||
|
||||
This component constructed a tool from a function that ran a loaded flow.
|
||||
|
||||
@ -268,7 +268,7 @@ It was deprecated in Langflow version 1.1.2 and replaced by the [**Run Flow** co
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Sub Flow (deprecated)</summary>
|
||||
<summary>Sub Flow</summary>
|
||||
|
||||
This component integrated entire flows as components within a larger workflow.
|
||||
It dynamically generated inputs based on the selected flow and executed the flow with provided parameters.
|
||||
|
||||
@ -1,55 +0,0 @@
|
||||
---
|
||||
title: Memories
|
||||
slug: /components-memories
|
||||
---
|
||||
|
||||
In Langflow version 1.5, the **Memory** category was removed.
|
||||
|
||||
All components that were in this category were replaced by other components or moved to other categories in the **Components** menu.
|
||||
|
||||
:::important
|
||||
Some components that were in the **Memory** category are legacy components.
|
||||
You can use these components in your flows, but they are no longer maintained and may be removed in a future release.
|
||||
|
||||
It is recommended that you replace all legacy components with the replacement components described on this page.
|
||||
:::
|
||||
|
||||
## Message History
|
||||
|
||||
The [**Message History** component](/components-helpers#message-history) was moved to the **Helpers** category.
|
||||
This component combines the functionality of the legacy **Chat History** and **Message Store** components.
|
||||
|
||||
## Message Store
|
||||
|
||||
The **Message Store** component is a legacy component.
|
||||
The functionality provided by this component is available in the **Message History** component.
|
||||
Replace this component with the [**Message History** component](/components-helpers#message-history).
|
||||
|
||||
## Provider-specific chat memory components
|
||||
|
||||
Provider-specific components were moved to the **Bundles** category:
|
||||
|
||||
- [**Mem0 Chat Memory** component](/bundles-mem0)
|
||||
- [**Redis Chat Memory** component](/bundles-redis)
|
||||
- [**Cassandra Chat Memory** component](/bundles-datastax#cassandra-chat-memory)
|
||||
- [**Astra DB Chat Memory** component](/bundles-datastax#astra-db-chat-memory)
|
||||
|
||||
<details>
|
||||
<summary>Zep Chat Memory</summary>
|
||||
|
||||
The **Zep Chat Memory** component is a legacy component.
|
||||
Replace this component with the [**Message History** component](/components-helpers#message-history).
|
||||
|
||||
This component creates a `ZepChatMessageHistory` instance, enabling storage and retrieval of chat messages using Zep, a memory server for LLMs.
|
||||
|
||||
It accepts the following parameters:
|
||||
|
||||
| Name | Type | Description |
|
||||
|---------------|---------------|-----------------------------------------------------------|
|
||||
| url | MessageText | Input parameter. The URL of the Zep instance. Required. |
|
||||
| api_key | SecretString | Input parameter. The API Key for authentication with the Zep instance. |
|
||||
| api_base_path | Dropdown | Input parameter. The API version to use. Options include api/v1 or api/v2. |
|
||||
| session_id | MessageText | Input parameter. The unique identifier for the chat session. Optional. |
|
||||
| message_history | BaseChatMessageHistory | Output parameter. An instance of ZepChatMessageHistory for the session. |
|
||||
|
||||
</details>
|
||||
@ -4,33 +4,35 @@ slug: /components-models
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
**Language Model** components in Langflow generate text using a specified Large Language Model (LLM).
|
||||
Language model components in Langflow generate text using a specified Large Language Model (LLM).
|
||||
These components accept inputs like chat messages, files, and instructions in order to generate a text response.
|
||||
|
||||
Langflow includes a **Language Model** core component that has built-in support for many LLMs.
|
||||
Alternatively, you can use any [additional language model](#additional-language-models) in place of the core **Language Model** component.
|
||||
Alternatively, you can use any [additional language model](#additional-language-models) in place of the **Language Model** core component.
|
||||
|
||||
## Use Language Model components in a flow
|
||||
## Use language model components in flows
|
||||
|
||||
Use **Language Model** components anywhere you would use an LLM in a flow.
|
||||
Use language model components anywhere you would use an LLM in a flow.
|
||||
|
||||
These components accept inputs like chat messages, files, and instructions in order to generate a text response.
|
||||
The flow must include [**Chat Input and Output** components](/components-io#chat-io) to allow chat-based interactions with the LLM.
|
||||
However, you can also use the **Language Model** component for actions that don't emit chat output directly, such as the **Smart Function** component.
|
||||
<Tabs>
|
||||
<TabItem value="chat" label="Chat" default>
|
||||
|
||||
The following example uses the **Language Model** core component to create a chatbot flow similar to the **Basic Prompting** template.
|
||||
It also explains how you can replace the core component with another LLM.
|
||||
One of the most common use cases of language model components is to chat with LLMs in your flows.
|
||||
|
||||
1. Add the **Language Model** component to your flow.
|
||||
The following example uses a language model component in a chatbot flow similar to the **Basic Prompting** template.
|
||||
|
||||
2. In the **OpenAI API Key** field, enter your OpenAI API key.
|
||||
1. Add the **Language Model** core component to your flow, and then enter your OpenAI API key.
|
||||
|
||||
This example uses the default OpenAI model and a built-in Anthropic model to compare responses from different providers.
|
||||
If you want to use a different provider, edit the **Model Provider**, **Model Name**, and **API Key** fields accordingly.
|
||||
This example uses the **Language Model** core component's default OpenAI model.
|
||||
If you want to use a different provider or model, edit the **Model Provider**, **Model Name**, and **API Key** fields accordingly.
|
||||
|
||||
:::tip My preferred provider or model isn't listed
|
||||
If you want to use a provider or model that isn't built-in to the **Language Model** core component, you can replace this component with another compatible component, as explained in [Additional language models](#additional-language-models).
|
||||
Then, you can continue following these steps to build your flow.
|
||||
If you want to use a provider or model that isn't built-in to the **Language Model** core component, you can replace this component with any [additional language model](#additional-language-models).
|
||||
|
||||
Browse <Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) or <Icon name="Search" aria-hidden="true" /> **Search** for your preferred provider to find additional language models.
|
||||
:::
|
||||
|
||||
3. In the [component's header menu](/concepts-components#component-menus), click <Icon name="SlidersHorizontal" aria-hidden="true"/> **Controls**, enable the **System Message** parameter, and then click **Close**.
|
||||
@ -42,6 +44,7 @@ It also explains how you can replace the core component with another LLM.
|
||||
6. Connect the **Prompt Template** component's output to the **Language Model** component's **System Message** input.
|
||||
|
||||
7. Add [**Chat Input** and **Chat Output** components](/components-io#chat-io) to your flow.
|
||||
These components are required for direct chat interaction with an LLM.
|
||||
|
||||
8. Connect the **Chat Input** component to the **Language Model** component's **Input**, and then connect the **Language Model** component's **Message** output to the **Chat Output** component.
|
||||
|
||||
@ -61,13 +64,10 @@ It also explains how you can replace the core component with another LLM.
|
||||
|
||||
</details>
|
||||
|
||||
10. Try a different model or provider to see how the response changes. For example:
|
||||
10. Optional: Try a different model or provider to see how the response changes.
|
||||
For example, if you are using the **Language Model** core component, you could try an Anthropic model.
|
||||
|
||||
1. In the **Language Model** component, change the model provider to **Anthropic**.
|
||||
2. Select an Anthropic model, such as Claude 3.5 Haiku.
|
||||
3. Enter an Anthropic API key.
|
||||
|
||||
11. Open the **Playground**, ask the same question as you did before, and then compare the content and format of the responses.
|
||||
Then, open the **Playground**, ask the same question as you did before, and then compare the content and format of the responses.
|
||||
|
||||
This helps you understand how different models handle the same request so you can choose the best model for your use case.
|
||||
You can also learn more about different models in each model provider's documentation.
|
||||
@ -78,7 +78,7 @@ It also explains how you can replace the core component with another LLM.
|
||||
The following response is an example of an Anthropic model's response.
|
||||
Your actual response may vary based on the model version at the time of your request, your template, and input.
|
||||
|
||||
Note that this response is shorter and includes sources, whereas the OpenAI response was more encyclopedic and didn't cite sources.
|
||||
Note that this response is shorter and includes sources, whereas the previous OpenAI response was more encyclopedic and didn't cite sources.
|
||||
|
||||
```
|
||||
The capital of Utah is Salt Lake City. It is also the most populous city in the state. Salt Lake City has been the capital of Utah since 1896, when Utah became a state.
|
||||
@ -90,10 +90,52 @@ It also explains how you can replace the core component with another LLM.
|
||||
|
||||
</details>
|
||||
|
||||
## Language Model parameters
|
||||
</TabItem>
|
||||
<TabItem value="drivers" label="Drivers">
|
||||
|
||||
Some **Language Model** component input parameters are hidden by default in the visual editor.
|
||||
You can toggle parameters through the <Icon name="SlidersHorizontal" aria-hidden="true"/> **Controls** in the [component's header menu](/concepts-components#component-menus).
|
||||
Some components use a language model component to perform LLM-driven actions.
|
||||
Typically, these components prepare data for further processing by downstream components, rather than emitting direct chat output.
|
||||
For an example, see the [**Smart Function** component](/components-processing#smart-function).
|
||||
|
||||
A component must accept a `LanguageModel` input to use a language model component as a driver, and you must set the language model component's output type to `LanguageModel`.
|
||||
For more information, see [Language Model output types](#language-model-output-types).
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="agents" label="Agents">
|
||||
|
||||
If you don't want to use the **Agent** component's built-in LLMs, you can use a language model component to connect your preferred model:
|
||||
|
||||
1. Add a language model component to your flow.
|
||||
|
||||
You can use the **Language Model** core component or browse <Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) to find additional language models.
|
||||
Components in bundles may not have `language model` in the name.
|
||||
For example, Azure OpenAI LLMs are provided through the [**Azure OpenAI** component](/bundles-azure#azure-openai).
|
||||
|
||||
2. Configure the language model component as needed to connect to your preferred model.
|
||||
|
||||
3. Change the language model component's output type from **Model Response** to **Language Model**.
|
||||
The output port changes to a `LanguageModel` port.
|
||||
This is required to connect the language model component to the **Agent** component.
|
||||
For more information, see [Language Model output types](#language-model-output-types).
|
||||
|
||||
4. Add an **Agent** component to the flow, and then set **Model Provider** to **Connect other models**.
|
||||
|
||||
The **Model Provider** field changes to a **Language Model** (`LanguageModel`) input.
|
||||
|
||||
5. Connect the language model component's output to the **Agent** component's **Language Model** input.
|
||||
The **Agent** component now inherits the language model settings from the connected language model component instead of using any of the built-in models.
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Language model parameters
|
||||
|
||||
The following parameters are for the **Language Model** core component.
|
||||
Other language model components can have additional or different parameters.
|
||||
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
<PartialParams />
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
@ -106,40 +148,35 @@ You can toggle parameters through the <Icon name="SlidersHorizontal" aria-hidden
|
||||
| temperature | Float | Input parameter. Controls randomness in responses. Range: `[0.0, 1.0]`. Default: `0.1`. |
|
||||
| model | LanguageModel | Output parameter. Alternative output type to the default `Message` output. Produces an instance of Chat configured with the specified parameters. See [Language Model output types](#language-model-output-types). |
|
||||
|
||||
## Language Model output types
|
||||
## Language model output types
|
||||
|
||||
**Language Model** components, including the core component and bundled components, can produce two types of output:
|
||||
Language model components, including the core component and bundled components, can produce two types of output:
|
||||
|
||||
* **Model Response**: The default output type emits the model's generated response as [`Message` data](/data-types#message).
|
||||
Use this output type when you want the typical LLM interaction where the LLM produces a text response based on given input.
|
||||
|
||||
* **Language Model**: Change the **Language Model** component's output type to [`LanguageModel`](/data-types#languagemodel) when you need to attach an LLM to another component in your flow.
|
||||
This is a specific data type that is only required by certain components, such as the [**Smart Function** component](/components-processing#smart-function).
|
||||
* **Language Model**: Change the language model component's output type to [`LanguageModel`](/data-types#languagemodel) when you need to attach an LLM to another component in your flow, such as an **Agent** or **Smart Function** component.
|
||||
|
||||
With this configuration, the **Language Model** component is meant to support an action completed by another component, rather than producing a text response for a standard chat-based interaction.
|
||||
With this configuration, the language model component supports an action completed by another component, rather than a direct chat interaction.
|
||||
For an example, the **Smart Function** component uses an LLM to create a function from natural language input.
|
||||
|
||||
## Additional language models
|
||||
|
||||
If your provider or model isn't supported by the **Language Model** core component, additional provider-specific models are available in the [**Bundles**](/components-bundle-components) section of the **Components** menu.
|
||||
If your provider or model isn't supported by the **Language Model** core component, additional language model components are available in <Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components).
|
||||
|
||||
You can use these provider-specific components directly in your flows in the same place that you would use the **Language Model** core component.
|
||||
Or, you can connect them to other components that accept a [`LanguageModel`](/data-types#languagemodel) input, such as the **Smart Function** and **Agent** components.
|
||||
You can use these components in the same way that you use the core **Language Model** component, as explained in [Use language model components in flows](#use-language-model-components-in-flows).
|
||||
|
||||
For example, to connect a provider-specific component to the **Agent** component, do the following:
|
||||
## Pair models with vector stores
|
||||
|
||||
1. In the **Components** menu, search for your preferred model provider, and then add the provider's LLM component to your flow.
|
||||
The component may not have `model` in the name.
|
||||
For example, Azure OpenAI LLMs are in the [**Azure OpenAI** component](/bundles-azure#azure-openai).
|
||||
import PartialVectorRagBlurb from '@site/docs/_partial-vector-rag-blurb.mdx';
|
||||
|
||||
2. Configure the LLM component as needed to connect to your preferred model.
|
||||
<PartialVectorRagBlurb />
|
||||
|
||||
3. Change the LLM component's output type from **Model Response** to **Language Model**.
|
||||
The output port changes to a `LanguageModel` port.
|
||||
For more information, see [Language Model output types](#language-model-output-types).
|
||||
<details>
|
||||
<summary>Example: Vector search flow</summary>
|
||||
|
||||
2. Add an **Agent** component to the flow, and then set **Model Provider** to **Custom**.
|
||||
The **Model Provider** field changes to a **Language Model** field with a `LanguageModel` port.
|
||||
import PartialVectorRagFlow from '@site/docs/_partial-vector-rag-flow.mdx';
|
||||
|
||||
4. Connect the LLM component's output to the **Agent** component's **Language Model** input.
|
||||
The **Agent** component now inherits the LLM settings from the connected LLM component instead of using any of the built-in models.
|
||||
<PartialVectorRagFlow />
|
||||
|
||||
</details>
|
||||
@ -8,7 +8,7 @@ import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
|
||||
Langflow's **Processing** components process and transform data within a flow.
|
||||
Processing components process and transform data within a flow.
|
||||
They have many uses, including:
|
||||
|
||||
* Feed instructions and context to your LLMs and agents with the [**Prompt Template** component](#prompt-template).
|
||||
@ -38,7 +38,7 @@ This is demonstrated in the following example.
|
||||
|
||||

|
||||
|
||||
1. Connect a **Language Model** component to a **Batch Run** component's **Language model** port.
|
||||
1. Connect any language model component to a **Batch Run** component's **Language model** port.
|
||||
|
||||
2. Connect `DataFrame` output from another component to the **Batch Run** component's **DataFrame** input.
|
||||
For example, you could connect a **File** component with a CSV file.
|
||||
@ -69,7 +69,7 @@ For example, `Create a business card for each name.`
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| model | HandleInput | Input parameter. Connect the 'Language Model' output from a **Language Model** component. Required. |
|
||||
| model | HandleInput | Input parameter. Connect the 'Language Model' output from a language model component. Required. |
|
||||
| system_message | MultilineInput | Input parameter. A multi-line system instruction for all rows in the DataFrame. |
|
||||
| df | DataFrameInput | Input parameter. The DataFrame whose column is treated as text messages, as specified by 'column_name'. Required. |
|
||||
| column_name | MessageTextInput | Input parameter. The name of the DataFrame column to treat as text messages. If empty, all columns are formatted in TOML. |
|
||||
@ -368,13 +368,13 @@ The output is a `DataFrame` containing all columns from the original `DataFrame`
|
||||
|
||||
The **LLM Router** component routes requests to the most appropriate LLM based on [OpenRouter](https://openrouter.ai/docs/quickstart) model specifications.
|
||||
|
||||
To use the component in a flow, you connect multiple **Language Model** components to the **LLM Router** components.
|
||||
To use the component in a flow, you connect multiple language model components to the **LLM Router** components.
|
||||
One model is the judge LLM that analyzes input messages to understand the evaluation context, selects the most appropriate model from the other attached LLMs, and then routes the input to the selected model.
|
||||
The selected model processes the input, and then returns the generated response.
|
||||
|
||||
The following example flow has three **Language Model** components.
|
||||
The following example flow has three language model components.
|
||||
One is the judge LLM, and the other two are in the LLM pool for request routing.
|
||||
The **Chat Input** and **Chat Output** components create a seamless chat interaction where you send a message and receive a response without any user awareness of the underlying routing.
|
||||
The input and output components create a seamless chat interaction where you send a message and receive a response without any user awareness of the underlying routing.
|
||||
|
||||

|
||||
|
||||
@ -384,7 +384,7 @@ The **Chat Input** and **Chat Output** components create a seamless chat interac
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
| `models` | **Language Models** | Input parameter. Connect [`LanguageModel`](/data-types#languagemodel) output from multiple [**Language Model** components](/components-models) to create a pool of models. The `judge_llm` selects models from this pool when routing requests. The first model you connect is the default model if there is a problem with model selection or routing. |
|
||||
| `models` | **Language Models** | Input parameter. Connect [`LanguageModel`](/data-types#languagemodel) output from multiple [language model components](/components-models) to create a pool of models. The `judge_llm` selects models from this pool when routing requests. The first model you connect is the default model if there is a problem with model selection or routing. |
|
||||
| `input_value` | **Input** | Input parameter. The incoming query to be routed to the model selected by the judge LLM. |
|
||||
| `judge_llm` | **Judge LLM** | Input parameter. Connect `LanguageModel` output from _one_ **Language Model** component to serve as the judge LLM for request routing. |
|
||||
| `optimization` | **Optimization** | Input parameter. Set a preferred characteristic for model selection by the judge LLM. The options are `quality` (highest response quality), `speed` (fastest response time), `cost` (most cost-effective model), or `balanced` (equal weight for quality, speed, and cost). Default: `balanced` |
|
||||
@ -698,7 +698,7 @@ To configure the **Save File** component and use it in a flow, do the following:
|
||||
In Langflow version 1.5, this component was renamed from **Lambda Filter** to **Smart Function**.
|
||||
|
||||
The **Smart Function** component uses an LLM to generate a Lambda function to filter or transform structured data based on natural language instructions.
|
||||
You must connect this component to a [**Language Model** component](/components-models), which is used to generate a function based on the natural language instructions you provide in the **Instructions** parameter.
|
||||
You must connect this component to a [language model component](/components-models), which is used to generate a function based on the natural language instructions you provide in the **Instructions** parameter.
|
||||
The LLM runs the function against the data input, and then outputs the results as [`Data`](/data-types#data).
|
||||
|
||||
:::tip
|
||||
@ -730,7 +730,7 @@ From there, the LLM generates a filter function that extracts email addresses fr
|
||||
|
||||
The **Split Text** component splits data into chunks based on parameters like chunk size and separator.
|
||||
It is often used to chunk data to be tokenized and embedded into vector databases.
|
||||
For examples, see [Use Vector Store components in a flow](/components-vector-stores#use-vector-store-components-in-a-flow), [Use Embedding Model components in a flow](/components-embedding-models#use-embedding-model-components-in-a-flow), and [Create a Vector RAG chatbot](/chat-with-rag).
|
||||
For examples, see [Use embedding model components in a flow](/components-embedding-models#use-embedding-model-components-in-a-flow) and [Create a Vector RAG chatbot](/chat-with-rag).
|
||||
|
||||

|
||||
|
||||
@ -793,7 +793,7 @@ This can come from practically any component, but it is typically a **Chat Input
|
||||
The schema is a table that defines the fields (keys) and data types to organize the data extracted by the LLM into a structured `Data` or `DataFrame` object.
|
||||
For more information, see [Output Schema options](#output-schema-options)
|
||||
|
||||
3. Attach a [**Language Model** component](/components-models) that is set to emit [`LanguageModel`](/data-types#languagemodel) output.
|
||||
3. Attach a [language model component](/components-models) that is set to emit [`LanguageModel`](/data-types#languagemodel) output.
|
||||
|
||||
The LLM uses the **Input Message** and **Format Instructions** from the **Structured Output** component to extract specific pieces of data from the input text.
|
||||
The output schema is applied to the model's response to produce the final `Data` or `DataFrame` structured object.
|
||||
@ -1009,10 +1009,11 @@ The following example uses the **Type Convert** component to convert the `DataFr
|
||||
|
||||
## Legacy Processing components
|
||||
|
||||
The following **Processing** components are legacy components.
|
||||
You can still use them in your flows, but they are no longer supported and can be removed in a future release.
|
||||
import PartialLegacy from '@site/docs/_partial-legacy.mdx';
|
||||
|
||||
Replace these components with suggested alternatives as soon as possible.
|
||||
<PartialLegacy />
|
||||
|
||||
The following Processing components are in legacy status:
|
||||
|
||||
<details>
|
||||
<summary>Alter Metadata</summary>
|
||||
@ -1034,7 +1035,7 @@ It accepts the following parameters:
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Combine Data/Merge Data</summary>
|
||||
<summary>Combine Data</summary>
|
||||
|
||||
Replace this legacy component with the [**Data Operations** component](#data-operations) or the [**Loop** component](/components-logic#loop).
|
||||
|
||||
@ -1086,7 +1087,7 @@ This component extracts a specific key from a `Data` object and returns the valu
|
||||
<details>
|
||||
<summary>Data to DataFrame/Data to Message</summary>
|
||||
|
||||
Replace these legacy components with newer **Processing** components, such as the [**Data Operations** component](#data-operations) and [**Type Convert** component](#type-convert).
|
||||
Replace these legacy components with newer Processing components, such as the [**Data Operations** component](#data-operations) and [**Type Convert** component](#type-convert).
|
||||
|
||||
These components converted one or more `Data` objects into a `DataFrame` or `Message` object.
|
||||
|
||||
@ -1178,47 +1179,6 @@ This component converts and extracts JSON fields in `Message` and `Data` objects
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Python REPL</summary>
|
||||
|
||||
Replace this legacy component with the [**Python Interpreter** component](#python-interpreter) or another processing or logic component.
|
||||
|
||||
This component creates a Python REPL (Read-Eval-Print Loop) tool for executing Python code.
|
||||
|
||||
It accepts the following parameters:
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| name | String | Input parameter. The name of the tool. Default: `python_repl`. |
|
||||
| description | String | Input parameter. A description of the tool's functionality. |
|
||||
| global_imports | List[String] | Input parameter. A list of modules to import globally. Default: `math`. |
|
||||
| tool | Tool | Output parameter. A Python REPL tool for use in LangChain. |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Python Code Structured</summary>
|
||||
|
||||
Replace this legacy component with the [**Python Interpreter** component](#python-interpreter) or another processing or logic component.
|
||||
|
||||
This component creates a structured tool from Python code using a dataclass.
|
||||
|
||||
The component dynamically updates its configuration based on the provided Python code, allowing for custom function arguments and descriptions.
|
||||
|
||||
It accepts the following parameters:
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| tool_code | String | Input parameter. The Python code for the tool's dataclass. |
|
||||
| tool_name | String | Input parameter. The name of the tool. |
|
||||
| tool_description | String | Input parameter. The description of the tool. |
|
||||
| return_direct | Boolean | Input parameter. Whether to return the function output directly. |
|
||||
| tool_function | String | Input parameter. The selected function for the tool. |
|
||||
| global_variables | Dict | Input parameter. Global variables or data for the tool. |
|
||||
| result_tool | Tool | Output parameter. A structured tool created from the Python code. |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Regex Extractor</summary>
|
||||
|
||||
|
||||
@ -69,4 +69,4 @@ For example, you could add variables for `{references}` and `{instructions}`, an
|
||||
## See also
|
||||
|
||||
* [**LangChain Prompt Hub** component](/bundles-langchain#prompt-hub)
|
||||
* [**Processing** components](/components-processing)
|
||||
* [Processing components](/components-processing)
|
||||
@ -4,71 +4,38 @@ slug: /components-tools
|
||||
---
|
||||
|
||||
In Langflow version 1.5, the **Tools** category was deprecated.
|
||||
All components that were in this category were replaced by other components or moved to other component categories.
|
||||
|
||||
All components that were in this category were replaced by other components or moved to other categories in the **Components** menu.
|
||||
|
||||
:::important
|
||||
Many components that were in the **Tools** category are legacy components.
|
||||
You can use these components in your flows, but they are no longer maintained and may be removed in a future release.
|
||||
|
||||
It is recommended that you replace all legacy components with the replacement components described on this page.
|
||||
:::
|
||||
|
||||
## Calculator Tool
|
||||
|
||||
The **Calculator Tool** component is a legacy component.
|
||||
Replace this component with the [**Calculator** component](/components-helpers#calculator) in the **Helpers** category.
|
||||
|
||||
## MCP Connection
|
||||
## MCP Connection component
|
||||
|
||||
This component was moved to the **Agents** category and renamed to the [**MCP Tools** component](/components-agents#mcp-connection)
|
||||
|
||||
## Python tools
|
||||
## Legacy Tools components
|
||||
|
||||
The **Python REPL** and **Python Code Structured** components are legacy components.
|
||||
Replace these components with the [**Python Interpreter** component](/components-processing#python-interpreter) in the **Processing** category.
|
||||
import PartialLegacy from '@site/docs/_partial-legacy.mdx';
|
||||
|
||||
## Search and API request tools
|
||||
<PartialLegacy />
|
||||
|
||||
Many tool components performed basic API calls to public archives or search APIs.
|
||||
All such components in the **Tools** category are legacy components.
|
||||
The following Tools components are in legacy status:
|
||||
|
||||
You have two options for replacing these components:
|
||||
* **Calculator Tool**: Replaced by the [**Calculator** component](/components-helpers#calculator).
|
||||
* **Python Code Structured**: Replaced by the [**Python Interpreter** component](/components-processing#python-interpreter).
|
||||
* **Python REPL**: Replaced by the [**Python Interpreter** component](/components-processing#python-interpreter).
|
||||
* **Search API**: Replaced by the [**SearchApi** bundle](/bundles-searchapi).
|
||||
* **SearXNG Search**: No direct replacement. Use another provider's search component, create a custom component, or use a core component like the [**API Request** component](/components-data#api-request).
|
||||
* **Serp Search API**: Replace by the **SerpApi** bundle.
|
||||
* **Tavily Search API**: Replaced by the **Tavily** bundle.
|
||||
* **Wikidata API**: Replaced by the [**Wikipedia** bundle](/bundles-wikipedia).
|
||||
* **Wikipedia API**: Replaced by the [**Wikipedia** bundle](/bundles-wikipedia).
|
||||
* **Yahoo! Finance**: Replaced by the **Yahoo! Search** bundle.
|
||||
|
||||
* Use the generic [**Data** components](/components-data) for search and API calls, such as the [**Web Search** component](/components-data#web-search) and [**News Search** component](/components-data#news-search).
|
||||
## See also
|
||||
|
||||
* Use the provider-specific search and API components in the **Bundles** category:
|
||||
|
||||
* [**arXiv** bundle](/bundles-arxiv)
|
||||
* [**Bing** bundle](/bundles-bing)
|
||||
* [**DataStax** bundle](/bundles-datastax)
|
||||
* [**DuckDuckGo** bundle](/bundles-duckduckgo)
|
||||
* [**Exa** bundle](/bundles-exa)
|
||||
* [**Glean** bundle](/bundles-glean)
|
||||
* [**Google** bundle](/bundles-google)
|
||||
* [**Icosa Computing** bundle](/bundles-icosacomputing)
|
||||
* [**LangChain** bundle](/bundles-langchain)
|
||||
* [**SearchApi** bundle](/bundles-searchapi)
|
||||
* **SerpApi** bundle
|
||||
* **Tavily** bundle
|
||||
* [**Wikipedia** bundle](/bundles-wikipedia)
|
||||
* **Yahoo! Search** bundle
|
||||
|
||||
<details>
|
||||
<summary>SearXNG Search Tool</summary>
|
||||
|
||||
The **SearXNG Search Tool** component is a legacy component.
|
||||
Replace this component with a [**Data** component](/components-data) or another metasearch provider's [bundle](/components-bundle-components).
|
||||
|
||||
This component creates a tool for searching using SearXNG, a metasearch engine.
|
||||
It accepts the following parameters:
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| url | String | Input parameter. The URL of the SearXNG instance. |
|
||||
| max_results | Integer | Input parameter. The maximum number of results to return. |
|
||||
| categories | List[String] | Input parameter. The categories to search in. |
|
||||
| language | String | Input parameter. The language for the search results. |
|
||||
| result_tool | Tool | Output parameter. A SearXNG search tool for use in LangChain. |
|
||||
|
||||
</details>
|
||||
* [**API Request** component](/components-data#api-request)
|
||||
* [**News Search** component](/components-data#news-search)
|
||||
* [**Web Search** component](/components-data#web-search)
|
||||
* [**Bing** bundle](/bundles-bing)
|
||||
* [**DuckDuckGo** bundle](/bundles-duckduckgo)
|
||||
* [**Exa** bundle](/bundles-exa)
|
||||
* [**Google** bundle](/bundles-google)
|
||||
* [**Serper** bundle](/bundles-serper)
|
||||
@ -1,983 +0,0 @@
|
||||
---
|
||||
title: Vector Stores
|
||||
slug: /components-vector-stores
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
Langflow's **Vector Store** components are used to read and write vector data, including embedding storage, vector search, Graph RAG traversals, and specialized provider-specific search, such as OpenSearch, Elasticsearch, and Vectara.
|
||||
|
||||
These components are critical for vector search applications, such as Retrieval Augmented Generation (RAG) chatbots that need to retrieve relevant context from large datasets.
|
||||
|
||||
Most of these components connect to a specific vector database provider, but some components support multiple providers or platforms.
|
||||
For example, the **Cassandra** vector store component can connect to self-managed Apache Cassandra-based clusters as well as Astra DB, which is a managed Cassandra DBaaS.
|
||||
|
||||
Other types of storage, like traditional structured databases and chat memory, are handled through other components like the [**SQL Database** component](/components-data#sql-database) or the [**Message History** component](/components-helpers#message-history).
|
||||
|
||||
## Use Vector Store components in a flow
|
||||
|
||||
:::tip
|
||||
For a tutorial using **Vector Store** components in a flow, see [Create a vector RAG chatbot](/chat-with-rag).
|
||||
:::
|
||||
|
||||
The following steps introduce the use of **Vector Store** components in a flow, including configuration details, how the components work when you run a flow, why you might need multiple **Vector Store** components in one flow, and useful supporting components, such as **Embedding Model** and **Parser** components.
|
||||
|
||||
1. Create a flow with the **Vector Store RAG** template.
|
||||
|
||||
This template has two subflows.
|
||||
The **Load Data** subflow loads embeddings and content into a vector database, and the **Retriever** subflow runs a vector search to retrieve relevant context based on a user's query.
|
||||
|
||||
2. Configure the database connection for both [**Astra DB** components](#astra-db), or replace them with another pair of **Vector Store** components of your choice.
|
||||
Make sure the components connect to the same vector store, and that the component in the **Retriever** subflow is able to run a similarity search.
|
||||
|
||||
The parameters you set in each **Vector Store** component depend on the component's role in your flow.
|
||||
In this example, the **Load Data** subflow _writes_ to the vector store, whereas the **Retriever** subflow _reads_ from the vector store.
|
||||
Therefore, search-related parameters are only relevant to the **Vector Search** component in the **Retriever** subflow.
|
||||
|
||||
For information about specific configuration parameters, see the section of this page for your chosen **Vector Store** component and [Hidden parameters](#hidden-parameters).
|
||||
|
||||
3. To configure the embedding model, do one of the following:
|
||||
|
||||
* **Use an OpenAI model**: In both **OpenAI Embeddings** components, enter your OpenAI API key.
|
||||
You can use the default model or select a different OpenAI embedding model.
|
||||
|
||||
* **Use another provider**: Replace the **OpenAI Embeddings** components with another pair of [**Embedding Model** component](/components-embedding-models) of your choice, and then configure the parameters and credentials accordingly.
|
||||
|
||||
* **Use Astra DB vectorize**: If you are using an Astra DB vector store that has a vectorize integration, you can remove both **OpenAI Embeddings** components.
|
||||
If you do this, the vectorize integration automatically generates embeddings from the **Ingest Data** (in the **Load Data** subflow) and **Search Query** (in the **Retriever** subflow).
|
||||
|
||||
:::tip
|
||||
If your vector store already contains embeddings, make sure your **Embedding Model** components use the same model as your previous embeddings.
|
||||
Mixing embedding models in the same vector store can produce inaccurate search results.
|
||||
:::
|
||||
|
||||
4. Recommended: In the [**Split Text** component](/components-processing#split-text), optimize the chunking settings for your embedding model.
|
||||
For example, if your embedding model has a token limit of 512, then the **Chunk Size** parameter must not exceed that limit.
|
||||
|
||||
Additionally, because the **Retriever** subflow passes the chat input directly to the **Vector Store** component for vector search, make sure that your chat input string doesn't exceed your embedding model's limits.
|
||||
For this example, you can enter a query that is within the limits; however, in a production environment, you might need to implement additional checks or preprocessing steps to ensure compliance.
|
||||
For example, use additional components to prepare the chat input before running the vector search, or enforce chat input limits in your application code.
|
||||
|
||||
5. In the **Language Model** component, enter your OpenAI API key, or select a different provider and model to use for the chat portion of the flow.
|
||||
|
||||
6. Run the **Load Data** subflow to populate your vector store.
|
||||
In the **File** component, select one or more files, and then click <Icon name="Play" aria-hidden="true" /> **Run component** on the **Vector Store** component in the **Load Data** subflow.
|
||||
|
||||
The **Load Data** subflow loads files from your local machine, chunks them, generates embeddings for the chunks, and then stores the chunks and their embeddings in the vector database.
|
||||
|
||||

|
||||
|
||||
The **Load Data** subflow is separate from the **Retriever** subflow because you probably won't run it every time you use the chat.
|
||||
You can run the **Load Data** subflow as needed to preload or update the data in your vector store.
|
||||
Then, your chat interactions only use the components that are necessary for chat.
|
||||
|
||||
If your vector store already contains data that you want to use for vector search, then you don't need to run the **Load Data** subflow.
|
||||
|
||||
7. Open the **Playground** and start chatting to run the **Retriever** subflow.
|
||||
|
||||
The **Retriever** subflow generates an embedding from chat input, runs a vector search to retrieve similar content from your vector store, parses the search results into supplemental context for the LLM, and then uses the LLM to generate a natural language response to your query.
|
||||
The LLM uses the vector search results along with its internal training data and tools, such as basic web search and datetime information, to produce the response.
|
||||
|
||||

|
||||
|
||||
To avoid passing the entire block of raw search results to the LLM, the **Parser** component extracts `text` strings from the search results `Data` object, and then passes them to the **Prompt Template** component in `Message` format.
|
||||
From there, the strings and other template content are compiled into natural language instructions for the LLM.
|
||||
|
||||
You can use other components for this transformation, such as the **Data Operations** component, depending on how you want to use the search results.
|
||||
|
||||
To view the raw search results, click <Icon name="TextSearch" aria-hidden="true" /> **Inspect output** on the **Vector Store** component after running the **Retriever** subflow.
|
||||
|
||||
### Hidden parameters
|
||||
|
||||
You can inspect a **Vector Store** component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it.
|
||||
|
||||
Many input parameters for **Vector Store** components are hidden by default in the visual editor.
|
||||
You can toggle parameters through the <Icon name="SlidersHorizontal" aria-hidden="true"/> **Controls** in each [component's header menu](/concepts-components#component-menus).
|
||||
|
||||
Some parameters are conditional, and they are only available after you set other parameters or select specific options for other parameters.
|
||||
Conditional parameters may not be visible on the **Controls** pane until you set the required dependencies.
|
||||
However, all parameters are always listed in a [component's code](/concepts-components#component-code).
|
||||
|
||||
For information about a specific component's parameters, see the provider's documentation and the component details.
|
||||
|
||||
### Search results output
|
||||
|
||||
If you use a **Vector Store** component to query your vector store, it produces search results that you can pass to downstream components in your flow as a list of [`Data`](/data-types#data) objects or a tabular [`DataFrame`](/data-types#dataframe).
|
||||
If both types are supported, you can set the format near the component's output port in the visual editor.
|
||||
|
||||
The exception to this pattern is the **Vectara RAG** component, which outputs only an `answer` string in [`Message`](/data-types#message) format.
|
||||
|
||||
### Vector store instances
|
||||
|
||||
Because Langflow is based on LangChain, **Vector Store** components use an instance of [LangChain vector store](https://python.langchain.com/docs/integrations/vectorstores/) to drive the underlying vector search functions.
|
||||
In the component code, this is often instantiated as `vector_store`, but some components use a different name, such as the provider name.
|
||||
|
||||
For the **Cassandra Graph** and **Astra DB Graph** components, `vector_store` is an instance of [LangChain graph vector store](https://python.langchain.com/api_reference/community/graph_vectorstores.html).
|
||||
|
||||
These instances are provider-specific and configured according to the component's parameters.
|
||||
For example, the **Redis** component creates an instance of [`RedisVectorStore`](https://python.langchain.com/docs/integrations/vectorstores/redis/) based on the component's parameters, such as the connection string, index name, and schema.
|
||||
|
||||
Some LangChain classes don't expose all possible options as component parameters.
|
||||
Depending on the provider, these options might use default values or allow modification through environment variables, if they are supported in Langflow.
|
||||
For information about specific options, see the LangChain API reference and provider documentation.
|
||||
|
||||
<details>
|
||||
<summary>Vector Store Connection ports</summary>
|
||||
|
||||
The **Astra DB** and **OpenSearch** components have an additional **Vector Store Connection** output.
|
||||
This output can only connect to a `VectorStore` input port, and it was intended for use with dedicated Graph RAG components.
|
||||
|
||||
The only non-legacy component that supports this input is the **Graph RAG** component, which was meant as a Graph RAG extension to the **Astra DB** component.
|
||||
Instead, you can use the **Astra DB Graph** component that includes both the vector store connection and Graph RAG functionality.
|
||||
OpenSearch instances support Graph traversal through built-in RAG functionality and plugins.
|
||||
|
||||
</details>
|
||||
|
||||
## Apache Cassandra
|
||||
|
||||
The **Cassandra** and **Cassandra Graph** components can be used with Cassandra clusters that support vector search, including Astra DB.
|
||||
|
||||
For more information, see the following:
|
||||
|
||||
* [Hidden parameters](#hidden-parameters)
|
||||
* [Search results output](#search-results-output)
|
||||
* [Vector store instances](#vector-store-instances)
|
||||
* [Vector search in Cassandra](https://cassandra.apache.org/doc/latest/cassandra/vector-search/overview.html)
|
||||
|
||||
### Cassandra
|
||||
|
||||
Use the **Cassandra** component to read or write to a Cassandra vector store using a `CassandraVectorStore` instance.
|
||||
|
||||
<details>
|
||||
<summary>Cassandra parameters</summary>
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| database_ref | String | Input parameter. Contact points for the database or an Astra database ID. |
|
||||
| username | String | Input parameter. Username for the database. Leave empty for Astra DB. |
|
||||
| token | SecretString | Input parameter. User password for the database or an Astra application token. |
|
||||
| keyspace | String | Input parameter. The name of the keyspace containing the vector store specified in **Table Name** (`table_name`). |
|
||||
| table_name | String | Input parameter. The name of the table or collection that is the vector store. |
|
||||
| ttl_seconds | Integer | Input parameter. Time-to-live for added texts, if supported by the cluster. Only relevant for writes. |
|
||||
| batch_size | Integer | Input parameter. Amount of records to process in a single batch. |
|
||||
| setup_mode | String | Input parameter. Configuration mode for setting up a Cassandra table. |
|
||||
| cluster_kwargs | Dict | Input parameter. Additional keyword arguments for a Cassandra cluster. |
|
||||
| search_query | String | Input parameter. Query string for similarity search. Only relevant for reads. |
|
||||
| ingest_data | Data | Input parameter. Data to be loaded into the vector store as raw chunks and embeddings. Only relevant for writes. |
|
||||
| embedding | Embeddings | Input parameter. Embedding function to use. |
|
||||
| number_of_results | Integer | Input parameter. Number of results to return in search. Only relevant for reads. |
|
||||
| search_type | String | Input parameter. Type of search to perform. Only relevant for reads. |
|
||||
| search_score_threshold | Float | Input parameter. Minimum similarity score for search results. Only relevant for reads. |
|
||||
| search_filter | Dict | Input parameter. An optional dictionary of metadata search filters to apply in addition to vector search. Only relevant for reads. |
|
||||
| body_search | String | Input parameter. Document textual search terms. Only relevant for reads. |
|
||||
| enable_body_search | Boolean | Input parameter. Flag to enable body search. Only relevant for reads. |
|
||||
|
||||
</details>
|
||||
|
||||
### Cassandra Graph
|
||||
|
||||
The **Cassandra Graph** component uses a `CassandraGraphVectorStore` instance for graph traversal and graph-based document retrieval in a compatible Cassandra cluster.
|
||||
It also supports writing to the vector store.
|
||||
|
||||
<details>
|
||||
<summary>Cassandra Graph parameters</summary>
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
| database_ref | Contact Points / Astra Database ID | Input parameter. The contact points for the database or an Astra database ID. Required. |
|
||||
| username | Username | Input parameter. The username for the database. Leave empty for Astra DB. |
|
||||
| token | Password / Astra DB Token | Input parameter. The user password for the database or an Astra application token. Required. |
|
||||
| keyspace | Keyspace | Input parameter. The name of the keyspace containing the vector store specified in **Table Name** (`table_name`). Required. |
|
||||
| table_name | Table Name | Input parameter. The name of the table or collection that is the vector store. Required. |
|
||||
| setup_mode | Setup Mode | Input parameter. The configuration mode for setting up the Cassandra table. The options are `Sync` (default) or `Off`. |
|
||||
| cluster_kwargs | Cluster arguments | Input parameter. An optional dictionary of additional keyword arguments for the Cassandra cluster. |
|
||||
| search_query | Search Query | Input parameter. The query string for similarity search. Only relevant for reads. |
|
||||
| ingest_data | Ingest Data | Input parameter. Data to be loaded into the vector store as raw chunks and embeddings. Only relevant for writes. |
|
||||
| embedding | Embedding | Input parameter. The embedding model to use. |
|
||||
| number_of_results | Number of Results | Input parameter. The number of results to return in similarity search. Only relevant for reads. Default: 4. |
|
||||
| search_type | Search Type | Input parameter. The search type to use. The options are `Traversal` (default), `MMR Traversal`, `Similarity`, `Similarity with score threshold`, or `MMR (Max Marginal Relevance)`. |
|
||||
| depth | Depth of traversal | Input parameter. The maximum depth of edges to traverse. Only relevant if **Search Type** (`search_type`) is `Traversal` or `MMR Traversal`. Default: 1. |
|
||||
| search_score_threshold | Search Score Threshold | Input parameter. The minimum similarity score threshold for search results. Only relevant for reads using the `Similarity with score threshold` search type. |
|
||||
| search_filter | Search Metadata Filter | Input parameter. An optional dictionary of metadata search filters to apply in addition to graph traversal and similarity search. |
|
||||
|
||||
</details>
|
||||
|
||||
## Chroma
|
||||
|
||||
The **Chroma DB** and **Local DB** components read and write to Chroma vector stores using an instance of `Chroma` vector store.
|
||||
Includes support for remote or in-memory instances with or without persistence.
|
||||
|
||||
For more information, see the following:
|
||||
|
||||
* [Hidden parameters](#hidden-parameters)
|
||||
* [Search results output](#search-results-output)
|
||||
* [Vector store instances](#vector-store-instances)
|
||||
* [Chroma documentation](https://docs.trychroma.com/)
|
||||
|
||||
### Chroma DB
|
||||
|
||||
You can use the **Chroma DB** component to read and write to a Chroma database in local storage or a remote Chroma server with options for persistence and caching.
|
||||
When writing, the component can create a new database or collection at the specified location.
|
||||
|
||||
:::tip
|
||||
An ephemeral (non-persistent) local Chroma vector store is helpful for testing vector search flows where you don't need to retain the database.
|
||||
:::
|
||||
|
||||
The following example flow uses one **Chroma DB** component for both reads and writes:
|
||||
|
||||
* When writing, it splits `Data` from a [**URL** component](/components-data#url) into chunks, computes embeddings with attached **Embedding Model** component, and then loads the chunks and embeddings into the Chroma vector store.
|
||||
To trigger writes, click <Icon name="Play" aria-hidden="true"/> **Run component** on the **Chroma DB** component.
|
||||
|
||||
* When reading, it uses chat input to perform a similarity search on the vector store, and then print the search results to the chat.
|
||||
To trigger reads, open the **Playground** and enter a chat message.
|
||||
|
||||
After running the flow once, you can click <Icon name="TextSearch" aria-hidden="true"/> **Inspect Output** on each component to understand how the data transformed as it passed from component to component.
|
||||
|
||||

|
||||
|
||||
<details>
|
||||
<summary>Chroma DB parameters</summary>
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| **Collection Name** (`collection_name`) | String | Input parameter. The name of your Chroma vector store collection. Default: `langflow`. |
|
||||
| **Persist Directory** (`persist_directory`) | String | Input parameter. To persist the Chroma database, enter a relative or absolute path to a directory to store the `chroma.sqlite3` file. Leave empty for an ephemeral database. When reading or writing to an existing persistent database, specify the path to the persistent directory. |
|
||||
| **Ingest Data** (`ingest_data`) | Data or DataFrame | Input parameter. `Data` or `DataFrame` input containing the records to write to the vector store. Only relevant for writes. |
|
||||
| **Search Query** (`search_query`) | String | Input parameter. The query to use for vector search. Only relevant for reads. |
|
||||
| **Cache Vector Store** (`cache_vector_store`) | Boolean | Input parameter. If true, the component caches the vector store in memory for faster reads. Default: Enabled (true). |
|
||||
| **Embedding** (`embedding`) | Embeddings | Input parameter. The embedding function to use for the vector store. By default, Chroma DB uses its built-in embeddings model, or you can attach an **Embedding Model** component to use a different provider or model. |
|
||||
| **CORS Allow Origins** (`chroma_server_cors_allow_origins`) | String | Input parameter. The CORS allow origins for the Chroma server. |
|
||||
| **Chroma Server Host** (`chroma_server_host`) | String | Input parameter. The host for the Chroma server. |
|
||||
| **Chroma Server HTTP Port** (`chroma_server_http_port`) | Integer | Input parameter. The HTTP port for the Chroma server. |
|
||||
| **Chroma Server gRPC Port** (`chroma_server_grpc_port`) | Integer | Input parameter. The gRPC port for the Chroma server. |
|
||||
| **Chroma Server SSL Enabled** (`chroma_server_ssl_enabled`) | Boolean | Input parameter. Enable SSL for the Chroma server. |
|
||||
| **Allow Duplicates** (`allow_duplicates`) | Boolean | Input parameter. If true (default), writes don't check for existing duplicates in the collection, allowing you to store multiple copies of the same content. If false, writes won't add documents that match existing documents already present in the collection. If false, it can strictly enforce deduplication by searching the entire collection or only search the number of records, specified in `limit`. Only relevant for writes.|
|
||||
| **Search Type** (`search_type`) | String | Input parameter. The type of search to perform, either `Similarity` or `MMR`. Only relevant for reads. |
|
||||
| **Number of Results** (`number_of_results`) | Integer | Input parameter. The number of search results to return. Default: `10`. Only relevant for reads. |
|
||||
| **Limit** (`limit`) | Integer | Input parameter. Limit the number of records to compare when **Allow Duplicates** is false. This can help improve performance when writing to large collections, but it can result in some duplicate records. Only relevant for writes. |
|
||||
|
||||
</details>
|
||||
|
||||
### Local DB
|
||||
|
||||
The **Local DB** component reads and writes to a persistent, in-memory Chroma DB instance intended for use with Langflow.
|
||||
It has separate modes for reads and writes, automatic collection management, and default persistence in your Langflow cache directory.
|
||||
|
||||

|
||||
|
||||
Set the **Mode** parameter to reflect the operation you want the component to perform, and the configure the other parameters accordingly.
|
||||
Some parameters are only available for one mode.
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="ingest" label="Ingest">
|
||||
|
||||
To create or write to your local Chroma vector store, use **Ingest** mode.
|
||||
|
||||
The following parameters are available in **Ingest** mode:
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| **Name Your Collection** (`collection_name`) | String | Input parameter. The name for your Chroma vector store collection. Default: `langflow`. Only available in **Ingest** mode. |
|
||||
| **Persist Directory** (`persist_directory`) | String | Input parameter. The base directory where you want to create and persist the vector store. If you use the **Local DB** component in multiple flows or to create multiple collections, collections are stored at `$PERSISTENT_DIRECTORY/vector_stores/$COLLECTION_NAME`. If not specified, the default location is your Langflow cache directory (`LANGFLOW_CONFIG_DIR`). For more information, see [Memory management options](/memory). |
|
||||
| **Embedding** (`embedding`) | Embeddings | Input parameter. The embedding function to use for the vector store. |
|
||||
| **Allow Duplicates** (`allow_duplicates`) | Boolean | Input parameter. If true (default), writes don't check for existing duplicates in the collection, allowing you to store multiple copies of the same content. If false, writes won't add documents that match existing documents already present in the collection. If false, it can strictly enforce deduplication by searching the entire collection or only search the number of records, specified in `limit`. Only available in **Ingest** mode. |
|
||||
| **Ingest Data** (`ingest_data`) | Data or DataFrame | Input parameter. The records to write to the collection. Records are embedded and indexed for semantic search. Only available in **Ingest** mode. |
|
||||
| **Limit** (`limit`) | Integer | Input parameter. Limit the number of records to compare when **Allow Duplicates** is false. This can help improve performance when writing to large collections, but it can result in some duplicate records. Only available in **Ingest** mode. |
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="retrieve" label="Retrieve">
|
||||
|
||||
To read from your local Chroma vector store, use **Retrieve** mode.
|
||||
|
||||
The following parameters are available in **Retrieve** mode:
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| **Persist Directory** (`persist_directory`) | String | Input parameter. The base directory where you want to create and persist the vector store. If you use the **Local DB** component in multiple flows or to create multiple collections, collections are stored at `$PERSISTENT_DIRECTORY/vector_stores/$COLLECTION_NAME`. If not specified, the default location is your Langflow cache directory (`LANGFLOW_CONFIG_DIR`). For more information, see [Memory management options](/memory). |
|
||||
| **Existing Collections** (`existing_collections`) | String | Input parameter. Select a previously-created collection to search. Only available in **Retrieve** mode. |
|
||||
| **Embedding** (`embedding`) | Embeddings | Input parameter. The embedding function to use for the vector store. |
|
||||
| **Search Type** (`search_type`) | String | Input parameter. The type of search to perform, either `Similarity` or `MMR`. Only available in **Retrieve** mode. |
|
||||
| **Search Query** (`search_query`) | String | Input parameter. Enter a query for similarity search. Only available in **Retrieve** mode. |
|
||||
| **Number of Results** (`number_of_results`) | Integer | Input parameter. Number of search results to return. Default: 10. Only available in **Retrieve** mode. |
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Clickhouse
|
||||
|
||||
The **Clickhouse** component reads and writes to a Clickhouse vector store using an instance of `Clickhouse` vector store.
|
||||
|
||||
For more information, see the following:
|
||||
|
||||
* [Hidden parameters](#hidden-parameters)
|
||||
* [Search results output](#search-results-output)
|
||||
* [Vector store instances](#vector-store-instances)
|
||||
* [Clickhouse Documentation](https://clickhouse.com/docs/en/intro)
|
||||
|
||||
<details>
|
||||
<summary>Clickhouse parameters</summary>
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
| host | hostname | Input parameter. The Clickhouse server hostname. Required. Default: `localhost`. |
|
||||
| port | port | Input parameter. The Clickhouse server port. Required. Default: `8123`. |
|
||||
| database | database | Input parameter. The Clickhouse database name. Required. |
|
||||
| table | Table name | Input parameter. The Clickhouse table name. Required. |
|
||||
| username | Username | Input parameter. Clickhouse username for authentication. Required. |
|
||||
| password | Password | Input parameter. Clickhouse password for authentication. Required. |
|
||||
| index_type | index_type | Input parameter. Type of the index, either `annoy` (default) or `vector_similarity`. |
|
||||
| metric | metric | Input parameter. Metric to compute distance for similarity search. The options are `angular` (default), `euclidean`, `manhattan`, `hamming`, `dot`. |
|
||||
| secure | Use HTTPS/TLS | Input parameter. If true, enables HTTPS/TLS for the Clickhouse server and overrides inferred values for interface or port arguments. Default: false. |
|
||||
| index_param | Param of the index | Input parameter. Index parameters. Default: `100,'L2Distance'`. |
|
||||
| index_query_params | index query params | Input parameter. Additional index query parameters. |
|
||||
| search_query | Search Query | Input parameter. The query string for similarity search. Only relevant for reads. |
|
||||
| ingest_data | Ingest Data | Input parameter. The records to load into the vector store. |
|
||||
| cache_vector_store | Cache Vector Store | Input parameter. If true, the component caches the vector store in memory for faster reads. Default: Enabled (true). |
|
||||
| embedding | Embedding | Input parameter. The embedding model to use. |
|
||||
| number_of_results | Number of Results | Input parameter. The number of search results to return. Default: `4`. Only relevant for reads. |
|
||||
| score_threshold | Score threshold | Input parameter. The threshold for similarity score comparison. Default: Unset (no threshold). Only relevant for reads. |
|
||||
|
||||
</details>
|
||||
|
||||
## Couchbase
|
||||
|
||||
The **Couchbase** component reads and writes to a Couchbase vector store using an instance of `CouchbaseSearchVectorStore`.
|
||||
|
||||
For more information, see the following:
|
||||
|
||||
* [Hidden parameters](#hidden-parameters)
|
||||
* [Search results output](#search-results-output)
|
||||
* [Vector store instances](#vector-store-instances)
|
||||
* [Couchbase documentation](https://docs.couchbase.com/home/index.html)
|
||||
|
||||
<details>
|
||||
<summary>Couchbase parameters</summary>
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| couchbase_connection_string | SecretString | Input parameter. Couchbase Cluster connection string. Required. |
|
||||
| couchbase_username | String | Input parameter. Couchbase username for authentication. Required. |
|
||||
| couchbase_password | SecretString | Input parameter. Couchbase password for authentication. Required. |
|
||||
| bucket_name | String | Input parameter. Name of the Couchbase bucket. Required. |
|
||||
| scope_name | String | Input parameter. Name of the Couchbase scope. Required. |
|
||||
| collection_name | String | Input parameter. Name of the Couchbase collection. Required. |
|
||||
| index_name | String | Input parameter. Name of the Couchbase index. Required. |
|
||||
| ingest_data | Data | Input parameter. The records to load into the vector store. Only relevant for writes. |
|
||||
| search_query | String | Input parameter. The query string for vector search. Only relevant for reads. |
|
||||
| cache_vector_store | Boolean | Input parameter. If true, the component caches the vector store in memory for faster reads. Default: Enabled (true). |
|
||||
| embedding | Embeddings | Input parameter. The embedding function to use for the vector store. |
|
||||
| number_of_results | Integer | Input parameter. Maximum number of search results to return. Default: 4. Only relevant for reads. |
|
||||
|
||||
</details>
|
||||
|
||||
## DataStax
|
||||
|
||||
The following components support DataStax vector stores.
|
||||
|
||||
For more information, see the following:
|
||||
|
||||
* [Hidden parameters](#hidden-parameters)
|
||||
* [Search results output](#search-results-output)
|
||||
* [Vector store instances](#vector-store-instances)
|
||||
* [Astra DB Serverless documentation](https://docs.datastax.com/en/astra-db-serverless/index.html)
|
||||
* [Hyper-Converged Database (HCD) documentation](https://docs.datastax.com/en/hyper-converged-database/1.2/get-started/get-started-hcd.html)
|
||||
|
||||
### Astra DB
|
||||
|
||||
The **Astra DB** component read and writes to Astra DB Serverless databases, using an instance of `AstraDBVectorStore` to call the Data API and DevOps API.
|
||||
|
||||
:::important
|
||||
It is recommend that you create any databases, keyspaces, and collections you need before configuring the **Astra DB** component.
|
||||
|
||||
You can create new databases and collections through this component, but this is only possible in the Langflow visual editor, not at runtime, and you must wait while the database or collection initializes before proceeding with flow configuration.
|
||||
Additionally, not all database and collection configuration options are available through the **Astra DB** component, such as hybrid search options, PCU groups, vectorize integration management, and multi-region deployments.
|
||||
:::
|
||||
|
||||
<details>
|
||||
<summary>Astra DB parameters</summary>
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
| token | Astra DB Application Token | Input parameter. An Astra application token with permission to access your vector database. Once the connection is verified, additional fields are populated with your existing databases and collections. If you want to create a database through this component, the application token must have Organization Administrator permissions. |
|
||||
| environment | Environment | Input parameter. The environment for the Astra DB API endpoint. Always use `prod`. |
|
||||
| database_name | Database | Input parameter. The name of the database that you want this component to connect to. Or, you can select **New Database** to create a new database, and then wait for the database to initialize. |
|
||||
| keyspace | Keyspace | Input parameter. The keyspace in your database that contains the collection specified in `collection_name`. Default: `default_keyspace`. |
|
||||
| collection_name | Collection | Input parameter. The name of the collection that you want to use with this flow. Or, select **New Collection** to create a new collection with limited configuration options. To ensure your collection is configured with the correct embedding provider and search capabilities, it is recommended to create the collection in the Astra Portal or with the Data API *before* configuring this component. For more information, see [Manage collections in Astra DB Serverless](https://docs.datastax.com/en/astra-db-serverless/databases/manage-collections.html). |
|
||||
| embedding_model | Embedding Model | Input parameter. Attach an [**Embedding Model** component](/components-embedding-models) to generate embeddings. Only available if the specified collection doesn't have a [vectorize integration](https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html). If a vectorize integration exists, the component automatically uses the collection's integrated model. |
|
||||
| ingest_data | Ingest Data | Input parameter. The documents to load into the specified collection. |
|
||||
| search_query | Search Query | Input parameter. The query string for vector search. |
|
||||
| cache_vector_store | Cache Vector Store | Input parameter. Whether to cache the vector store in Langflow memory for faster reads. Default: Enabled (true). |
|
||||
| search_method | Search Method | Input parameter. The search methods to use, either `Hybrid Search` or `Vector Search`. Your collection must be configured to support the chosen option, and the default depends on what your collection supports. All collections in Astra DB Serverless (Vector) databases support vector search, but hybrid search requires that you set specific collection settings when creating the collection. These options are only available when creating a collection programmatically. For more information, see [Ways to find data in Astra DB Serverless](https://docs.datastax.com/en/astra-db-serverless/databases/about-search.html) and [Create a collection that supports hybrid search](https://docs.datastax.com/en/astra-db-serverless/api-reference/collection-methods/create-collection.html#example-hybrid). |
|
||||
| reranker | Reranker | Input parameter. The re-ranker model to use for hybrid search, depending on the collection configuration. **This parameter shows the default reranker even if the selected collection doesn't support hybrid search.** To verify if a collection supports hybrid search, [get collection metadata](https://docs.datastax.com/en/astra-db-serverless/api-reference/collection-methods/list-collection-metadata.html), and then check that `lexical` and `rerank` both have `"enabled": true`. |
|
||||
| lexical_terms | Lexical Terms | Input parameter. A space-separated string of keywords for hybrid search, like `features, data, attributes, characteristics`. This parameter is only available if the collection supports hybrid search. For more information, see the following **Hybrid search example**. |
|
||||
| number_of_results | Number of Search Results | Input parameter. The number of search results to return. Default: 4. |
|
||||
| search_type | Search Type | Input parameter. The search type to use, either `Similarity` (default), `Similarity with score threshold`, and `MMR (Max Marginal Relevance)`. |
|
||||
| search_score_threshold | Search Score Threshold | Input parameter. The minimum similarity score threshold for vector search results with the `Similarity with score threshold` search type. Default: 0. |
|
||||
| advanced_search_filter | Search Metadata Filter | Input parameter. An optional dictionary of metadata filters to apply in addition to vector or hybrid search. |
|
||||
| autodetect_collection | Autodetect Collection | Input parameter. Whether to automatically fetch a list of available collections after providing an application token and API endpoint. |
|
||||
| content_field | Content Field | Input parameter. For writes, this parameter specifies the name of the field in the documents that contains text strings for which you want to generate embeddings. |
|
||||
| deletion_field | Deletion Based On Field | Input parameter. When provided, documents in the target collection with metadata field values matching the input metadata field value are deleted before new records are loaded. Use this setting for writes with upserts (overwrites). |
|
||||
| ignore_invalid_documents | Ignore Invalid Documents | Input parameter. Whether to ignore invalid documents during writes. If disabled (false), then an error is raised for invalid documents. Default: Enabled (true). |
|
||||
| astradb_vectorstore_kwargs | AstraDBVectorStore Parameters | Input parameter. An optional dictionary of additional parameters for the `AstraDBVectorStore` instance. For more information, see [Vector store instances](#vector-store-instances). |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Hybrid search example</summary>
|
||||
|
||||
The **Astra DB** component supports the Data API's [hybrid search](https://docs.datastax.com/en/astra-db-serverless/databases/hybrid-search.html) feature.
|
||||
Hybrid search performs a vector similarity search and a lexical search, compares the results of both searches, and then returns the most relevant results overall.
|
||||
|
||||
To use hybrid search through the **Astra DB** component, do the following:
|
||||
|
||||
1. Use the Data API to [create a collection that supports hybrid search](https://docs.datastax.com/en/astra-db-serverless/api-reference/collection-methods/create-collection.html#example-hybrid) if you haven't already created one.
|
||||
|
||||
Although you can create a collection through the **Astra DB** component, you have more control and insight into the collection settings when using the Data API for this operation.
|
||||
|
||||
2. Create a flow based on the **Hybrid Search RAG** template, which includes an **Astra DB** component that is pre-configured for hybrid search.
|
||||
3. In the **Language Model** components, add your OpenAI API key.
|
||||
4. Delete the **Language Model** component that is connected to the **Structured Output** component's **Input Message** port, and then connect the **Chat Input** component to that port.
|
||||
5. Configure the **Astra DB** vector store component:
|
||||
|
||||
1. Enter your Astra DB application token.
|
||||
2. In the **Database** field, select your database.
|
||||
3. In the **Collection** field, select your collection with hybrid search enabled.
|
||||
|
||||
Once you select a collection that supports hybrid search, the other parameters automatically update to allow hybrid search options.
|
||||
|
||||
6. In the [component's header menu](/concepts-components#component-menus), click <Icon name="SlidersHorizontal" aria-hidden="true"/> **Controls**, find the **Lexical Terms** field, enable the **Show** toggle, and then click **Close**.
|
||||
|
||||
7. Connect the first **Parser** component's **Parsed Text** output to the **Astra DB** component's **Lexical Terms** input.
|
||||
This input only appears after connecting a collection that support hybrid search with reranking.
|
||||
|
||||
8. Click the **Structured Output** component to expose the [component's header menu](/concepts-components#component-menus), click <Icon name="SlidersHorizontal" aria-hidden="true"/> **Controls**, find the **Format Instructions** row, click <Icon name="Expand" aria-hidden="true"/> **Expand**, and then replace the prompt with the following text:
|
||||
|
||||
```text
|
||||
You are a database query planner that takes a user's requests, and then converts to a search against the subject matter in question.
|
||||
You should convert the query into:
|
||||
1. A list of keywords to use against a Lucene text analyzer index, no more than 4. Strictly unigrams.
|
||||
2. A question to use as the basis for a QA embedding engine.
|
||||
Avoid common keywords associated with the user's subject matter.
|
||||
```
|
||||
|
||||
9. Click **Finish Editing**, and then click **Close** to save your changes to the component.
|
||||
|
||||
10. Open the **Playground**, and then enter a natural language question that you would ask about your database.
|
||||
|
||||
In this example, your input is sent to both the **Astra DB** and **Structured Output** components:
|
||||
|
||||
* The input sent directly to the **Astra DB** component's **Search Query** port is used as a string for similarity search.
|
||||
An embedding is generated from the query string using the collection's Astra DB vectorize integration.
|
||||
|
||||
* The input sent to the **Structured Output** component is processed by the **Structured Output**, **Language Model**, and **Parser** components to extract space-separated `keywords` used for the lexical search portion of the hybrid search.
|
||||
|
||||
The complete hybrid search query is executed against your database using the Data API's `find_and_rerank` command.
|
||||
The API's response is output as a `DataFrame` that is transformed into a text string `Message` by another **Parser** component.
|
||||
Finally, the **Chat Output** component prints the `Message` response to the **Playground**.
|
||||
|
||||
11. Optional: Exit the **Playground**, and then click <Icon name="TextSearch" aria-hidden="true"/> **Inspect Output** on each individual component to understand how lexical keywords were constructed and view the raw response from the Data API.
|
||||
This is helpful for debugging flows where a certain component isn't receiving input as expected from another component.
|
||||
|
||||
* **Structured Output component**: The output is the `Data` object produced by applying the output schema to the LLM's response to the input message and format instructions.
|
||||
The following example is based on the aforementioned instructions for keyword extraction:
|
||||
|
||||
```
|
||||
1. Keywords: features, data, attributes, characteristics
|
||||
2. Question: What characteristics can be identified in my data?
|
||||
```
|
||||
|
||||
* **Parser component**: The output is the string of keywords extracted from the structured output `Data`, and then used as lexical terms for the hybrid search.
|
||||
|
||||
* **Astra DB component**: The output is the `DataFrame` containing the results of the hybrid search as returned by the Data API.
|
||||
|
||||
</details>
|
||||
|
||||
### Astra DB Graph
|
||||
|
||||
The **Astra DB Graph** component uses a `AstraDBGraphVectorStore` instance for graph traversal and graph-based document retrieval in an Astra DB collection. It also supports writing to the vector store.
|
||||
For more information, see [Build a Graph RAG system with LangChain and GraphRetriever](https://docs.datastax.com/en/astra-db-serverless/tutorials/graph-rag.html).
|
||||
|
||||
<details>
|
||||
<summary>Astra DB Graph parameters</summary>
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
| token | Astra DB Application Token | Input parameter. An Astra application token with permission to access your vector database. Once the connection is verified, additional fields are populated with your existing databases and collections. If you want to create a database through this component, the application token must have Organization Administrator permissions. |
|
||||
| api_endpoint | API Endpoint | Input parameter. Your database's API endpoint. |
|
||||
| keyspace | Keyspace | Input parameter. The keyspace in your database that contains the collection specified in `collection_name`. Default: `default_keyspace`. |
|
||||
| collection_name | Collection | Input parameter. The name of the collection that you want to use with this flow. For write operations, if a matching collection doesn't exist, a new one is created. |
|
||||
| metadata_incoming_links_key | Metadata Incoming Links Key | Input parameter. The metadata key for the incoming links in the vector store. |
|
||||
| ingest_data | Ingest Data | Input parameter. Records to load into the vector store. Only relevant for writes. |
|
||||
| search_input | Search Query | Input parameter. Query string for similarity search. Only relevant for reads. |
|
||||
| cache_vector_store | Cache Vector Store | Input parameter. Whether to cache the vector store in Langflow memory for faster reads. Default: Enabled (true). |
|
||||
| embedding_model | Embedding Model | Input parameter. Attach an [**Embedding Model** component](/components-embedding-models) to generate embeddings. If the collection has a [vectorize integration](https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html), don't attach an **Embedding Model** component. |
|
||||
| metric | Metric | Input parameter. The metrics to use for similarity search calculations, either `cosine` (default), `dot_product`, or `euclidean`. This is a collection setting. |
|
||||
| batch_size | Batch Size | Input parameter. Optional number of records to process in a single batch. |
|
||||
| bulk_insert_batch_concurrency | Bulk Insert Batch Concurrency | Input parameter. Optional concurrency level for bulk write operations. |
|
||||
| bulk_insert_overwrite_concurrency | Bulk Insert Overwrite Concurrency | Input parameter. Optional concurrency level for bulk write operations that allow upserts (overwriting existing records). |
|
||||
| bulk_delete_concurrency | Bulk Delete Concurrency | Input parameter. Optional concurrency level for bulk delete operations. |
|
||||
| setup_mode | Setup Mode | Input parameter. Configuration mode for setting up the vector store, either `Sync` (default) or `Off`. |
|
||||
| pre_delete_collection | Pre Delete Collection | Input parameter. Whether to delete the collection before creating a new one. Default: Disabled (false). |
|
||||
| metadata_indexing_include | Metadata Indexing Include | Input parameter. An list of metadata fields to index if you want to enable [selective indexing](https://docs.datastax.com/en/astra-db-serverless/api-reference/collection-indexes.html) *only* when creating a collection. Doesn't apply to existing collections. Only one `*_indexing_*` parameter can be set per collection. If all `*_indexing_*` parameters are unset, then all fields are indexed (default indexing). |
|
||||
| metadata_indexing_exclude | Metadata Indexing Exclude | Input parameter. An list of metadata fields to exclude from indexing if you want to enable selective indexing *only* when creating a collection. Doesn't apply to existing collections. Only one `*_indexing_*` parameter can be set per collection. If all `*_indexing_*` parameters are unset, then all fields are indexed (default indexing). |
|
||||
| collection_indexing_policy | Collection Indexing Policy | Input parameter. A dictionary to define the indexing policy if you want to enable selective indexing *only* when creating a collection. Doesn't apply to existing collections. Only one `*_indexing_*` parameter can be set per collection. If all `*_indexing_*` parameters are unset, then all fields are indexed (default indexing). The `collection_indexing_policy` dictionary is used when you need to set indexing on subfields or a complex indexing definition that isn't compatible as a list. |
|
||||
| number_of_results | Number of Results | Input parameter. Number of search results to return. Default: 4. Only relevant to reads. |
|
||||
| search_type | Search Type | Input parameter. Search type to use, either `Similarity`, `Similarity with score threshold`, or `MMR (Max Marginal Relevance)`, `Graph Traversal`, or `MMR (Max Marginal Relevance) Graph Traversal` (default). Only relevant to reads. |
|
||||
| search_score_threshold | Search Score Threshold | Input parameter. Minimum similarity score threshold for search results if the `search_type` is `Similarity with score threshold`. Default: 0. |
|
||||
| search_filter | Search Metadata Filter | Input parameter. Optional dictionary of metadata filters to apply in addition to vector search. |
|
||||
|
||||
</details>
|
||||
|
||||
### Graph RAG
|
||||
|
||||
The **Graph RAG** component uses an instance of [`GraphRetriever`](https://datastax.github.io/graph-rag/reference/langchain_graph_retriever/) for Graph RAG traversal enabling graph-based document retrieval in an Astra DB vector store.
|
||||
For more information, see the [DataStax Graph RAG documentation](https://datastax.github.io/graph-rag/).
|
||||
|
||||
:::tip
|
||||
This component was meant as a Graph RAG extension for the **Astra DB** vector store component.
|
||||
However, the **Astra DB Graph** component includes both the vector store connection and Graph RAG functionality.
|
||||
:::
|
||||
|
||||
<details>
|
||||
<summary>Graph RAG parameters</summary>
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
| embedding_model | Embedding Model | Input parameter. Specify the embedding model to use. Not required if the connected vector store has an [vectorize integration](https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html). |
|
||||
| vector_store | Vector Store Connection | Input parameter. A [`vector_store`](#vector-store-instances) instance inherited from an **Astra DB** component's **Vector Store Connection** output. |
|
||||
| edge_definition | Edge Definition | Input parameter. [Edge definition](https://datastax.github.io/graph-rag/reference/graph_retriever/edges/) for the graph traversal. |
|
||||
| strategy | Traversal Strategies | Input parameter. The strategy to use for graph traversal. Strategy options are dynamically loaded from available strategies. |
|
||||
| search_query | Search Query | Input parameter. The query to search for in the vector store. |
|
||||
| graphrag_strategy_kwargs | Strategy Parameters | Input parameter. Optional dictionary of additional parameters for the [retrieval strategy](https://datastax.github.io/graph-rag/reference/graph_retriever/strategies/). |
|
||||
| search_results | **Search Results** or **DataFrame** | Output parameter. The results of the graph-based document retrieval as a list of [`Data`](/data-types#data) objects or as a tabular [`DataFrame`](/data-types#dataframe). You can set the desired output type near the component's output port. |
|
||||
|
||||
</details>
|
||||
|
||||
### Hyper-Converged Database (HCD)
|
||||
|
||||
The **Hyper-Converged Database (HCD)** component uses your cluster's the Data API server to read and write to an HCD vector store.
|
||||
Because the underlying functions call the Data API, which originated from Astra DB, the component uses an instance of `AstraDBVectorStore`.
|
||||
|
||||

|
||||
|
||||
For more information about using the Data API with an HCD deployment, see [Get started with the Data API in HCD 1.2](https://docs.datastax.com/en/hyper-converged-database/1.2/api-reference/dataapiclient.html).
|
||||
|
||||
<details>
|
||||
<summary>HCD parameters</summary>
|
||||
|
||||
| Name | Display Name | Info |
|
||||
|------|--------------|------|
|
||||
| collection_name | Collection Name | Input parameter. The name of a vector store collection in HCD. For write operations, if the collection doesn't exist, then a new one is created. Required. |
|
||||
| username | HCD Username | Input parameter. Username for authenticating to your HCD deployment. Default: `hcd-superuser`. Required. |
|
||||
| password | HCD Password | Input parameter. Password for authenticating to your HCD deployment. Required. |
|
||||
| api_endpoint | HCD API Endpoint | Input parameter. Your deployment's HCD Data API endpoint, formatted as `http[s]://**CLUSTER_HOST**:**GATEWAY_PORT` where `CLUSTER_HOST` is the IP address of any node in your cluster and `GATEWAY_PORT` is the port number ofr your API gateway service. For example, `http://192.0.2.250:8181`. Required. |
|
||||
| ingest_data | Ingest Data | Input parameter. Records to load into the vector store. Only relevant for writes. |
|
||||
| search_input | Search Input | Input parameter. Query string for similarity search. Only relevant for reads. |
|
||||
| namespace | Namespace | Input parameter. The namespace in HCD that contains or will contain the collection specified in `collection_name`. Default: `default_namespace`. |
|
||||
| ca_certificate | CA Certificate | Input parameter. Optional CA certificate for TLS connections to HCD. |
|
||||
| metric | Metric | Input parameter. The metrics to use for similarity search calculations, either `cosine`, `dot_product`, or `euclidean`. This is a collection setting. If calling an existing collection, leave unset to use the collection's metric. If a write operation creates a new collection, specify the desired similarity metric setting. |
|
||||
| batch_size | Batch Size | Input parameter. Optional number of records to process in a single batch. |
|
||||
| bulk_insert_batch_concurrency | Bulk Insert Batch Concurrency | Input parameter. Optional concurrency level for bulk write operations. |
|
||||
| bulk_insert_overwrite_concurrency | Bulk Insert Overwrite Concurrency | Input parameter. Optional concurrency level for bulk write operations that allow upserts (overwriting existing records). |
|
||||
| bulk_delete_concurrency | Bulk Delete Concurrency | Input parameter. Optional concurrency level for bulk delete operations. |
|
||||
| setup_mode | Setup Mode | Input parameter. Configuration mode for setting up the vector store, either `Sync` (default), `Async`, or `Off`. |
|
||||
| pre_delete_collection | Pre Delete Collection | Input parameter. Whether to delete the collection before creating a new one. |
|
||||
| metadata_indexing_include | Metadata Indexing Include | Input parameter. An list of metadata fields to index if you want to enable [selective indexing](https://docs.datastax.com/en/hyper-converged-database/1.2/api-reference/collection-indexes.html) *only* when creating a collection. Doesn't apply to existing collections. Only one `*_indexing_*` parameter can be set per collection. If all `*_indexing_*` parameters are unset, then all fields are indexed (default indexing). |
|
||||
| metadata_indexing_exclude | Metadata Indexing Exclude | Input parameter. An list of metadata fields to exclude from indexing if you want to enable selective indexing *only* when creating a collection. Doesn't apply to existing collections. Only one `*_indexing_*` parameter can be set per collection. If all `*_indexing_*` parameters are unset, then all fields are indexed (default indexing). |
|
||||
| collection_indexing_policy | Collection Indexing Policy | Input parameter. A dictionary to define the indexing policy if you want to enable selective indexing *only* when creating a collection. Doesn't apply to existing collections. Only one `*_indexing_*` parameter can be set per collection. If all `*_indexing_*` parameters are unset, then all fields are indexed (default indexing). The `collection_indexing_policy` dictionary is used when you need to set indexing on subfields or a complex indexing definition that isn't compatible as a list. |
|
||||
| embedding | Embedding or Astra Vectorize | Input parameter. The embedding model to use by attaching an **Embedding Model** component. This component doesn't support additional vectorize authentication headers, so it isn't possible to use a vectorize integration with this component, even if you have enabled one on an existing HCD collection. |
|
||||
| number_of_results | Number of Results | Input parameter. Number of search results to return. Default: 4. Only relevant to reads. |
|
||||
| search_type | Search Type | Input parameter. Search type to use, either `Similarity` (default), `Similarity with score threshold`, or `MMR (Max Marginal Relevance)`. Only relevant to reads. |
|
||||
| search_score_threshold | Search Score Threshold | Input parameter. Minimum similarity score threshold for search results if the `search_type` is `Similarity with score threshold`. Default: 0. |
|
||||
| search_filter | Search Metadata Filter | Input parameter. Optional dictionary of metadata filters to apply in addition to vector search. |
|
||||
|
||||
</details>
|
||||
|
||||
## Elasticsearch
|
||||
|
||||
The **Elasticsearch** component reads and writes to an Elasticsearch instance using `ElasticsearchStore`.
|
||||
|
||||
For more information, see the following:
|
||||
|
||||
* [Hidden parameters](#hidden-parameters)
|
||||
* [Search results output](#search-results-output)
|
||||
* [Vector store instances](#vector-store-instances)
|
||||
* [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/dense-vector.html)
|
||||
|
||||
<details>
|
||||
<summary>Elasticsearch parameters</summary>
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| es_url | String | Input parameter. Elasticsearch server URL. |
|
||||
| es_user | String | Input parameter. Username for Elasticsearch authentication. |
|
||||
| es_password | SecretString | Input parameter. Password for Elasticsearch authentication. |
|
||||
| index_name | String | Input parameter. Name of the Elasticsearch index. |
|
||||
| strategy | String | Input parameter. Strategy for vector search, either `approximate_k_nearest_neighbors` or `script_scoring`. |
|
||||
| distance_strategy | String | Input parameter. Strategy for distance calculation, either `COSINE`, `EUCLIDEAN_DISTANCE`, or `DOT_PRODUCT`. |
|
||||
| search_query | String | Input parameter. Query string for similarity search. |
|
||||
| ingest_data | Data | Input parameter. Records to load into the vector store. |
|
||||
| embedding | Embeddings | Input parameter. The embedding model to use. |
|
||||
| number_of_results | Integer | Input parameter. Number of search results to return. Default: 4. |
|
||||
|
||||
</details>
|
||||
|
||||
## FAISS
|
||||
|
||||
The **FAISS** component providese access to the Facebook AI Similarity Search (FAISS) library through an instance of `FAISS` vector store.
|
||||
|
||||
For more information, see the following:
|
||||
|
||||
* [Hidden parameters](#hidden-parameters)
|
||||
* [Search results output](#search-results-output)
|
||||
* [Vector store instances](#vector-store-instances)
|
||||
* [FAISS documentation](https://faiss.ai/index.html)
|
||||
|
||||
<details>
|
||||
<summary>FAISS parameters</summary>
|
||||
|
||||
| Name | Type | Description |
|
||||
|---------------------------|---------------|--------------------------------------------------|
|
||||
| index_name | String | Input parameter. The name of the FAISS index. Default: "langflow_index". |
|
||||
| persist_directory | String | Input parameter. Path to save the FAISS index. It is relative to where Langflow is running. |
|
||||
| search_query | String | Input parameter. The query to search for in the vector store. |
|
||||
| ingest_data | Data | Input parameter. The list of data to ingest into the vector store. |
|
||||
| allow_dangerous_deserialization | Boolean | Input parameter. Set to True to allow loading pickle files from untrusted sources. Default: True. |
|
||||
| embedding | Embeddings | Input parameter. The embedding function to use for the vector store. |
|
||||
| number_of_results | Integer | Input parameter. Number of results to return from the search. Default: 4. |
|
||||
|
||||
</details>
|
||||
|
||||
## Milvus
|
||||
|
||||
The **Milvus** component reads and writes to Milvus vector stores using an instance of `Milvus` vector store.
|
||||
|
||||
For more information, see the following:
|
||||
|
||||
* [Hidden parameters](#hidden-parameters)
|
||||
* [Search results output](#search-results-output)
|
||||
* [Vector store instances](#vector-store-instances)
|
||||
* [Milvus documentation](https://milvus.io/docs)
|
||||
|
||||
<details>
|
||||
<summary>Milvus parameters</summary>
|
||||
|
||||
| Name | Type | Description |
|
||||
|-------------------------|---------------|--------------------------------------------------|
|
||||
| collection_name | String | Input parameter. Name of the Milvus collection. |
|
||||
| collection_description | String | Input parameter. Description of the Milvus collection. |
|
||||
| uri | String | Input parameter. Connection URI for Milvus. |
|
||||
| password | SecretString | Input parameter. Password for Milvus. |
|
||||
| username | SecretString | Input parameter. Username for Milvus. |
|
||||
| batch_size | Integer | Input parameter. Number of data to process in a single batch. |
|
||||
| search_query | String | Input parameter. Query for similarity search. |
|
||||
| ingest_data | Data | Input parameter. Data to be ingested into the vector store. |
|
||||
| embedding | Embeddings | Input parameter. Embedding function to use. |
|
||||
| number_of_results | Integer | Input parameter. Number of results to return in search. |
|
||||
| search_type | String | Input parameter. Type of search to perform. |
|
||||
| search_score_threshold | Float | Input parameter. Minimum similarity score for search results. |
|
||||
| search_filter | Dict | Input parameter. Metadata filters for search query. |
|
||||
| setup_mode | String | Input parameter. Configuration mode for setting up the vector store. |
|
||||
| vector_dimensions | Integer | Input parameter. Number of dimensions of the vectors. |
|
||||
| pre_delete_collection | Boolean | Input parameter. Whether to delete the collection before creating a new one. |
|
||||
|
||||
</details>
|
||||
|
||||
## MongoDB Atlas
|
||||
|
||||
The **MongoDB Atlas** component reads and writes to MongoDB Atlas vector stores using an instance of `MongoDBAtlasVectorSearch`.
|
||||
|
||||
For more information, see the following:
|
||||
|
||||
* [Hidden parameters](#hidden-parameters)
|
||||
* [Search results output](#search-results-output)
|
||||
* [Vector store instances](#vector-store-instances)
|
||||
* [MongoDB Atlas documentation](https://www.mongodb.com/docs/atlas/atlas-vector-search/tutorials/vector-search-quick-start/)
|
||||
|
||||
<details>
|
||||
<summary>MongoDB Atlas parameters</summary>
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------------------------- | ------------ | ----------------------------------------- |
|
||||
| mongodb_atlas_cluster_uri | SecretString | Input parameter. The connection URI for your MongoDB Atlas cluster. Required. |
|
||||
| enable_mtls | Boolean | Input parameter. Enable mutual TLS authentication. Default: false. |
|
||||
| mongodb_atlas_client_cert | SecretString | Input parameter. Client certificate combined with private key for mTLS authentication. Required if mTLS is enabled. |
|
||||
| db_name | String | Input parameter. The name of the database to use. Required. |
|
||||
| collection_name | String | Input parameter. The name of the collection to use. Required. |
|
||||
| index_name | String | Input parameter. The name of the Atlas Search index, it should be a Vector Search. Required. |
|
||||
| insert_mode | String | Input parameter. How to insert new documents into the collection. The options are "append" or "overwrite". Default: "append". |
|
||||
| embedding | Embeddings | Input parameter. The embedding model to use. |
|
||||
| number_of_results | Integer | Input parameter. Number of results to return in similarity search. Default: 4. |
|
||||
| index_field | String | Input parameter. The field to index. Default: "embedding". |
|
||||
| filter_field | String | Input parameter. The field to filter the index. |
|
||||
| number_dimensions | Integer | Input parameter. Embedding context length. Default: 1536. |
|
||||
| similarity | String | Input parameter. The method used to measure similarity between vectors. The options are "cosine", "euclidean", or "dotProduct". Default: "cosine". |
|
||||
| quantization | String | Input parameter. Quantization reduces memory costs by converting 32-bit floats to smaller data types. The options are "scalar" or "binary". |
|
||||
|
||||
</details>
|
||||
|
||||
## OpenSearch
|
||||
|
||||
The **OpenSearch** component reads and writes to OpenSearch instances using `OpenSearchVectorSearch`.
|
||||
|
||||
For more information, see the following:
|
||||
|
||||
* [Hidden parameters](#hidden-parameters)
|
||||
* [Search results output](#search-results-output)
|
||||
* [Vector store instances](#vector-store-instances)
|
||||
* [OpenSearch documentation](https://opensearch.org/platform/search/vector-database.html)
|
||||
|
||||
<details>
|
||||
<summary>OpenSearch parameters</summary>
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| opensearch_url | String | Input parameter. URL for OpenSearch cluster, such as `https://192.168.1.1:9200`. |
|
||||
| index_name | String | Input parameter. The index name where the vectors are stored in OpenSearch cluster. |
|
||||
| search_input | String | Input parameter. Enter a search query. Leave empty to retrieve all documents or if hybrid search is being used. |
|
||||
| ingest_data | Data | Input parameter. The data to be ingested into the vector store. |
|
||||
| embedding | Embeddings | Input parameter. The embedding function to use. |
|
||||
| search_type | String | Input parameter. The options are "similarity", "similarity_score_threshold", "mmr". |
|
||||
| number_of_results | Integer | Input parameter. The number of results to return in search. |
|
||||
| search_score_threshold | Float | Input parameter. The minimum similarity score threshold for search results. |
|
||||
| username | String | Input parameter. The username for the opensource cluster. |
|
||||
| password | SecretString | Input parameter. The password for the opensource cluster. |
|
||||
| use_ssl | Boolean | Input parameter. Use SSL. |
|
||||
| verify_certs | Boolean | Input parameter. Verify certificates. |
|
||||
| hybrid_search_query | String | Input parameter. Provide a custom hybrid search query in JSON format. This allows you to combine vector similarity and keyword matching. |
|
||||
|
||||
</details>
|
||||
|
||||
## PGVector
|
||||
|
||||
The **PGVector** component reads and writes to PostgreSQL vector stores using an instance of `PGVector`.
|
||||
|
||||
For more information, see the following:
|
||||
|
||||
* [Hidden parameters](#hidden-parameters)
|
||||
* [Search results output](#search-results-output)
|
||||
* [Vector store instances](#vector-store-instances)
|
||||
* [PGVector documentation](https://github.com/pgvector/pgvector)
|
||||
|
||||
<details>
|
||||
<summary>PGVector parameters</summary>
|
||||
|
||||
| Name | Type | Description |
|
||||
| --------------- | ------------ | ----------------------------------------- |
|
||||
| pg_server_url | SecretString | Input parameter. The PostgreSQL server connection string. |
|
||||
| collection_name | String | Input parameter. The table name for the vector store. |
|
||||
| search_query | String | Input parameter. The query for similarity search. |
|
||||
| ingest_data | Data | Input parameter. The data to be ingested into the vector store. |
|
||||
| embedding | Embeddings | Input parameter. The embedding function to use. |
|
||||
| number_of_results | Integer | Input parameter. The number of results to return in search. |
|
||||
|
||||
</details>
|
||||
|
||||
## Pinecone
|
||||
|
||||
The **Pinecone** component reads and writes to Pinecone vector stores using an instance of `PineconeVectorStore`.
|
||||
|
||||
For more information, see the following:
|
||||
|
||||
* [Hidden parameters](#hidden-parameters)
|
||||
* [Search results output](#search-results-output)
|
||||
* [Vector store instances](#vector-store-instances)
|
||||
* [Pinecone documentation](https://docs.pinecone.io/home)
|
||||
|
||||
<details>
|
||||
<summary>Pinecone parameters</summary>
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----------------- | ------------ | ----------------------------------------- |
|
||||
| index_name | String | Input parameter. The name of the Pinecone index. |
|
||||
| namespace | String | Input parameter. The namespace for the index. |
|
||||
| distance_strategy | String | Input parameter. The strategy for calculating distance between vectors. |
|
||||
| pinecone_api_key | SecretString | Input parameter. The API key for Pinecone. |
|
||||
| text_key | String | Input parameter. The key in the record to use as text. |
|
||||
| search_query | String | Input parameter. The query for similarity search. |
|
||||
| ingest_data | Data | Input parameter. The data to be ingested into the vector store. |
|
||||
| embedding | Embeddings | Input parameter. The embedding function to use. |
|
||||
| number_of_results | Integer | Input parameter. The number of results to return in search. |
|
||||
|
||||
</details>
|
||||
|
||||
## Qdrant
|
||||
|
||||
The **Qdrant** component reads and writes to Qdrant vector stores using an instance of `QdrantVectorStore`.
|
||||
|
||||
For more information, see the following:
|
||||
|
||||
* [Hidden parameters](#hidden-parameters)
|
||||
* [Search results output](#search-results-output)
|
||||
* [Vector store instances](#vector-store-instances)
|
||||
* [Qdrant documentation](https://qdrant.tech/documentation/)
|
||||
|
||||
<details>
|
||||
<summary>Qdrant parameters</summary>
|
||||
|
||||
| Name | Type | Description |
|
||||
| -------------------- | ------------ | ----------------------------------------- |
|
||||
| collection_name | String | Input parameter. The name of the Qdrant collection. |
|
||||
| host | String | Input parameter. The Qdrant server host. |
|
||||
| port | Integer | Input parameter. The Qdrant server port. |
|
||||
| grpc_port | Integer | Input parameter. The Qdrant gRPC port. |
|
||||
| api_key | SecretString | Input parameter. The API key for Qdrant. |
|
||||
| prefix | String | Input parameter. The prefix for Qdrant. |
|
||||
| timeout | Integer | Input parameter. The timeout for Qdrant operations. |
|
||||
| path | String | Input parameter. The path for Qdrant. |
|
||||
| url | String | Input parameter. The URL for Qdrant. |
|
||||
| distance_func | String | Input parameter. The distance function for vector similarity. |
|
||||
| content_payload_key | String | Input parameter. The content payload key. |
|
||||
| metadata_payload_key | String | Input parameter. The metadata payload key. |
|
||||
| search_query | String | Input parameter. The query for similarity search. |
|
||||
| ingest_data | Data | Input parameter. The data to be ingested into the vector store. |
|
||||
| embedding | Embeddings | Input parameter. The embedding function to use. |
|
||||
| number_of_results | Integer | Input parameter. The number of results to return in search. |
|
||||
|
||||
</details>
|
||||
|
||||
## Redis
|
||||
|
||||
The **Redis** component reads and writes to Redis vector stores using an instance of `Redis` vector store.
|
||||
|
||||
For more information, see the following:
|
||||
|
||||
* [Hidden parameters](#hidden-parameters)
|
||||
* [Search results output](#search-results-output)
|
||||
* [Vector store instances](#vector-store-instances)
|
||||
* [Redis documentation](https://redis.io/docs/latest/develop/interact/search-and-query/advanced-concepts/vectors/)
|
||||
|
||||
<details>
|
||||
<summary>Redis parameters</summary>
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----------------- | ------------ | ----------------------------------------- |
|
||||
| redis_server_url | SecretString | Input parameter. The Redis server connection string. |
|
||||
| redis_index_name | String | Input parameter. The name of the Redis index. |
|
||||
| code | String | Input parameter. The custom code for Redis (advanced). |
|
||||
| schema | String | Input parameter. The schema for Redis index. |
|
||||
| search_query | String | Input parameter. The query for similarity search. |
|
||||
| ingest_data | Data | Input parameter. The data to be ingested into the vector store. |
|
||||
| number_of_results | Integer | Input parameter. The number of results to return in search. |
|
||||
| embedding | Embeddings | Input parameter. The embedding function to use. |
|
||||
|
||||
</details>
|
||||
|
||||
## Supabase
|
||||
|
||||
The **Supabase** component reads and writes to Supabase vector stores using an instance of `SupabaseVectorStore`.
|
||||
|
||||
For more information, see the following:
|
||||
|
||||
* [Hidden parameters](#hidden-parameters)
|
||||
* [Search results output](#search-results-output)
|
||||
* [Vector store instances](#vector-store-instances)
|
||||
* [Supabase documentation](https://supabase.com/docs/guides/ai)
|
||||
|
||||
<details>
|
||||
<summary>Supabase parameters</summary>
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------------------- | ------------ | ----------------------------------------- |
|
||||
| supabase_url | String | Input parameter. The URL of the Supabase instance. |
|
||||
| supabase_service_key| SecretString | Input parameter. The service key for Supabase authentication. |
|
||||
| table_name | String | Input parameter. The name of the table in Supabase. |
|
||||
| query_name | String | Input parameter. The name of the query to use. |
|
||||
| search_query | String | Input parameter. The query for similarity search. |
|
||||
| ingest_data | Data | Input parameter. The data to be ingested into the vector store. |
|
||||
| embedding | Embeddings | Input parameter. The embedding function to use. |
|
||||
| number_of_results | Integer | Input parameter. The number of results to return in search. |
|
||||
|
||||
</details>
|
||||
|
||||
## Upstash
|
||||
|
||||
The **Upstash** component reads and writes to Upstash vector stores using an instance of `UpstashVectorStore`.
|
||||
|
||||
For more information, see the following:
|
||||
|
||||
* [Hidden parameters](#hidden-parameters)
|
||||
* [Search results output](#search-results-output)
|
||||
* [Vector store instances](#vector-store-instances)
|
||||
* [Upstash documentation](https://upstash.com/docs/introduction)
|
||||
|
||||
<details>
|
||||
<summary>Upstash parameters</summary>
|
||||
|
||||
| Name | Type | Description |
|
||||
| --------------- | ------------ | ----------------------------------------- |
|
||||
| index_url | String | Input parameter. The URL of the Upstash index. |
|
||||
| index_token | SecretString | Input parameter. The token for the Upstash index. |
|
||||
| text_key | String | Input parameter. The key in the record to use as text. |
|
||||
| namespace | String | Input parameter. The namespace for the index. |
|
||||
| search_query | String | Input parameter. The query for similarity search. |
|
||||
| metadata_filter | String | Input parameter. Filter documents by metadata. |
|
||||
| ingest_data | Data | Input parameter. The data to be ingested into the vector store. |
|
||||
| embedding | Embeddings | Input parameter. The embedding function to use. |
|
||||
| number_of_results | Integer | Input parameter. The number of results to return in search. |
|
||||
|
||||
</details>
|
||||
|
||||
## Vectara Platform
|
||||
|
||||
The **Vectara** and **Vectara RAG** components support Vectara vector store, search, and RAG functionality using instances of `Vectara` vector store.
|
||||
|
||||
For more information, see the following:
|
||||
|
||||
* [Hidden parameters](#hidden-parameters)
|
||||
* [Vector store instances](#vector-store-instances)
|
||||
* [Vectara documentation](https://docs.vectara.com/docs/)
|
||||
|
||||
### Vectara
|
||||
|
||||
The **Vectara** component reads and writes to Vectara vector stores, and then produces [search results output](#search-results-output).
|
||||
|
||||
<details>
|
||||
<summary>Vectara parameters</summary>
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---------------- | ------------ | ----------------------------------------- |
|
||||
| vectara_customer_id | String | Input parameter. The Vectara customer ID. |
|
||||
| vectara_corpus_id | String | Input parameter. The Vectara corpus ID. |
|
||||
| vectara_api_key | SecretString | Input parameter. The Vectara API key. |
|
||||
| embedding | Embeddings | Input parameter. The embedding function to use (optional). |
|
||||
| ingest_data | List[Document/Data] | Input parameter. The data to be ingested into the vector store. |
|
||||
| search_query | String | Input parameter. The query for similarity search. |
|
||||
| number_of_results | Integer | Input parameter. The number of results to return in search. |
|
||||
|
||||
</details>
|
||||
|
||||
### Vectara RAG
|
||||
|
||||
This component enables Vectara's full end-to-end RAG capabilities with reranking options.
|
||||
|
||||
This component uses a `Vectara` vector store to execute the vector search and reranking functions, and then outputs an **Answer** string in [`Message`](/data-types#message) format.
|
||||
|
||||
## Weaviate
|
||||
|
||||
The **Weaviate** component reads and writes to Weaviate vector stores using an instance of `Weaviate` vector store.
|
||||
|
||||
For more information, see the following:
|
||||
|
||||
* [Hidden parameters](#hidden-parameters)
|
||||
* [Search results output](#search-results-output)
|
||||
* [Vector store instances](#vector-store-instances)
|
||||
* [Weaviate Documentation](https://weaviate.io/developers/weaviate)
|
||||
|
||||
<details>
|
||||
<summary>Weaviate parameters</summary>
|
||||
|
||||
| Name | Type | Description |
|
||||
|---------------|--------------|-------------------------------------------|
|
||||
| weaviate_url | String | Input parameter. The default instance URL. |
|
||||
| search_by_text| Boolean | Input parameter. Indicates whether to search by text. |
|
||||
| api_key | SecretString | Input parameter. The optional API key for authentication. |
|
||||
| index_name | String | Input parameter. The optional index name. |
|
||||
| text_key | String | Input parameter. The default text extraction key. |
|
||||
| input | Document | Input parameter. The document or record. |
|
||||
| embedding | Embeddings | Input parameter. The embedding model used. |
|
||||
| attributes | List[String] | Input parameter. Optional additional attributes. |
|
||||
|
||||
</details>
|
||||
@ -4,6 +4,7 @@ slug: /mcp-client
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import McpIcon from '@site/static/logos/mcp-icon.svg';
|
||||
|
||||
Langflow integrates with the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) as both an MCP server and an MCP client.
|
||||
|
||||
@ -24,23 +25,25 @@ This component has two modes, depending on the type of server you want to access
|
||||
|
||||
1. Add an **MCP Tools** component to your flow.
|
||||
|
||||
2. In the **MCP Server** field, select the server you want to add, or click <Icon name="Plus" aria-hidden="true"/> **Add MCP Server**.
|
||||
2. In the **MCP Server** field, select a previously connected server or click <Icon name="Plus" aria-hidden="true"/> **Add MCP Server**.
|
||||
|
||||
There are multiple ways to add a new server.
|
||||
There are multiple ways to add a new server:
|
||||
|
||||
* In the **JSON** pane, paste the MCP server's JSON configuration file, and then click **Add Server**.
|
||||
* In the **STDIO** pane, enter the MCP server's **Name**, **Command**, and any **Arguments** or **Environment Variables** the server uses, and then click **Add Server**.
|
||||
* **JSON**: Paste the MCP server's JSON configuration object into the field, including required and optional parameters that you want to use, and then click **Add Server**.
|
||||
* **STDIO**: Enter the MCP server's **Name**, **Command**, and any **Arguments** and **Environment Variables** the server uses, and then click **Add Server**.
|
||||
For example, to start a [Fetch](https://github.com/modelcontextprotocol/servers/tree/main/src/fetch) server, the **Command** is `uvx mcp-server-fetch`.
|
||||
* In the **SSE** pane, enter your Langflow MCP server's **Name**, **SSE URL**, and any **Headers** or **Environment Variables** the server uses, and then click **Add Server**.
|
||||
* **SSE**: Enter your Langflow MCP server's **Name**, **SSE URL**, and any **Headers** and **Environment Variables** the server uses, and then click **Add Server**.
|
||||
The default **SSE URL** is `http://localhost:7860/api/v1/mcp/sse`. For more information, see [Use SSE mode](#mcp-sse-mode).
|
||||
|
||||
:::tip
|
||||
`uvx` is included with `uv` in the Langflow package.
|
||||
To use `npx` server commands, you must first install an LTS release of [Node.js](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm).
|
||||
For an example of an `npx` MCP server in Langflow, see [Connect an Astra DB MCP server to Langflow](/mcp-component-astra).
|
||||
:::
|
||||
|
||||
3. To use environment variables in your server command, enter each variable in the **Env** fields as you would define them in a script, such as `VARIABLE=value`.
|
||||
3. To use environment variables in your server command, enter each variable in the **Env** fields as key-value pairs.
|
||||
|
||||
:::important
|
||||
:::tip
|
||||
Langflow passes environment variables from the `.env` file to MCP, but it doesn't pass global variables declared in your Langflow **Settings**.
|
||||
To define an MCP server environment variable as a global variable, add it to Langflow's `.env` file at startup.
|
||||
For more information, see [global variables](/configuration-global-variables).
|
||||
@ -96,7 +99,7 @@ In SSE mode, all flows available from the targeted server are treated as tools.
|
||||
|
||||
## Manage connected MCP servers
|
||||
|
||||
To manage MCP servers connected to your Langflow client, go to **Settings**, and then click **MCP Servers**.
|
||||
To manage all MCP server connections for your Langflow client, click <McpIcon /> **MCP servers** in the visual editor, or click your profile icon, select **Settings**, and then click **MCP Servers**.
|
||||
|
||||
To add a new MCP server, click **Add MCP Server**, and then follow the steps in [Use the MCP Tools component](#use-the-mcp-tools-component) to configure the connection and use the server in a flow.
|
||||
|
||||
|
||||
@ -16,13 +16,17 @@ In the Langflow header, click your profile icon, select **Settings**, and then c
|
||||
|
||||
## Add a component to a flow {#component-menus}
|
||||
|
||||
To add a component to a flow, drag the component from the **Components** menu to the [workspace](/concepts-overview).
|
||||
To add a component to a flow, drag the component from the <Icon name="Component" aria-hidden="true" /> **Core components** or <Icon name="Blocks" aria-hidden="true" /> **Bundles** menu into the [workspace](/concepts-overview#workspace).
|
||||
|
||||
The **Components** menu is organized by component type or provider, and some components are hidden by default.
|
||||
Components are grouped by type or provider, and some components are hidden by default:
|
||||
|
||||
* **Core**: The categories near the top of the **Components** menu are Langflow's core components. They are grouped by purpose, such as **Inputs and Outputs** or **Data**. **Beta** components are newly released and still in development.
|
||||
* **Bundles**: These components support specific third-party integrations, and they are grouped by provider.
|
||||
* **Legacy**: You can still use these components, but they are no longer supported. Legacy components are hidden by default; click <Icon name="SlidersHorizontal" aria-hidden="true" /> **Component settings** to expose legacy components.
|
||||
* <Icon name="Component" aria-hidden="true" /> **Core components**: Langflow's base components are grouped by purpose, such as **Inputs and Outputs** or **Data**.
|
||||
These components either provide generic functionality, like loops and parsing, or they provide single components that support multiple third-party integrations.
|
||||
|
||||
* <Icon name="Blocks" aria-hidden="true" /> **Bundles**: Bundles contain one or more components that support specific third-party integrations, and they are grouped by service provider.
|
||||
|
||||
* **Legacy**: These components are hidden by default.
|
||||
For more information, see [Legacy components](#legacy-components).
|
||||
|
||||
### Configure a component
|
||||
|
||||
@ -91,9 +95,8 @@ When building flows, connect output ports to input ports of the same type (color
|
||||
For information about the programmatic representation of each data type, see [Langflow data types](/data-types).
|
||||
|
||||
:::tip
|
||||
* Hover over a port to see connection details for that port.
|
||||
|
||||
* Click a port to filter the **Components** menu by compatible components.
|
||||
* In the workspace, hover over a port to see connection details for that port.
|
||||
Click a port to <Icon name="Search" aria-hidden="true" /> **Search** for compatible components.
|
||||
|
||||
* If two components have incompatible data types, you can use a processing component like the [**Type Convert** component](/components-processing#type-convert) to convert the data between components.
|
||||
:::
|
||||
@ -115,7 +118,7 @@ Some components can produce multiple types of output:
|
||||
|
||||
* If the component emits only one type, you must select the output type by clicking the output label near the output port, and then selecting the desired output type. In component code, this is represented by `group_outputs=False` or omitting the `group_outputs` parameter.
|
||||
|
||||
For example, the **Language Model** component can output _either_ a **Model Response** or **Language Model**.
|
||||
For example, a language model component can output _either_ a **Model Response** or **Language Model**.
|
||||
The **Model Response** output produces [`Message`](/data-types#message) data that can be passed to another component's `Message` port.
|
||||
The **Language Model** output must be connected to a component with a **Language Model** input, such as the [**Structured Output** component](/components-processing#structured-output), that uses the attached LLM to power the receiving component's reasoning.
|
||||
|
||||
@ -253,4 +256,10 @@ Grouped components are configured and managed as a single component, including t
|
||||
|
||||
To ungroup the components, click the component in the workspace to expose the component's header menu, click <Icon name="Ellipsis" aria-hidden="true" /> **Show More**, and then select **Ungroup**.
|
||||
|
||||
If you want to reuse this grouping in other flows, click the component in the workspace to expose the component's header menu, click <Icon name="Ellipsis" aria-hidden="true" /> **Show More**, and then select **Save** to save the component to the **Components** menu.
|
||||
If you want to reuse this grouping in other flows, click the component in the workspace to expose the component's header menu, click <Icon name="Ellipsis" aria-hidden="true" /> **Show More**, and then select **Save** to save the component to the <Icon name="Component" aria-hidden="true" /> **Core components** menu as a custom component.
|
||||
|
||||
## Legacy components
|
||||
|
||||
import PartialLegacy from '@site/docs/_partial-legacy.mdx';
|
||||
|
||||
<PartialLegacy />
|
||||
@ -7,7 +7,8 @@ import Icon from "@site/src/components/icon";
|
||||
|
||||
Each Langflow server has a file management system where you can store files that you want to use in your flows.
|
||||
|
||||
Files uploaded to Langflow file management are stored locally to your Langflow server, and they are available to all of your flows.
|
||||
Files uploaded to Langflow file management are stored locally in your [Langflow configuration directory](/memory), and they are available to all of your flows.
|
||||
Local storage is set by `LANGFLOW_STORAGE_TYPE`, which has only one allowed value (`local`).
|
||||
|
||||
Uploading files to Langflow file management keeps your files in a central location, and allows you to reuse files across flows without repeated manual uploads.
|
||||
|
||||
@ -18,20 +19,18 @@ You can also manage all files that have been uploaded to your Langflow server.
|
||||
|
||||
1. Navigate to Langflow file management:
|
||||
|
||||
* In Langflow, on the [**Projects** page](/concepts-flows#projects) page, click **My Files** below the list of projects.
|
||||
* From a browser, navigate to your Langflow server's `/files` endpoint, such as `http://localhost:7860/files`. Modify the base URL as needed for your Langflow server.
|
||||
* For programmatic file management, use the [Langflow API files endpoints](/api-files). However, the following steps assume you're using the file management UI.
|
||||
* **Langflow Desktop**: In Langflow, on the [**Projects** page](/concepts-flows#projects) page, click **My Files** below the list of projects.
|
||||
* **Langflow OSS**: From a browser, navigate to your Langflow server's `/files` endpoint, such as `http://localhost:7860/files`. Modify the base URL as needed for your Langflow server.
|
||||
* **Backend-only**: For programmatic file management, use the [Langflow API files endpoints](/api-files). However, the following steps assume you're using the file management UI.
|
||||
|
||||
2. On the **My Files** page, click **Upload**.
|
||||
|
||||
3. Select one or more files to upload.
|
||||
|
||||
After uploading files, you can rename, download, copy, or delete files within the file management UI:
|
||||
|
||||
* To delete a file, hover over a file's icon, select it, and then click <Icon name="Trash2" aria-hidden="true"/> **Delete**.
|
||||
After uploading files, you can rename, download, copy, or delete files within the file management UI.
|
||||
To delete a file, hover over a file's icon, select it, and then click <Icon name="Trash2" aria-hidden="true"/> **Delete**.
|
||||
You can delete multiple files in a single action.
|
||||
|
||||
* To download a file, hover over a file's icon, select it, and then click <Icon name="Download" aria-hidden="true"/> **Download**.
|
||||
To download a file, hover over a file's icon, select it, and then click <Icon name="Download" aria-hidden="true"/> **Download**.
|
||||
If you download multiple files in a single action, they are saved together in a zip file.
|
||||
|
||||
## Upload and manage files with the Langflow API
|
||||
@ -40,6 +39,11 @@ With the Langflow API, you can upload and manage files in Langflow file manageme
|
||||
|
||||
For more information and examples, see [Files endpoints](/api-files) and [Create a chatbot that can ingest files](/chat-with-files).
|
||||
|
||||
## Set the maximum file size
|
||||
|
||||
By default, the maximum file size is 1024 MB.
|
||||
To modify this value, change the `LANGFLOW_MAX_FILE_SIZE_UPLOAD` [environment variable](/environment-variables).
|
||||
|
||||
## Use files in a flow
|
||||
|
||||
To use files in your Langflow file management system in a flow, add a component that accepts file input to your flow, such as the **File** component.
|
||||
@ -49,15 +53,19 @@ For example, add a **File** component to your flow, click **Select files**, and
|
||||
This list includes all files in your server's file management system, but you can only select [file types that are supported by the **File** component](/components-data#file).
|
||||
If you need another file type, you must use a different component that supports that file type, or you need to convert it to a supported type before uploading it.
|
||||
|
||||
For more information about the **File** component and other data loading components, see [**Data** components](/components-data).
|
||||
For more information about the **File** component and other data loading components, see [Data components](/components-data).
|
||||
|
||||
### Load files at runtime
|
||||
|
||||
You can use preloaded files in your flows, and you can load files at runtime, if your flow accepts file input.
|
||||
To enable file input in your flow, do the following:
|
||||
|
||||
1. Add a [**File** component](/components-data#file) to your flow.
|
||||
|
||||
2. Click **Share**, select **API access**, and then click **Input Schema** to add [`tweaks`](/concepts-publish#input-schema) to the request payload in the flow's automatically generated code snippets.
|
||||
|
||||
3. Expand the **File** section, find the **Files** row, and then enable **Expose Input** to allow the parameter to be set at runtime through the Langflow API.
|
||||
|
||||
4. Close the **Input Schema** pane to return to the **API access** pane.
|
||||
The payload in each code snippet now includes `tweaks` with your **File** component's ID and the `path` key that you enabled in **Input Schema**:
|
||||
|
||||
@ -112,27 +120,13 @@ You can upload images to the **Playground** chat interface and as runtime input
|
||||
}'
|
||||
```
|
||||
|
||||
For more specialized image processing, browse third-party [bundles](/components-bundle-components) or [create your own components](/components-custom-components).
|
||||
For more specialized image processing, browse <Icon name="Blocks" aria-hidden="true" /> [**Bundles**] or [create your own components](/components-custom-components).
|
||||
|
||||
## Work with video files
|
||||
|
||||
For videos, see the **Twelve Labs** and **YouTube** [bundles](/components-bundle-components) in the Langflow **Components** menu.
|
||||
|
||||
## Set the maximum file size
|
||||
|
||||
By default, the maximum file size is 100 MB.
|
||||
To modify this value, change the `--max-file-size-upload` [environment variable](/environment-variables).
|
||||
|
||||
## File management configuration
|
||||
|
||||
You can configure file management behavior using the following [environment variables](/environment-variables):
|
||||
|
||||
| Variable | Format | Default | Description |
|
||||
|----------|--------|---------|-------------|
|
||||
| `LANGFLOW_MAX_FILE_SIZE_UPLOAD` | Integer | `100` | Set the maximum file size for the upload in megabytes. |
|
||||
| `LANGFLOW_STORAGE_TYPE` | String | `local` | Type of storage to use for file uploads and data. |
|
||||
For videos, see the **Twelve Labs** and **YouTube** <Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components).
|
||||
|
||||
## See also
|
||||
|
||||
* [**Data** components](/components-data)
|
||||
* [**Processing** components](/components-processing)
|
||||
* [Data components](/components-data)
|
||||
* [Processing components](/components-processing)
|
||||
@ -28,7 +28,7 @@ When exporting from the **Projects** page or **Share** menu, you can select **Sa
|
||||
Non-API key variables are included in the export regardless of the **Save with my API keys** setting.
|
||||
|
||||
:::warning
|
||||
If you enter the literal key into a component's **API key** field, then **Save with my API keys** exports the literal key value.
|
||||
If you enter the literal key into a component's API key field, then **Save with my API keys** exports the literal key value.
|
||||
|
||||
If your key is stored in a Langflow global variable, **Save with my API keys** exports only the variable name.
|
||||
:::
|
||||
@ -55,9 +55,12 @@ For more information, see [Save with my API keys](/concepts-flows-import#save-wi
|
||||
|
||||
An exported flow is downloaded to your local machine as a JSON file named `FLOW_NAME.json`.
|
||||
|
||||
Langflow JSON files contain [nodes](#nodes) and [edges](#edges) that describe components and connections, and [additional metadata](#additional-metadata-and-project-information) that describe the flow.
|
||||
Langflow JSON files contain the following:
|
||||
|
||||
For an example Langflow JSON file, examine the [Basic Prompting.json](https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/initial_setup/starter_projects/Basic%20Prompting.json) file in the Langflow repository.
|
||||
* [Nodes](#nodes) and [edges](#edges) that describe components and connections in the flow.
|
||||
* [Additional metadata](#additional-metadata-and-project-information) that describes the flow and the project it belongs to.
|
||||
|
||||
For example Langflow JSON files, you can examine any of the https://github.com/langflow-ai/langflow/tree/main/src/backend/base/langflow/initial_setup/starter_projects[templates in the Langflow repository], or you can create a flow from a template in Langflow, export it, and then open the exported JSON file in a text editor.
|
||||
|
||||
### Nodes
|
||||
|
||||
@ -110,7 +113,7 @@ Entrypoint nodes, such as the `ChatInput` node, are the first node executed when
|
||||
|
||||
Edges represent the connections between nodes.
|
||||
|
||||
The connection between the `ChatInput` node and the `OpenAIModel` node is represented as an edge:
|
||||
The following example represents the edge (or connection) between the `ChatInput` node and the `OpenAIModel` node:
|
||||
|
||||
```json
|
||||
{
|
||||
@ -142,9 +145,10 @@ The `OpenAIModel` component accepts the `Message` type at the `input_value` fiel
|
||||
|
||||
### Additional metadata and project information
|
||||
|
||||
Additional information about the flow is stored in the root `data` object.
|
||||
Additional information about the flow is stored in the root `data` object:
|
||||
|
||||
* Metadata and project information including the name, description, and `last_tested_version` of the flow:
|
||||
* Metadata and project information including the name, description, and `last_tested_version` of the flow.
|
||||
For example:
|
||||
|
||||
```json
|
||||
{
|
||||
@ -158,7 +162,7 @@ Additional information about the flow is stored in the root `data` object.
|
||||
}
|
||||
```
|
||||
|
||||
* Visual information about the flow defining the initial position of the flow in the workspace:
|
||||
* Visual information about the flow defining the position of the viewport when you open the flow in the workspace:
|
||||
|
||||
```json
|
||||
"viewport": {
|
||||
@ -168,9 +172,9 @@ Additional information about the flow is stored in the root `data` object.
|
||||
}
|
||||
```
|
||||
|
||||
* Notes are comments that help you understand the flow within the workspace.
|
||||
They may contain links, code snippets, and other information.
|
||||
Notes are written in Markdown and stored as `node` objects.
|
||||
* <Icon name="StickyNote" aria-hidden="true"/> **Notes** are comments that help explain the flow's purpose, configuration details, and any other information relevant to users who might be editing the flow.
|
||||
They can contain text, links, code snippets, and other information.
|
||||
They are encoded in Markdown format and stored as `node` objects.
|
||||
|
||||
```json
|
||||
{
|
||||
|
||||
@ -4,8 +4,6 @@ slug: /concepts-flows
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialConfigDirPaths from '@site/docs/_partial-config-dir-paths.mdx';
|
||||
import PartialDBDirPaths from '@site/docs/_partial-db-dir-paths.mdx';
|
||||
|
||||
A _flow_ is a functional representation of an application workflow.
|
||||
Flows receive input, process it, and produce output.
|
||||
@ -52,7 +50,7 @@ You can also create a flow with the [Langflow API](/api-flows), but the Langflow
|
||||
Flows consist of [components](/concepts-components), which are nodes that you configure and connect in the [workspace](/concepts-overview#workspace).
|
||||
Each component performs a specific task, like serving an AI model or connecting a data source.
|
||||
|
||||
Drag and drop components from the **Components** menu to add them to your flow.
|
||||
Drag and drop components from the <Icon name="Component" aria-hidden="true" /> **Core components** and <Icon name="Blocks" aria-hidden="true" /> **Bundles** menus to add them to your flow.
|
||||
Then, configure the component settings and connect the components together.
|
||||
|
||||

|
||||
@ -100,6 +98,26 @@ To get back to the **Projects** page after editing a flow, click the project nam
|
||||
2. Click <Icon name="Ellipsis" aria-hidden="true" /> **More**, and then select **Edit details**.
|
||||
3. Edit the **Name** and **Description**, and then click **Save**.
|
||||
|
||||
### Lock a flow
|
||||
|
||||
To prevent changes to a flow, you can lock it:
|
||||
|
||||
1. On the **Projects** page, locate the flow you want to lock.
|
||||
2. Click <Icon name="Ellipsis" aria-hidden="true" /> **More**, and then select **Edit details**.
|
||||
3. Enable **Lock Flow**, and then click **Save**.
|
||||
|
||||
Repeat these steps to unlock the flow by disabling **Lock Flow**.
|
||||
|
||||
When editing a flow, the **Lock Status** indicates whether the flow is <Icon name="Lock" aria-hidden="true" /> **Locked** or <Icon name="LockOpen" aria-hidden="true" /> **Unlocked**.
|
||||
You cannot change the lock status while editing the flow.
|
||||
|
||||
### Move a flow
|
||||
|
||||
To move a flow from one project to another, do the following:
|
||||
|
||||
1. On the **Projects** page, locate the flow you want to move.
|
||||
2. Click and drag the flow from the list of flows to the target project name in the list of projects.
|
||||
|
||||
### Delete a flow
|
||||
|
||||
1. On the **Projects** page, locate the flow you want to delete.
|
||||
@ -107,14 +125,7 @@ To get back to the **Projects** page after editing a flow, click the project nam
|
||||
|
||||
## Flow storage and logs
|
||||
|
||||
By default, flows and flow execution data are stored in a SQLite database at the following locations.
|
||||
<PartialDBDirPaths/>
|
||||
|
||||
The database storage location can be customized using the `LANGFLOW_CONFIG_DIR` and `LANGFLOW_SAVE_DB_IN_CONFIG_DIR` environment variables. The config directory can be customized with the `LANGFLOW_CONFIG_DIR` environment variable.
|
||||
|
||||
Langflow logs are stored in the config directory specified in the `LANGFLOW_CONFIG_DIR` environment variable.
|
||||
<PartialConfigDirPaths/>
|
||||
|
||||
By default, flows and flow execution data are stored in the Langflow database, and flow logs are stored with other Langflow logs in the Langflow config directory.
|
||||
For more information, see [Memory management options](/memory) and [Logging](/logging).
|
||||
|
||||
## See also
|
||||
|
||||
@ -22,25 +22,27 @@ This is where you add [components](/concepts-components), configure them, and at
|
||||
|
||||

|
||||
|
||||
From the workspace, you can also access the [**Playground**](#playground), [**Share** menu](#share-menu), and [**Logs**](/concepts-flows#flow-storage-and-logs).
|
||||
From the workspace, you can also access the [**Playground**](#playground), [**Share** menu](#share-menu), and [**Logs**](/logging).
|
||||
|
||||
### Workspace gestures and interactions
|
||||
|
||||
- To pan horizontally and vertically, click and drag an empty area of the workspace.
|
||||
Use these shortcuts, gestures, and functionality to navigate the workspace:
|
||||
|
||||
- To rearrange components visually, click and drag the components.
|
||||
- **Pan horizontally and vertically**: Click and drag an empty area of the workspace.
|
||||
|
||||
- **Rearrange components**: Click and drag the components anywhere on the workspace.
|
||||
|
||||
To change the programmatic relationship between components, you must manipulate the component _edges_ or _ports_. For more information, see [Components overview](/concepts-components).
|
||||
|
||||
- To lock the visual position of the components, click <Icon name="LockOpen" aria-hidden="true"/> **Lock**.
|
||||
To enable guide lines, click <Icon name="CircleQuestionMark" aria-hidden="true" /> **Help**, and then toggle **Enable smart guides**.
|
||||
|
||||
- To zoom, use any of the following options:
|
||||
If you can't edit any components, make sure the flow is [unlocked](/concepts-flows#lock-a-flow).
|
||||
|
||||
- Scroll up or down on the mouse or trackpad.
|
||||
- Click <Icon name="ZoomIn" aria-hidden="true"/> **Zoom In** or <Icon name="ZoomOut" aria-hidden="true"/> **Zoom Out**.
|
||||
- Click <Icon name="Maximize" aria-hidden="true"/> **Fit To Zoom** to scale the zoom level to show the entire flow.
|
||||
- **Zoom**: Scroll on the mouse or trackpad, or click <Icon name="ChevronUp" aria-hidden="true" /> **Canvas controls** next to the zoom percentage more zoom options: **Zoom In**, **Zoom Out**, **Zoom To 100%**, and **Zoom To Fit**.
|
||||
|
||||
- To add a text box for non-functional notes and comments, click <Icon name="StickyNote" aria-hidden="true"/> **Add Note**.
|
||||
- **Add notes and comments**: Click <Icon name="StickyNote" aria-hidden="true"/> **Add Note**.
|
||||
|
||||
- **Keyboard shortcuts**: To view available shortcuts, click <Icon name="CircleQuestionMark" aria-hidden="true" /> **Help**, and then select **Shortcuts**.
|
||||
|
||||
## Playground
|
||||
|
||||
|
||||
@ -82,7 +82,7 @@ You can set custom session IDs in the visual editor and programmatically.
|
||||
<Tabs>
|
||||
<TabItem value="visual" label="Visual editor" default>
|
||||
|
||||
In your [**Input and Output** components](/components-io), use the **Session ID** field:
|
||||
In your [input and output components](/components-io), use the **Session ID** field:
|
||||
|
||||
1. Click the component where you want to set a custom session ID.
|
||||
2. In the [component's header menu](/concepts-components#component-menus), click <Icon name="SlidersHorizontal" aria-hidden="true"/> **Controls**.
|
||||
|
||||
@ -13,6 +13,7 @@ Langflow provides several ways to run flows from external applications:
|
||||
* [Trigger flows with the Langflow API](#api-access)
|
||||
* [Add an embedded chat widget to a website](#embedded-chat-widget)
|
||||
* [Serve flows through a Langflow MCP server](#serve-flows-through-a-langflow-mcp-server)
|
||||
* [Run flows with the OpenAI Responses compatible endpoint](#openai-responses-api)
|
||||
|
||||
Although you can use these options with an isolated, local Langflow instance, they are typically more valuable when you have [deployed a Langflow server](/deployment-overview) or [packaged Langflow as a dependency of an application](/develop-application).
|
||||
|
||||
@ -527,6 +528,12 @@ Interactions with Langflow MCP servers happen through the Langflow API's `/mcp`
|
||||
|
||||
For more information, see [Use Langflow as an MCP server](/mcp-server) and [Use Langflow as an MCP client](/mcp-client).
|
||||
|
||||
## Run flows with the OpenAI Responses compatible endpoint {#openai-responses-api}
|
||||
|
||||
Langflow includes an OpenAI Responses API-compatible endpoint at `/api/v1/responses` that allows you to use existing OpenAI client libraries and code with minimal modifications.
|
||||
|
||||
For more information, see [OpenAI Responses API](/api-openai-responses).
|
||||
|
||||
## See also
|
||||
|
||||
* [Import and export flows](/concepts-flows-import)
|
||||
|
||||
@ -20,8 +20,7 @@ When building flows, connect output ports to input ports of the same type (color
|
||||
|
||||
:::tip
|
||||
* In the [workspace](/concepts-overview#workspace), hover over a port to see connection details for that port.
|
||||
|
||||
* Click a port to filter the **Components** menu by compatible components.
|
||||
Click a port to <Icon name="Search" aria-hidden="true" /> **Search** for compatible components.
|
||||
|
||||
* If two components have incompatible data types, you can use a processing component like the [**Type Convert** component](/components-processing#type-convert) to convert the data between components.
|
||||
:::
|
||||
@ -130,21 +129,20 @@ When represented as tabular data, the preceding DataFrame object is structured a
|
||||
|
||||
**Embeddings** ports <Icon name="Circle" size="16" aria-label="Emerald embeddings port" style={{ color: '#10b981', fill: '#10b981' }} /> emit or ingest vector embeddings to support functions like similarity search.
|
||||
|
||||
The `Embeddings` data type is used specifically by components that either produce or consume vector embeddings, such as the [**Embedding Model** components](/components-embedding-models) and [**Vector Store** components](/components-vector-stores).
|
||||
The `Embeddings` data type is used specifically by components that either produce or consume vector embeddings, such as the [embedding model components](/components-embedding-models) and vector store components.
|
||||
|
||||
For example, **Embedding Model** components output `Embeddings` data that you can connect to an **Embedding** input port on a **Vector Store** component.
|
||||
For example, embedding model components output `Embeddings` data that you can connect to an **Embedding** input port on a vector store component.
|
||||
|
||||
For information about the underlying Python classes that produce `Embeddings`, see the [LangChain Embedding models documentation](https://python.langchain.com/docs/integrations/text_embedding/).
|
||||
|
||||
## LanguageModel
|
||||
|
||||
The `LanguageModel` type is a specific data type that can be produced by **Language Model** components and accepted by components that use an LLM.
|
||||
|
||||
When you change a **Language Model** component's output type from **Model Response** to **Language Model**, the component's output port changes from a **Message** port to a **Language Model** port <Icon name="Circle" size="16" aria-label="Fuchsia language model port" style={{ color: '#c026d3', fill: '#c026d3' }} />.
|
||||
The `LanguageModel` type is a specific data type that can be produced by language model components and accepted by components that use an LLM.
|
||||
|
||||
When you change a language model component's output type from **Model Response** to **Language Model**, the component's output port changes from a **Message** port to a **Language Model** port <Icon name="Circle" size="16" aria-label="Fuchsia language model port" style={{ color: '#c026d3', fill: '#c026d3' }} />.
|
||||
Then, you connect the outgoing **Language Model** port to a **Language Model** input port on a compatible component, such as a **Smart Function** component.
|
||||
|
||||
For more information about using these components in flows and toggling `LanguageModel` output, see [**Language Model** components](/components-models#language-model-output-types).
|
||||
For more information about using these components in flows and toggling `LanguageModel` output, see [Language model components](/components-models#language-model-output-types).
|
||||
|
||||
<details>
|
||||
<summary>LanguageModel is an instance of LangChain ChatModel</summary>
|
||||
@ -226,7 +224,7 @@ To see all `Message` attributes, inspect the message logs in the **Playground**.
|
||||
In flows with [**Text Input and Output** components](/components-io#text-io), `Message` data is used to pass simple text strings without the chat-related metadata.
|
||||
These components handle `Message` data as independent text strings, not as part of an ongoing conversation.
|
||||
For this reason, a flow with only **Text Input and Output** components isn't compatible with the **Playground**.
|
||||
For more information, see [**Input and Output** components](/components-io).
|
||||
For more information, see [Input and output components](/components-io).
|
||||
|
||||
When using the Langflow API, the response includes the `Message` object along with other response data from the flow run.
|
||||
Langflow API responses can be extremely verbose, so your applications must include code to extract relevant data from the response to return to the user.
|
||||
@ -338,7 +336,7 @@ The following example shows how to inspect the output of a [**Type Convert** com
|
||||
|
||||
## See also
|
||||
|
||||
- [**Processing** components](/components-processing)
|
||||
- [Processing components](/components-processing)
|
||||
- [Custom components](/components-custom-components)
|
||||
- [Pydantic Models](https://docs.pydantic.dev/latest/api/base_model/)
|
||||
- [pandas.DataFrame](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html)
|
||||
@ -25,10 +25,6 @@ For information about using Langflow as an MCP client and managing MCP server co
|
||||
|
||||
## Serve flows as MCP tools {#select-flows-to-serve}
|
||||
|
||||
:::important MCP flow requirements
|
||||
A flow must contain a [**Chat Output** component](/components-io#chat-output) to be used as a tool by MCP clients.
|
||||
:::
|
||||
|
||||
Each [Langflow project](/concepts-flows#projects) has an MCP server that exposes the project's flows as tools for use by MCP clients.
|
||||
|
||||
By default, all flows in a project are exposed as tools on the project's MCP server.
|
||||
@ -111,46 +107,24 @@ However, the description mentions it's for "Emily's resume" not Alex's. I don't
|
||||
Langflow provides automatic installation and code snippets to help you deploy your Langflow MCP servers to your local MCP clients.
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="auto" label="Auto install" default>
|
||||
|
||||
:::info
|
||||
The auto install option is available only for specific MCP clients, and the client must be installed locally to your Langflow server.
|
||||
If your client isn't supported or installed remotely from your Langflow server, use the **JSON** option.
|
||||
:::
|
||||
|
||||
1. Install [Cursor](https://docs.cursor.com/get-started/installation), Claude, or Windsurf local to your Langflow instance.
|
||||
|
||||
2. Recommended: Configure [authentication](#authentication) for your MCP server.
|
||||
|
||||
3. In Langflow, on the **Projects** page, click the **MCP Server** tab.
|
||||
|
||||
4. On the **Auto install** tab, find your MCP client provider, and then click <Icon name="Plus" aria-hidden="true"/> **Add**.
|
||||
|
||||
Your Langflow project's MCP server is automatically added to the configuration file for your local Cursor, Claude, or Windsurf client.
|
||||
For example, with Cursor, the server configuration is added to the `mcp.json` configuration file.
|
||||
|
||||
Langflow attempts to add this configuration even if the selected client isn't installed.
|
||||
To verify the installation, check the available MCP servers in your client.
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JSON" label="JSON">
|
||||
<TabItem value="JSON" label="JSON" default>
|
||||
|
||||
The JSON option allows you to connect a Langflow MCP server to any local or remote MCP client.
|
||||
|
||||
You can modify this process for any [MCP-compatible client](https://modelcontextprotocol.io/clients).
|
||||
|
||||
1. Install [Cursor](https://docs.cursor.com/get-started/installation) or any other [MCP-compatible client](https://modelcontextprotocol.io/clients).
|
||||
1. Install any [MCP-compatible client](https://modelcontextprotocol.io/clients).
|
||||
|
||||
These steps use Cursor as an example.
|
||||
Modify them as needed for other clients.
|
||||
These steps use Cursor as an example, but the process is generally the same for all clients, with slight differences in client-specific details like file names.
|
||||
|
||||
2. In Cursor, go to **Cursor Settings**, select **MCP**, and then click **Add New Global MCP Server** to open Cursor's global `mcp.json` configuration file.
|
||||
2. In your client, add a new MCP server using the client's UI or configuration file.
|
||||
|
||||
For example, in Cursor, go to **Cursor Settings**, select **MCP**, and then click **Add New Global MCP Server** to open Cursor's global `mcp.json` configuration file.
|
||||
|
||||
3. Recommended: Configure [authentication](#authentication) for your MCP server.
|
||||
|
||||
4. In Langflow, on the **Projects** page, click the **MCP Server** tab.
|
||||
|
||||
5. Click the **JSON** tab, copy the code snippet for your operating system, and then paste it into Cursor's `mcp.json` file.
|
||||
5. Click the **JSON** tab, copy the code snippet for your operating system, and then paste it into your client's MCP configuration file.
|
||||
For example:
|
||||
|
||||
```json
|
||||
@ -172,12 +146,55 @@ For example:
|
||||
The default Langflow server address is `http://localhost:7860`.
|
||||
If you are using a [public Langflow server](/deployment-public-server), the server address is automatically included.
|
||||
|
||||
If your Langflow server requires authentication, you must include your Langflow API key in the configuration.
|
||||
For more information, see [MCP server authentication and environment variables](#authentication).
|
||||
If your Langflow server requires authentication, you must include your Langflow API key or OAuth settings in the configuration.
|
||||
For more information, see [MCP server authentication](#authentication).
|
||||
|
||||
6. In Cursor, save and close the `mcp.json` file.
|
||||
6. To include other environment variables with your MCP server command, add an `env` object with key-value pairs of environment variables:
|
||||
|
||||
7. Confirm that your Langflow MCP server is on Cursor's **MCP Servers** list.
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"PROJECT_NAME": {
|
||||
"command": "uvx",
|
||||
"args": [
|
||||
"mcp-proxy",
|
||||
"http://LANGFLOW_SERVER_ADDRESS/api/v1/mcp/project/PROJECT_ID/sse"
|
||||
],
|
||||
"env": {
|
||||
"KEY": "VALUE"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
7. Save and close your client's MCP configuration file.
|
||||
|
||||
8. Confirm that your Langflow MCP server is on the client's list of MCP servers.
|
||||
If necessary, restart your client to apply the modified configuration file.
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="auto" label="Auto install">
|
||||
|
||||
:::info
|
||||
The auto install option is available only for specific MCP clients.
|
||||
Auto install requires the client to be installed locally so Langflow can write to the client's configuration file.
|
||||
If your client isn't supported, is installed remotely, or you need to pass additional environment variables, use the **JSON** option.
|
||||
:::
|
||||
|
||||
1. Install [Cursor](https://docs.cursor.com/get-started/installation), [Claude](https://claude.ai/download), or [Windsurf](https://windsurf.com/download/editor) on the same computer where your Langflow server is running.
|
||||
|
||||
2. Recommended: Configure [authentication](#authentication) for your MCP server.
|
||||
|
||||
3. In Langflow, on the **Projects** page, click the **MCP Server** tab.
|
||||
|
||||
4. On the **Auto install** tab, find your MCP client provider, and then click <Icon name="Plus" aria-hidden="true"/> **Add**.
|
||||
|
||||
Your Langflow project's MCP server is automatically added to the configuration file for your local Cursor, Claude, or Windsurf client.
|
||||
For example, with Cursor, the server configuration is added to the `mcp.json` configuration file.
|
||||
|
||||
Langflow attempts to add this configuration even if the selected client isn't installed.
|
||||
To verify the installation, check the available MCP servers in your client.
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -186,52 +203,90 @@ Once your MCP client is connected to your Langflow project's MCP server, your fl
|
||||
Cursor determines when to use tools based on your queries, and requests permissions when necessary.
|
||||
For more information, see the MCP documentation for your client, such as [Cursor's MCP documentation](https://docs.cursor.com/context/model-context-protocol).
|
||||
|
||||
### MCP server authentication and environment variables {#authentication}
|
||||
## MCP server authentication {#authentication}
|
||||
|
||||
You must provide a Langflow API key in your MCP client configuration if your [Langflow server has authentication enabled](/api-keys-and-authentication#start-a-langflow-server-with-authentication-enabled).
|
||||
Each [Langflow project](/concepts-flows#projects) has its own MCP server with its own MCP server authentication settings.
|
||||
|
||||
When this is the case, the code template in your project's **MCP Server** tab automatically includes the `--header` and `x-api-key` arguments:
|
||||
To configure authentication for a Langflow MCP server, go to the **Projects** page in Langflow, click the **MCP Server** tab, click <Icon name="Fingerprint" aria-hidden="true"/> **Edit Auth**, and then select your preferred authentication method:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"PROJECT_NAME": {
|
||||
"command": "uvx",
|
||||
"args": [
|
||||
"mcp-proxy",
|
||||
"--headers",
|
||||
"x-api-key",
|
||||
"YOUR_API_KEY",
|
||||
"http://LANGFLOW_SERVER_ADDRESS/api/v1/mcp/project/PROJECT_ID/sse"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
<Tabs groupId="auth-type">
|
||||
<TabItem value="API key" label="API key">
|
||||
|
||||
When authenticating your MCP server with a Langflow API key, your project's MCP server **JSON** code snippets and **Auto install** configuration automatically include the `--headers` and `x-api-key` arguments.
|
||||
|
||||
Click <Icon name="key" aria-hidden="true"/> **Generate API key** to automatically insert a new Langflow API key into the code template.
|
||||
Alternatively, you can replace `YOUR_API_KEY` with an existing Langflow API key.
|
||||
|
||||

|
||||
</TabItem>
|
||||
<TabItem value="OAuth" label="OAuth">
|
||||
|
||||
To include other environment variables with your MCP server command, use the `env` object with key-value pairs of environment variables:
|
||||
When OAuth is enabled, Langflow automatically starts an [MCP Composer](https://pypi.org/project/mcp-composer) instance for your project, creating a secure client-side proxy between MCP clients and the `mcp-proxy` on your server.
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"PROJECT_NAME": {
|
||||
"command": "uvx",
|
||||
"args": [
|
||||
"mcp-proxy",
|
||||
"http://LANGFLOW_SERVER_ADDRESS/api/v1/mcp/project/PROJECT_ID/sse"
|
||||
],
|
||||
"env": {
|
||||
"KEY": "VALUE"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
OAuth integration allows your Langflow MCP server to authenticate users and applications through any OAuth 2.0 compliant service. When users or applications connect to your MCP server, they are redirected to your chosen OAuth provider to authenticate. Upon successful authentication, they are granted access to your flows as MCP tools.
|
||||
|
||||
Before configuring OAuth in Langflow, you must first set up an OAuth application with an external OAuth 2.0 service provider.
|
||||
You must register your Langflow server as an OAuth client, and then obtain the required values to complete the configuration in Langflow.
|
||||
|
||||
The following table describes the required values.
|
||||
[GitHub OAuth](https://github.com/settings/developers) is used for example purposes.
|
||||
Be sure to use the actual values from your own deployment.
|
||||
For more information, see your OAuth provider's documentation.
|
||||
|
||||
| Field | Description | Source | Example |
|
||||
|-------|-------------|--------|---------|
|
||||
| **Host** | OAuth server host | MCP Composer default. | `localhost` |
|
||||
| **Port** | OAuth server port | MCP Composer default. | `9000` |
|
||||
| **Server URL** | Full OAuth server URL | Combines the MCP Composer default OAuth host and port. | `http://localhost:9000` |
|
||||
| **Callback Path** | OAuth callback URL on your server | You define this address during OAuth app registration. | `http://localhost:9000/auth/idaas/callback` |
|
||||
| **Client ID** | Your OAuth client identifier | From your OAuth provider. | `Ov23li9vx2grVL61qjb` |
|
||||
| **Client Secret** | Your OAuth client secret | From your OAuth provider. | `1234567890abcdef1234567890abcdef12345678` |
|
||||
| **Authorization URL** | OAuth authorization endpoint | From your OAuth provider. | `https://github.com/login/oauth/authorize` |
|
||||
| **Token URL** | OAuth token endpoint for getting refresh tokens | From your OAuth provider. | `https://github.com/login/oauth/access_token` |
|
||||
| **MCP Scope** | Scope for MCP operations | You define this. As of Langflow 1.6, `user` is the only available value. | `user` |
|
||||
| **Provider Scope** | OAuth provider scope | You define this. As of Langflow 1.6, `openid` is the only available value. | `openid` |
|
||||
|
||||
To configure OAuth authentication:
|
||||
|
||||
1. Select **OAuth** as the authentication type.
|
||||
2. Configure the OAuth settings with the values from your OAuth deployment.
|
||||
All values are required.
|
||||
|
||||
The OAuth credentials are encrypted and stored securely in your Langflow database.
|
||||
|
||||
3. Click **Save**.
|
||||
|
||||
Your MCP server's **JSON** code snippets and **Auto install** configuration are automatically updated with OAuth values. These are automatically used for new installations after enabling OAuth. However, you must manually update any existing installations, as explained in the next step.
|
||||
|
||||
4. If you already installed your Langflow MCP server in your MCP client, you must update your MCP client configuration to use the new OAuth settings after enabling OAuth on your MCP server.
|
||||
The client update method depends on how you installed the server on the client:
|
||||
|
||||
- **Auto install**: Manually update your client's config file using the updated JSON snippet from the **JSON** tab, or repeat the steps in [Auto-install](#connect-clients-to-use-the-servers-actions) to re-install the client with the updated settings.
|
||||
- **JSON option**: Copy the updated JSON snippet from the **JSON** tab and replace your existing configuration.
|
||||
- **New connections**: Use either the **Auto install** or **JSON** option. The OAuth settings are included automatically.
|
||||
|
||||
After you enable OAuth and update your client configuration, an OAuth callback window opens each time your MCP client attempts to authenticate with the server.
|
||||
A successful authentication returns `Authentication complete. You may close this window.`
|
||||
If your client doesn't open the OAuth window, try restarting the client to retrieve the updated configuration.
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="None" label="None">
|
||||
|
||||
When no authentication is configured, your MCP server becomes a public endpoint that anyone can access without providing credentials.
|
||||
Only use this option when Langflow is running in a trusted environment.
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## MCP server environment variables
|
||||
|
||||
The following environment variables set behaviors related to your Langflow projects' MCP servers:
|
||||
|
||||
| Variable | Format | Default | Description |
|
||||
|----------|--------|---------|-------------|
|
||||
| `LANGFLOW_MCP_SERVER_ENABLED` | Boolean | True | Whether to initialize an MCP server for each of your Langflow projects. If false, Langflow doesn't initialize MCP servers. |
|
||||
| `LANGFLOW_MCP_SERVER_ENABLE_PROGRESS_NOTIFICATIONS` | Boolean | False | If true, Langflow MCP servers send progress notifications. |
|
||||
| `LANGFLOW_MCP_SERVER_TIMEOUT` | Integer | `20` | The number of seconds to wait before an MCP server operation expires due to poor connectivity or long-running requests. |
|
||||
| `LANGFLOW_MCP_MAX_SESSIONS_PER_SERVER` | Integer | `10` | Maximum number of MCP sessions to keep per unique server. |
|
||||
|
||||
{/* The anchor on this section (deploy-your-server-externally) is currently a link target in the Langflow UI. Do not change. */}
|
||||
### Deploy your Langflow MCP server externally {#deploy-your-server-externally}
|
||||
@ -240,8 +295,11 @@ To deploy your Langflow MCP server externally, see [Deploy a public Langflow ser
|
||||
|
||||
## Use MCP Inspector to test and debug flows {#test-and-debug-flows}
|
||||
|
||||
:::info Node prerequisite
|
||||
MCP Inspector requires any LTS version of [Node.js](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) installed on your computer.
|
||||
:::
|
||||
[MCP Inspector](https://modelcontextprotocol.io/docs/tools/inspector) is a common tool for testing and debugging MCP servers.
|
||||
You can use MCP Inspector to monitor your flows and get insights into how they are being consumed by the MCP server:
|
||||
You can use MCP Inspector to monitor your flows and get insights into how they are being consumed by the MCP server.
|
||||
|
||||
1. Install MCP Inspector:
|
||||
|
||||
@ -254,18 +312,39 @@ You can use MCP Inspector to monitor your flows and get insights into how they a
|
||||
2. Open a web browser and navigate to the MCP Inspector UI.
|
||||
The default address is `http://localhost:6274`.
|
||||
|
||||
3. In the MCP Inspector UI, enter the connection details for your Langflow project's MCP server:
|
||||
3. In the MCP Inspector UI, enter the connection details for your Langflow project's MCP server.
|
||||
The field values depend on your server's method of [authentication](#authentication).
|
||||
<Tabs groupId="auth-type">
|
||||
<TabItem value="API key" label="API key" default>
|
||||
|
||||
- **Transport Type**: Select **SSE**.
|
||||
- **URL**: Enter the Langflow MCP server's `sse` endpoint. For example: `http://localhost:7860/api/v1/mcp/project/d359cbd4-6fa2-4002-9d53-fa05c645319c/sse`
|
||||
- **Transport Type**: Select **STDIO**.
|
||||
- **Command**: `uvx`
|
||||
- **Arguments**: Enter the following list of arguments, separated by spaces. Replace the values for `YOUR_API_KEY`, `LANGFLOW_SERVER_ADDRESS`, and `PROJECT_ID` with the values from your Langflow MCP server. For example:
|
||||
```bash
|
||||
mcp-proxy --headers x-api-key YOUR_API_KEY http://LANGFLOW_SERVER_ADDRESS/api/v1/mcp/project/PROJECT_ID/sse
|
||||
```
|
||||
|
||||
If you've [configured authentication for your MCP server](#authentication), fill out the following additional fields:
|
||||
- **Transport Type**: Select **STDIO**.
|
||||
- **Command**: `uvx`
|
||||
- **Arguments**: Enter the following list of arguments, separated by spaces. Replace the values for `YOUR_API_KEY`, `LANGFLOW_SERVER_ADDRESS`, and `PROJECT_ID` with the values from your Langflow MCP server. For example:
|
||||
```bash
|
||||
mcp-proxy --headers x-api-key YOUR_API_KEY http://LANGFLOW_SERVER_ADDRESS/api/v1/mcp/project/PROJECT_ID/sse
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="OAuth" label="OAuth">
|
||||
|
||||
- **Transport Type**: Select **STDIO**.
|
||||
- **Command**: `uvx`
|
||||
- **Arguments**: Enter the following list of arguments, separated by spaces. Replace the value for `OAUTH_SERVER_URL` with the URL of your OAuth server. For example:
|
||||
```bash
|
||||
mcp-composer --mode stdio --sse-url http://localhost:9000/sse --disable-composer-tools --client_auth_type oauth
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="None" label="None">
|
||||
|
||||
- **Transport Type**: Select **SSE**.
|
||||
- **URL**: Enter the Langflow MCP server's `sse` endpoint. For example:
|
||||
```bash
|
||||
http://localhost:7860/api/v1/mcp/project/d359cbd4-6fa2-4002-9d53-fa05c645319c/sse
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
4. Click **Connect**.
|
||||
|
||||
@ -276,52 +355,7 @@ The default address is `http://localhost:6274`.
|
||||
|
||||
## Troubleshoot Langflow MCP servers {#troubleshooting-mcp-server}
|
||||
|
||||
If Claude for Desktop isn't using your server's tools correctly, you may need to explicitly define the path to your local `uvx` or `npx` executable file in the `claude_desktop_config.json` configuration file.
|
||||
|
||||
1. To find your UVX path, run `which uvx`.
|
||||
|
||||
To find your NPX path, run `which npx`.
|
||||
|
||||
2. Copy the path, and then replace `PATH_TO_UVX` or `PATH_TO_NPX` in your `claude_desktop_config.json` file.
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="uvx" label="uvx" default>
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"PROJECT_NAME": {
|
||||
"command": "PATH_TO_UVX",
|
||||
"args": [
|
||||
"mcp-proxy",
|
||||
"http://LANGFLOW_SERVER_ADDRESS/api/v1/mcp/project/PROJECT_ID/sse"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="npx" label="npx">
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"PROJECT_NAME": {
|
||||
"command": "PATH_TO_NPX",
|
||||
"args": [
|
||||
"-y",
|
||||
"supergateway",
|
||||
"--sse",
|
||||
"http://LANGFLOW_SERVER_ADDRESS/api/v1/mcp/project/PROJECT_ID/sse"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
For troubleshooting advice for MCP servers and clients, see [Troubleshoot Langflow: MCP issues](/troubleshoot#mcp).
|
||||
|
||||
## See also
|
||||
|
||||
|
||||
@ -25,8 +25,9 @@ There are three types of credentials that you use in Langflow:
|
||||
|
||||
You can use Langflow API keys to interact with Langflow programmatically.
|
||||
|
||||
In Langflow version 1.5 and later, most API endpoints require a Langflow API key, even when `LANGFLOW_AUTO_LOGIN` is `True`.
|
||||
For more information, see [`LANGFLOW_AUTO_LOGIN`](#langflow-auto-login).
|
||||
By default, most Langflow API endpoints, such as `/v1/run/$FLOW_ID`, require authentication with a Langflow API key.
|
||||
To require API key authentication for flow webhook endpoints, use the [`LANGFLOW_WEBHOOK_AUTH_ENABLE`](/webhook#require-authentication-for-webhooks) environment variable.
|
||||
To configure authentication for Langflow MCP servers, see [Use Langflow as an MCP server](/mcp-server).
|
||||
|
||||
### Langflow API key permissions
|
||||
|
||||
@ -61,9 +62,8 @@ In this case, you must create API keys with the Langflow CLI.
|
||||
|
||||
1. Recommended: [Start your Langflow server with authentication enabled](#start-a-langflow-server-with-authentication-enabled).
|
||||
|
||||
This configuration is recommended for security reasons to prevent unauthorized API key and superuser creation, especially in production environments.
|
||||
|
||||
However, if authentication isn't enabled (`LANGFLOW_AUTO_LOGIN=True`), all users are effectively superusers, and they can create API keys with the Langflow CLI.
|
||||
The Langflow team recommends enabling authentication for security reasons to prevent unauthorized creation of API keys and superusers, especially in production environments.
|
||||
If authentication isn't enabled (`LANGFLOW_AUTO_LOGIN=True`), all users are effectively superusers, and they can create API keys with the Langflow CLI.
|
||||
|
||||
2. Create an API key with [`langflow api-key`](/configuration-cli#langflow-api-key):
|
||||
|
||||
@ -106,6 +106,13 @@ curl -X POST \
|
||||
|
||||
For more information about forming Langflow API requests, see [Get started with the Langflow API](/api-reference-api-examples) and [Trigger flows with the Langflow API](/concepts-publish).
|
||||
|
||||
### Track API key usage
|
||||
|
||||
By default, Langflow tracks API key usage through `total_uses` and `last_used_at` records in your [Langflow database](/memory).
|
||||
|
||||
To disable API key tracking, set `LANGFLOW_DISABLE_TRACK_APIKEY_USAGE=True` in your [Langflow environment variables](/environment-variables).
|
||||
This can help avoid database contention during periods of high concurrency.
|
||||
|
||||
### Revoke an API key
|
||||
|
||||
To revoke and delete an API key, do the following:
|
||||
@ -116,13 +123,12 @@ To revoke and delete an API key, do the following:
|
||||
|
||||
This action immediately invalidates the key and prevents it from being used again.
|
||||
|
||||
## Component API keys
|
||||
## Component API keys {#component-api-keys}
|
||||
|
||||
Component API keys authorize access to external services that are called by components in your flows, such as model providers, databases, or third-party APIs.
|
||||
These aren't Langflow API keys or general application credentials.
|
||||
|
||||
In Langflow, you can store component API keys in global variables in your **Settings** or import them from your Langflow `.env` file.
|
||||
When creating global variables, use the **Credential** type for secure handling of sensitive information.
|
||||
In Langflow, you can store component API keys in global variables in your **Settings** or import them from your runtime environment.
|
||||
For more information, see [Global variables](/configuration-global-variables).
|
||||
|
||||
You create and manage component API keys within the service provider's platform.
|
||||
@ -130,6 +136,9 @@ Langflow only stores the encrypted key value or a secure reference to a key stor
|
||||
This means that deleting a global variable from Langflow doesn't delete or invalidate the actual API key in the service provider's system.
|
||||
You must delete or rotate component API keys directly using the service provider's interface or API.
|
||||
|
||||
For added security, you can set `LANGFLOW_REMOVE_API_KEYS=True` to omit API keys and tokens from flow data in your [Langflow database](/memory).
|
||||
Additionally, when [exporting flows](/concepts-flows-import), you can choose to omit API keys from the exported flow JSON.
|
||||
|
||||
## Authentication environment variables
|
||||
|
||||
This section describes the available authentication configuration variables.
|
||||
@ -138,33 +147,36 @@ You can use the [`.env.example`](https://github.com/langflow-ai/langflow/blob/ma
|
||||
|
||||
### LANGFLOW_AUTO_LOGIN {#langflow-auto-login}
|
||||
|
||||
This variable controls whether authentication is required to access your Langflow server, including the visual editor and API:
|
||||
This variable controls whether authentication is required to access your Langflow server, including the visual editor, API, and Langflow CLI:
|
||||
|
||||
* If `LANGFLOW_AUTO_LOGIN=False`, automatic login is disabled. Users must sign in to the visual editor and use a Langflow API key for Langflow API requests.
|
||||
If false, you must also set [`LANGFLOW_SUPERUSER` and `LANGFLOW_SUPERUSER_PASSWORD`](#langflow-superuser).
|
||||
* If `LANGFLOW_AUTO_LOGIN=False`, automatic login is disabled. Users must sign in to the visual editor, authenticate as a superuser to run certain Langflow CLI commands, and use a Langflow API key for Langflow API requests.
|
||||
If false, the Langflow team recommends that you also explicitly set [`LANGFLOW_SUPERUSER` and `LANGFLOW_SUPERUSER_PASSWORD`](#langflow-superuser) to avoid using the insecure default values.
|
||||
|
||||
* If `LANGFLOW_AUTO_LOGIN=True`, Langflow bypasses authentication for the visual editor and API requests.
|
||||
All users can access the same environment without password protection.
|
||||
If you don't have user management enabled, all users are effectively superusers.
|
||||
* If `LANGFLOW_AUTO_LOGIN=True` (default), all API requests require authentication with a Langflow API key, but the visual editor automatically signs in all users as superusers, and Langflow uses _only_ the default [superuser credentials](/api-keys-and-authentication#langflow-superuser).
|
||||
All users access the same visual editor environment without password protection, they can run all Langflow CLI commands as superusers, and Langflow automatically authenticates internal requests between the backend and frontend based on the users' superuser privileges.
|
||||
If you also want to bypass authentication for Langflow API requests in addition to other bypassed authentication, see [`LANGFLOW_SKIP_AUTH_AUTO_LOGIN`](/api-keys-and-authentication#langflow-skip-auth-auto-login).
|
||||
|
||||
Langflow doesn't allow users to simultaneously edit the same flow in real time.
|
||||
If two users edit the same flow, Langflow saves only the work of the most recent editor based on the state of that user's [workspace](/concepts-overview#workspace). Any changes made by the other user in the interim are overwritten.
|
||||
|
||||
#### AUTO_LOGIN and API authentication in version 1.5 and later
|
||||
#### Default authentication enforcement and LANGFLOW_SKIP_AUTH_AUTO_LOGIN {#langflow-skip-auth-auto-login}
|
||||
|
||||
In Langflow versions 1.5 and later, most API endpoints require a Langflow API key, even when `AUTO_LOGIN` is true.
|
||||
The only exceptions are the MCP endpoints `/v1/mcp`, `/v1/mcp-projects`, and `/v2/mcp`, which never require authentication.
|
||||
In Langflow version 1.6, the default settings are `LANGFLOW_AUTO_LOGIN=True` and `LANGFLOW_SKIP_AUTH_AUTO_LOGIN=False`.
|
||||
This enforces authentication for API requests only, as explained in the preceding section.
|
||||
|
||||
For temporary backwards compatibility, you can revert to the fully unauthenticated behavior from earlier versions by setting both variables to true.
|
||||
However, a future release will set `LANGFLOW_AUTO_LOGIN=False` and remove `LANGFLOW_SKIP_AUTH_AUTO_LOGIN`.
|
||||
At that point, Langflow will strictly enforce API key authentication for API requests, and you can manually disable authentication for some features, like the visual editor, by setting `LANGFLOW_AUTO_LOGIN=True`.
|
||||
|
||||
<details>
|
||||
<summary>LANGFLOW_AUTO_LOGIN and LANGFLOW_SKIP_AUTH_AUTO_LOGIN options</summary>
|
||||
<summary>Authentication enforcement in earlier versions</summary>
|
||||
|
||||
In Langflow versions earlier than 1.5, if `LANGFLOW_AUTO_LOGIN=True`, then Langflow automatically logs users in as a superuser without requiring authentication.
|
||||
In this case, API requests don't require a Langflow API key.
|
||||
Langflow version 1.5 was the first version that could enforce authentication for Langflow API requests, regardless of the value of `LANGFLOW_AUTO_LOGIN`.
|
||||
As a temporary bypass for backwards compatibility, this version added the `LANGFLOW_SKIP_AUTH_AUTO_LOGIN` environment variable and set both variables to true by default to preserve the fully unauthenticated behavior from earlier versions.
|
||||
This allowed users to upgrade to version 1.5 with no change in the authentication behavior.
|
||||
|
||||
In Langflow version 1.5, you can set `LANGFLOW_SKIP_AUTH_AUTO_LOGIN=True` _and_ `LANGFLOW_AUTO_LOGIN=True` to skip authentication for API requests _and_ allow automatic login as a superuser for all users.
|
||||
This is a temporary bypass for backwards compatibility, and the `LANGFLOW_SKIP_AUTH_AUTO_LOGIN` option will be removed in a future release.
|
||||
|
||||
If either `LANGFLOW_AUTO_LOGIN` or `LANGFLOW_SKIP_AUTH_AUTO_LOGIN` are false, then authentication is required.
|
||||
In Langflow versions earlier than 1.5, Langflow API requests didn't require authentication.
|
||||
Additionally, the default setting of `LANGFLOW_AUTO_LOGIN=True` automatically granted all users superuser privileges in the visual editor, and it allowed all users to run all Langflow CLI commands as superusers.
|
||||
</details>
|
||||
|
||||
### LANGFLOW_ENABLE_SUPERUSER_CLI {#langflow-enable-superuser-cli}
|
||||
@ -270,6 +282,42 @@ LANGFLOW_NEW_USER_IS_ACTIVE=False
|
||||
Only superusers can manage user accounts for a Langflow server, but user management only matters if your server has authentication enabled.
|
||||
For more information, see [Start a Langflow server with authentication enabled](#start-a-langflow-server-with-authentication-enabled).
|
||||
|
||||
### LANGFLOW_CORS_* {#cors-configuration-for-authentication}
|
||||
|
||||
Cross-Origin Resource Sharing (CORS) configuration controls how authentication credentials are handled when your Langflow frontend and backend are served from different origins.
|
||||
The following `LANGFLOW_CORS_*` environment variables are available:
|
||||
|
||||
| Variable | Format | Default | Description |
|
||||
|----------|--------|---------|-------------|
|
||||
| `LANGFLOW_CORS_ALLOW_CREDENTIALS` | Boolean | True | Whether to allow credentials, such as cookies and authorization headers, in CORS requests. |
|
||||
| `LANGFLOW_CORS_ALLOW_HEADERS` | List[String] or String | `*` | The allowed headers for CORS requests. Provide a comma-separated list of headers or use `*` to allow all headers. |
|
||||
| `LANGFLOW_CORS_ALLOW_METHODS` | List[String] or String | `*` | The allowed HTTP methods for CORS requests. Provide a comma-separated list of methods or use `*` to allow all methods. |
|
||||
| `LANGFLOW_CORS_ORIGINS` | String | `*` | The allowed CORS origins. Provide a comma-separated list of origins or use `*` for all origins. |
|
||||
|
||||
The default configuration enables CORS credentials and uses wildcards (`*`) to allow all origins, headers, and methods:
|
||||
|
||||
```text
|
||||
LANGFLOW_CORS_ORIGINS=*
|
||||
LANGFLOW_CORS_ALLOW_CREDENTIALS=True
|
||||
LANGFLOW_CORS_ALLOW_HEADERS=*
|
||||
LANGFLOW_CORS_ALLOW_METHODS=*
|
||||
```
|
||||
|
||||
:::danger
|
||||
Langflow's default CORS settings can be a security risk in production environments because any website can make requests to your Langflow API, and any website can include credentials in cross-origin requests, including authentication cookies and authorization headers.
|
||||
|
||||
In production deployments, specify exact origins in `LANGFLOW_CORS_ORIGINS`.
|
||||
You can also specify allowed headers and methods, if needed.
|
||||
For example:
|
||||
|
||||
```text
|
||||
LANGFLOW_CORS_ORIGINS=https://yourdomain.com,https://app.yourdomain.com
|
||||
LANGFLOW_CORS_ALLOW_CREDENTIALS=True
|
||||
LANGFLOW_CORS_ALLOW_HEADERS=Content-Type,Authorization
|
||||
LANGFLOW_CORS_ALLOW_METHODS=GET,POST,PUT
|
||||
```
|
||||
:::
|
||||
|
||||
## Start a Langflow server with authentication enabled
|
||||
|
||||
This section shows you how to use the [authentication environment variables](/api-keys-and-authentication#authentication-environment-variables) to deploy a Langflow server with authentication enabled.
|
||||
@ -353,4 +401,8 @@ Next, you can add users to your Langflow server to collaborate with others on fl
|
||||
5. To test the new user's access, sign out of Langflow, and then sign in with the new user's credentials.
|
||||
|
||||
Try to access the `/admin` page.
|
||||
You are redirected to the `/flows` page if the new user isn't a superuser.
|
||||
You are redirected to the `/flows` page if the new user isn't a superuser.
|
||||
|
||||
## See also
|
||||
|
||||
* [Langflow environment variables](/environment-variables)
|
||||
@ -37,7 +37,7 @@ Langflow CLI options override the values of [environment variables](/environment
|
||||
For example, if you have `LANGFLOW_PORT=7860` defined as an environment variable, and you run the CLI with `--port 7880`, then Langflow sets the port to `7880` because the CLI option overrides the environment variable.
|
||||
|
||||
This also applies to Boolean environment variables.
|
||||
For example, if you set `LANGFLOW_REMOVE_API_KEYS=True` in your `.env` file, then you can change it to `False` by running the CLI with `--no-remove-api-keys`.
|
||||
For example, if you set `LANGFLOW_REMOVE_API_KEYS=True` in your `.env` file, you can change it to `False` at runtime by running the CLI with `--no-remove-api-keys`.
|
||||
|
||||
## Langflow CLI options
|
||||
|
||||
@ -259,28 +259,27 @@ For more information Langflow configuration options, see [Langflow environment v
|
||||
|
||||
| Option | Default | Type | Description |
|
||||
|--------|---------|--------|-------------|
|
||||
| `--auto-saving` | `--auto-saving` (true) | Boolean | Whether to enable flow auto-saving. Use `--no-auto-saving` to disable flow auto-saving. |
|
||||
| `--auto-saving` | `--auto-saving` (true) | Boolean | Whether to enable flow auto-saving in the visual editor. Use `--no-auto-saving` to disable flow auto-saving. |
|
||||
| `--auto-saving-interval` | `1000` | Integer | The interval for flow auto-saving in milliseconds. |
|
||||
| `--backend-only` | `--no-backend-only` (false) | Boolean | Whether to run Langflow's backend service only (no frontend). Omit or use `--no-backend-only` to start both the frontend and backend. See [Start Langflow in headless mode](#start-langflow-in-headless-mode). |
|
||||
| `--cache` | `async` | String | The type of cache to use. One of `async`, `redis`, `memory`, or `disk`. |
|
||||
| `--components-path` | Not set | String | The path to the directory containing custom components. |
|
||||
| `--cache` | `async` | String | The type of [cache storage](/memory) to use. One of `async`, `redis`, `memory`, or `disk`. |
|
||||
| `--components-path` | Not set | String | The path to the directory containing your custom components. |
|
||||
| `--dev` | `--no-dev` (false) | Boolean | Whether to run in development mode (may contain bugs). |
|
||||
| `--env-file` | Not set | String | The path to the `.env` file containing Langflow environment variables. See [Start Langflow with a specific .env file](#start-langflow-with-a-specific-env-file). |
|
||||
| `--frontend-path` | Not set | String | The path to the frontend directory containing build files. This is only used when [contributing to the Langflow codebase](/contributing-how-to-contribute) or developing a custom Langflow image that includes customized frontend code. |
|
||||
| `--health-check-max-retries` | `5` | Integer | The maximum number of retries for the health check. |
|
||||
| `--health-check-max-retries` | `5` | Integer | The maximum number of retries for your Langflow server's health check. |
|
||||
| `--host` | `localhost` | String | The host on which the Langflow server will run. |
|
||||
| `--log-file` | `logs/langflow.log` | String | The path to the log file for Langflow. |
|
||||
| `--log-level` | `critical` | String | The logging level as one of `debug`, `info`, `warning`, `error`, or `critical`. |
|
||||
| `--log-rotation` | Not set | String | The log rotation (Time/Size). |
|
||||
| `--max-file-size-upload` | `100` | Integer | The maximum size in megabytes for file uploads. |
|
||||
| `--log-rotation` | Not set | String | The log rotation interval, either a time duration or file size. |
|
||||
| `--max-file-size-upload` | `1024` | Integer | The maximum size in megabytes for file uploads. |
|
||||
| `--open-browser` | `--no-open-browser` (false) | Boolean | Whether to open the system web browser on startup. Use `--open-browser` to open the system's default web browser when Langflow starts. |
|
||||
| `--port` | `7860` | Integer | The port on which the Langflow server will run. The server automatically selects a free port if the specified port is in use. |
|
||||
| `--remove-api-keys` | `--no-remove-api-keys` (false) | Boolean | Whether to remove API keys from projects saved in the Langflow database. |
|
||||
| `--ssl-cert-file-path` | Not set | String | The path to the SSL certificate file on the local system. |
|
||||
| `--ssl-key-file-path` | Not set | String | The path to the SSL key file on the local system. |
|
||||
| `--store` | `--store` (true) | Boolean | Whether to enable the Langflow Store features. Use `--no-store` to disable the Langflow Store features. |
|
||||
| `--worker-timeout` | `300` | Integer | The worker timeout in seconds. |
|
||||
| `--workers` | `1` | Integer | The number of worker processes. |
|
||||
| `--remove-api-keys` | `--no-remove-api-keys` (false) | Boolean | Whether to remove API keys and tokens from flows saved in the Langflow database. |
|
||||
| `--ssl-cert-file-path` | Not set | String | The path to the SSL certificate file on the local system for SSL-encrypted connections. |
|
||||
| `--ssl-key-file-path` | Not set | String | The path to the SSL key file on the local system for SSL-encrypted connections. |
|
||||
| `--worker-timeout` | `300` | Integer | The Langflow server worker timeout in seconds. |
|
||||
| `--workers` | `1` | Integer | The number of Langflow server worker processes. |
|
||||
|
||||
#### Start Langflow with a specific .env file {#start-langflow-with-a-specific-env-file}
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ Langflow can more efficiently handle multiple users and larger workloads by usin
|
||||
- If you're running PostgreSQL in a separate Docker container with `docker run`, use the container's IP address or network alias.
|
||||
- If you're running a cloud-hosted PostgreSQL, your provider will share your connection string, which includes a username and password.
|
||||
|
||||
3. Create a Langflow `.env` file:
|
||||
3. Edit or create a Langflow `.env` file:
|
||||
|
||||
```
|
||||
touch .env
|
||||
@ -48,6 +48,8 @@ Langflow can more efficiently handle multiple users and larger workloads by usin
|
||||
uv run langflow run --env-file .env
|
||||
```
|
||||
|
||||
For optional connection pooling and timeout settings, see [Configure external memory](/memory#configure-external-memory).
|
||||
|
||||
6. In Langflow, run any flow to create traffic.
|
||||
|
||||
7. Inspect your PostgreSQL database's tables and activity to verify that new tables and traffic were created after you ran a flow.
|
||||
@ -86,6 +88,9 @@ This approach means you only have to manage deployment variables in one file, in
|
||||
LANGFLOW_PORT_2=7861
|
||||
LANGFLOW_HOST=0.0.0.0
|
||||
```
|
||||
|
||||
For optional connection pooling and timeout settings, see [Configure external memory](/memory#configure-external-memory).
|
||||
|
||||
2. Reference these variables in your `docker-compose.yml`.
|
||||
For example:
|
||||
|
||||
@ -157,7 +162,7 @@ Your container name may vary.
|
||||
6. Examine the query results for multiple connections with different `client_addr` values, for example `172.21.0.3` and `172.21.0.4`.
|
||||
Since each Langflow instance runs in its own container on the Docker network, using different incoming IP addresses confirms that both instances are actively connected to the PostgreSQL database.
|
||||
|
||||
7. To quit psql, type `quit`.
|
||||
7. To quit `psql`, type `quit`.
|
||||
|
||||
## See also
|
||||
|
||||
|
||||
@ -6,14 +6,14 @@ slug: /configuration-global-variables
|
||||
import Icon from "@site/src/components/icon";
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
import EnvGlobalVars from '@site/docs/_partial-env-global-vars.mdx';
|
||||
|
||||
Global variables let you store and reuse generic input values and credentials across your [Langflow projects](/concepts-flows#projects).
|
||||
You can use a global variable in any text input field that displays the <Icon name="Globe" aria-hidden="true"/> **Globe** icon.
|
||||
Use global variables to store and reuse credentials and generic values across all of your flows.
|
||||
Global variables are typically used by components in flow, and you can use them in any field with the <Icon name="Globe" aria-hidden="true"/> global variable icon.
|
||||
|
||||
Langflow stores global variables in its internal database, and encrypts the values using a secret key.
|
||||
In contrast, [environment variables](/environment-variables), like `LANGFLOW_PORT` or `LANGFLOW_LOG_LEVEL`, are generally for broader settings that configure how Langflow runs.
|
||||
However, Langflow can also source global variables from environment variables.
|
||||
|
||||
<EnvGlobalVars />
|
||||
Langflow stores global variables in its internal database, and it encrypts the values using a secret key.
|
||||
|
||||
## Create a global variable
|
||||
|
||||
@ -28,13 +28,9 @@ To create a new global variable, follow these steps.
|
||||
|
||||
5. Optional: Select a **Type** for your global variable. The available types are **Generic** (default) and **Credential**.
|
||||
|
||||
Langflow encrypts both **Generic** and **Credential** type global variables. The difference is in how the variables are displayed in the visual editor:
|
||||
|
||||
* Global variables of the **Generic** type are displayed in a standard input field with no masking.
|
||||
* Global variables of the **Credential** type are hidden in the visual editor and entered in a password-style input field that masks the value. This type isn't allowed in session ID fields where the value is exposed.
|
||||
|
||||
All default environment variables and variables sourced from the environment using `LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` are automatically set as **Credential** type.
|
||||
For more information, see [Default environment variables](#default-environment-variables).
|
||||
Langflow encrypts both **Generic** and **Credential** type global variables.
|
||||
However, **Generic** variables aren't masked in the visual editor, whereas **Credential** variables are masked.
|
||||
**Session ID** fields don't accept **Credential** (masked) variables.
|
||||
|
||||
6. Enter the **Value** for your global variable.
|
||||
|
||||
@ -71,20 +67,24 @@ Flows that reference the deleted global variable will fail.
|
||||
|
||||
The global variable is deleted from the database.
|
||||
|
||||
## Add custom global variables from the environment
|
||||
## Add custom global variables from the environment {#add-custom-global-variables-from-the-environment}
|
||||
|
||||
You can use the `LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` [environment variable](/environment-variables#global-variables-and-environment-integration) to source custom global variables from your runtime environment.
|
||||
All global variables sourced from the environment are automatically set as **Credential** type global variables.
|
||||
Langflow can source custom global variables from your runtime environment.
|
||||
For information about how Langflow detects and applies environment variables, see [Langflow environment variables](/environment-variables).
|
||||
|
||||
Langflow's [default global variables](#default-environment-variables) are already included in this list and are automatically sourced when detected.
|
||||
You can extend this list by setting `LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` with your additional variables.
|
||||
Langflow automatically generates global variables based on [`constants.py`](https://github.com/langflow-ai/langflow/blob/main/src/lfx/src/lfx/services/settings/constants.py) if it detects any matching environment variables.
|
||||
For example, if you set `OPENAI_API_KEY` in your runtime environment, Langflow automatically generates a global variable using that value.
|
||||
|
||||
You can declare additional variables in `LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT`.
|
||||
For example, `LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT=WATSONX_PROJECT_ID,WATSONX_API_KEY` creates global variables named `WATSONX_PROJECT_ID` and `WATSONX_API_KEY` in Langflow's database.
|
||||
Then, you can use these variables wherever they are needed in your component settings.
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="local" label="Local" default>
|
||||
|
||||
If you installed Langflow locally, you must define the `LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` environment variable in a `.env` file.
|
||||
If you installed Langflow locally, set `LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` in your Langflow `.env` file:
|
||||
|
||||
1. Create a `.env` file and open it in your preferred editor.
|
||||
1. Create or edit your Langflow `.env` file.
|
||||
|
||||
2. Add the `LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` environment variable as follows:
|
||||
|
||||
@ -99,7 +99,6 @@ If you installed Langflow locally, you must define the `LANGFLOW_VARIABLES_TO_GE
|
||||
```
|
||||
|
||||
Replace `VARIABLE1,VARIABLE2` with your additional variables that you want Langflow to source from the environment, such as `CUSTOM_API_KEY,INTERNAL_SERVICE_URL` or `["CUSTOM_API_KEY", "INTERNAL_SERVICE_URL"]`.
|
||||
These are added to the [default list of variables](#default-environment-variables) that Langflow already monitors, which includes common API keys like `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, and `GOOGLE_API_KEY`.
|
||||
|
||||
3. Save and close the file.
|
||||
|
||||
@ -115,7 +114,7 @@ If you installed Langflow locally, you must define the `LANGFLOW_VARIABLES_TO_GE
|
||||
VARIABLE1="VALUE1" VARIABLE2="VALUE2" uv run langflow run --env-file .env
|
||||
```
|
||||
|
||||
The command-line variables will override any values in the `.env` file.
|
||||
The command-line variables override matching variables in the `.env` file.
|
||||
Expose your environment variables to Langflow in a manner that best suits your own environment.
|
||||
|
||||
5. Confirm that Langflow successfully sourced the global variables from the environment:
|
||||
@ -127,61 +126,60 @@ If you installed Langflow locally, you must define the `LANGFLOW_VARIABLES_TO_GE
|
||||
</TabItem>
|
||||
<TabItem value="docker" label="Docker">
|
||||
|
||||
If you're using Docker, you can pass `LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` directly from the command line or from a `.env` file.
|
||||
If you're using Docker, there are two ways that you can set `LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT`:
|
||||
|
||||
To pass `LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` directly from the command line:
|
||||
* On the command line:
|
||||
|
||||
```bash
|
||||
docker run -it --rm \
|
||||
-p 7860:7860 \
|
||||
-e LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT="VARIABLE1,VARIABLE2" \
|
||||
-e VARIABLE1="VALUE1" \
|
||||
-e VARIABLE2="VALUE2" \
|
||||
langflowai/langflow:latest
|
||||
```
|
||||
```bash
|
||||
docker run -it --rm \
|
||||
-p 7860:7860 \
|
||||
-e LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT="VARIABLE1,VARIABLE2" \
|
||||
-e VARIABLE1="VALUE1" \
|
||||
-e VARIABLE2="VALUE2" \
|
||||
langflowai/langflow:latest
|
||||
```
|
||||
|
||||
To pass `LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` from a `.env` file:
|
||||
* In your `.env` file:
|
||||
|
||||
```bash
|
||||
docker run -it --rm \
|
||||
-p 7860:7860 \
|
||||
--env-file .env \
|
||||
-e VARIABLE1="VALUE1" \
|
||||
-e VARIABLE2="VALUE2" \
|
||||
langflowai/langflow:latest
|
||||
```
|
||||
```bash
|
||||
docker run -it --rm \
|
||||
-p 7860:7860 \
|
||||
--env-file .env \
|
||||
-e VARIABLE1="VALUE1" \
|
||||
-e VARIABLE2="VALUE2" \
|
||||
langflowai/langflow:latest
|
||||
```
|
||||
|
||||
The list in `LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` includes only the variable names.
|
||||
You must ensure that these environment variables are defined in your Docker environment, such as with `-e` or otherwise.
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
When adding global variables from the environment, the following limitations apply:
|
||||
After starting Langflow, go to your Langflow **Settings** to confirm that the variables were created.
|
||||
|
||||
- You can only source the **Name** and **Value** from the environment.
|
||||
Only the **Name** and **Value** are taken from the environment.
|
||||
You can edit the variables in your Langflow **Settings** if you want to configure additional options, such as the **Apply To Fields** option.
|
||||
|
||||
To add additional parameters, such as the **Apply To Fields** parameter, you must edit the global variables in your Langflow **Settings**.
|
||||
|
||||
- Global variables that you add from the environment always have the **Credential** type.
|
||||
Global variables sourced from the environment are assigned the **Credential** type, which masks the values in the visual editor.
|
||||
However, Langflow automatically encrypts _all_ global variables stored in the database.
|
||||
|
||||
## Disallow global variables from the environment
|
||||
|
||||
If you want to explicitly prevent Langflow from sourcing global variables from the environment, set `LANGFLOW_STORE_ENVIRONMENT_VARIABLES=False` in your `.env` file.
|
||||
|
||||
## Use environment variables for missing global variables
|
||||
## Use environment variables for missing global variables {#use-environment-variables-for-missing-global-variables}
|
||||
|
||||
If you want to automatically set fallback values for your global variables to environment variables, set `LANGFLOW_FALLBACK_TO_ENV_VAR=True` in your `.env` file. When this setting is enabled, if a global variable isn't found, Langflow attempts to use an environment variable with the same name as a backup.
|
||||
If you want to automatically set fallback values for your global variables to environment variables, set `LANGFLOW_FALLBACK_TO_ENV_VAR=True` in your `.env` file.
|
||||
When this setting is enabled, if a global variable isn't found, Langflow attempts to use an environment variable with the same name as a backup.
|
||||
|
||||
## Global variables automatically set by environment variables {#default-environment-variables}
|
||||
For example, assume you have the following Langflow `.env` configuration, and your flow has a component that expects a `WATSONX_API_KEY` global variable:
|
||||
|
||||
Langflow automatically detects and converts some environment variables into global variables of the type **Credential**, which are applied to the specific fields in components that require them.
|
||||
```text
|
||||
LANGFLOW_FALLBACK_TO_ENV_VAR=True
|
||||
WATSONX_PROJECT_ID=your_project_id
|
||||
WATSONX_API_KEY=your_api_key
|
||||
```
|
||||
|
||||
The supported variables are listed in [constants.py](https://github.com/langflow-ai/langflow/blob/main/src/lfx/src/lfx/services/settings/constants.py).
|
||||
|
||||
## Configure global variable and environment variable handling
|
||||
|
||||
These environment variables configure how Langflow handles the relationship between environment variables and global variables.
|
||||
|
||||
| Variable | Format | Default | Description |
|
||||
|----------|--------|---------|-------------|
|
||||
| `LANGFLOW_STORE_ENVIRONMENT_VARIABLES` | Boolean | True | Whether to store environment variables as [global variables](/configuration-global-variables) in the database. |
|
||||
| `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-global-variables). |
|
||||
| `LANGFLOW_FALLBACK_TO_ENV_VAR` | Boolean | True | If enabled, [global variables](/configuration-global-variables) set in your Langflow **Settings** can use an environment variable with the same name if Langflow can't retrieve the variable value from the global variables. |
|
||||
When you run the flow, if there is no global variable named `WATSONX_API_KEY`, Langflow looks for an environment variable named `WATSONX_API_KEY`.
|
||||
In this example, Langflow uses the `WATSONX_API_KEY` value from the `.env` to run the flow.
|
||||
@ -6,39 +6,37 @@ slug: /environment-variables
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
import Link from '@docusaurus/Link';
|
||||
import EnvGlobalVars from '@site/docs/_partial-env-global-vars.mdx';
|
||||
|
||||
Langflow uses environment variables to configure certain settings.
|
||||
You can also import environment variables for use in your deployment, such as environment variables used by certain components in your flows.
|
||||
In general, environment variables, like `LANGFLOW_PORT` or `LANGFLOW_LOG_LEVEL`, configure how Langflow runs.
|
||||
These are broad settings that apply to your entire Langflow deployment.
|
||||
|
||||
You can set Langflow environment variables in your terminal, in `.env`, and with the [Langflow CLI](./configuration-cli).
|
||||
In contrast, global variables are user-defined values stored in Langflow's database for use in flows, such as `OPENAI_API_KEY`.
|
||||
Langflow can also source global variables from environment variables.
|
||||
For more information, see [Langflow global variables](/configuration-global-variables).
|
||||
|
||||
<EnvGlobalVars />
|
||||
## Configure environment variables for Langflow OSS
|
||||
|
||||
## Precedence {#precedence}
|
||||
Langflow recognizes [supported environment variables](#supported-variables) from the following sources:
|
||||
|
||||
If an environment variable is set in multiple places, the following hierarchy applies:
|
||||
- Environment variables set in your terminal.
|
||||
- Environment variables imported from a `.env` file when starting Langflow.
|
||||
- Environment variables set with the [Langflow CLI](./configuration-cli), including the `--env-file` option and direct options, such as `--port`.
|
||||
|
||||
You can choose to use one or more of these sources.
|
||||
|
||||
### Precedence {#precedence}
|
||||
|
||||
If the same environment variable is set in multiple places, the following hierarchy applies:
|
||||
|
||||
1. Langflow CLI options override all other sources.
|
||||
2. The `.env` file overrides system environment variables.
|
||||
3. System environment variables are used only if not set elsewhere.
|
||||
When running a Langflow Docker image, the `-e` flag can be used to set additional system environment variables.
|
||||
|
||||
When running a Langflow Docker image, the `-e` flag sets system environment variables.
|
||||
For example:
|
||||
|
||||
For example:
|
||||
* If you set `LANGFLOW_PORT=8080` in your system environment and `LANGFLOW_PORT=7860` in `.env`, Langflow uses `7860` from `.env`.
|
||||
* If you run `langflow run --port 9000` with `LANGFLOW_PORT=7860` in `.env`, Langflow uses `9000` from the CLI option.
|
||||
|
||||
|
||||
## Configure environment variables
|
||||
|
||||
Langflow recognizes [supported environment variables](#supported-variables) from the following sources:
|
||||
|
||||
- Environment variables that you've set in your terminal.
|
||||
- Environment variables that you've imported from a `.env` file when starting Langflow or using the `--env-file` option in the Langflow CLI.
|
||||
|
||||
You can choose to use one or both sources.
|
||||
However, environment variables imported from a `.env` file take [precedence](#precedence) over those set in your terminal.
|
||||
* If you set `LANGFLOW_PORT=8080` in your system environment and `LANGFLOW_PORT=7860` in `.env`, Langflow uses `7860` from `.env`.
|
||||
* If you use the Langflow CLI to run `langflow run --env-file .env --port 9000`, and you set `LANGFLOW_PORT=7860` in `.env`, then Langflow uses `9000` from the CLI option.
|
||||
|
||||
### Set environment variables in your terminal {#configure-variables-terminal}
|
||||
|
||||
@ -80,7 +78,10 @@ If it detects a supported environment variable, then it automatically adopts the
|
||||
|
||||
2. Create a `.env` file, and then open it in your preferred editor.
|
||||
|
||||
3. Define [Langflow environment variables](#supported-variables) in the `.env` file. For example:
|
||||
3. Define [Langflow environment variables](#supported-variables) in the `.env` file.
|
||||
|
||||
<details>
|
||||
<summary>Example: .env</summary>
|
||||
|
||||
```text
|
||||
DO_NOT_TRACK=True
|
||||
@ -107,7 +108,6 @@ If it detects a supported environment variable, then it automatically adopts the
|
||||
LANGFLOW_REMOVE_API_KEYS=False
|
||||
LANGFLOW_SAVE_DB_IN_CONFIG_DIR=True
|
||||
LANGFLOW_SECRET_KEY=somesecretkey
|
||||
LANGFLOW_STORE=True
|
||||
LANGFLOW_STORE_ENVIRONMENT_VARIABLES=True
|
||||
LANGFLOW_SUPERUSER=adminuser
|
||||
LANGFLOW_SUPERUSER_PASSWORD=adminpass
|
||||
@ -115,7 +115,9 @@ If it detects a supported environment variable, then it automatically adopts the
|
||||
LANGFLOW_WORKERS=3
|
||||
```
|
||||
|
||||
For additional examples, see the [`.env.example`](https://github.com/langflow-ai/langflow/blob/main/.env.example) file in the Langflow repository.
|
||||
For additional examples, see [`.env.example`](https://github.com/langflow-ai/langflow/blob/main/.env.example) in the Langflow repository.
|
||||
|
||||
</details>
|
||||
|
||||
4. Save and close `.env`.
|
||||
|
||||
@ -145,156 +147,9 @@ If it detects a supported environment variable, then it automatically adopts the
|
||||
|
||||
On startup, Langflow imports the environment variables from your `.env` file, as well as any others that you set in your terminal, and then adopts their specified values.
|
||||
|
||||
## Supported environment variables {#supported-variables}
|
||||
### Configure environment variables for development
|
||||
|
||||
The following tables list the environment variables supported by Langflow.
|
||||
|
||||
### Authentication and security
|
||||
|
||||
| Variable | Format | Default | Description |
|
||||
|----------|--------|---------|-------------|
|
||||
| `LANGFLOW_AUTO_LOGIN` | Boolean | True | See [Authentication variables](/api-keys-and-authentication#authentication-environment-variables). |
|
||||
| `LANGFLOW_SKIP_AUTH_AUTO_LOGIN` | Boolean | True | See [Authentication variables](/api-keys-and-authentication#authentication-environment-variables). |
|
||||
| `LANGFLOW_SECRET_KEY` | String | Automated | See [Authentication variables](/api-keys-and-authentication#authentication-environment-variables). |
|
||||
| `LANGFLOW_SUPERUSER` | String | `langflow` | See [Authentication variables](/api-keys-and-authentication#authentication-environment-variables). |
|
||||
| `LANGFLOW_SUPERUSER_PASSWORD` | String | `langflow` | See [Authentication variables](/api-keys-and-authentication#authentication-environment-variables). |
|
||||
| `LANGFLOW_ENABLE_SUPERUSER_CLI` | Boolean | True | See [Authentication variables](/api-keys-and-authentication#authentication-environment-variables). |
|
||||
| `LANGFLOW_NEW_USER_IS_ACTIVE` | Boolean | False | See [Authentication variables](/api-keys-and-authentication#authentication-environment-variables). |
|
||||
| `LANGFLOW_REMOVE_API_KEYS` | Boolean | False | When `true`, automatically removes API keys and tokens from flow data before saving to the database. Fields that contain `api`, `key`, or `token` in their names AND are marked as password fields will have their values set to `null`. This prevents credentials from being stored in the database. |
|
||||
| `LANGFLOW_DISABLE_TRACK_APIKEY_USAGE` | Boolean | False | Whether to track API key usage. If true, disables tracking of API key usage (`total_uses` and `last_used_at`) to avoid database contention under high concurrency. |
|
||||
| `LANGFLOW_WEBHOOK_AUTH_ENABLE` | Boolean | False | Enable API key authentication for webhook endpoints. If false, webhooks run as flow owner without authentication. |
|
||||
|
||||
For detailed information about authentication configuration, see [API keys and authentication](/api-keys-and-authentication).
|
||||
|
||||
### Caching configuration
|
||||
|
||||
| Variable | Format | Default | Description |
|
||||
|----------|--------|---------|-------------|
|
||||
| `LANGFLOW_CACHE_TYPE` | String | `async` | Set the cache type for Langflow. Possible values: `async`, `redis`, `memory`, `disk`. If you set the type to `redis`, then you must also set the following environment variables: `LANGFLOW_REDIS_HOST`, `LANGFLOW_REDIS_PORT`, `LANGFLOW_REDIS_DB`, and `LANGFLOW_REDIS_CACHE_EXPIRE`. See also [`langflow run`](/configuration-cli#langflow-run). |
|
||||
| `LANGFLOW_LANGCHAIN_CACHE` | String | `InMemoryCache` | Type of cache storage to use, separate from `LANGFLOW_CACHE_TYPE`. Possible values: `InMemoryCache`, `SQLiteCache`. See [Cache configuration](/memory#configure-cache-memory). |
|
||||
| `LANGFLOW_REDIS_HOST` | String | `localhost` | Redis host for cache. See `LANGFLOW_CACHE_TYPE`. |
|
||||
| `LANGFLOW_REDIS_PORT` | String | `6379` | Redis port for cache. See `LANGFLOW_CACHE_TYPE`. |
|
||||
| `LANGFLOW_REDIS_DB` | Integer | `0` | Redis database number for cache. See `LANGFLOW_CACHE_TYPE`. |
|
||||
| `LANGFLOW_REDIS_PASSWORD` | String | Not set | Password for Redis authentication when using Redis cache type. |
|
||||
| `LANGFLOW_REDIS_CACHE_EXPIRE` | Integer | `3600` | Cache expiration time in seconds. See `LANGFLOW_CACHE_TYPE`. |
|
||||
|
||||
For detailed information about cache configuration, see [Memory management options](/memory#configure-cache-memory).
|
||||
|
||||
### Database configuration
|
||||
|
||||
| Variable | Format | Default | Description |
|
||||
|----------|--------|---------|-------------|
|
||||
| `LANGFLOW_DATABASE_URL` | String | Not set | Set the database URL for Langflow. If not provided, Langflow uses a SQLite database. See [Database configuration](/memory#configure-external-memory). |
|
||||
| `LANGFLOW_DATABASE_CONNECTION_RETRY` | Boolean | False | Whether to retry lost connections to the Langflow database. If true, Langflow tries to connect to the database again if the connection fails. |
|
||||
| `LANGFLOW_DB_CONNECT_TIMEOUT` | Integer | `30` | The number of seconds to wait before giving up on a lock to be released or establishing a connection to the database. |
|
||||
| `LANGFLOW_DB_CONNECTION_SETTINGS` | JSON | Not set | A JSON dictionary to centralize database connection parameters. Example: `{"pool_size": 20, "max_overflow": 30}`. See [Database configuration](/memory#configure-the-external-database-connection). |
|
||||
| `LANGFLOW_DB_POOL_SIZE` | Integer | `20` | **DEPRECATED:** Use `LANGFLOW_DB_CONNECTION_SETTINGS` instead. The number of connections to keep open in the connection pool. |
|
||||
| `LANGFLOW_DB_MAX_OVERFLOW` | Integer | `30` | **DEPRECATED:** Use `LANGFLOW_DB_CONNECTION_SETTINGS` instead. The number of connections to allow that can be opened beyond the pool size. |
|
||||
| `LANGFLOW_SAVE_DB_IN_CONFIG_DIR` | Boolean | False | If false (default), the Langflow database is saved in the `langflow` root directory. This means the database isn't shared between different virtual environments, and the database is deleted when you uninstall Langflow. If true, the database is saved in the `LANGFLOW_CONFIG_DIR`. |
|
||||
| `LANGFLOW_USE_NOOP_DATABASE` | Boolean | False | If true, disables all database operations and uses a no-op session. Useful for testing. |
|
||||
|
||||
For detailed information about database configuration, see [Memory management options](/memory).
|
||||
|
||||
### File and data management
|
||||
|
||||
| Variable | Format | Default | Description |
|
||||
|----------|--------|---------|-------------|
|
||||
| `LANGFLOW_CONFIG_DIR` | String | Varies | Set the Langflow configuration directory where files, logs, and the Langflow database are stored. Default path depends on your installation. See [Flow storage and logs](/concepts-flows#flow-storage-and-logs). |
|
||||
| `LANGFLOW_COMPONENTS_PATH` | String | Not set | Path to the directory containing custom components. |
|
||||
| `LANGFLOW_FRONTEND_PATH` | String | `./frontend` | Path to the frontend directory containing build files. This is for development purposes only. See [`langflow run`](/configuration-cli#langflow-run). |
|
||||
| `LANGFLOW_MAX_FILE_SIZE_UPLOAD` | Integer | `100` | Set the maximum file size for the upload in megabytes. See [`langflow run`](/configuration-cli#langflow-run). |
|
||||
| `LANGFLOW_MAX_ITEMS_LENGTH` | Integer | `100` | Maximum number of items to store and display in the visual editor. Lists longer than this will be truncated when displayed in the visual editor. Doesn't affect data passed between components nor outputs. |
|
||||
| `LANGFLOW_MAX_TEXT_LENGTH` | Integer | `1000` | Maximum number of characters to store and display in the visual editor. Responses longer than this will be truncated when displayed in the visual editor. Doesn't truncate responses between components nor outputs. |
|
||||
| `LANGFLOW_STORAGE_TYPE` | String | `local` | Type of storage to use for file uploads and data. |
|
||||
| `LANGFLOW_MAX_TRANSACTIONS_TO_KEEP` | Integer | `3000` | Maximum number of transactions to keep in the database. |
|
||||
| `LANGFLOW_MAX_VERTEX_BUILDS_TO_KEEP` | Integer | `3000` | Maximum number of vertex builds to keep in the database. |
|
||||
| `LANGFLOW_MAX_VERTEX_BUILDS_PER_VERTEX` | Integer | `2` | Maximum number of builds to keep per vertex. Older builds will be deleted. |
|
||||
|
||||
### Flow and project management
|
||||
|
||||
| Variable | Format | Default | Description |
|
||||
|----------|--------|---------|-------------|
|
||||
| `LANGFLOW_AUTO_SAVING` | Boolean | True | Enable flow auto-saving. |
|
||||
| `LANGFLOW_AUTO_SAVING_INTERVAL` | Integer | `1000` | Set the interval for flow auto-saving in milliseconds. |
|
||||
| `LANGFLOW_BUNDLE_URLS` | List[String] | `[]` | A list of URLs from which to load component bundles and flows. Supports GitHub URLs. If LANGFLOW_AUTO_LOGIN is enabled, flows from these bundles are loaded into the database. |
|
||||
| `LANGFLOW_LOAD_FLOWS_PATH` | String | Not set | Path to a directory containing flow JSON files to be loaded on startup. Note that this feature only works if `LANGFLOW_AUTO_LOGIN` is enabled. |
|
||||
| `LANGFLOW_CREATE_STARTER_PROJECTS` | Boolean | True | Whether to create templates during initialization. If false, Langflow doesn't create templates, and `LANGFLOW_UPDATE_STARTER_PROJECTS` is treated as false. |
|
||||
| `LANGFLOW_UPDATE_STARTER_PROJECTS` | Boolean | True | Whether to update templates with the latest component versions when initializing after an upgrade. |
|
||||
| `LANGFLOW_LAZY_LOAD_COMPONENTS` | Boolean | False | If true, Langflow only partially loads components at startup and fully loads them on demand. This significantly reduces startup time but may cause a slight delay when a component is first used. |
|
||||
| `LANGFLOW_EVENT_DELIVERY` | String | `streaming` | How to deliver build events to the frontend. Can be 'polling', 'streaming' or 'direct'. |
|
||||
|
||||
### Global variables and environment variables interaction
|
||||
|
||||
For detailed information about how global and environment variables interact, see [Global variables](/configuration-global-variables).
|
||||
|
||||
### Logging configuration {#logging}
|
||||
|
||||
For detailed information about logging configuration, including environment variables, see [Configure log options](/logging#configure-log-options).
|
||||
|
||||
### MCP (Model Context Protocol) {#mcp}
|
||||
|
||||
The following environment variables set behaviors related to your Langflow projects' MCP servers.
|
||||
For detailed information about MCP server configuration, see [Use Langflow as an MCP server](/mcp-server#mcp-server-configuration).
|
||||
|
||||
| Variable | Format | Default | Description |
|
||||
|----------|--------|---------|-------------|
|
||||
| `LANGFLOW_MCP_SERVER_ENABLED` | Boolean | True | If this option is set to False, Langflow doesn't enable the MCP server. |
|
||||
| `LANGFLOW_MCP_SERVER_ENABLE_PROGRESS_NOTIFICATIONS` | Boolean | False | If this option is set to True, Langflow sends progress notifications in the MCP server. |
|
||||
| `LANGFLOW_MCP_SERVER_TIMEOUT` | Integer | `20` | The number of seconds to wait before timing out MCP server operations. |
|
||||
| `LANGFLOW_MCP_MAX_SESSIONS_PER_SERVER` | Integer | `10` | Maximum number of MCP sessions to keep per unique server. |
|
||||
|
||||
### Monitoring and metrics
|
||||
|
||||
For environment variables for specific monitoring service providers, see the Langflow monitoring integration guides, such as [Langfuse](/integrations-langfuse).
|
||||
|
||||
| Variable | Format | Default | Description |
|
||||
|----------|--------|---------|-------------|
|
||||
| `LANGFLOW_PROMETHEUS_ENABLED` | Boolean | False | Expose Prometheus metrics. |
|
||||
| `LANGFLOW_PROMETHEUS_PORT` | Integer | `9090` | Set the port on which Langflow exposes Prometheus metrics. |
|
||||
|
||||
### Other environment variables
|
||||
|
||||
| Variable | Format | Default | Description |
|
||||
|----------|--------|---------|-------------|
|
||||
| `LANGFLOW_STORE` | Boolean | True | Whether to enable the Langflow Store features. |
|
||||
| `LANGFLOW_STORE_URL` | String | `https://api.langflow.store` | URL for the Langflow Store API. |
|
||||
| `LANGFLOW_DOWNLOAD_WEBHOOK_URL` | String | Not set | Webhook URL for download events. |
|
||||
| `LANGFLOW_LIKE_WEBHOOK_URL` | String | Not set | Webhook URL for like events. |
|
||||
| `LANGFLOW_DEV` | Boolean | False | Enable development mode. |
|
||||
| `LANGFLOW_DEACTIVATE_TRACING` | Boolean | False | Deactivate tracing functionality. |
|
||||
| `LANGFLOW_CELERY_ENABLED` | Boolean | False | Enable Celery for distributed task processing. |
|
||||
|
||||
### Public flow settings
|
||||
|
||||
Public flows are flows that are exposed in shared Langflow playgrounds.
|
||||
For detailed information about shared Playground configuration, see [Share a flow's Playground](/concepts-playground#share-a-flows-playground).
|
||||
|
||||
| Variable | Format | Default | Description |
|
||||
|----------|--------|---------|-------------|
|
||||
| `LANGFLOW_PUBLIC_FLOW_CLEANUP_INTERVAL` | Integer | `3600` | The interval in seconds at which public temporary flows will be cleaned up. Default is 1 hour (3600 seconds). Minimum is 600 seconds (10 minutes). |
|
||||
| `LANGFLOW_PUBLIC_FLOW_EXPIRATION` | Integer | `86400` | The time in seconds after which a public temporary flow will be considered expired and eligible for cleanup. Default is 24 hours (86400 seconds). Minimum is 600 seconds (10 minutes). |
|
||||
|
||||
### Server configuration
|
||||
|
||||
| Variable | Format | Default | Description |
|
||||
|----------|--------|---------|-------------|
|
||||
| `LANGFLOW_HOST` | String | `localhost` | The host on which the Langflow server will run. See [`langflow run`](/configuration-cli#langflow-run). |
|
||||
| `LANGFLOW_PORT` | Integer | `7860` | The port on which the Langflow server runs. The server automatically selects a free port if the specified port is in use. |
|
||||
| `LANGFLOW_BACKEND_ONLY` | Boolean | False | Run only the Langflow backend service (no frontend). |
|
||||
| `LANGFLOW_OPEN_BROWSER` | Boolean | False | Open the system web browser on startup. |
|
||||
| `LANGFLOW_HEALTH_CHECK_MAX_RETRIES` | Integer | `5` | Set the maximum number of retries for the health check. See [`langflow run`](/configuration-cli#langflow-run). |
|
||||
| `LANGFLOW_WORKERS` | Integer | `1` | Number of worker processes. |
|
||||
| `LANGFLOW_WORKER_TIMEOUT` | Integer | `300` | Worker timeout in seconds. |
|
||||
| `LANGFLOW_SSL_CERT_FILE` | String | Not set | Path to the SSL certificate file on the local system. |
|
||||
| `LANGFLOW_SSL_KEY_FILE` | String | Not set | Path to the SSL key file on the local system. |
|
||||
|
||||
### Telemetry
|
||||
|
||||
For telemetry configuration options, see [Telemetry](/contributing-telemetry).
|
||||
|
||||
## Configure .env, override.conf, and tasks.json files
|
||||
|
||||
The following examples show how to configure Langflow using environment variables in different scenarios.
|
||||
The following examples show how to configure Langflow using environment variables in different development scenarios.
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="env" label=".env file" default>
|
||||
@ -303,6 +158,9 @@ The `.env` file is a text file that contains key-value pairs of environment vari
|
||||
|
||||
Create or edit a `.env` file in the root directory of your application or Langflow environment, and then add your configuration variables to the file:
|
||||
|
||||
<details>
|
||||
<summary>Example: .env</summary>
|
||||
|
||||
```text title=".env"
|
||||
DO_NOT_TRACK=True
|
||||
LANGFLOW_AUTO_LOGIN=False
|
||||
@ -328,7 +186,6 @@ LANGFLOW_PORT=7860
|
||||
LANGFLOW_REMOVE_API_KEYS=False
|
||||
LANGFLOW_SAVE_DB_IN_CONFIG_DIR=True
|
||||
LANGFLOW_SECRET_KEY=somesecretkey
|
||||
LANGFLOW_STORE=True
|
||||
LANGFLOW_STORE_ENVIRONMENT_VARIABLES=True
|
||||
LANGFLOW_SUPERUSER=adminuser
|
||||
LANGFLOW_SUPERUSER_PASSWORD=adminpass
|
||||
@ -336,6 +193,8 @@ LANGFLOW_WORKER_TIMEOUT=60000
|
||||
LANGFLOW_WORKERS=3
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="systemd" label="Systemd service">
|
||||
|
||||
@ -343,6 +202,9 @@ A systemd service configuration file configures Linux system services.
|
||||
|
||||
To add environment variables, create or edit a service configuration file and add an `override.conf` file. This file allows you to override the default environment variables for the service.
|
||||
|
||||
<details>
|
||||
<summary>Example: override.conf</summary>
|
||||
|
||||
```ini title="override.conf"
|
||||
[Service]
|
||||
Environment="DO_NOT_TRACK=true"
|
||||
@ -371,7 +233,6 @@ Environment="LANGFLOW_PORT=7860"
|
||||
Environment="LANGFLOW_REMOVE_API_KEYS=false"
|
||||
Environment="LANGFLOW_SAVE_DB_IN_CONFIG_DIR=true"
|
||||
Environment="LANGFLOW_SECRET_KEY=somesecretkey"
|
||||
Environment="LANGFLOW_STORE=true"
|
||||
Environment="LANGFLOW_STORE_ENVIRONMENT_VARIABLES=true"
|
||||
Environment="LANGFLOW_SUPERUSER=adminuser"
|
||||
Environment="LANGFLOW_SUPERUSER_PASSWORD=adminpass"
|
||||
@ -379,6 +240,8 @@ Environment="LANGFLOW_WORKER_TIMEOUT=60000"
|
||||
Environment="LANGFLOW_WORKERS=3"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
For more information on systemd, see the [Red Hat documentation](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/using_systemd_unit_files_to_customize_and_optimize_your_system/assembly_working-with-systemd-unit-files_working-with-systemd).
|
||||
|
||||
</TabItem>
|
||||
@ -386,7 +249,10 @@ For more information on systemd, see the [Red Hat documentation](https://docs.re
|
||||
|
||||
The `tasks.json` file located in `.vscode/tasks.json` is a configuration file for development environments using Visual Studio Code.
|
||||
|
||||
Create or edit the `.vscode/tasks.json` file in your project root:
|
||||
Create or edit the `.vscode/tasks.json` file in your project root.
|
||||
|
||||
<details>
|
||||
<summary>Example: .vscode/tasks.json</summary>
|
||||
|
||||
```json title=".vscode/tasks.json"
|
||||
{
|
||||
@ -419,7 +285,6 @@ Create or edit the `.vscode/tasks.json` file in your project root:
|
||||
"LANGFLOW_REMOVE_API_KEYS": "true",
|
||||
"LANGFLOW_SAVE_DB_IN_CONFIG_DIR": "false",
|
||||
"LANGFLOW_SECRET_KEY": "somesecretkey",
|
||||
"LANGFLOW_STORE": "true",
|
||||
"LANGFLOW_STORE_ENVIRONMENT_VARIABLES": "true",
|
||||
"LANGFLOW_SUPERUSER": "adminuser",
|
||||
"LANGFLOW_SUPERUSER_PASSWORD": "adminpass",
|
||||
@ -439,6 +304,8 @@ Create or edit the `.vscode/tasks.json` file in your project root:
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
To run Langflow using the above VSCode `tasks.json` file, in the VSCode command palette, select **Tasks: Run Task** > **langflow backend**.
|
||||
|
||||
</TabItem>
|
||||
@ -545,4 +412,79 @@ To define environment variables for Windows using PowerShell, do the following:
|
||||
3. Launch or restart Langflow Desktop to apply the environment variables.
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
</Tabs>
|
||||
|
||||
## Supported environment variables {#supported-variables}
|
||||
|
||||
The following sections provide information about specific Langflow environment variables.
|
||||
|
||||
### Authentication and security
|
||||
|
||||
See [API keys and authentication](/api-keys-and-authentication).
|
||||
|
||||
### Global variables
|
||||
|
||||
For information about the relationship between Langflow global variables and environment variables, as well as environment variables that control handling of global variables, see [Global variables](/configuration-global-variables).
|
||||
|
||||
### Logs {#logging}
|
||||
|
||||
See [Configure log options](/logging#log-storage).
|
||||
|
||||
### MCP servers {#mcp}
|
||||
|
||||
See [Use Langflow as an MCP server](/mcp-server).
|
||||
|
||||
### Monitoring and metrics
|
||||
|
||||
For environment variables for specific monitoring service providers, see the Langflow monitoring integration guides, such as [Langfuse](/integrations-langfuse) and [Best practices for Langflow on Kubernetes](/deployment-prod-best-practices).
|
||||
|
||||
### Server
|
||||
|
||||
The following environment variables set base Langflow server configuration, such as where the server is hosted, required files for SSL encryption, and the deployment type (frontend and backend, backend-only, development mode).
|
||||
|
||||
| Variable | Format | Default | Description |
|
||||
|----------|--------|---------|-------------|
|
||||
| `LANGFLOW_HOST` | String | `localhost` | The host on which the Langflow server will run. |
|
||||
| `LANGFLOW_PORT` | Integer | `7860` | The port on which the Langflow server runs. The server automatically selects a free port if the specified port is in use. |
|
||||
| `LANGFLOW_BACKEND_ONLY` | Boolean | False | Run only the Langflow backend service (no frontend). |
|
||||
| `LANGFLOW_DEV` | Boolean | False | Whether to run Langflow in development mode (may contain bugs). |
|
||||
| `LANGFLOW_OPEN_BROWSER` | Boolean | False | Open the system web browser on startup. |
|
||||
| `LANGFLOW_HEALTH_CHECK_MAX_RETRIES` | Integer | `5` | Set the maximum number of retries for Langflow's server status health checks. |
|
||||
| `LANGFLOW_WORKERS` | Integer | `1` | Number of worker processes. |
|
||||
| `LANGFLOW_WORKER_TIMEOUT` | Integer | `300` | Worker timeout in seconds. |
|
||||
| `LANGFLOW_SSL_CERT_FILE` | String | Not set | Path to the SSL certificate file on the local system for SSL-encrypted connections. |
|
||||
| `LANGFLOW_SSL_KEY_FILE` | String | Not set | Path to the SSL key file on the local system for SSL-encrypted connections. |
|
||||
| `LANGFLOW_DEACTIVATE_TRACING` | Boolean | False | Deactivate tracing functionality. |
|
||||
| `LANGFLOW_CELERY_ENABLED` | Boolean | False | Enable Celery for distributed task processing. |
|
||||
|
||||
For more information about deploying Langflow servers, see [Langflow deployment overview](/deployment-overview).
|
||||
|
||||
### Storage
|
||||
|
||||
See [Memory management options](/memory) and [Manage files](/concepts-file-management).
|
||||
|
||||
### Telemetry
|
||||
|
||||
See [Telemetry](/contributing-telemetry).
|
||||
|
||||
### Visual editor and Playground behavior
|
||||
|
||||
| Variable | Format | Default | Description |
|
||||
|----------|--------|---------|-------------|
|
||||
| `LANGFLOW_AUTO_SAVING` | Boolean | True | Whether to automatically save flows. |
|
||||
| `LANGFLOW_AUTO_SAVING_INTERVAL` | Integer | `1000` | Set the auto-save interval in milliseconds if `LANGFLOW_AUTO_SAVING=True`. |
|
||||
| `LANGFLOW_BUNDLE_URLS` | List[String] | `[]` | A list of URLs from which to load custom bundles. Supports GitHub URLs. If `LANGFLOW_AUTO_LOGIN=True`, flows from these bundles are loaded into the database. |
|
||||
| `LANGFLOW_COMPONENTS_PATH` | String | Not set | Path to a directory containing custom components. Typically used if you have local custom components or you are building a Docker image with custom components. |
|
||||
| `LANGFLOW_LOAD_FLOWS_PATH` | String | Not set | Path to a directory containing flow JSON files to be loaded on startup. Typically used when creating a Docker image with prepackaged flows. Requires `LANGFLOW_AUTO_LOGIN=True`. |
|
||||
| `LANGFLOW_CREATE_STARTER_PROJECTS` | Boolean | True | Whether to create templates during initialization. If false, Langflow doesn't create templates, and `LANGFLOW_UPDATE_STARTER_PROJECTS` is treated as false. |
|
||||
| `LANGFLOW_UPDATE_STARTER_PROJECTS` | Boolean | True | Whether to update templates with the latest component versions when initializing after an upgrade. |
|
||||
| `LANGFLOW_LAZY_LOAD_COMPONENTS` | Boolean | False | If true, Langflow only partially loads components at startup and fully loads them on demand. This significantly reduces startup time but can cause a slight delay when a component is first used. |
|
||||
| `LANGFLOW_EVENT_DELIVERY` | String | `streaming` | How to deliver build events to the frontend: `polling`, `streaming` or `direct`. |
|
||||
| `LANGFLOW_FRONTEND_PATH` | String | `./frontend` | Path to the frontend directory containing build files. For development purposes only when you need to serve specific frontend code. |
|
||||
| `LANGFLOW_MAX_ITEMS_LENGTH` | Integer | `100` | Maximum number of items to store and display in the visual editor. Lists longer than this will be truncated when displayed in the visual editor. Doesn't affect outputs or data passed between components. |
|
||||
| `LANGFLOW_MAX_TEXT_LENGTH` | Integer | `1000` | Maximum number of characters to store and display in the visual editor. Responses longer than this will be truncated when displayed in the visual editor. Doesn't truncate outputs or responses passed between components. |
|
||||
| `LANGFLOW_MAX_TRANSACTIONS_TO_KEEP` | Integer | `3000` | Maximum number of flow transaction events to keep in the database. |
|
||||
| `LANGFLOW_MAX_VERTEX_BUILDS_TO_KEEP` | Integer | `3000` | Maximum number of vertex builds to keep in the database. Relates to [Playground](/concepts-playground) functionality. |
|
||||
| `LANGFLOW_MAX_VERTEX_BUILDS_PER_VERTEX` | Integer | `2` | Maximum number of builds to keep per vertex. Older builds are deleted. Relates to [Playground](/concepts-playground) functionality. |
|
||||
| `LANGFLOW_PUBLIC_FLOW_CLEANUP_INTERVAL` | Integer | `3600` | The interval in seconds at which data for [shared Playground](/concepts-playground#share-a-flows-playground) flows are cleaned up. Default: 3600 seconds (1 hour). Minimum: 600 seconds (10 minutes). |
|
||||
| `LANGFLOW_PUBLIC_FLOW_EXPIRATION` | Integer | `86400` | The time in seconds after which a [shared Playground](/concepts-playground#share-a-flows-playground) flow is considered expired and eligible for cleanup. Default: 86400 seconds (24 hours). Minimum: 600 seconds (10 minutes). |
|
||||
@ -3,11 +3,13 @@ title: Contribute bundles
|
||||
slug: /contributing-bundles
|
||||
---
|
||||
|
||||
Bundles are groups of components that are related to a specific service provider.
|
||||
import Icon from "@site/src/components/icon";
|
||||
|
||||
Follow these steps to add components to the **Bundles** section of the **Components** menu in the Langflow visual editor.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) are groups of components that are related to a specific service provider.
|
||||
If you want to contribute your custom components back to the Langflow project, you must put them into a bundle.
|
||||
|
||||
Example adds a new bundle named `DarthVader`.
|
||||
Follow these steps to add components to <Icon name="Blocks" aria-hidden="true" /> **Bundles** in the Langflow visual editor.
|
||||
This example adds a bundle named `DarthVader`.
|
||||
|
||||
## Add the bundle to the backend folder
|
||||
|
||||
@ -103,7 +105,7 @@ For example:
|
||||
import("@/icons/DeepSeek").then((mod) => ({ default: mod.DeepSeekIcon })),
|
||||
```
|
||||
|
||||
8. To add your bundle to the **Bundles** menu, edit the [`SIDEBAR_BUNDLES` array](https://github.com/langflow-ai/langflow/blob/main/src/frontend/src/utils/styleUtils.ts#L231) in `/src/frontend/src/utils/styleUtils.ts`.
|
||||
8. To add your bundle to the <Icon name="Blocks" aria-hidden="true" /> **Bundles** menu, edit the [`SIDEBAR_BUNDLES` array](https://github.com/langflow-ai/langflow/blob/main/src/frontend/src/utils/styleUtils.ts#L231) in `/src/frontend/src/utils/styleUtils.ts`.
|
||||
|
||||
Add an object to the array with the following keys:
|
||||
|
||||
@ -139,4 +141,4 @@ class DarthVaderAPIComponent(LCToolComponent):
|
||||
1. To rebuild the backend and frontend, run `make install_frontend && make build_frontend && make install_backend && uv run langflow run --port 7860`.
|
||||
|
||||
2. Refresh the frontend application.
|
||||
Your new bundle called `DarthVader` is available in the **Components** menu in the visual editor.
|
||||
Your new bundle called `DarthVader` is available in the <Icon name="Blocks" aria-hidden="true" /> **Bundles** menu in the visual editor.
|
||||
@ -3,6 +3,8 @@ title: Contribute templates
|
||||
slug: /contributing-templates
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
|
||||
Follow these best practices when submitting a template to Langflow.
|
||||
|
||||
For template formatting examples, see [`/starter_projects`](https://github.com/langflow-ai/langflow/tree/main/src/backend/base/langflow/initial_setup/starter_projects) in the Langflow repository.
|
||||
@ -44,10 +46,10 @@ Use icons from the [Lucide](https://lucide.dev/icons/) icon library.
|
||||
|
||||
### Flow
|
||||
|
||||
Use only the components that are available in the **Components** menu in the visual editor.
|
||||
Don't use custom components.
|
||||
Use only <Icon name="Component" aria-hidden="true" /> **Core components** and <Icon name="Blocks" aria-hidden="true" /> **Bundles**.
|
||||
Don't use custom components that aren't part of the Langflow codebase.
|
||||
|
||||
Include brief README, quickstart, or other essential details in a note. Notes accept Markdown syntax.
|
||||
Include brief README, quickstart, or other essential details in a <Icon name="StickyNote" aria-hidden="true"/> **Note**. Notes accept Markdown syntax.
|
||||
For example:
|
||||
|
||||
```text
|
||||
|
||||
@ -13,60 +13,78 @@ This example uses [Hetzner cloud](https://www.hetzner.com/) for hosting. Your de
|
||||
|
||||
## Connect to your remote server with SSH
|
||||
|
||||
1. Create an SSH key.
|
||||
This key allows you to connect to your server remotely.
|
||||
Replace `DANA@EXAMPLE.COM` with the email address you want to associate with the SSH key.
|
||||
1. Create an SSH key to connect to your server remotely.
|
||||
For example:
|
||||
|
||||
```bash
|
||||
ssh-keygen -t ed25519 -C "DANA@EXAMPLE.COM"
|
||||
```
|
||||
|
||||
Replace `DANA@EXAMPLE.COM` with the email address that you want to associate with the SSH key.
|
||||
|
||||
2. In your terminal, follow the instructions to create your SSH key pair.
|
||||
This creates both a private and public key.
|
||||
To copy the public key from your terminal, enter the following command:
|
||||
|
||||
```bash
|
||||
cat ~/Downloads/host-lf.pub | pbcopy
|
||||
```
|
||||
|
||||
3. In your remote server, add the SSH key you copied in the previous step.
|
||||
For example, if you are using a Hetzner cloud server, click **Server**, and then select **SSH keys** to add an SSH key.
|
||||
|
||||
4. To connect to your server with SSH, enter the following command.
|
||||
|
||||
```bash
|
||||
ssh -i PATH_TO_PRIVATE_KEY/PRIVATE_KEY_NAME root@SERVER_IP_ADDRESS
|
||||
```
|
||||
|
||||
Replace the following:
|
||||
|
||||
* `PATH_TO_PRIVATE_KEY/PRIVATE_KEY_NAME`: The path to your private SSH key file that matches the public key you added to your server
|
||||
* `SERVER_IP_ADDRESS`: Your server's IP address
|
||||
|
||||
5. When prompted for a key fingerprint, type `yes`.
|
||||
|
||||
The terminal output indicates if the connection succeeds or fails.
|
||||
The following response was returned after connecting to a Hetzner cloud server:
|
||||
```text
|
||||
System information as of Mon May 19 04:34:44 PM UTC 2025
|
||||
|
||||
System load: 0.0 Processes: 129
|
||||
Usage of /: 1.5% of 74.79GB Users logged in: 0
|
||||
Memory usage: 5% IPv4 address for eth0: 5.161.250.132
|
||||
Swap usage: 0% IPv6 address for eth0: 2a01:4ff:f0:4de7::1
|
||||
```
|
||||
```text
|
||||
System information as of Mon May 19 04:34:44 PM UTC 2025
|
||||
|
||||
System load: 0.0 Processes: 129
|
||||
Usage of /: 1.5% of 74.79GB Users logged in: 0
|
||||
Memory usage: 5% IPv4 address for eth0: 5.161.250.132
|
||||
Swap usage: 0% IPv6 address for eth0: 2a01:4ff:f0:4de7::1
|
||||
```
|
||||
|
||||
## Deploy Langflow on your server
|
||||
|
||||
Now that your local machine is connected to your remote server with SSH, you can install Docker, create a `docker-compose.yml` file, and serve it publicly with a reverse proxy, such as Caddy.
|
||||
|
||||
1. Install Docker on your server.
|
||||
Since this example server is an Ubuntu server, it can install snap packages.
|
||||
If you aren't using Ubuntu or you prefer a different installation method, see the [official Docker installation guide](https://docs.docker.com/get-started/get-docker/) for instructions for your operating system.
|
||||
|
||||
Since this example server is an Ubuntu server, it can install snap packages.
|
||||
If you aren't using Ubuntu or you prefer a different installation method, see the [official Docker installation guide](https://docs.docker.com/get-started/get-docker/) for instructions for your operating system.
|
||||
|
||||
```bash
|
||||
snap install docker
|
||||
```
|
||||
|
||||
2. Create a file called `docker-compose.yml`, and then open it in a text editor:
|
||||
|
||||
```bash
|
||||
touch docker-compose.yml && nano docker-compose.yml
|
||||
```
|
||||
|
||||
3. Add the following values to `docker-compose.yml`, and then save the file.
|
||||
|
||||
The following example defines the Langflow service from the `langflow:latest` image and a Caddy service to expose Langflow through a reverse proxy.
|
||||
|
||||
:::tip
|
||||
The [host-langflow](https://github.com/datastax/host-langflow) repository offers pre-built copies of this `docker-compose.yml` and `Caddyfile`, if you prefer to fork the repository to your server.
|
||||
:::
|
||||
3. Add the following values to `docker-compose.yml`, and then save the file.
|
||||
|
||||
```yml
|
||||
version: "3.8"
|
||||
|
||||
@ -95,19 +113,27 @@ If you aren't using Ubuntu or you prefer a different installation method, see th
|
||||
caddy_data:
|
||||
caddy_config:
|
||||
```
|
||||
4. Create a file called `Caddyfile`.
|
||||
|
||||
4. Create a file called `Caddyfile`:
|
||||
|
||||
```bash
|
||||
touch Caddyfile && nano Caddyfile
|
||||
```
|
||||
|
||||
5. Add the following values to `Caddyfile`, and then save the file.
|
||||
The Caddyfile configures Caddy to listen on port 80, and forward all incoming requests to port 80 to the Langflow service at port 7860.
|
||||
|
||||
This Caddyfile configures Caddy to listen on port 80, and forward all incoming requests to port 80 to the Langflow service at port 7860.
|
||||
|
||||
```
|
||||
:80 {
|
||||
reverse_proxy langflow:7860
|
||||
}
|
||||
```
|
||||
|
||||
6. To deploy your server, run `docker-compose up`.
|
||||
When the `Welcome to Langflow` message appears, Langflow is running and accessible internally at `http://0.0.0.0:7860` inside the Docker network.
|
||||
|
||||
When the `Welcome to Langflow` message appears, Langflow is running and accessible internally at `http://0.0.0.0:7860` inside the Docker network.
|
||||
|
||||
7. To access your Langflow server over the public internet, navigate to your server's public IP address, such as `http://5.161.250.132`.
|
||||
This address uses HTTP because HTTPS isn't enabled yet.
|
||||
|
||||
@ -122,6 +148,7 @@ This address uses HTTP because HTTPS isn't enabled yet.
|
||||
```
|
||||
|
||||
2. Stop your server.
|
||||
|
||||
3. Modify your Caddyfile to include port `443` so Caddy can forward both HTTP (port 80) and HTTPS (port 443) requests to the Langflow service:
|
||||
|
||||
```
|
||||
|
||||
@ -101,6 +101,11 @@ Effective monitoring ensures Langflow operates reliably and performs well under
|
||||
* **Database monitoring**: See [Langflow database guide for enterprise DBAs](/enterprise-database-guide).
|
||||
* **Application logs**: Collect and analyze logs for errors, warnings, and flow execution issues. Centralize logs using tools like ELK Stack or Fluentd. You can also inspect [Langflow logs](/logging).
|
||||
* **Resource usage**: Track CPU, memory, and disk usage of Langflow instances. Use Prometheus and Grafana for real-time metrics collection and monitoring in Kubernetes.
|
||||
|
||||
To expose your Langflow server's Prometheus metrics, set `LANGFLOW_PROMETHEUS_ENABLED=True` (the default is false).
|
||||
The default port for the Prometheus metrics is 9090.
|
||||
To change the port, set `LANGFLOW_PROMETHEUS_PORT`.
|
||||
|
||||
* **API performance**: Monitor response times, error rates, and request throughput. Set alerts for high latency or error spikes.
|
||||
* **Observability tools**: Integrate with [LangWatch](/integrations-langwatch) or [Opik](/integrations-opik) for detailed flow tracing and metrics. Use these tools to debug flow performance and optimize execution.
|
||||
|
||||
@ -118,4 +123,5 @@ Follow industry best practices and use secure Langflow configurations, such as t
|
||||
## See also
|
||||
|
||||
* [Deploy the Langflow production environment on Kubernetes](/deployment-kubernetes-prod)
|
||||
* [Langflow Helm Charts repository](https://github.com/langflow-ai/langflow-helm-charts)
|
||||
* [Langflow Helm Charts repository](https://github.com/langflow-ai/langflow-helm-charts)
|
||||
* [Langflow environment variables](/environment-variables)
|
||||
@ -91,7 +91,6 @@ pnpm add @datastax/langflow-client
|
||||
* `input`: The chat input message you want to send to trigger the flow.
|
||||
This is only valid for flows with a **Chat Input** component.
|
||||
|
||||
|
||||
2. Review the result to confirm that the client connected to your Langflow server.
|
||||
|
||||
The following example shows the response from a well-formed `runFlow` request that reached the Langflow server and successfully started the flow:
|
||||
|
||||
@ -3,6 +3,8 @@ title: Containerize a Langflow application
|
||||
slug: /develop-application
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
|
||||
Designing flows in the visual editor is only the first step in building an application that uses Langflow.
|
||||
|
||||
Once you have a functional flow, you can use that flow in a larger application, such as a website or mobile app.
|
||||
@ -54,7 +56,7 @@ COPY pyproject.toml uv.lock /app/
|
||||
### Environment variables {#docker-env}
|
||||
|
||||
The `docker.env` file is a `.env` file loaded into your Docker image.
|
||||
It contains environment variables that control Langflow's behavior, such as authentication, database storage, API keys, and server configurations.
|
||||
It contains [Langflow environment variables](/environment-variables) that are used in flows or control Langflow's behavior, such as authentication, database storage, API keys, and server configurations.
|
||||
For example:
|
||||
|
||||
```text
|
||||
@ -64,37 +66,10 @@ LANGFLOW_BASE_URL=http://0.0.0.0:7860
|
||||
OPENAI_API_KEY=sk-...
|
||||
```
|
||||
|
||||
You can set environment variables in the Dockerfile, but if you set an environment variable in both `docker.env` and the Dockerfile, Langflow uses the value set in `docker.env`.
|
||||
You can set environment variables in the Dockerfile as well.
|
||||
However, if you set an environment variable in both `docker.env` and the Dockerfile, Langflow uses the value set in `docker.env`.
|
||||
|
||||
Langflow automatically converts a [predefined list](/configuration-global-variables#default-environment-variables) of environment variables into global variables.
|
||||
|
||||
If your custom environment variables aren't in this predefined list, you need to explicitly include them using the `LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT` environment variable.
|
||||
|
||||
This environment variable accepts a comma-separated list of environment variables to get from the environment and store as global variables.
|
||||
|
||||
For example, this configuration creates global variables named `WATSONX_PROJECT_ID` and `WATSONX_API_KEY` in Langflow's database and makes them available for use in components:
|
||||
|
||||
```text
|
||||
LANGFLOW_AUTO_LOGIN=True
|
||||
LANGFLOW_SAVE_DB_IN_CONFIG_DIR=True
|
||||
WATSONX_PROJECT_ID=your_project_id
|
||||
WATSONX_API_KEY=your_api_key
|
||||
LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT=WATSONX_PROJECT_ID,WATSONX_API_KEY
|
||||
```
|
||||
|
||||
Alternatively, set `LANGFLOW_FALLBACK_TO_ENV_VAR=True` to allow global variables set in Langflow Settings to use an environment variable with the same name if Langflow can't retrieve the variable value from the global variables.
|
||||
|
||||
For example, in this configuration, when a component references the global variables `WATSONX_PROJECT_ID` or `WATSONX_API_KEY` that don't exist in Langflow's database, Langflow will automatically use the corresponding environment variable value as a fallback.
|
||||
|
||||
```text
|
||||
LANGFLOW_AUTO_LOGIN=True
|
||||
LANGFLOW_SAVE_DB_IN_CONFIG_DIR=True
|
||||
LANGFLOW_FALLBACK_TO_ENV_VAR=True
|
||||
WATSONX_PROJECT_ID=your_project_id
|
||||
WATSONX_API_KEY=your_api_key
|
||||
```
|
||||
|
||||
For more information, see [Langflow environment variables](/environment-variables) and [Global variables](/configuration-global-variables).
|
||||
Langflow can also [create global variables from your environment variables](/configuration-global-variables#add-custom-global-variables-from-the-environment), or [use environment variables as a backup for missing global variables](/configuration-global-variables#use-environment-variables-for-missing-global-variables).
|
||||
|
||||
### Secrets
|
||||
|
||||
@ -123,7 +98,7 @@ When you package Langflow as a dependency of an application, you only want to in
|
||||
|
||||
### Components
|
||||
|
||||
The core components and bundles that you see in the Langflow visual editor are automatically included in the base Langflow Docker image.
|
||||
The <Icon name="Component" aria-hidden="true" /> **Core components** and <Icon name="Blocks" aria-hidden="true" /> [**Bundles**] that you see in the Langflow visual editor are automatically included in the base Langflow Docker image.
|
||||
|
||||
If you have any [custom components](/components-custom-components) that you created for your application, you must include these components in your application directory:
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ To add dependencies to Langflow Desktop, add an entry for the package to the app
|
||||
* On macOS, the file is located at `/Users/USER/.langflow/data/requirements.txt`.
|
||||
* On Windows, the file is located at `C:\Users\USER\AppData\Roaming\com.Langflow\data\requirements.txt`.
|
||||
|
||||
Add each dependency to `requirements.txt` on its own line in the format `DEPENDENCY==VERSION`, such as `docling==2.40.0`.
|
||||
Add each dependency to `requirements.txt` on its own line in the format `DEPENDENCY==VERSION`, such as `matplotlib==3.10.0`.
|
||||
|
||||
Restart Langflow Desktop to install the dependencies.
|
||||
|
||||
@ -144,5 +144,4 @@ dev = [
|
||||
## See also
|
||||
|
||||
* [Containerize a Langflow application](/develop-application)
|
||||
* [Create custom Python components](/components-custom-components)
|
||||
* [**Docling** bundle](/integrations-docling)
|
||||
* [Create custom Python components](/components-custom-components)
|
||||
@ -6,85 +6,92 @@ slug: /logging
|
||||
import Icon from "@site/src/components/icon";
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
import PartialConfigDirPaths from '@site/docs/_partial-config-dir-paths.mdx';
|
||||
|
||||
This page provides information about Langflow logs, including logs for individual flows and the Langflow application itself.
|
||||
Langflow produces logs for individual flows and the Langflow application itself using the [structlog](https://www.structlog.org) library for logging.
|
||||
|
||||
Langflow uses the [structlog](https://www.structlog.org) library for logging.
|
||||
|
||||
The default logfile is named `langflow.log`.
|
||||
Langflow also produces logfiles for flows.
|
||||
The default, primary logfile is named `langflow.log`.
|
||||
|
||||
Log files are stored in JSON format with structured metadata.
|
||||
|
||||
## Log storage
|
||||
|
||||
Langflow logs are stored in the config directory specified in the `LANGFLOW_CONFIG_DIR` environment variable.
|
||||
<PartialConfigDirPaths/>
|
||||
The default config directory location depends on your operating system and installation method:
|
||||
|
||||
To customize log storage, see [Configure log options](#configure-log-storage-options).
|
||||
- **Langflow Desktop**:
|
||||
|
||||
### Configure log storage options
|
||||
- **macOS**: `/Users/<username>/Library/Logs/com.Langflow`
|
||||
- **Windows**: `C:\Users\<username>\AppData\Roaming\com.Langflow\cache`
|
||||
|
||||
Use [Langflow environment variables](/environment-variables) to configure logging options in your Langflow `.env` file, and then start Langflow with `uv run langflow run --env-file .env`.
|
||||
- **OSS Langflow**:
|
||||
|
||||
The following environment variables are available to configure logging:
|
||||
- **macOS with `uv pip install`**: `/Users/<username>/Library/Caches/langflow`
|
||||
- **Linux with `uv pip install`**: `/home/<username>/.cache/langflow`
|
||||
- **Windows/WSL with `uv pip install`**: `C:\Users\<username>\AppData\Local\langflow\langflow\Cache`
|
||||
- **macOS/Windows/Linux/WSL with `git clone`**: `<path_to_clone>/src/backend/base/langflow/`
|
||||
|
||||
To customize log storage locations and behaviors, set the following [Langflow environment variables](/environment-variables) in your Langflow `.env` file, and then start Langflow with `uv run langflow run --env-file .env`:
|
||||
|
||||
| Variable | Format | Default | Description |
|
||||
|----------|--------|---------|-------------|
|
||||
| `LANGFLOW_CONFIG_DIR` | String | Varies | Set the Langflow configuration directory where files and logs are stored. Default path depends on your installation, as described in the preceding list. |
|
||||
| `LANGFLOW_LOG_LEVEL` | String | `ERROR` | Sets the log level as one of `DEBUG`, `ERROR`, `INFO`, `WARNING`, and `CRITICAL`. For example, `LANGFLOW_LOG_LEVEL=DEBUG`. |
|
||||
| `LANGFLOW_LOG_FILE` | String | Not set | Sets the log file storage location if you want to use a non-default location. For example, `LANGFLOW_LOG_FILE=path/to/logfile.log`. If this option isn't set, logs are written to stdout. |
|
||||
| `LANGFLOW_LOG_ENV` | String | `default` | Controls how logs are formatted and displayed. `container`: JSON format for Docker/structured logging. `container_csv`: CSV format for data analysis. `default` or unset: Pretty, colorful format for development/reading using [RichHandler](https://rich.readthedocs.io/en/stable/reference/logging.html). |
|
||||
| `LANGFLOW_LOG_ROTATION` | String | `1 day` | Controls when the log file is rotated, either based on time or file size. Time-based rotation: "1 day", "12 hours", "1 week". Size-based rotation: "10 MB", "1 GB". Disable rotation: "None" (log files will grow without limit). |
|
||||
| `LANGFLOW_LOG_RETRIEVER_BUFFER_SIZE` | Integer | `10000` | Set the buffer size for log retrieval. Only used if `LANGFLOW_ENABLE_LOG_RETRIEVAL` is enabled. |
|
||||
| `LANGFLOW_LOG_FORMAT` | String | Not set | Set the log format configuration. |
|
||||
| `LANGFLOW_PRETTY_LOGS` | Boolean | True | Enable pretty log formatting with colors and rich console output. |
|
||||
| `LANGFLOW_LOG_FILE` | String | Not set | Sets the log file storage location if you want to use a non-default location. For example, `LANGFLOW_LOG_FILE=path/to/logfile.log`. If not set, logs are written to stdout. |
|
||||
| `LANGFLOW_LOG_ENV` | String | `default` | This variable is the primary log format controller. `container`: JSON format for Docker/structured logging. `container_csv`: Key-value format for data analysis. `default` or unset: Uses `LANGFLOW_PRETTY_LOGS` to determine format. |
|
||||
| `LANGFLOW_PRETTY_LOGS` | Boolean | True | This variable controls log output format when `LANGFLOW_LOG_ENV=default` or unset. When `true`, uses structlog's [ConsoleRenderer](https://www.structlog.org/en/stable/console-output.html). When `false`, outputs logs in JSON format. |
|
||||
| `LANGFLOW_LOG_FORMAT` | String | Not set | Switch between key-value format and console format. Set to `key_value` for key-value format or `console` to use structlog's [ConsoleRenderer](https://www.structlog.org/en/stable/console-output.html). This variable only works when `LANGFLOW_LOG_ENV=default` and `LANGFLOW_PRETTY_LOGS=true`. |
|
||||
| `LANGFLOW_LOG_ROTATION` | String | `1 day` | Controls when the log file is rotated, either based on time or file size. For time-based rotation, set to `1 day`, `12 hours`, or `1 week`. For size-based rotation, set to `10 MB` or `1 GB`. To disable rotation, set to `None`. If disabled, log files grow without limit. |
|
||||
| `LANGFLOW_ENABLE_LOG_RETRIEVAL` | Boolean | False | Enables retrieval of logs from your Langflow instance with [Logs endpoints](/api-logs). |
|
||||
| `LANGFLOW_LOG_RETRIEVER_BUFFER_SIZE` | Integer | `10000` | Set the buffer size for log retrieval if `LANGFLOW_ENABLE_LOG_RETRIEVAL=True`. Must be greater than `0` for log retrieval to function. |
|
||||
|
||||
## View logs in real-time
|
||||
|
||||
To monitor Langflow logs as they are generated, you can use the `tail -f` command to follow the log file:
|
||||
To monitor Langflow logs as they are generated, you can follow the log file:
|
||||
|
||||
1. Change to your [Langflow config directory](#log-storage):
|
||||
|
||||
<Tabs groupId="cd-command">
|
||||
<TabItem value="macOS" label="macOS" default>
|
||||
<TabItem value="macOS" label="macOS" default>
|
||||
|
||||
```bash
|
||||
cd /Users/**USERNAME**/Library/Caches/langflow
|
||||
```
|
||||
```bash
|
||||
cd /Users/**USERNAME**/Library/Caches/langflow
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="Windows" label="Windows">
|
||||
```cmd
|
||||
cd C:\Users\**USERNAME**\AppData\Local\langflow\langflow\Cache
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="Windows" label="Windows">
|
||||
|
||||
</TabItem>
|
||||
```cmd
|
||||
cd C:\Users\**USERNAME**\AppData\Local\langflow\langflow\Cache
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
2. Tail the main log file:
|
||||
|
||||
<Tabs groupId="tail-command">
|
||||
<TabItem value="macOS" label="macOS" default>
|
||||
<TabItem value="macOS" label="macOS" default>
|
||||
|
||||
```bash
|
||||
tail -f langflow.log
|
||||
```
|
||||
```bash
|
||||
tail -f langflow.log
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="Windows" label="Windows">
|
||||
```cmd
|
||||
Get-Content -Wait -Path langflow.log
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="Windows" label="Windows">
|
||||
|
||||
</TabItem>
|
||||
```cmd
|
||||
Get-Content -Wait -Path langflow.log
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
If you don't see new log entries, check that Langflow is running and generating logs. You can also check the terminal where you started Langflow to see if logs are being displayed there.
|
||||
|
||||
If you don't see new log entries, check that Langflow is running, and perform some actions to generate logs events. You can also check the terminal where you started Langflow to see if logs are being printed there.
|
||||
|
||||
## Flow and component logs
|
||||
|
||||
After you run a flow, you can inspect the logs for the each component and flow run.
|
||||
For example, you can inspect `Message` objects ingested and generated by [**Input and Output** components](/components-io).
|
||||
For example, you can inspect `Message` objects ingested and generated by [Input and Output components](/components-io).
|
||||
|
||||
### View flow logs
|
||||
|
||||
@ -111,7 +118,7 @@ For example, the following `Message` data could be the output from a **Chat Inpu
|
||||
```
|
||||
|
||||
In the case of Input/Output components, the original input might not be structured as a `Message` object.
|
||||
For example, a **Language Model** component might pass a raw text response to a **Chat Output** component that is then transformed into a `Message` object.
|
||||
For example, a language model component can pass a raw text response to a **Chat Output** component that is then transformed into a `Message` object.
|
||||
|
||||
You can find `.log` files for flows at your Langflow installation's log storage location.
|
||||
For filepaths, see [Log storage](#log-storage).
|
||||
@ -146,20 +153,24 @@ Follow the steps for your operating system.
|
||||
```
|
||||
|
||||
3. Locate the `langflow.log` file.
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="windows" label="Windows">
|
||||
|
||||
1. Open the Command Prompt (CMD), and then run the following command:
|
||||
|
||||
```cmd
|
||||
cd %LOCALAPPDATA%\com.langflow\logs
|
||||
```
|
||||
|
||||
2. To open the folder and view the log files, run the command:
|
||||
2. Open the folder and view the log files:
|
||||
|
||||
```cmd
|
||||
start .
|
||||
```
|
||||
|
||||
3. Locate the `langflow.log` file.
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
@ -169,5 +180,6 @@ The log file is only created when Langflow Desktop runs. If you don't see a log
|
||||
|
||||
## See also
|
||||
|
||||
* [Logs endpoints](/api-logs)
|
||||
* [Memory management options](/memory)
|
||||
* [Configure an external PostgreSQL database](/configuration-custom-database)
|
||||
@ -3,9 +3,6 @@ title: Memory management options
|
||||
slug: /memory
|
||||
---
|
||||
|
||||
import PartialConfigDirPaths from '@site/docs/_partial-config-dir-paths.mdx';
|
||||
import PartialDBDirPaths from '@site/docs/_partial-db-dir-paths.mdx';
|
||||
|
||||
Langflow provides flexible memory management options for storage and retrieval of data relevant to your flows and your Langflow server.
|
||||
This includes essential Langflow database tables, file management, and caching, as well as chat memory.
|
||||
|
||||
@ -13,14 +10,32 @@ This includes essential Langflow database tables, file management, and caching,
|
||||
|
||||
Langflow supports both local memory and external memory options.
|
||||
|
||||
Langflow's default storage option is a [SQLite](https://www.sqlite.org/) database stored in your system's cache directory.
|
||||
<PartialDBDirPaths/>
|
||||
Langflow's default storage option is a [SQLite](https://www.sqlite.org/) database.
|
||||
The default storage path depends on your operating system and installation method:
|
||||
|
||||
Alternatively, you can use an external PostgreSQL database for all of your Langflow storage.
|
||||
You can also selectively use external storage for chat memory, separate from other Langflow storage.
|
||||
For more information, see [Configure external memory](#configure-external-memory) and [Store chat memory](#store-chat-memory).
|
||||
- **Langflow Desktop**:
|
||||
- **macOS**: `/Users/<username>/.langflow/data/database.db`
|
||||
- **Windows**: `C:\Users\<name>\AppData\Roaming\com.Langflow\data\langflow.db`
|
||||
- **Langflow OSS**
|
||||
- **macOS/Windows/Linux/WSL with `uv pip install`**: `<path_to_venv>/lib/python3.12/site-packages/langflow/langflow.db` (Python version can vary. Database isn't shared between virtual environments because it is tied to the venv path.)
|
||||
- **macOS/Windows/Linux/WSL with `git clone`**: `<path_to_clone>/src/backend/base/langflow/langflow.db`
|
||||
|
||||
## Local Langflow database tables
|
||||
Langflow offers a few alternatives to the default database path:
|
||||
|
||||
* **Config directory**: Set `LANGFLOW_SAVE_DB_IN_CONFIG_DIR=True` to store the database in your Langflow config directory as set in [`LANGFLOW_CONFIG_DIR`](/logging).
|
||||
|
||||
* **External PostgreSQL database**: You can use an external PostgreSQL database for all of your Langflow storage.
|
||||
For more information, see [Configure external memory](#configure-external-memory)
|
||||
|
||||
External storage can be useful if you want to preserve the data after uninstalling Langflow or to share the same database between multiple virtual environments.
|
||||
|
||||
* **Separate chat memory**: You can selectively use external storage for chat memory only, separate from other Langflow storage.
|
||||
For more information, see [Store chat memory](#store-chat-memory).
|
||||
|
||||
* **No database**: To disable all database operations and run a no-op session, set `LANGFLOW_USE_NOOP_DATABASE=True` in your [Langflow environment variables](/environment-variables).
|
||||
This is useful for testing when you don't want to persist any data.
|
||||
|
||||
## Langflow database tables
|
||||
|
||||
The following tables are stored in `langflow.db`:
|
||||
|
||||
@ -30,6 +45,12 @@ The following tables are stored in `langflow.db`:
|
||||
|
||||
• **Flow**: Contains flow definitions, including nodes, edges, and components, stored as JSON or database records. For more information, see [Build flows](/concepts-flows).
|
||||
|
||||
:::tip
|
||||
To automatically remove API keys and tokens from flow data before saving a flow to the database, set `LANGFLOW_REMOVE_API_KEYS=True` in your [Langflow environment variables](/environment-variables).
|
||||
When true, any field marked as a password field that _also_ has `api`, `key`, or `token` in its name is set to `null` before the flow is saved.
|
||||
This helps prevent credentials from being stored in the database.
|
||||
:::
|
||||
|
||||
• **Folder**: Provides a structure for flow storage, including single-user folders and shared folders accessed by multiple users. For more information, see [Manage flows in projects](/concepts-flows#projects).
|
||||
|
||||
• **Message**: Stores chat messages and interactions that occur between components. For more information, see [Message objects](/data-types#message) and [Store chat memory](#store-chat-memory).
|
||||
@ -38,63 +59,67 @@ The following tables are stored in `langflow.db`:
|
||||
|
||||
• **User**: Stores user account information including credentials, permissions, profiles, and user management settings. For more information, see [API keys and authentication](/api-keys-and-authentication).
|
||||
|
||||
• **Variables**: Stores global encrypted values and credentials. For more information, see [Global variables](/configuration-global-variables).
|
||||
• **Variables**: Stores global encrypted values and credentials. For more information, see [Global variables](/configuration-global-variables) and [Component API keys](/api-keys-and-authentication#component-api-keys).
|
||||
|
||||
• **VertexBuild**: Tracks the build status of individual nodes within flows. For more information, see [Test flows in the Playground](/concepts-playground).
|
||||
|
||||
For more information, see the database models in the [source code](https://github.com/langflow-ai/langflow/tree/main/src/backend/base/langflow/services/database/models).
|
||||
|
||||
## Configure external memory
|
||||
## Configure external memory {#configure-external-memory}
|
||||
|
||||
To replace the default Langflow SQLite database with another database, modify the `LANGFLOW_DATABASE_URL` environment variable, and then start Langflow with your `.env` file:
|
||||
To replace the default Langflow SQLite database with another database, set the `LANGFLOW_DATABASE_URL` environment variable to your database URL, and then start Langflow with your `.env` file.
|
||||
For more information and examples, see [Configure an external PostgreSQL database](/configuration-custom-database).
|
||||
|
||||
```
|
||||
```text
|
||||
LANGFLOW_DATABASE_URL=postgresql://user:password@localhost:5432/langflow
|
||||
```
|
||||
|
||||
For an example, see [Configure an external PostgreSQL database](/configuration-custom-database).
|
||||
To fine-tune your database connection pool and timeout settings, you can set the following additional environment variables:
|
||||
|
||||
The `LANGFLOW_DB_CONNECTION_SETTINGS` is a JSON configuration for database connection pool settings that allows you to fine-tune your database connection pool and timeout settings.
|
||||
* `LANGFLOW_DATABASE_CONNECTION_RETRY`: Whether to retry lost connections to your Langflow database. If true, Langflow tries to connect to the database again if the connection fails. Default: False.
|
||||
|
||||
* `LANGFLOW_DB_CONNECT_TIMEOUT`: The number of seconds to wait before giving up on a lock to be released or establishing a connection to the database. This may be separate from the `pool_timeout` in `LANGFLOW_DB_CONNECTION_SETTINGS`. Default: 30.
|
||||
|
||||
```bash
|
||||
LANGFLOW_DB_CONNECTION_SETTINGS='{"pool_size": 20, "max_overflow": 30, "pool_timeout": 30, "pool_pre_ping": true, "pool_recycle": 1800, "echo": false}'
|
||||
```
|
||||
* `LANGFLOW_DB_CONNECTION_SETTINGS`: A a JSON dictionary containing the following database connection pool settings:
|
||||
|
||||
### Connection pool parameters
|
||||
- `pool_size`: Maximum number of database connections to keep in the pool. Default: 20 connections.
|
||||
- `max_overflow`: Maximum number of connections that can be created beyond the pool_size. Default: 30 connections.
|
||||
- `pool_timeout`: Number of seconds to wait before timing out on getting a connection from the pool. Default: 30 seconds.
|
||||
- `pool_pre_ping`: If `true`, the pool tests connections for liveness upon each checkout. Default: `true`.
|
||||
- `pool_recycle`: Number of seconds after which a connection is automatically recycled. Default: 1800 seconds (30 minutes).
|
||||
- `echo`: If `true`, SQL queries are logged for debugging purposes. Default: `false`.
|
||||
- `pool_size`: The base number of connections to keep open in the connection pool. Default: 20.
|
||||
- `max_overflow`: Maximum number of connections that can be created in excess of `pool_size` if needed. Default: 30.
|
||||
- `pool_timeout`: Number of seconds to wait for a connection from the pool before timing out. Default: 30.
|
||||
- `pool_pre_ping`: If true, the pool tests connections for liveness upon each checkout. Default: True.
|
||||
- `pool_recycle`: Number of seconds after which a connection is automatically recycled. Default: 1800 (30 minutes).
|
||||
- `echo`: If true, SQL queries are logged for debugging purposes. Default: False.
|
||||
|
||||
For example:
|
||||
|
||||
```text
|
||||
LANGFLOW_DB_CONNECTION_SETTINGS='{"pool_size": 20, "max_overflow": 30, "pool_timeout": 30, "pool_pre_ping": true, "pool_recycle": 1800, "echo": false}'
|
||||
```
|
||||
|
||||
Don't use the deprecated environment variables `LANGFLOW_DB_POOL_SIZE` or `LANGFLOW_DB_MAX_OVERFLOW`.
|
||||
Instead, use `pool_size` and `max_overflow` in `LANGFLOW_DB_CONNECTION_SETTINGS`.
|
||||
|
||||
## Configure cache memory
|
||||
|
||||
The default Langflow caching behavior is an asynchronous, in-memory cache.
|
||||
```
|
||||
The default Langflow caching behavior is an asynchronous, in-memory cache:
|
||||
|
||||
```text
|
||||
LANGFLOW_LANGCHAIN_CACHE=InMemoryCache
|
||||
LANGFLOW_CACHE_TYPE=async
|
||||
```
|
||||
|
||||
Langflow officially supports only the default asynchronous, in-memory cache. Other backends are experimental and may change without notice.
|
||||
The default behavior is suitable for most use cases.
|
||||
|
||||
:::warning
|
||||
Redis and other external cache settings are experimental and not officially supported.
|
||||
:::
|
||||
|
||||
### Cache environment variables
|
||||
Langflow officially supports only the default asynchronous, in-memory cache, which is suitable for most use cases.
|
||||
Other cache options, such as Redis, are experimental and can change without notice.
|
||||
If you want to use a non-default cache setting, you can use the following environment variables:
|
||||
|
||||
| Variable | Type | Default | Description |
|
||||
|----------|------|---------|-------------|
|
||||
| `LANGFLOW_CACHE_TYPE` | String | `async` | Set the cache type for Langflow's internal caching system. |
|
||||
| `LANGFLOW_LANGCHAIN_CACHE` | String | `InMemoryCache` | Set the cache type for Langchain's caching system. |
|
||||
| `LANGFLOW_REDIS_HOST` | String | `localhost` | Redis server hostname. |
|
||||
| `LANGFLOW_REDIS_PORT` | Integer | `6379` | Redis server port. |
|
||||
| `LANGFLOW_REDIS_DB` | Integer | `0` | Redis database number. |
|
||||
| `LANGFLOW_REDIS_CACHE_EXPIRE` | Integer | `3600` | Cache expiration time in seconds. |
|
||||
| `LANGFLOW_REDIS_PASSWORD` | String | Not set | Redis authentication password (optional). |
|
||||
| `LANGFLOW_CACHE_TYPE` | String | `async` | Set the cache type for Langflow's internal caching system. Possible values: `async`, `redis`, `memory`, `disk`. If you set the type to `redis`, then you must also set the `LANGFLOW_REDIS_*` environment variables. |
|
||||
| `LANGFLOW_LANGCHAIN_CACHE` | String | `InMemoryCache` | Set the cache storage type for the LangChain caching system (a Langflow dependency), either `InMemoryCache` or `SQLiteCache`. |
|
||||
| `LANGFLOW_REDIS_HOST` | String | `localhost` | Redis server hostname if `LANGFLOW_CACHE_TYPE=redis`. |
|
||||
| `LANGFLOW_REDIS_PORT` | Integer | `6379` | Redis server port if `LANGFLOW_CACHE_TYPE=redis`. |
|
||||
| `LANGFLOW_REDIS_DB` | Integer | `0` | Redis database number if `LANGFLOW_CACHE_TYPE=redis`. |
|
||||
| `LANGFLOW_REDIS_CACHE_EXPIRE` | Integer | `3600` | Cache expiration time in seconds if `LANGFLOW_CACHE_TYPE=redis`. |
|
||||
| `LANGFLOW_REDIS_PASSWORD` | String | Not set | Optional password for Redis authentication if `LANGFLOW_CACHE_TYPE=redis`. |
|
||||
|
||||
## Store chat memory
|
||||
|
||||
@ -152,4 +177,5 @@ For more information and examples, see [**Message History** component](/componen
|
||||
## See also
|
||||
|
||||
* [Langflow file management](/concepts-file-management)
|
||||
* [Langflow logs](/logging)
|
||||
* [Langflow logs](/logging)
|
||||
* [Langflow environment variables](/environment-variables)
|
||||
@ -88,6 +88,11 @@ For the preceding example, the parsed payload would be a string like `ID: 12345
|
||||
Typically, you won't manually trigger the **Webhook** component.
|
||||
To learn about triggering flows with payloads from external applications, see the video tutorial [How to Use Webhooks in Langflow](https://www.youtube.com/watch?v=IC1CAtzFRE0).
|
||||
|
||||
## Require authentication for webhooks {#require-authentication-for-webhooks}
|
||||
|
||||
By default, webhooks run as the flow owner without authentication (`LANGFLOW_WEBHOOK_AUTH_ENABLE=False`).
|
||||
If you want to require API key authentication for webhooks, set `LANGFLOW_WEBHOOK_AUTH_ENABLE=True`.
|
||||
|
||||
## Troubleshoot flows with Webhook components
|
||||
|
||||
Use the following information to help address common issues that can occur with the **Webhook** component.
|
||||
|
||||
@ -57,9 +57,11 @@ The **Simple Agent** template consists of an [**Agent** component](/agents) conn
|
||||
|
||||
Many components can be tools for agents, including [Model Context Protocol (MCP) servers](/mcp-server). The agent decides which tools to call based on the context of a given query.
|
||||
|
||||
2. In the **Agent** component, enter your OpenAI API key directly or click the <Icon name="Globe" aria-hidden="true"/> **Globe** to create a [global variable](/configuration-global-variables).
|
||||
2. In the **Agent** component, enter your OpenAI API key directly or use a <Icon name="Globe" aria-hidden="true"/> [global variable](/configuration-global-variables).
|
||||
|
||||
This guide uses an OpenAI model for demonstration purposes. If you want to use a different provider, change the **Model Provider** and **Model Name** fields, and then provide credentials for your selected provider.
|
||||
This example uses the **Agent** component's built-in OpenAI model.
|
||||
If you want to use a different provider, edit the model provider, model name, and credentials accordingly.
|
||||
If your preferred provider or model isn't listed, set **Model Provider** to **Connect other models**, and then connect any [language model component](/components-models#additional-language-models).
|
||||
|
||||
3. To run the flow, click <Icon name="Play" aria-hidden="true"/> **Playground**.
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@ Instructions for integrating Langflow and Arize are also available in the Arize
|
||||
|
||||
## Run a flow and view metrics in Arize
|
||||
|
||||
1. In Langflow, run a flow that has an **Agent** or **Language Model** component.
|
||||
1. In Langflow, run a flow that has an LLM-driven component, such as an **Agent** component or any language model component.
|
||||
You must chat with the flow or trigger the LLM to produce traffic for Arize to trace.
|
||||
|
||||
For example, you can create a flow with the **Simple Agent** template, add your OpenAI API key to the **Agent** component, and then click **Playground** to chat with the flow and generate traffic.
|
||||
|
||||
@ -3,69 +3,103 @@ title: Composio
|
||||
slug: /integrations-composio
|
||||
---
|
||||
|
||||
Composio components in Langflow provide [Composio](https://app.composio.dev/) tools to your **Agent** components.
|
||||
import Icon from "@site/src/components/icon";
|
||||
|
||||
Instead of juggling multiple integrations and components in your flow, connect Composio components to an **Agent** component to use all of Composio's supported APIs and actions as tools for your agent.
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
The following components are available in the **Composio** bundle:
|
||||
|
||||
* **Composio Tools**
|
||||
* **GitHub**
|
||||
* **Gmail**
|
||||
* **Google Calendar**
|
||||
* **Outlook**
|
||||
* **Slack**
|
||||
This page describes the components that are available in the **Composio** bundle.
|
||||
|
||||
For information about specific Composio functionality, see the [Composio documentation](https://docs.composio.dev/introduction/intro/overview).
|
||||
|
||||
## Authentication for Composio components
|
||||
|
||||
Composio components require authentication to Composio with a Composio API key.
|
||||
|
||||
Depending on the components you use, you may also need additional access, such as an OpenAI API key, Gmail account, or GitHub account.
|
||||
|
||||
## Use Composio components in a flow
|
||||
|
||||
1. In Langflow, create a flow.
|
||||
Composio components are primarily used as [tools for agents](/agents-tools).
|
||||
|
||||
2. Add an **Agent** component and a **Composio Tools** component.
|
||||
The **Composio** bundle includes an aggregate **Composio Tools** component and the following single-service components:
|
||||
|
||||
3. Connect the **Agent** component's **Tools** port to the **Composio Tools** component's **Tools** port.
|
||||
- **Dropbox**
|
||||
- **GitHub**
|
||||
- **Gmail**
|
||||
- **Google Calendar**
|
||||
- **Google Meet**
|
||||
- **Google Tasks**
|
||||
- **Linear**
|
||||
- **Outlook**
|
||||
- **Reddit**
|
||||
- **Slack** (your Slack account)
|
||||
- **Slackbot** (bot integration)
|
||||
- **Supabase**
|
||||
- **Todoist**
|
||||
- **Youtube**
|
||||
|
||||
4. In the **Composio API Key** field, enter your Composio API key.
|
||||
The **Composio Tools** component is an access point for multiple Composio services (tools).
|
||||
However, most of these services are also available as single-service components, which are recommended over the **Composio Tools** component.
|
||||
|
||||
5. In the **Tool Name** field, select the tool you want your agent to have access to.
|
||||
Although you can use single-service components for non-agentic actions in your flows, they are primarily used in **Tool Mode** with **Agent** components.
|
||||
In contrast, the **Composio Tools** component can _only_ be a tool for agents; it doesn't support non-agentic use.
|
||||
|
||||
For this example, select the **Gmail** tool to allow your agent to control an email account with the **Composio Tools** component.
|
||||
The following example demonstrates how to use the Composio **Gmail** component as a tool for an **Agent** component.
|
||||
This allows the agent to use Composio Gmail functionality, if necessary, when generating responses.
|
||||
You can connect other Composio components in the same way.
|
||||
|
||||
6. In the **Actions** field, select the action you want the agent to take with the **Gmail** tool.
|
||||
1. Create a flow based on the **Simple Agent** template.
|
||||
|
||||
The **Gmail** tool supports multiple actions, and it also supports multiple actions within the same tool.
|
||||
For this example, select **GMAIL_CREATE_EMAIL_DRAFT**.
|
||||
For more information, see the [Composio documentation](https://docs.composio.dev/patterns/tools/use-tools/use-specific-actions).
|
||||
2. In <Icon name="Blocks" aria-hidden="true" /> **Bundles**, find the **Composio** bundle, and then add the **Gmail** component to the flow.
|
||||
|
||||
7. Add **Chat Input** and **Chat Output** components to your flow, and then connect them to the **Agent** component's **Input** and **Response**, respectively.
|
||||
3. In the **Composio API Key** field, enter your Composio API key or use the `COMPOSIO_API_KEY` global variable.
|
||||
For more information, see [Composio authentication](#composio-authentication).
|
||||
|
||||
If the key is valid, the <Icon name="TriangleAlert" aria-hidden="true" /> **Alert** is replaced by a <Icon name="Check" aria-hidden="true" /> **Success** indicator, and the **Actions** list populates with actions available to your API key.
|
||||
|
||||
4. In the [component's header menu](/concepts-components#component-menus), enable **Tool Mode**.
|
||||
|
||||
If you are using the **Composio Tools** component, skip this step because the component is already configured as a tool.
|
||||
|
||||
5. In the **Actions** list, configure the Gmail actions that you want to provide to the agent.
|
||||
You can select the actions you want to allow, and you can edit each action's slug (agentic label) and description, which help the agent decide which tools to use.
|
||||
|
||||
6. Connect the **Gmail** component's **Toolset** output to the **Agent** component's **Tools** input.
|
||||
|
||||
7. In the **Agent** component, enter your OpenAI API key or configure the **Agent** component to use a different LLM.
|
||||
For more information, see [Language model components](/components-models).
|
||||
|
||||
At this point, your flow has four connected components:
|
||||
|
||||
* The **Chat Input** component is connected to the **Agent** component's **Input** port.
|
||||
This allows the flow to be triggered by an incoming prompt from a user or application.
|
||||
* The **Gmail** component is connected to the **Agent** component as a tool.
|
||||
The agent may not use this tool for every request; the agent only uses this connection if it decides the Gmail tool can help respond to the prompt.
|
||||
* The **Agent** component's **Output** port is connected to the **Chat Output** component, which returns the final response to the user or application.
|
||||
|
||||

|
||||
|
||||
8. In the **Agent** component, enter your OpenAI API key or configure the **Agent** component to use a different LLM.
|
||||
|
||||
9. To test the connection to Composio, click **Playground**, and then ask the LLM about the tools available to it.
|
||||
8. To test the flow, click **Playground**, and then ask the LLM about the tools available to it.
|
||||
The agent should provide a list of connected tools, including the **Gmail** tool and the built-in tools in the **Agent** component.
|
||||
For example:
|
||||
|
||||
```text
|
||||
User:
|
||||
What tools are available to you?
|
||||
|
||||
AI:
|
||||
I have access to the following tools:
|
||||
I have access to a variety of tools that allow me to help you with different tasks. Here are the main categories of tools available to me:
|
||||
|
||||
1. **GMAIL_CREATE_EMAIL_DRAFT**: This tool allows me to create a draft email using Gmail's API. I can specify the recipient's email address, subject, body content, and whether the body content is HTML.
|
||||
1. Gmail Tools:
|
||||
- Fetch emails, search, and filter messages.
|
||||
- Fetch specific email details by message ID.
|
||||
- Create email drafts (with attachments, HTML, CC/BCC, etc.).
|
||||
- Delete email drafts or specific messages.
|
||||
|
||||
2. **CurrentDate-get_current_date**: This tool retrieves the current date and time in a specified timezone.
|
||||
2. Date & Time Tools:
|
||||
- Get the current date and time in any timezone.
|
||||
|
||||
3. Multi-Tool Use:
|
||||
- Run multiple tools in parallel for efficiency.
|
||||
|
||||
If you have a specific task in mind, let me know and I can tell you which tool I would use or demonstrate how I can help!
|
||||
```
|
||||
|
||||
10. To test the specific tool, tell the agent to perform an action like writing a draft email:
|
||||
9. To test a specific tool or function, tell the agent to perform an action that uses that tool.
|
||||
For example, ask the agent to write a draft email:
|
||||
|
||||
```text
|
||||
Create a draft email with the subject line "Greetings from Composio"
|
||||
@ -73,8 +107,8 @@ The agent should provide a list of connected tools, including the **Gmail** tool
|
||||
Body content: "Hello from composio!"
|
||||
```
|
||||
|
||||
The **Playground** shows the logic the agent choose to use specific tools.
|
||||
This example response is abbreviated.
|
||||
The **Playground** prints the logic as the agent chooses the `GMAIL_CREATE_EMAIL_DRAFT` tool to create the email draft.
|
||||
The following example response is abbreviated:
|
||||
|
||||
```text
|
||||
The draft email with the subject "Greetings from Composio" and body "Hello from composio!" has been successfully created.
|
||||
@ -107,6 +141,42 @@ The agent should provide a list of connected tools, including the **Gmail** tool
|
||||
}
|
||||
```
|
||||
|
||||
11. For further confirmation, you can go to your Gmail account and find the message in your drafts folder.
|
||||
For further confirmation, you can go to your Gmail account and find the message in your drafts folder.
|
||||
|
||||
12. To add more Composio actions, add more Composio components to your flow, and then connect them to the **Agent** component's **Tools** port.
|
||||
10. Optional: To add more Composio services, repeat these steps to add more Composio components to your flow.
|
||||
For each component, provide the necessary credentials, enable **Tool Mode**, configure the actions, and then connect it to the **Agent** component's **Tools** port.
|
||||
|
||||
## Composio parameters
|
||||
|
||||
All single-service Composio components have the same parameters, and the **Composio Tools** component has one additional parameter:
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| entity_id | String | Input parameter. The entity ID for the Composio account. Default: `default`. This parameter is hidden by default in the visual editor. If you need to set this parameter, you can access it through the <Icon name="SlidersHorizontal" aria-hidden="true"/> **Controls** in the [component's header menu](/concepts-components#component-menus). |
|
||||
| api_key | SecretString | Input parameter. The Composio API key for authentication with the Composio platform. Make sure the key authorizes the specific service that you want to use. For more information, see [Composio authentication](#composio-authentication). |
|
||||
| tool_name | Connection | Input parameter for the **Composio Tools** component only. Select the Composio service (tool) to connect to. |
|
||||
| action | List | Input parameter. Select actions to use. Available actions vary by service. Some actions might require premium access to a particular service. |
|
||||
|
||||
## Composio authentication
|
||||
|
||||
Composio components require authentication to the Composio platform with a Composio API key.
|
||||
|
||||
You can provide this key directly in your components, or you can use the `COMPOSIO_API_KEY` [global variable](/configuration-global-variables), which Langflow can automatically load from your `.env` file.
|
||||
|
||||
:::info
|
||||
The Composio API key _only_ handles the connection to Composio.
|
||||
Service provider authentication is managed through the Composio platform for each service that you want to use.
|
||||
:::
|
||||
|
||||
Make sure that your Composio API key provides access to the required services for the components in your flow.
|
||||
For example, if you are using the Composio **Gmail** component, your Composio API key must have access to the Gmail service.
|
||||
|
||||
## Composio output
|
||||
|
||||
When used as tools for an agent, Composio components output [`Tools`](/data-types#tool), which is a list of tools for use by an agent.
|
||||
When called by the agent, the response from the Composio service is ingested by the agent, not passed directly as output to the user or application.
|
||||
|
||||
In non-agentic use cases, the output is a [`DataFrame`](/data-types#dataframe) containing the response from the specified Composio service, depending on the component and action used in the flow.
|
||||
|
||||
Because the **Composio Tools** component supports _only_ agentic use, it cannot output `DataFrame`.
|
||||
All single-service Composio components can output either `DataFrame` or `Tools`.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user