diff --git a/docs/docs/administration/cli.mdx b/docs/docs/administration/cli.mdx index 11ea6fa65..41bc76de3 100644 --- a/docs/docs/administration/cli.mdx +++ b/docs/docs/administration/cli.mdx @@ -4,12 +4,12 @@ Langflow's Command Line Interface (CLI) is a powerful tool that allows you to in The available commands are below. Navigate to their individual sections of this page to see the parameters. -* [langflow](#overview) -* [langflow api-key](#langflow-api-key) -* [langflow copy-db](#langflow-copy-db) -* [langflow migration](#langflow-migration) -* [langflow run](#langflow-run) -* [langflow superuser](#langflow-superuser) +- [langflow](#overview) +- [langflow api-key](#langflow-api-key) +- [langflow copy-db](#langflow-copy-db) +- [langflow migration](#langflow-migration) +- [langflow run](#langflow-run) +- [langflow superuser](#langflow-superuser) ## Overview @@ -23,21 +23,21 @@ langflow --help python -m langflow ``` -| Command | Description | -| ------- | ----------- | -| `api-key` | Creates an API key for the default superuser if AUTO_LOGIN is enabled. | -| `copy-db` | Copy the database files to the current directory (`which langflow`). | -| `migration` | Run or test migrations. | -| `run` | Run the Langflow. | -| `superuser` | Create a superuser. | +| Command | Description | +| ----------- | ---------------------------------------------------------------------- | +| `api-key` | Creates an API key for the default superuser if AUTO_LOGIN is enabled. | +| `copy-db` | Copy the database files to the current directory (`which langflow`). | +| `migration` | Run or test migrations. | +| `run` | Run the Langflow. | +| `superuser` | Create a superuser. | ### Options -| Option | Description | -| ------ | ----------- | -| `--install-completion` | Install completion for the current shell. | -| `--show-completion` | Show completion for the current shell, to copy it or customize the installation. | -| `--help` | Show this message and exit. | +| Option | Description | +| ---------------------- | -------------------------------------------------------------------------------- | +| `--install-completion` | Install completion for the current shell. | +| `--show-completion` | Show completion for the current shell, to copy it or customize the installation. | +| `--help` | Show this message and exit. | ## langflow api-key @@ -61,10 +61,10 @@ python -m langflow api-key ### Options -| Option | Type | Description | -|------------------|------|-------------------------------------------------------------| -| --log-level | TEXT | Logging level. [env var: LANGFLOW_LOG_LEVEL] [default: error] | -| --help | | Show this message and exit. | +| Option | Type | Description | +| ----------- | ---- | ------------------------------------------------------------- | +| --log-level | TEXT | Logging level. [env var: LANGFLOW_LOG_LEVEL] [default: error] | +| --help | | Show this message and exit. | ## langflow copy-db @@ -87,12 +87,12 @@ python -m langflow migration ``` ### Options -| Option | Description | -|-----------------|-------------------------------------------------------------| -| `--test, --no-test` | Run migrations in test mode. [default: test] | -| `--fix, --no-fix` | Fix migrations. This is a destructive operation, and should only be used if you know what you are doing. [default: no-fix] | -| `--help` | Show this message and exit. | +| Option | Description | +| ------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `--test, --no-test` | Run migrations in test mode. [default: test] | +| `--fix, --no-fix` | Fix migrations. This is a destructive operation, and should only be used if you know what you are doing. [default: no-fix] | +| `--help` | Show this message and exit. | ## langflow run @@ -106,26 +106,26 @@ python -m langflow run ### Options -| Option | Description | -|-------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `--help` | Displays all available options. | -| `--host` | Defines the host to bind the server to. Can be set using the `LANGFLOW_HOST` environment variable. The default is `127.0.0.1`. | -| `--workers` | Sets the number of worker processes. Can be set using the `LANGFLOW_WORKERS` environment variable. The default is `1`. | -| `--timeout` | Sets the worker timeout in seconds. The default is `60`. | -| `--port` | Sets the port to listen on. Can be set using the `LANGFLOW_PORT` environment variable. The default is `7860`. | -| `--env-file` | Specifies the path to the .env file containing environment variables. The default is `.env`. | -| `--log-level` | Defines the logging level. Can be set using the `LANGFLOW_LOG_LEVEL` environment variable. The default is `critical`. | -| `--components-path` | Specifies the path to the directory containing custom components. Can be set using the `LANGFLOW_COMPONENTS_PATH` environment variable. The default is `langflow/components`. | -| `--log-file` | Specifies the path to the log file. Can be set using the `LANGFLOW_LOG_FILE` environment variable. The default is `logs/langflow.log`. | -| `--cache` | Select the type of cache to use. Options are `InMemoryCache` and `SQLiteCache`. Can be set using the `LANGFLOW_LANGCHAIN_CACHE` environment variable. The default is `SQLiteCache`. | -| `--dev`/`--no-dev` | Toggles the development mode. The default is `no-dev`. | -| `--path` | Specifies the path to the frontend directory containing build files. This option is for development purposes only. Can be set using the `LANGFLOW_FRONTEND_PATH` environment variable. | -| `--open-browser`/`--no-open-browser`| Toggles the option to open the browser after starting the server. Can be set using the `LANGFLOW_OPEN_BROWSER` environment variable. The default is `open-browser`. | -| `--remove-api-keys`/`--no-remove-api-keys`| Toggles the option to remove API keys from the projects saved in the database. Can be set using the `LANGFLOW_REMOVE_API_KEYS` environment variable. The default is `no-remove-api-keys`. | -| `--install-completion [bash\|zsh\|fish\|powershell\|pwsh]`| Installs completion for the specified shell. | -| `--show-completion [bash\|zsh\|fish\|powershell\|pwsh]` | Shows completion for the specified shell, allowing you to copy it or customize the installation. | -| `--backend-only` | This parameter, with a default value of `False`, allows running only the backend server without the frontend. It can also be set using the `LANGFLOW_BACKEND_ONLY` environment variable. For more, see [Backend-only](../deployment/backend-only.md).| -| `--store` | This parameter, with a default value of `True`, enables the store features, use `--no-store` to deactivate it. It can be configured using the `LANGFLOW_STORE` environment variable. | +| Option | Description | +| ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `--help` | Displays all available options. | +| `--host` | Defines the host to bind the server to. Can be set using the `LANGFLOW_HOST` environment variable. The default is `127.0.0.1`. | +| `--workers` | Sets the number of worker processes. Can be set using the `LANGFLOW_WORKERS` environment variable. The default is `1`. | +| `--timeout` | Sets the worker timeout in seconds. The default is `60`. | +| `--port` | Sets the port to listen on. Can be set using the `LANGFLOW_PORT` environment variable. The default is `7860`. | +| `--env-file` | Specifies the path to the .env file containing environment variables. The default is `.env`. | +| `--log-level` | Defines the logging level. Can be set using the `LANGFLOW_LOG_LEVEL` environment variable. The default is `critical`. | +| `--components-path` | Specifies the path to the directory containing custom components. Can be set using the `LANGFLOW_COMPONENTS_PATH` environment variable. The default is `langflow/components`. | +| `--log-file` | Specifies the path to the log file. Can be set using the `LANGFLOW_LOG_FILE` environment variable. The default is `logs/langflow.log`. | +| `--cache` | Select the type of cache to use. Options are `InMemoryCache` and `SQLiteCache`. Can be set using the `LANGFLOW_LANGCHAIN_CACHE` environment variable. The default is `SQLiteCache`. | +| `--dev`/`--no-dev` | Toggles the development mode. The default is `no-dev`. | +| `--path` | Specifies the path to the frontend directory containing build files. This option is for development purposes only. Can be set using the `LANGFLOW_FRONTEND_PATH` environment variable. | +| `--open-browser`/`--no-open-browser` | Toggles the option to open the browser after starting the server. Can be set using the `LANGFLOW_OPEN_BROWSER` environment variable. The default is `open-browser`. | +| `--remove-api-keys`/`--no-remove-api-keys` | Toggles the option to remove API keys from the projects saved in the database. Can be set using the `LANGFLOW_REMOVE_API_KEYS` environment variable. The default is `no-remove-api-keys`. | +| `--install-completion [bash\|zsh\|fish\|powershell\|pwsh]` | Installs completion for the specified shell. | +| `--show-completion [bash\|zsh\|fish\|powershell\|pwsh]` | Shows completion for the specified shell, allowing you to copy it or customize the installation. | +| `--backend-only` | This parameter, with a default value of `False`, allows running only the backend server without the frontend. It can also be set using the `LANGFLOW_BACKEND_ONLY` environment variable. For more, see [Backend-only](../deployment/backend-only.md). | +| `--store` | This parameter, with a default value of `True`, enables the store features, use `--no-store` to deactivate it. It can be configured using the `LANGFLOW_STORE` environment variable. | #### Environment Variables @@ -145,10 +145,9 @@ python -m langflow superuser ### Options -| Option | Type | Description | -|----------------|-------|-------------------------------------------------------------| -| `--username` | TEXT | Username for the superuser. [default: None] [required] | -| `--password` | TEXT | Password for the superuser. [default: None] [required] | -| `--log-level` | TEXT | Logging level. [env var: LANGFLOW_LOG_LEVEL] [default: error] | -| `--help` | | Show this message and exit. | - +| Option | Type | Description | +| ------------- | ---- | ------------------------------------------------------------- | +| `--username` | TEXT | Username for the superuser. [default: None] [required] | +| `--password` | TEXT | Password for the superuser. [default: None] [required] | +| `--log-level` | TEXT | Logging level. [env var: LANGFLOW_LOG_LEVEL] [default: error] | +| `--help` | | Show this message and exit. | diff --git a/docs/docs/deployment/backend-only.md b/docs/docs/deployment/backend-only.md index c82e55aa6..9c408ad17 100644 --- a/docs/docs/deployment/backend-only.md +++ b/docs/docs/deployment/backend-only.md @@ -1,4 +1,5 @@ # Backend-only + You can run Langflow in `--backend-only` mode to expose your Langflow app as an API, without running the frontend UI. Start langflow in backend-only mode with `python3 -m langflow run --backend-only`. @@ -8,17 +9,18 @@ Langflow will now serve requests to its API without the frontend running. ## Prerequisites -* [Langflow installed](../getting-started/install-langflow.mdx) +- [Langflow installed](../getting-started/install-langflow.mdx) -* [OpenAI API key](https://platform.openai.com) +- [OpenAI API key](https://platform.openai.com) -* [A Langflow flow created](../starter-projects/basic-prompting.mdx) +- [A Langflow flow created](../starter-projects/basic-prompting.mdx) ## Download your flow's curl call 1. Click API. 2. Click **curl** > **Copy code** and save the code to your local machine. -It will look something like this: + It will look something like this: + ```curl curl -X POST \ "http://127.0.0.1:7864/api/v1/run/ef7e0554-69e5-4e3e-ab29-ee83bcd8d9ef?stream=false" \ @@ -33,19 +35,22 @@ curl -X POST \ "ChatInput-xXC4F": {} }}' ``` + Note the flow ID of `ef7e0554-69e5-4e3e-ab29-ee83bcd8d9ef`. You can find this ID in the UI as well to ensure you're querying the right flow. ## Start Langflow in backend-only mode 1. Stop Langflow with Ctrl+C. 2. Start langflow in backend-only mode with `python3 -m langflow run --backend-only`. -The terminal prints ` Welcome to ⛓ Langflow `, and a blank window opens at `http://127.0.0.1:7864/all`. -Langflow will now serve requests to its API. + The terminal prints ` Welcome to ⛓ Langflow `, and a blank window opens at `http://127.0.0.1:7864/all`. + Langflow will now serve requests to its API. 3. Run the curl code you copied from the UI. -You should get a result like this: + You should get a result like this: + ```bash {"session_id":"ef7e0554-69e5-4e3e-ab29-ee83bcd8d9ef:bf81d898868ac87e1b4edbd96c131c5dee801ea2971122cc91352d144a45b880","outputs":[{"inputs":{"input_value":"hi, are you there?"},"outputs":[{"results":{"result":"Arrr, ahoy matey! Aye, I be here. What be ye needin', me hearty?"},"artifacts":{"message":"Arrr, ahoy matey! Aye, I be here. What be ye needin', me hearty?","sender":"Machine","sender_name":"AI"},"messages":[{"message":"Arrr, ahoy matey! Aye, I be here. What be ye needin', me hearty?","sender":"Machine","sender_name":"AI","component_id":"ChatOutput-ktwdw"}],"component_display_name":"Chat Output","component_id":"ChatOutput-ktwdw","used_frozen_result":false}]}]}% ``` + Again, note that the flow ID matches. Langflow is receiving your POST request, running the flow, and returning the result, all without running the frontend. Cool! @@ -55,7 +60,8 @@ Instead of using curl, you can download your flow as a Python API call instead. 1. Click API. 2. Click **Python API** > **Copy code** and save the code to your local machine. -The code will look something like this: + The code will look something like this: + ```python import requests from typing import Optional @@ -99,15 +105,19 @@ message = "message" print(run_flow(message=message, flow_id=FLOW_ID)) ``` + 3. Run your Python app: + ```python python3 app.py ``` The result is similar to the curl call: + ```bash {'session_id': 'ef7e0554-69e5-4e3e-ab29-ee83bcd8d9ef:bf81d898868ac87e1b4edbd96c131c5dee801ea2971122cc91352d144a45b880', 'outputs': [{'inputs': {'input_value': 'message'}, 'outputs': [{'results': {'result': "Arrr matey! What be yer message for this ol' pirate? Speak up or walk the plank!"}, 'artifacts': {'message': "Arrr matey! What be yer message for this ol' pirate? Speak up or walk the plank!", 'sender': 'Machine', 'sender_name': 'AI'}, 'messages': [{'message': "Arrr matey! What be yer message for this ol' pirate? Speak up or walk the plank!", 'sender': 'Machine', 'sender_name': 'AI', 'component_id': 'ChatOutput-ktwdw'}], 'component_display_name': 'Chat Output', 'component_id': 'ChatOutput-ktwdw', 'used_frozen_result': False}]}]} ``` + Your Python app POSTs to your Langflow server, and the server runs the flow and returns the result. -See [API](../administration/api.mdx) for more ways to interact with your headless Langflow server. \ No newline at end of file +See [API](../administration/api.mdx) for more ways to interact with your headless Langflow server. diff --git a/docs/sidebars.js b/docs/sidebars.js index 6a9b3580a..04d81d475 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -113,7 +113,8 @@ module.exports = { type: "category", label: "Deployment", collapsed: true, - items: ["deployment/docker", + items: [ + "deployment/docker", "deployment/backend-only", "deployment/gcp-deployment", ], diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting (Hello, world!).json b/src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting (Hello, world!).json index 1fd1af39e..9bab93817 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting (Hello, world!).json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting (Hello, world!).json @@ -45,9 +45,7 @@ "name": "template", "display_name": "Template", "advanced": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "dynamic": false, "info": "", "load_from_db": false, @@ -86,22 +84,14 @@ "is_input": null, "is_output": null, "is_composition": null, - "base_classes": [ - "object", - "str", - "Text" - ], + "base_classes": ["object", "str", "Text"], "name": "", "display_name": "Prompt", "documentation": "", "custom_fields": { - "template": [ - "user_input" - ] + "template": ["user_input"] }, - "output_types": [ - "Text" - ], + "output_types": ["Text"], "full_path": null, "field_formatters": {}, "frozen": false, @@ -150,9 +140,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "code": { "type": "code", @@ -235,9 +223,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "openai_api_base": { "type": "str", @@ -256,9 +242,7 @@ "info": "The base URL of the OpenAI API. Defaults to https://api.openai.com/v1.\n\nYou can change this to use other APIs like JinaChat, LocalAI and Prem.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "openai_api_key": { "type": "str", @@ -277,9 +261,7 @@ "info": "The OpenAI API Key to use for the OpenAI model.", "load_from_db": true, "title_case": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "value": "OPENAI_API_KEY" }, "stream": { @@ -318,9 +300,7 @@ "info": "System message to pass to the model.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "temperature": { "type": "float", @@ -351,11 +331,7 @@ }, "description": "Generates text using OpenAI LLMs.", "icon": "OpenAI", - "base_classes": [ - "object", - "Text", - "str" - ], + "base_classes": ["object", "Text", "str"], "display_name": "OpenAI", "documentation": "", "custom_fields": { @@ -369,9 +345,7 @@ "stream": null, "system_message": null }, - "output_types": [ - "Text" - ], + "output_types": ["Text"], "field_formatters": {}, "frozen": false, "field_order": [ @@ -442,9 +416,7 @@ "name": "input_value", "display_name": "Message", "advanced": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "dynamic": false, "info": "", "load_from_db": false, @@ -468,9 +440,7 @@ "info": "In case of Message being a Record, this template will be used to convert it to text.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "return_record": { "type": "bool", @@ -502,10 +472,7 @@ "fileTypes": [], "file_path": "", "password": false, - "options": [ - "Machine", - "User" - ], + "options": ["Machine", "User"], "name": "sender", "display_name": "Sender Type", "advanced": true, @@ -513,9 +480,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "sender_name": { "type": "str", @@ -535,9 +500,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "session_id": { "type": "str", @@ -556,20 +519,13 @@ "info": "If provided, the message will be stored in the memory.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "_type": "CustomComponent" }, "description": "Display a chat message in the Playground.", "icon": "ChatOutput", - "base_classes": [ - "Record", - "Text", - "str", - "object" - ], + "base_classes": ["Record", "Text", "str", "object"], "display_name": "Chat Output", "documentation": "", "custom_fields": { @@ -580,10 +536,7 @@ "return_record": null, "record_template": null }, - "output_types": [ - "Text", - "Record" - ], + "output_types": ["Text", "Record"], "field_formatters": {}, "frozen": false, "field_order": [], @@ -679,10 +632,7 @@ "fileTypes": [], "file_path": "", "password": false, - "options": [ - "Machine", - "User" - ], + "options": ["Machine", "User"], "name": "sender", "display_name": "Sender Type", "advanced": true, @@ -690,9 +640,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "sender_name": { "type": "str", @@ -712,9 +660,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "session_id": { "type": "str", @@ -733,20 +679,13 @@ "info": "If provided, the message will be stored in the memory.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "_type": "CustomComponent" }, "description": "Get chat inputs from the Playground.", "icon": "ChatInput", - "base_classes": [ - "object", - "Record", - "str", - "Text" - ], + "base_classes": ["object", "Record", "str", "Text"], "display_name": "Chat Input", "documentation": "", "custom_fields": { @@ -756,10 +695,7 @@ "session_id": null, "return_record": null }, - "output_types": [ - "Text", - "Record" - ], + "output_types": ["Text", "Record"], "field_formatters": {}, "frozen": false, "field_order": [], @@ -787,17 +723,11 @@ "targetHandle": { "fieldName": "input_value", "id": "ChatOutput-njtka", - "inputTypes": [ - "Text" - ], + "inputTypes": ["Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "object", - "Text", - "str" - ], + "baseClasses": ["object", "Text", "str"], "dataType": "OpenAIModel", "id": "OpenAIModel-k39HS" } @@ -817,17 +747,11 @@ "targetHandle": { "fieldName": "input_value", "id": "OpenAIModel-k39HS", - "inputTypes": [ - "Text" - ], + "inputTypes": ["Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "object", - "str", - "Text" - ], + "baseClasses": ["object", "str", "Text"], "dataType": "Prompt", "id": "Prompt-uxBqP" } @@ -847,21 +771,11 @@ "targetHandle": { "fieldName": "user_input", "id": "Prompt-uxBqP", - "inputTypes": [ - "Document", - "BaseOutputParser", - "Record", - "Text" - ], + "inputTypes": ["Document", "BaseOutputParser", "Record", "Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "object", - "Record", - "str", - "Text" - ], + "baseClasses": ["object", "Record", "str", "Text"], "dataType": "ChatInput", "id": "ChatInput-P3fgL" } @@ -883,4 +797,4 @@ "name": "Basic Prompting (Hello, World)", "last_tested_version": "1.0.0a4", "is_component": false -} \ No newline at end of file +} diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Langflow Blog Writter.json b/src/backend/base/langflow/initial_setup/starter_projects/Langflow Blog Writter.json index 872bd36cd..49fa386e6 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Langflow Blog Writter.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Langflow Blog Writter.json @@ -45,9 +45,7 @@ "name": "template", "display_name": "Template", "advanced": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "dynamic": false, "info": "", "load_from_db": false, @@ -138,24 +136,14 @@ "is_input": null, "is_output": null, "is_composition": null, - "base_classes": [ - "object", - "Text", - "str" - ], + "base_classes": ["object", "Text", "str"], "name": "", "display_name": "Prompt", "documentation": "", "custom_fields": { - "template": [ - "reference_1", - "reference_2", - "instructions" - ] + "template": ["reference_1", "reference_2", "instructions"] }, - "output_types": [ - "Text" - ], + "output_types": ["Text"], "full_path": null, "field_formatters": {}, "frozen": false, @@ -222,9 +210,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "value": [ "https://www.promptingguide.ai/techniques/prompt_chaining" ] @@ -233,17 +219,13 @@ }, "description": "Fetch content from one or more URLs.", "icon": "layout-template", - "base_classes": [ - "Record" - ], + "base_classes": ["Record"], "display_name": "URL", "documentation": "", "custom_fields": { "urls": null }, - "output_types": [ - "Record" - ], + "output_types": ["Record"], "field_formatters": {}, "frozen": false, "field_order": [], @@ -302,9 +284,7 @@ "name": "input_value", "display_name": "Message", "advanced": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "dynamic": false, "info": "", "load_from_db": false, @@ -328,9 +308,7 @@ "info": "In case of Message being a Record, this template will be used to convert it to text.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "return_record": { "type": "bool", @@ -362,10 +340,7 @@ "fileTypes": [], "file_path": "", "password": false, - "options": [ - "Machine", - "User" - ], + "options": ["Machine", "User"], "name": "sender", "display_name": "Sender Type", "advanced": true, @@ -373,9 +348,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "sender_name": { "type": "str", @@ -395,9 +368,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "session_id": { "type": "str", @@ -416,20 +387,13 @@ "info": "If provided, the message will be stored in the memory.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "_type": "CustomComponent" }, "description": "Display a chat message in the Playground.", "icon": "ChatOutput", - "base_classes": [ - "Text", - "Record", - "object", - "str" - ], + "base_classes": ["Text", "Record", "object", "str"], "display_name": "Chat Output", "documentation": "", "custom_fields": { @@ -440,10 +404,7 @@ "return_record": null, "record_template": null }, - "output_types": [ - "Text", - "Record" - ], + "output_types": ["Text", "Record"], "field_formatters": {}, "frozen": false, "field_order": [], @@ -483,9 +444,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "code": { "type": "code", @@ -568,9 +527,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "openai_api_base": { "type": "str", @@ -589,9 +546,7 @@ "info": "The base URL of the OpenAI API. Defaults to https://api.openai.com/v1.\n\nYou can change this to use other APIs like JinaChat, LocalAI and Prem.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "openai_api_key": { "type": "str", @@ -610,9 +565,7 @@ "info": "The OpenAI API Key to use for the OpenAI model.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "value": "OPENAI_API_KEY" }, "stream": { @@ -651,9 +604,7 @@ "info": "System message to pass to the model.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "temperature": { "type": "float", @@ -684,11 +635,7 @@ }, "description": "Generates text using OpenAI LLMs.", "icon": "OpenAI", - "base_classes": [ - "str", - "Text", - "object" - ], + "base_classes": ["str", "Text", "object"], "display_name": "OpenAI", "documentation": "", "custom_fields": { @@ -702,9 +649,7 @@ "stream": null, "system_message": null }, - "output_types": [ - "Text" - ], + "output_types": ["Text"], "field_formatters": {}, "frozen": false, "field_order": [ @@ -777,28 +722,20 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ], - "value": [ - "https://www.promptingguide.ai/introduction/basics" - ] + "input_types": ["Text"], + "value": ["https://www.promptingguide.ai/introduction/basics"] }, "_type": "CustomComponent" }, "description": "Fetch content from one or more URLs.", "icon": "layout-template", - "base_classes": [ - "Record" - ], + "base_classes": ["Record"], "display_name": "URL", "documentation": "", "custom_fields": { "urls": null }, - "output_types": [ - "Record" - ], + "output_types": ["Record"], "field_formatters": {}, "frozen": false, "field_order": [], @@ -858,10 +795,7 @@ "name": "input_value", "display_name": "Value", "advanced": false, - "input_types": [ - "Record", - "Text" - ], + "input_types": ["Record", "Text"], "dynamic": false, "info": "Text or Record to be passed as input.", "load_from_db": false, @@ -885,28 +819,20 @@ "info": "Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "_type": "CustomComponent" }, "description": "Get text inputs from the Playground.", "icon": "type", - "base_classes": [ - "object", - "Text", - "str" - ], + "base_classes": ["object", "Text", "str"], "display_name": "Instructions", "documentation": "", "custom_fields": { "input_value": null, "record_template": null }, - "output_types": [ - "Text" - ], + "output_types": ["Text"], "field_formatters": {}, "frozen": false, "field_order": [], @@ -935,18 +861,11 @@ "targetHandle": { "fieldName": "reference_2", "id": "Prompt-Rse03", - "inputTypes": [ - "Document", - "BaseOutputParser", - "Record", - "Text" - ], + "inputTypes": ["Document", "BaseOutputParser", "Record", "Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "Record" - ], + "baseClasses": ["Record"], "dataType": "URL", "id": "URL-HYPkR" } @@ -966,17 +885,11 @@ "targetHandle": { "fieldName": "input_value", "id": "ChatOutput-JPlxl", - "inputTypes": [ - "Text" - ], + "inputTypes": ["Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "str", - "Text", - "object" - ], + "baseClasses": ["str", "Text", "object"], "dataType": "OpenAIModel", "id": "OpenAIModel-gi29P" } @@ -996,18 +909,11 @@ "targetHandle": { "fieldName": "reference_1", "id": "Prompt-Rse03", - "inputTypes": [ - "Document", - "BaseOutputParser", - "Record", - "Text" - ], + "inputTypes": ["Document", "BaseOutputParser", "Record", "Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "Record" - ], + "baseClasses": ["Record"], "dataType": "URL", "id": "URL-2cX90" } @@ -1027,20 +933,11 @@ "targetHandle": { "fieldName": "instructions", "id": "Prompt-Rse03", - "inputTypes": [ - "Document", - "BaseOutputParser", - "Record", - "Text" - ], + "inputTypes": ["Document", "BaseOutputParser", "Record", "Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "object", - "Text", - "str" - ], + "baseClasses": ["object", "Text", "str"], "dataType": "TextInput", "id": "TextInput-og8Or" } @@ -1060,17 +957,11 @@ "targetHandle": { "fieldName": "input_value", "id": "OpenAIModel-gi29P", - "inputTypes": [ - "Text" - ], + "inputTypes": ["Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "object", - "Text", - "str" - ], + "baseClasses": ["object", "Text", "str"], "dataType": "Prompt", "id": "Prompt-Rse03" } @@ -1093,4 +984,4 @@ "name": "Blog Writer", "last_tested_version": "1.0.0a0", "is_component": false -} \ No newline at end of file +} diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Langflow Document QA.json b/src/backend/base/langflow/initial_setup/starter_projects/Langflow Document QA.json index 4b38d5ce1..361676b66 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Langflow Document QA.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Langflow Document QA.json @@ -45,9 +45,7 @@ "name": "template", "display_name": "Template", "advanced": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "dynamic": false, "info": "", "load_from_db": false, @@ -112,23 +110,14 @@ "is_input": null, "is_output": null, "is_composition": null, - "base_classes": [ - "object", - "str", - "Text" - ], + "base_classes": ["object", "str", "Text"], "name": "", "display_name": "Prompt", "documentation": "", "custom_fields": { - "template": [ - "Document", - "Question" - ] + "template": ["Document", "Question"] }, - "output_types": [ - "Text" - ], + "output_types": ["Text"], "full_path": null, "field_formatters": {}, "frozen": false, @@ -231,18 +220,14 @@ "_type": "CustomComponent" }, "description": "A generic file loader.", - "base_classes": [ - "Record" - ], + "base_classes": ["Record"], "display_name": "Files", "documentation": "", "custom_fields": { "path": null, "silent_errors": null }, - "output_types": [ - "Record" - ], + "output_types": ["Record"], "field_formatters": {}, "frozen": false, "field_order": [], @@ -338,10 +323,7 @@ "fileTypes": [], "file_path": "", "password": false, - "options": [ - "Machine", - "User" - ], + "options": ["Machine", "User"], "name": "sender", "display_name": "Sender Type", "advanced": true, @@ -349,9 +331,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "sender_name": { "type": "str", @@ -371,9 +351,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "session_id": { "type": "str", @@ -392,20 +370,13 @@ "info": "If provided, the message will be stored in the memory.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "_type": "CustomComponent" }, "description": "Get chat inputs from the Playground.", "icon": "ChatInput", - "base_classes": [ - "str", - "Record", - "Text", - "object" - ], + "base_classes": ["str", "Record", "Text", "object"], "display_name": "Chat Input", "documentation": "", "custom_fields": { @@ -415,10 +386,7 @@ "session_id": null, "return_record": null }, - "output_types": [ - "Text", - "Record" - ], + "output_types": ["Text", "Record"], "field_formatters": {}, "frozen": false, "field_order": [], @@ -477,9 +445,7 @@ "name": "input_value", "display_name": "Message", "advanced": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "dynamic": false, "info": "", "load_from_db": false, @@ -515,10 +481,7 @@ "fileTypes": [], "file_path": "", "password": false, - "options": [ - "Machine", - "User" - ], + "options": ["Machine", "User"], "name": "sender", "display_name": "Sender Type", "advanced": true, @@ -526,9 +489,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "sender_name": { "type": "str", @@ -548,9 +509,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "session_id": { "type": "str", @@ -569,20 +528,13 @@ "info": "If provided, the message will be stored in the memory.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "_type": "CustomComponent" }, "description": "Display a chat message in the Playground.", "icon": "ChatOutput", - "base_classes": [ - "str", - "Record", - "Text", - "object" - ], + "base_classes": ["str", "Record", "Text", "object"], "display_name": "Chat Output", "documentation": "", "custom_fields": { @@ -592,10 +544,7 @@ "session_id": null, "return_record": null }, - "output_types": [ - "Text", - "Record" - ], + "output_types": ["Text", "Record"], "field_formatters": {}, "frozen": false, "field_order": [], @@ -640,9 +589,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "code": { "type": "code", @@ -725,9 +672,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "openai_api_base": { "type": "str", @@ -746,9 +691,7 @@ "info": "The base URL of the OpenAI API. Defaults to https://api.openai.com/v1.\n\nYou can change this to use other APIs like JinaChat, LocalAI and Prem.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "openai_api_key": { "type": "str", @@ -767,9 +710,7 @@ "info": "The OpenAI API Key to use for the OpenAI model.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "value": "OPENAI_API_KEY" }, "stream": { @@ -808,9 +749,7 @@ "info": "System message to pass to the model.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "temperature": { "type": "float", @@ -841,11 +780,7 @@ }, "description": "Generates text using OpenAI LLMs.", "icon": "OpenAI", - "base_classes": [ - "object", - "str", - "Text" - ], + "base_classes": ["object", "str", "Text"], "display_name": "OpenAI", "documentation": "", "custom_fields": { @@ -859,9 +794,7 @@ "stream": null, "system_message": null }, - "output_types": [ - "Text" - ], + "output_types": ["Text"], "field_formatters": {}, "frozen": false, "field_order": [ @@ -899,21 +832,11 @@ "targetHandle": { "fieldName": "Question", "id": "Prompt-tHwPf", - "inputTypes": [ - "Document", - "BaseOutputParser", - "Record", - "Text" - ], + "inputTypes": ["Document", "BaseOutputParser", "Record", "Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "str", - "Record", - "Text", - "object" - ], + "baseClasses": ["str", "Record", "Text", "object"], "dataType": "ChatInput", "id": "ChatInput-MsSJ9" } @@ -933,18 +856,11 @@ "targetHandle": { "fieldName": "Document", "id": "Prompt-tHwPf", - "inputTypes": [ - "Document", - "BaseOutputParser", - "Record", - "Text" - ], + "inputTypes": ["Document", "BaseOutputParser", "Record", "Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "Record" - ], + "baseClasses": ["Record"], "dataType": "File", "id": "File-6TEsD" } @@ -964,17 +880,11 @@ "targetHandle": { "fieldName": "input_value", "id": "OpenAIModel-Bt067", - "inputTypes": [ - "Text" - ], + "inputTypes": ["Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "object", - "str", - "Text" - ], + "baseClasses": ["object", "str", "Text"], "dataType": "Prompt", "id": "Prompt-tHwPf" } @@ -994,17 +904,11 @@ "targetHandle": { "fieldName": "input_value", "id": "ChatOutput-F5Awj", - "inputTypes": [ - "Text" - ], + "inputTypes": ["Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "object", - "str", - "Text" - ], + "baseClasses": ["object", "str", "Text"], "dataType": "OpenAIModel", "id": "OpenAIModel-Bt067" } @@ -1026,4 +930,4 @@ "name": "Document QA", "last_tested_version": "1.0.0a0", "is_component": false -} \ No newline at end of file +} diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Langflow Memory Conversation.json b/src/backend/base/langflow/initial_setup/starter_projects/Langflow Memory Conversation.json index 28d873e14..1083e08cb 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Langflow Memory Conversation.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Langflow Memory Conversation.json @@ -83,10 +83,7 @@ "fileTypes": [], "file_path": "", "password": false, - "options": [ - "Machine", - "User" - ], + "options": ["Machine", "User"], "name": "sender", "display_name": "Sender Type", "advanced": true, @@ -94,9 +91,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "sender_name": { "type": "str", @@ -116,9 +111,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "session_id": { "type": "str", @@ -137,21 +130,14 @@ "info": "If provided, the message will be stored in the memory.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "value": "MySessionID" }, "_type": "CustomComponent" }, "description": "Get chat inputs from the Playground.", "icon": "ChatInput", - "base_classes": [ - "Text", - "object", - "Record", - "str" - ], + "base_classes": ["Text", "object", "Record", "str"], "display_name": "Chat Input", "documentation": "", "custom_fields": { @@ -161,10 +147,7 @@ "session_id": null, "return_record": null }, - "output_types": [ - "Text", - "Record" - ], + "output_types": ["Text", "Record"], "field_formatters": {}, "frozen": false, "field_order": [], @@ -223,9 +206,7 @@ "name": "input_value", "display_name": "Message", "advanced": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "dynamic": false, "info": "", "load_from_db": false, @@ -261,10 +242,7 @@ "fileTypes": [], "file_path": "", "password": false, - "options": [ - "Machine", - "User" - ], + "options": ["Machine", "User"], "name": "sender", "display_name": "Sender Type", "advanced": true, @@ -272,9 +250,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "sender_name": { "type": "str", @@ -294,9 +270,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "session_id": { "type": "str", @@ -315,21 +289,14 @@ "info": "If provided, the message will be stored in the memory.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "value": "MySessionID" }, "_type": "CustomComponent" }, "description": "Display a chat message in the Playground.", "icon": "ChatOutput", - "base_classes": [ - "Text", - "object", - "Record", - "str" - ], + "base_classes": ["Text", "object", "Record", "str"], "display_name": "Chat Output", "documentation": "", "custom_fields": { @@ -339,10 +306,7 @@ "session_id": null, "return_record": null }, - "output_types": [ - "Text", - "Record" - ], + "output_types": ["Text", "Record"], "field_formatters": {}, "frozen": false, "field_order": [], @@ -418,10 +382,7 @@ "fileTypes": [], "file_path": "", "password": false, - "options": [ - "Ascending", - "Descending" - ], + "options": ["Ascending", "Descending"], "name": "order", "display_name": "Order", "advanced": true, @@ -429,9 +390,7 @@ "info": "Order of the messages.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "record_template": { "type": "str", @@ -451,9 +410,7 @@ "info": "Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "sender": { "type": "str", @@ -466,11 +423,7 @@ "fileTypes": [], "file_path": "", "password": false, - "options": [ - "Machine", - "User", - "Machine and User" - ], + "options": ["Machine", "User", "Machine and User"], "name": "sender", "display_name": "Sender Type", "advanced": false, @@ -478,9 +431,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "sender_name": { "type": "str", @@ -499,9 +450,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "session_id": { "type": "str", @@ -516,9 +465,7 @@ "name": "session_id", "display_name": "Session ID", "advanced": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "dynamic": false, "info": "Session ID of the chat history.", "load_from_db": false, @@ -529,11 +476,7 @@ }, "description": "Retrieves stored chat messages given a specific Session ID.", "icon": "history", - "base_classes": [ - "str", - "Text", - "object" - ], + "base_classes": ["str", "Text", "object"], "display_name": "Chat Memory", "documentation": "", "custom_fields": { @@ -544,9 +487,7 @@ "order": null, "record_template": null }, - "output_types": [ - "Text" - ], + "output_types": ["Text"], "field_formatters": {}, "frozen": false, "field_order": [], @@ -608,9 +549,7 @@ "name": "template", "display_name": "Template", "advanced": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "dynamic": false, "info": "", "load_from_db": false, @@ -675,23 +614,14 @@ "is_input": null, "is_output": null, "is_composition": null, - "base_classes": [ - "Text", - "str", - "object" - ], + "base_classes": ["Text", "str", "object"], "name": "", "display_name": "Prompt", "documentation": "", "custom_fields": { - "template": [ - "context", - "user_message" - ] + "template": ["context", "user_message"] }, - "output_types": [ - "Text" - ], + "output_types": ["Text"], "full_path": null, "field_formatters": {}, "frozen": false, @@ -740,9 +670,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "code": { "type": "code", @@ -825,9 +753,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "openai_api_base": { "type": "str", @@ -846,9 +772,7 @@ "info": "The base URL of the OpenAI API. Defaults to https://api.openai.com/v1.\n\nYou can change this to use other APIs like JinaChat, LocalAI and Prem.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "openai_api_key": { "type": "str", @@ -867,9 +791,7 @@ "info": "The OpenAI API Key to use for the OpenAI model.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "value": "OPENAI_API_KEY" }, "stream": { @@ -908,9 +830,7 @@ "info": "System message to pass to the model.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "temperature": { "type": "float", @@ -941,11 +861,7 @@ }, "description": "Generates text using OpenAI LLMs.", "icon": "OpenAI", - "base_classes": [ - "str", - "object", - "Text" - ], + "base_classes": ["str", "object", "Text"], "display_name": "OpenAI", "documentation": "", "custom_fields": { @@ -959,9 +875,7 @@ "stream": null, "system_message": null }, - "output_types": [ - "Text" - ], + "output_types": ["Text"], "field_formatters": {}, "frozen": false, "field_order": [ @@ -1013,10 +927,7 @@ "name": "input_value", "display_name": "Value", "advanced": false, - "input_types": [ - "Record", - "Text" - ], + "input_types": ["Record", "Text"], "dynamic": false, "info": "Text or Record to be passed as output.", "load_from_db": false, @@ -1058,28 +969,20 @@ "info": "Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "_type": "CustomComponent" }, "description": "Display a text output in the Playground.", "icon": "type", - "base_classes": [ - "str", - "object", - "Text" - ], + "base_classes": ["str", "object", "Text"], "display_name": "Inspect Memory", "documentation": "", "custom_fields": { "input_value": null, "record_template": null }, - "output_types": [ - "Text" - ], + "output_types": ["Text"], "field_formatters": {}, "frozen": false, "field_order": [], @@ -1108,19 +1011,10 @@ "fieldName": "context", "type": "str", "id": "Prompt-ODkUx", - "inputTypes": [ - "Document", - "BaseOutputParser", - "Record", - "Text" - ] + "inputTypes": ["Document", "BaseOutputParser", "Record", "Text"] }, "sourceHandle": { - "baseClasses": [ - "str", - "Text", - "object" - ], + "baseClasses": ["str", "Text", "object"], "dataType": "MemoryComponent", "id": "MemoryComponent-cdA1J" } @@ -1142,20 +1036,10 @@ "fieldName": "user_message", "type": "str", "id": "Prompt-ODkUx", - "inputTypes": [ - "Document", - "BaseOutputParser", - "Record", - "Text" - ] + "inputTypes": ["Document", "BaseOutputParser", "Record", "Text"] }, "sourceHandle": { - "baseClasses": [ - "Text", - "object", - "Record", - "str" - ], + "baseClasses": ["Text", "object", "Record", "str"], "dataType": "ChatInput", "id": "ChatInput-t7F8v" } @@ -1176,17 +1060,11 @@ "targetHandle": { "fieldName": "input_value", "id": "OpenAIModel-9RykF", - "inputTypes": [ - "Text" - ], + "inputTypes": ["Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "Text", - "str", - "object" - ], + "baseClasses": ["Text", "str", "object"], "dataType": "Prompt", "id": "Prompt-ODkUx" } @@ -1206,17 +1084,11 @@ "targetHandle": { "fieldName": "input_value", "id": "ChatOutput-P1jEe", - "inputTypes": [ - "Text" - ], + "inputTypes": ["Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "str", - "object", - "Text" - ], + "baseClasses": ["str", "object", "Text"], "dataType": "OpenAIModel", "id": "OpenAIModel-9RykF" } @@ -1236,18 +1108,11 @@ "targetHandle": { "fieldName": "input_value", "id": "TextOutput-vrs6T", - "inputTypes": [ - "Record", - "Text" - ], + "inputTypes": ["Record", "Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "str", - "Text", - "object" - ], + "baseClasses": ["str", "Text", "object"], "dataType": "MemoryComponent", "id": "MemoryComponent-cdA1J" } @@ -1269,4 +1134,4 @@ "name": "Memory Chatbot", "last_tested_version": "1.0.0a0", "is_component": false -} \ No newline at end of file +} diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Langflow Prompt Chaining.json b/src/backend/base/langflow/initial_setup/starter_projects/Langflow Prompt Chaining.json index 094b8079b..7182b97a1 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Langflow Prompt Chaining.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Langflow Prompt Chaining.json @@ -45,9 +45,7 @@ "name": "template", "display_name": "Template", "advanced": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "dynamic": false, "info": "", "load_from_db": false, @@ -86,22 +84,14 @@ "is_input": null, "is_output": null, "is_composition": null, - "base_classes": [ - "object", - "str", - "Text" - ], + "base_classes": ["object", "str", "Text"], "name": "", "display_name": "Prompt", "documentation": "", "custom_fields": { - "template": [ - "document" - ] + "template": ["document"] }, - "output_types": [ - "Text" - ], + "output_types": ["Text"], "full_path": null, "field_formatters": {}, "frozen": false, @@ -165,9 +155,7 @@ "name": "template", "display_name": "Template", "advanced": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "dynamic": false, "info": "", "load_from_db": false, @@ -206,22 +194,14 @@ "is_input": null, "is_output": null, "is_composition": null, - "base_classes": [ - "object", - "str", - "Text" - ], + "base_classes": ["object", "str", "Text"], "name": "", "display_name": "Prompt", "documentation": "", "custom_fields": { - "template": [ - "summary" - ] + "template": ["summary"] }, - "output_types": [ - "Text" - ], + "output_types": ["Text"], "full_path": null, "field_formatters": {}, "frozen": false, @@ -280,9 +260,7 @@ "name": "input_value", "display_name": "Message", "advanced": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "dynamic": false, "info": "", "load_from_db": false, @@ -306,9 +284,7 @@ "info": "In case of Message being a Record, this template will be used to convert it to text.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "return_record": { "type": "bool", @@ -340,10 +316,7 @@ "fileTypes": [], "file_path": "", "password": false, - "options": [ - "Machine", - "User" - ], + "options": ["Machine", "User"], "name": "sender", "display_name": "Sender Type", "advanced": true, @@ -351,9 +324,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "sender_name": { "type": "str", @@ -373,9 +344,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "session_id": { "type": "str", @@ -394,20 +363,13 @@ "info": "If provided, the message will be stored in the memory.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "_type": "CustomComponent" }, "description": "Display a chat message in the Playground.", "icon": "ChatOutput", - "base_classes": [ - "object", - "Record", - "Text", - "str" - ], + "base_classes": ["object", "Record", "Text", "str"], "display_name": "Chat Output", "documentation": "", "custom_fields": { @@ -418,10 +380,7 @@ "return_record": null, "record_template": null }, - "output_types": [ - "Text", - "Record" - ], + "output_types": ["Text", "Record"], "field_formatters": {}, "frozen": false, "field_order": [], @@ -476,9 +435,7 @@ "name": "input_value", "display_name": "Message", "advanced": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "dynamic": false, "info": "", "load_from_db": false, @@ -502,9 +459,7 @@ "info": "In case of Message being a Record, this template will be used to convert it to text.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "return_record": { "type": "bool", @@ -536,10 +491,7 @@ "fileTypes": [], "file_path": "", "password": false, - "options": [ - "Machine", - "User" - ], + "options": ["Machine", "User"], "name": "sender", "display_name": "Sender Type", "advanced": true, @@ -547,9 +499,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "sender_name": { "type": "str", @@ -569,9 +519,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "session_id": { "type": "str", @@ -590,20 +538,13 @@ "info": "If provided, the message will be stored in the memory.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "_type": "CustomComponent" }, "description": "Display a chat message in the Playground.", "icon": "ChatOutput", - "base_classes": [ - "object", - "Record", - "Text", - "str" - ], + "base_classes": ["object", "Record", "Text", "str"], "display_name": "Chat Output", "documentation": "", "custom_fields": { @@ -614,10 +555,7 @@ "return_record": null, "record_template": null }, - "output_types": [ - "Text", - "Record" - ], + "output_types": ["Text", "Record"], "field_formatters": {}, "frozen": false, "field_order": [], @@ -672,10 +610,7 @@ "name": "input_value", "display_name": "Value", "advanced": false, - "input_types": [ - "Record", - "Text" - ], + "input_types": ["Record", "Text"], "dynamic": false, "info": "Text or Record to be passed as input.", "load_from_db": false, @@ -699,28 +634,20 @@ "info": "Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "_type": "CustomComponent" }, "description": "Get text inputs from the Playground.", "icon": "type", - "base_classes": [ - "str", - "Text", - "object" - ], + "base_classes": ["str", "Text", "object"], "display_name": "Text Input", "documentation": "", "custom_fields": { "input_value": null, "record_template": null }, - "output_types": [ - "Text" - ], + "output_types": ["Text"], "field_formatters": {}, "frozen": false, "field_order": [], @@ -762,10 +689,7 @@ "name": "input_value", "display_name": "Value", "advanced": false, - "input_types": [ - "Record", - "Text" - ], + "input_types": ["Record", "Text"], "dynamic": false, "info": "Text or Record to be passed as output.", "load_from_db": false, @@ -807,28 +731,20 @@ "info": "Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "_type": "CustomComponent" }, "description": "Display a text output in the Playground.", "icon": "type", - "base_classes": [ - "str", - "Text", - "object" - ], + "base_classes": ["str", "Text", "object"], "display_name": "First Prompt", "documentation": "", "custom_fields": { "input_value": null, "record_template": null }, - "output_types": [ - "Text" - ], + "output_types": ["Text"], "field_formatters": {}, "frozen": false, "field_order": [], @@ -873,9 +789,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "code": { "type": "code", @@ -958,9 +872,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "openai_api_base": { "type": "str", @@ -979,9 +891,7 @@ "info": "The base URL of the OpenAI API. Defaults to https://api.openai.com/v1.\n\nYou can change this to use other APIs like JinaChat, LocalAI and Prem.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "openai_api_key": { "type": "str", @@ -1000,9 +910,7 @@ "info": "The OpenAI API Key to use for the OpenAI model.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "value": "OPENAI_API_KEY" }, "stream": { @@ -1041,9 +949,7 @@ "info": "System message to pass to the model.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "temperature": { "type": "float", @@ -1074,11 +980,7 @@ }, "description": "Generates text using OpenAI LLMs.", "icon": "OpenAI", - "base_classes": [ - "str", - "Text", - "object" - ], + "base_classes": ["str", "Text", "object"], "display_name": "OpenAI", "documentation": "", "custom_fields": { @@ -1092,9 +994,7 @@ "stream": null, "system_message": null }, - "output_types": [ - "Text" - ], + "output_types": ["Text"], "field_formatters": {}, "frozen": false, "field_order": [ @@ -1146,10 +1046,7 @@ "name": "input_value", "display_name": "Value", "advanced": false, - "input_types": [ - "Record", - "Text" - ], + "input_types": ["Record", "Text"], "dynamic": false, "info": "Text or Record to be passed as output.", "load_from_db": false, @@ -1191,28 +1088,20 @@ "info": "Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "_type": "CustomComponent" }, "description": "Display a text output in the Playground.", "icon": "type", - "base_classes": [ - "str", - "Text", - "object" - ], + "base_classes": ["str", "Text", "object"], "display_name": "Second Prompt", "documentation": "", "custom_fields": { "input_value": null, "record_template": null }, - "output_types": [ - "Text" - ], + "output_types": ["Text"], "field_formatters": {}, "frozen": false, "field_order": [], @@ -1257,9 +1146,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "code": { "type": "code", @@ -1342,9 +1229,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "openai_api_base": { "type": "str", @@ -1363,9 +1248,7 @@ "info": "The base URL of the OpenAI API. Defaults to https://api.openai.com/v1.\n\nYou can change this to use other APIs like JinaChat, LocalAI and Prem.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "openai_api_key": { "type": "str", @@ -1384,9 +1267,7 @@ "info": "The OpenAI API Key to use for the OpenAI model.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "value": "" }, "stream": { @@ -1425,9 +1306,7 @@ "info": "System message to pass to the model.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "temperature": { "type": "float", @@ -1458,11 +1337,7 @@ }, "description": "Generates text using OpenAI LLMs.", "icon": "OpenAI", - "base_classes": [ - "str", - "Text", - "object" - ], + "base_classes": ["str", "Text", "object"], "display_name": "OpenAI", "documentation": "", "custom_fields": { @@ -1476,9 +1351,7 @@ "stream": null, "system_message": null }, - "output_types": [ - "Text" - ], + "output_types": ["Text"], "field_formatters": {}, "frozen": false, "field_order": [ @@ -1516,20 +1389,11 @@ "targetHandle": { "fieldName": "document", "id": "Prompt-amqBu", - "inputTypes": [ - "Document", - "BaseOutputParser", - "Record", - "Text" - ], + "inputTypes": ["Document", "BaseOutputParser", "Record", "Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "str", - "Text", - "object" - ], + "baseClasses": ["str", "Text", "object"], "dataType": "TextInput", "id": "TextInput-sptaH" } @@ -1549,18 +1413,11 @@ "targetHandle": { "fieldName": "input_value", "id": "TextOutput-2MS4a", - "inputTypes": [ - "Record", - "Text" - ], + "inputTypes": ["Record", "Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "object", - "str", - "Text" - ], + "baseClasses": ["object", "str", "Text"], "dataType": "Prompt", "id": "Prompt-amqBu" } @@ -1580,17 +1437,11 @@ "targetHandle": { "fieldName": "input_value", "id": "OpenAIModel-uYXZJ", - "inputTypes": [ - "Text" - ], + "inputTypes": ["Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "object", - "str", - "Text" - ], + "baseClasses": ["object", "str", "Text"], "dataType": "Prompt", "id": "Prompt-amqBu" } @@ -1610,20 +1461,11 @@ "targetHandle": { "fieldName": "summary", "id": "Prompt-gTNiz", - "inputTypes": [ - "Document", - "BaseOutputParser", - "Record", - "Text" - ], + "inputTypes": ["Document", "BaseOutputParser", "Record", "Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "str", - "Text", - "object" - ], + "baseClasses": ["str", "Text", "object"], "dataType": "OpenAIModel", "id": "OpenAIModel-uYXZJ" } @@ -1643,17 +1485,11 @@ "targetHandle": { "fieldName": "input_value", "id": "ChatOutput-EJkG3", - "inputTypes": [ - "Text" - ], + "inputTypes": ["Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "str", - "Text", - "object" - ], + "baseClasses": ["str", "Text", "object"], "dataType": "OpenAIModel", "id": "OpenAIModel-uYXZJ" } @@ -1673,18 +1509,11 @@ "targetHandle": { "fieldName": "input_value", "id": "TextOutput-MUDOR", - "inputTypes": [ - "Record", - "Text" - ], + "inputTypes": ["Record", "Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "object", - "str", - "Text" - ], + "baseClasses": ["object", "str", "Text"], "dataType": "Prompt", "id": "Prompt-gTNiz" } @@ -1704,17 +1533,11 @@ "targetHandle": { "fieldName": "input_value", "id": "OpenAIModel-XawYB", - "inputTypes": [ - "Text" - ], + "inputTypes": ["Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "object", - "str", - "Text" - ], + "baseClasses": ["object", "str", "Text"], "dataType": "Prompt", "id": "Prompt-gTNiz" } @@ -1734,17 +1557,11 @@ "targetHandle": { "fieldName": "input_value", "id": "ChatOutput-DNmvg", - "inputTypes": [ - "Text" - ], + "inputTypes": ["Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "str", - "Text", - "object" - ], + "baseClasses": ["str", "Text", "object"], "dataType": "OpenAIModel", "id": "OpenAIModel-XawYB" } @@ -1766,4 +1583,4 @@ "name": "Prompt Chaining", "last_tested_version": "1.0.0a0", "is_component": false -} \ No newline at end of file +} diff --git a/src/backend/base/langflow/initial_setup/starter_projects/VectorStore-RAG-Flows.json b/src/backend/base/langflow/initial_setup/starter_projects/VectorStore-RAG-Flows.json index 656c50514..4bd5931f1 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/VectorStore-RAG-Flows.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/VectorStore-RAG-Flows.json @@ -81,10 +81,7 @@ "fileTypes": [], "file_path": "", "password": false, - "options": [ - "Machine", - "User" - ], + "options": ["Machine", "User"], "name": "sender", "display_name": "Sender Type", "advanced": true, @@ -92,9 +89,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "sender_name": { "type": "str", @@ -114,9 +109,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "session_id": { "type": "str", @@ -135,20 +128,13 @@ "info": "If provided, the message will be stored in the memory.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "_type": "CustomComponent" }, "description": "Get chat inputs from the Playground.", "icon": "ChatInput", - "base_classes": [ - "Text", - "str", - "object", - "Record" - ], + "base_classes": ["Text", "str", "object", "Record"], "display_name": "Chat Input", "documentation": "", "custom_fields": { @@ -158,10 +144,7 @@ "session_id": null, "return_record": null }, - "output_types": [ - "Text", - "Record" - ], + "output_types": ["Text", "Record"], "field_formatters": {}, "frozen": false, "field_order": [], @@ -198,10 +181,7 @@ "name": "input_value", "display_name": "Value", "advanced": false, - "input_types": [ - "Record", - "Text" - ], + "input_types": ["Record", "Text"], "dynamic": false, "info": "Text or Record to be passed as output.", "load_from_db": false, @@ -243,28 +223,20 @@ "info": "Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "_type": "CustomComponent" }, "description": "Display a text output in the Playground.", "icon": "type", - "base_classes": [ - "object", - "Text", - "str" - ], + "base_classes": ["object", "Text", "str"], "display_name": "Extracted Chunks", "documentation": "", "custom_fields": { "input_value": null, "record_template": null }, - "output_types": [ - "Text" - ], + "output_types": ["Text"], "field_formatters": {}, "frozen": false, "field_order": [], @@ -310,9 +282,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "chunk_size": { "type": "int", @@ -424,9 +394,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "disallowed_special": { "type": "str", @@ -435,9 +403,7 @@ "list": false, "show": true, "multiline": false, - "value": [ - "all" - ], + "value": ["all"], "fileTypes": [], "file_path": "", "password": false, @@ -448,9 +414,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "embedding_ctx_length": { "type": "int", @@ -513,9 +477,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "model_kwargs": { "type": "NestedDict", @@ -553,9 +515,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "openai_api_key": { "type": "str", @@ -574,9 +534,7 @@ "info": "", "load_from_db": true, "title_case": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "value": "OPENAI_API_KEY" }, "openai_api_type": { @@ -596,9 +554,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "openai_api_version": { "type": "str", @@ -617,9 +573,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "openai_organization": { "type": "str", @@ -638,9 +592,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "openai_proxy": { "type": "str", @@ -659,9 +611,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "request_timeout": { "type": "float", @@ -761,16 +711,12 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "_type": "CustomComponent" }, "description": "Generate embeddings using OpenAI models.", - "base_classes": [ - "Embeddings" - ], + "base_classes": ["Embeddings"], "display_name": "OpenAI Embeddings", "documentation": "", "custom_fields": { @@ -797,9 +743,7 @@ "tiktoken_enable": null, "tiktoken_model_name": null }, - "output_types": [ - "Embeddings" - ], + "output_types": ["Embeddings"], "field_formatters": {}, "frozen": false, "field_order": [], @@ -840,9 +784,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "code": { "type": "code", @@ -925,9 +867,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "openai_api_base": { "type": "str", @@ -946,9 +886,7 @@ "info": "The base URL of the OpenAI API. Defaults to https://api.openai.com/v1.\n\nYou can change this to use other APIs like JinaChat, LocalAI and Prem.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "openai_api_key": { "type": "str", @@ -967,9 +905,7 @@ "info": "The OpenAI API Key to use for the OpenAI model.", "load_from_db": true, "title_case": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "value": "OPENAI_API_KEY" }, "stream": { @@ -1008,9 +944,7 @@ "info": "System message to pass to the model.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "temperature": { "type": "float", @@ -1041,11 +975,7 @@ }, "description": "Generates text using OpenAI LLMs.", "icon": "OpenAI", - "base_classes": [ - "object", - "Text", - "str" - ], + "base_classes": ["object", "Text", "str"], "display_name": "OpenAI", "documentation": "", "custom_fields": { @@ -1059,9 +989,7 @@ "stream": null, "system_message": null }, - "output_types": [ - "Text" - ], + "output_types": ["Text"], "field_formatters": {}, "frozen": false, "field_order": [ @@ -1131,9 +1059,7 @@ "name": "template", "display_name": "Template", "advanced": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "dynamic": false, "info": "", "load_from_db": false, @@ -1198,23 +1124,14 @@ "is_input": null, "is_output": null, "is_composition": null, - "base_classes": [ - "object", - "Text", - "str" - ], + "base_classes": ["object", "Text", "str"], "name": "", "display_name": "Prompt", "documentation": "", "custom_fields": { - "template": [ - "context", - "question" - ] + "template": ["context", "question"] }, - "output_types": [ - "Text" - ], + "output_types": ["Text"], "full_path": null, "field_formatters": {}, "frozen": false, @@ -1277,9 +1194,7 @@ "name": "input_value", "display_name": "Message", "advanced": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "dynamic": false, "info": "", "load_from_db": false, @@ -1303,9 +1218,7 @@ "info": "In case of Message being a Record, this template will be used to convert it to text.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "return_record": { "type": "bool", @@ -1337,10 +1250,7 @@ "fileTypes": [], "file_path": "", "password": false, - "options": [ - "Machine", - "User" - ], + "options": ["Machine", "User"], "name": "sender", "display_name": "Sender Type", "advanced": true, @@ -1348,9 +1258,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "sender_name": { "type": "str", @@ -1370,9 +1278,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "session_id": { "type": "str", @@ -1391,20 +1297,13 @@ "info": "If provided, the message will be stored in the memory.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "_type": "CustomComponent" }, "description": "Display a chat message in the Playground.", "icon": "ChatOutput", - "base_classes": [ - "object", - "Text", - "Record", - "str" - ], + "base_classes": ["object", "Text", "Record", "str"], "display_name": "Chat Output", "documentation": "", "custom_fields": { @@ -1415,10 +1314,7 @@ "return_record": null, "record_template": null }, - "output_types": [ - "Text", - "Record" - ], + "output_types": ["Text", "Record"], "field_formatters": {}, "frozen": false, "field_order": [], @@ -1525,18 +1421,14 @@ }, "description": "A generic file loader.", "icon": "file-text", - "base_classes": [ - "Record" - ], + "base_classes": ["Record"], "display_name": "File", "documentation": "", "custom_fields": { "path": null, "silent_errors": null }, - "output_types": [ - "Record" - ], + "output_types": ["Record"], "field_formatters": {}, "frozen": false, "field_order": [], @@ -1577,10 +1469,7 @@ "name": "inputs", "display_name": "Input", "advanced": false, - "input_types": [ - "Document", - "Record" - ], + "input_types": ["Document", "Record"], "dynamic": false, "info": "The texts to split.", "load_from_db": false, @@ -1659,19 +1548,13 @@ "info": "The characters to split on.\nIf left empty defaults to [\"\\n\\n\", \"\\n\", \" \", \"\"].", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ], - "value": [ - "" - ] + "input_types": ["Text"], + "value": [""] }, "_type": "CustomComponent" }, "description": "Split text into chunks of a specified length.", - "base_classes": [ - "Record" - ], + "base_classes": ["Record"], "display_name": "Recursive Character Text Splitter", "documentation": "https://docs.langflow.org/components/text-splitters#recursivecharactertextsplitter", "custom_fields": { @@ -1680,9 +1563,7 @@ "chunk_size": null, "chunk_overlap": null }, - "output_types": [ - "Record" - ], + "output_types": ["Record"], "field_formatters": {}, "frozen": false, "field_order": [], @@ -1745,9 +1626,7 @@ "info": "Input value to search", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "api_endpoint": { "type": "str", @@ -1766,9 +1645,7 @@ "info": "API endpoint URL for the Astra DB service.", "load_from_db": true, "title_case": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "value": "ASTRA_DB_API_ENDPOINT" }, "batch_size": { @@ -1896,9 +1773,7 @@ "info": "The name of the collection within Astra DB where the vectors will be stored.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "value": "langflow" }, "metadata_indexing_exclude": { @@ -1918,9 +1793,7 @@ "info": "Optional list of metadata fields to exclude from the indexing.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "metadata_indexing_include": { "type": "str", @@ -1939,9 +1812,7 @@ "info": "Optional list of metadata fields to include in the indexing.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "metric": { "type": "str", @@ -1960,9 +1831,7 @@ "info": "Optional distance metric for vector comparisons in the vector store.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "namespace": { "type": "str", @@ -1981,9 +1850,7 @@ "info": "Optional namespace within Astra DB to use for the collection.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "number_of_results": { "type": "int", @@ -2034,10 +1901,7 @@ "fileTypes": [], "file_path": "", "password": false, - "options": [ - "Similarity", - "MMR" - ], + "options": ["Similarity", "MMR"], "name": "search_type", "display_name": "Search Type", "advanced": false, @@ -2045,9 +1909,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "setup_mode": { "type": "str", @@ -2060,11 +1922,7 @@ "fileTypes": [], "file_path": "", "password": false, - "options": [ - "Sync", - "Async", - "Off" - ], + "options": ["Sync", "Async", "Off"], "name": "setup_mode", "display_name": "Setup Mode", "advanced": true, @@ -2072,9 +1930,7 @@ "info": "Configuration mode for setting up the vector store, with options like “Sync”, “Async”, or “Off”.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "token": { "type": "str", @@ -2093,18 +1949,14 @@ "info": "Authentication token for accessing Astra DB.", "load_from_db": true, "title_case": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "value": "ASTRA_DB_APPLICATION_TOKEN" }, "_type": "CustomComponent" }, "description": "Searches an existing Astra DB Vector Store.", "icon": "AstraDB", - "base_classes": [ - "Record" - ], + "base_classes": ["Record"], "display_name": "Astra DB Search", "documentation": "", "custom_fields": { @@ -2127,9 +1979,7 @@ "metadata_indexing_exclude": null, "collection_indexing_policy": null }, - "output_types": [ - "Record" - ], + "output_types": ["Record"], "field_formatters": {}, "frozen": false, "field_order": [ @@ -2216,9 +2066,7 @@ "info": "API endpoint URL for the Astra DB service.", "load_from_db": true, "title_case": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "value": "ASTRA_DB_API_ENDPOINT" }, "batch_size": { @@ -2346,9 +2194,7 @@ "info": "The name of the collection within Astra DB where the vectors will be stored.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "value": "langflow" }, "metadata_indexing_exclude": { @@ -2368,9 +2214,7 @@ "info": "Optional list of metadata fields to exclude from the indexing.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "metadata_indexing_include": { "type": "str", @@ -2389,9 +2233,7 @@ "info": "Optional list of metadata fields to include in the indexing.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "metric": { "type": "str", @@ -2410,9 +2252,7 @@ "info": "Optional distance metric for vector comparisons in the vector store.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "namespace": { "type": "str", @@ -2431,9 +2271,7 @@ "info": "Optional namespace within Astra DB to use for the collection.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "pre_delete_collection": { "type": "bool", @@ -2465,11 +2303,7 @@ "fileTypes": [], "file_path": "", "password": false, - "options": [ - "Sync", - "Async", - "Off" - ], + "options": ["Sync", "Async", "Off"], "name": "setup_mode", "display_name": "Setup Mode", "advanced": true, @@ -2477,9 +2311,7 @@ "info": "Configuration mode for setting up the vector store, with options like “Sync”, “Async”, or “Off”.", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "token": { "type": "str", @@ -2498,18 +2330,14 @@ "info": "Authentication token for accessing Astra DB.", "load_from_db": true, "title_case": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "value": "ASTRA_DB_APPLICATION_TOKEN" }, "_type": "CustomComponent" }, "description": "Builds or loads an Astra DB Vector Store.", "icon": "AstraDB", - "base_classes": [ - "VectorStore" - ], + "base_classes": ["VectorStore"], "display_name": "Astra DB", "documentation": "", "custom_fields": { @@ -2530,9 +2358,7 @@ "metadata_indexing_exclude": null, "collection_indexing_policy": null }, - "output_types": [ - "VectorStore" - ], + "output_types": ["VectorStore"], "field_formatters": {}, "frozen": false, "field_order": [ @@ -2584,9 +2410,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "chunk_size": { "type": "int", @@ -2698,9 +2522,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "disallowed_special": { "type": "str", @@ -2709,9 +2531,7 @@ "list": false, "show": true, "multiline": false, - "value": [ - "all" - ], + "value": ["all"], "fileTypes": [], "file_path": "", "password": false, @@ -2722,9 +2542,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "embedding_ctx_length": { "type": "int", @@ -2787,9 +2605,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "model_kwargs": { "type": "NestedDict", @@ -2827,9 +2643,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "openai_api_key": { "type": "str", @@ -2848,9 +2662,7 @@ "info": "", "load_from_db": true, "title_case": false, - "input_types": [ - "Text" - ], + "input_types": ["Text"], "value": "OPENAI_API_KEY" }, "openai_api_type": { @@ -2870,9 +2682,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "openai_api_version": { "type": "str", @@ -2891,9 +2701,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "openai_organization": { "type": "str", @@ -2912,9 +2720,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "openai_proxy": { "type": "str", @@ -2933,9 +2739,7 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "request_timeout": { "type": "float", @@ -3035,16 +2839,12 @@ "info": "", "load_from_db": false, "title_case": false, - "input_types": [ - "Text" - ] + "input_types": ["Text"] }, "_type": "CustomComponent" }, "description": "Generate embeddings using OpenAI models.", - "base_classes": [ - "Embeddings" - ], + "base_classes": ["Embeddings"], "display_name": "OpenAI Embeddings", "documentation": "", "custom_fields": { @@ -3071,9 +2871,7 @@ "tiktoken_enable": null, "tiktoken_model_name": null }, - "output_types": [ - "Embeddings" - ], + "output_types": ["Embeddings"], "field_formatters": {}, "frozen": false, "field_order": [], @@ -3102,20 +2900,11 @@ "targetHandle": { "fieldName": "context", "id": "Prompt-xeI6K", - "inputTypes": [ - "Document", - "BaseOutputParser", - "Record", - "Text" - ], + "inputTypes": ["Document", "BaseOutputParser", "Record", "Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "object", - "Text", - "str" - ], + "baseClasses": ["object", "Text", "str"], "dataType": "TextOutput", "id": "TextOutput-BDknO" } @@ -3136,21 +2925,11 @@ "targetHandle": { "fieldName": "question", "id": "Prompt-xeI6K", - "inputTypes": [ - "Document", - "BaseOutputParser", - "Record", - "Text" - ], + "inputTypes": ["Document", "BaseOutputParser", "Record", "Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "Text", - "str", - "object", - "Record" - ], + "baseClasses": ["Text", "str", "object", "Record"], "dataType": "ChatInput", "id": "ChatInput-yxMKE" } @@ -3171,17 +2950,11 @@ "targetHandle": { "fieldName": "input_value", "id": "OpenAIModel-EjXlN", - "inputTypes": [ - "Text" - ], + "inputTypes": ["Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "object", - "Text", - "str" - ], + "baseClasses": ["object", "Text", "str"], "dataType": "Prompt", "id": "Prompt-xeI6K" } @@ -3202,17 +2975,11 @@ "targetHandle": { "fieldName": "input_value", "id": "ChatOutput-Q39I8", - "inputTypes": [ - "Text" - ], + "inputTypes": ["Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "object", - "Text", - "str" - ], + "baseClasses": ["object", "Text", "str"], "dataType": "OpenAIModel", "id": "OpenAIModel-EjXlN" } @@ -3233,16 +3000,11 @@ "targetHandle": { "fieldName": "inputs", "id": "RecursiveCharacterTextSplitter-tR9QM", - "inputTypes": [ - "Document", - "Record" - ], + "inputTypes": ["Document", "Record"], "type": "Document" }, "sourceHandle": { - "baseClasses": [ - "Record" - ], + "baseClasses": ["Record"], "dataType": "File", "id": "File-t0a6a" } @@ -3266,9 +3028,7 @@ "type": "Embeddings" }, "sourceHandle": { - "baseClasses": [ - "Embeddings" - ], + "baseClasses": ["Embeddings"], "dataType": "OpenAIEmbeddings", "id": "OpenAIEmbeddings-ZlOk1" } @@ -3288,18 +3048,11 @@ "targetHandle": { "fieldName": "input_value", "id": "AstraDBSearch-41nRz", - "inputTypes": [ - "Text" - ], + "inputTypes": ["Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "Text", - "str", - "object", - "Record" - ], + "baseClasses": ["Text", "str", "object", "Record"], "dataType": "ChatInput", "id": "ChatInput-yxMKE" } @@ -3323,9 +3076,7 @@ "type": "Record" }, "sourceHandle": { - "baseClasses": [ - "Record" - ], + "baseClasses": ["Record"], "dataType": "RecursiveCharacterTextSplitter", "id": "RecursiveCharacterTextSplitter-tR9QM" } @@ -3350,9 +3101,7 @@ "type": "Embeddings" }, "sourceHandle": { - "baseClasses": [ - "Embeddings" - ], + "baseClasses": ["Embeddings"], "dataType": "OpenAIEmbeddings", "id": "OpenAIEmbeddings-9TPjc" } @@ -3373,16 +3122,11 @@ "targetHandle": { "fieldName": "input_value", "id": "TextOutput-BDknO", - "inputTypes": [ - "Record", - "Text" - ], + "inputTypes": ["Record", "Text"], "type": "str" }, "sourceHandle": { - "baseClasses": [ - "Record" - ], + "baseClasses": ["Record"], "dataType": "AstraDBSearch", "id": "AstraDBSearch-41nRz" } @@ -3404,4 +3148,4 @@ "name": "Vector Store RAG", "last_tested_version": "1.0.0a0", "is_component": false -} \ No newline at end of file +} diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsx index 36f2ad9f9..4a60f453f 100644 --- a/src/frontend/src/App.tsx +++ b/src/frontend/src/App.tsx @@ -29,10 +29,10 @@ export default function App() { useTrackLastVisitedPath(); const removeFromTempNotificationList = useAlertStore( - (state) => state.removeFromTempNotificationList + (state) => state.removeFromTempNotificationList, ); const tempNotificationList = useAlertStore( - (state) => state.tempNotificationList + (state) => state.tempNotificationList, ); const [fetchError, setFetchError] = useState(false); const isLoading = useFlowsManagerStore((state) => state.isLoading); @@ -50,7 +50,7 @@ export default function App() { const refreshVersion = useDarkStore((state) => state.refreshVersion); const refreshStars = useDarkStore((state) => state.refreshStars); const setGlobalVariables = useGlobalVariablesStore( - (state) => state.setGlobalVariables + (state) => state.setGlobalVariables, ); const checkHasStore = useStoreStore((state) => state.checkHasStore); const navigate = useNavigate(); diff --git a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx index fc94b7b87..be62de826 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx @@ -98,7 +98,7 @@ export default function ParameterComponent({ debouncedHandleUpdateValues, setNode, renderTooltips, - setIsLoading + setIsLoading, ); const { handleNodeClass: handleNodeClassHook } = useHandleNodeClass( @@ -107,7 +107,7 @@ export default function ParameterComponent({ takeSnapshot, setNode, updateNodeInternals, - renderTooltips + renderTooltips, ); const { handleRefreshButtonPress: handleRefreshButtonPressHook } = @@ -116,7 +116,7 @@ export default function ParameterComponent({ let disabled = edges.some( (edge) => - edge.targetHandle === scapedJSONStringfy(proxy ? { ...id, proxy } : id) + edge.targetHandle === scapedJSONStringfy(proxy ? { ...id, proxy } : id), ) ?? false; const handleRefreshButtonPress = async (name, data) => { @@ -129,12 +129,12 @@ export default function ParameterComponent({ handleUpdateValues, setNode, renderTooltips, - setIsLoading + setIsLoading, ); const handleOnNewValue = async ( newValue: string | string[] | boolean | Object[], - skipSnapshot: boolean | undefined = false + skipSnapshot: boolean | undefined = false, ): Promise => { handleOnNewValueHook(newValue, skipSnapshot); }; @@ -216,7 +216,7 @@ export default function ParameterComponent({ className={classNames( left ? "my-12 -ml-0.5 " : " my-12 -mr-0.5 ", "h-3 w-3 rounded-full border-2 bg-background", - !showNode ? "mt-0" : "" + !showNode ? "mt-0" : "", )} style={{ borderColor: color ?? nodeColors.unknown, @@ -284,7 +284,7 @@ export default function ParameterComponent({ "h-5 w-5 rounded-md", displayOutputPreview && !unknownOutput ? " hover:bg-secondary-foreground/5 hover:text-medium-indigo" - : " cursor-not-allowed text-muted-foreground" + : " cursor-not-allowed text-muted-foreground", )} name={"ScanEye"} /> @@ -334,7 +334,7 @@ export default function ParameterComponent({ } className={classNames( left ? "-ml-0.5" : "-mr-0.5", - "h-3 w-3 rounded-full border-2 bg-background" + "h-3 w-3 rounded-full border-2 bg-background", )} style={{ borderColor: color ?? nodeColors.unknown }} onClick={() => setFilterEdge(groupedEdge.current)} diff --git a/src/frontend/src/CustomNodes/GenericNode/components/tooltipRenderComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/tooltipRenderComponent/index.tsx index c76bc7293..ed2760161 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/tooltipRenderComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/tooltipRenderComponent/index.tsx @@ -24,7 +24,7 @@ const TooltipRenderComponent = ({ item, index, left }) => { 0 ? "mt-2 flex items-center" : "mt-3 flex items-center" + index > 0 ? "mt-2 flex items-center" : "mt-3 flex items-center", )} >
void, - types + types, ) => { useEffect(() => { // This one should run only once diff --git a/src/frontend/src/CustomNodes/hooks/use-fetch-data-on-mount.tsx b/src/frontend/src/CustomNodes/hooks/use-fetch-data-on-mount.tsx index 7426164f7..be239df8a 100644 --- a/src/frontend/src/CustomNodes/hooks/use-fetch-data-on-mount.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-fetch-data-on-mount.tsx @@ -9,7 +9,7 @@ const useFetchDataOnMount = ( handleUpdateValues, setNode, renderTooltips, - setIsLoading + setIsLoading, ) => { const setErrorData = useAlertStore((state) => state.setErrorData); diff --git a/src/frontend/src/CustomNodes/hooks/use-handle-new-value.tsx b/src/frontend/src/CustomNodes/hooks/use-handle-new-value.tsx index dc416646b..e917970ca 100644 --- a/src/frontend/src/CustomNodes/hooks/use-handle-new-value.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-handle-new-value.tsx @@ -10,7 +10,7 @@ const useHandleOnNewValue = ( debouncedHandleUpdateValues, setNode, renderTooltips, - setIsLoading + setIsLoading, ) => { const setErrorData = useAlertStore((state) => state.setErrorData); diff --git a/src/frontend/src/CustomNodes/hooks/use-handle-node-class.tsx b/src/frontend/src/CustomNodes/hooks/use-handle-node-class.tsx index bdcf1f8cc..412658d77 100644 --- a/src/frontend/src/CustomNodes/hooks/use-handle-node-class.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-handle-node-class.tsx @@ -6,7 +6,7 @@ const useHandleNodeClass = ( takeSnapshot, setNode, updateNodeInternals, - renderTooltips + renderTooltips, ) => { const handleNodeClass = (newNodeClass, code) => { if (!data.node) return; diff --git a/src/frontend/src/CustomNodes/hooks/use-icon-render.tsx b/src/frontend/src/CustomNodes/hooks/use-icon-render.tsx index cc9e29c0e..181b4f515 100644 --- a/src/frontend/src/CustomNodes/hooks/use-icon-render.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-icon-render.tsx @@ -12,8 +12,8 @@ const useIconNodeRender = ( checkNodeIconFragment: ( iconColor: string, iconName: string, - iconClassName: string - ) => JSX.Element + iconClassName: string, + ) => JSX.Element, ) => { const iconNodeRender = useCallback(() => { const iconElement = data?.node?.icon; diff --git a/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx b/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx index 9915c9074..ec378fac2 100644 --- a/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx @@ -7,7 +7,7 @@ import { VertexBuildTypeAPI } from "../../types/api"; const useIconStatus = ( buildStatus: BuildStatus | undefined, - validationStatus: VertexBuildTypeAPI | null + validationStatus: VertexBuildTypeAPI | null, ) => { const renderIconStatus = () => { if (buildStatus === BuildStatus.BUILDING) { diff --git a/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx b/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx index a4c742273..28220d141 100644 --- a/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx @@ -7,7 +7,7 @@ const useUpdateNodeCode = ( dataNode: APIClassType, // Define YourNodeType according to your data structure setNode: (id: string, callback: (oldNode) => any) => void, setIsOutdated: (value: boolean) => void, - updateNodeInternals: (id: string) => void + updateNodeInternals: (id: string) => void, ) => { const updateNodeCode = useCallback( (newNodeClass: APIClassType, code: string, name: string) => { @@ -29,7 +29,7 @@ const useUpdateNodeCode = ( updateNodeInternals(dataId); }, - [dataId, dataNode, setNode, setIsOutdated, updateNodeInternals] + [dataId, dataNode, setNode, setIsOutdated, updateNodeInternals], ); return updateNodeCode; diff --git a/src/frontend/src/CustomNodes/utils/get-field-title.tsx b/src/frontend/src/CustomNodes/utils/get-field-title.tsx index a00829a90..e448c4f01 100644 --- a/src/frontend/src/CustomNodes/utils/get-field-title.tsx +++ b/src/frontend/src/CustomNodes/utils/get-field-title.tsx @@ -2,7 +2,7 @@ import { APITemplateType } from "../../types/api"; export default function getFieldTitle( template: APITemplateType, - templateField: string + templateField: string, ): string { return template[templateField].display_name ? template[templateField].display_name! diff --git a/src/frontend/src/alerts/alertDropDown/index.tsx b/src/frontend/src/alerts/alertDropDown/index.tsx index 6eff32fe2..05f42922d 100644 --- a/src/frontend/src/alerts/alertDropDown/index.tsx +++ b/src/frontend/src/alerts/alertDropDown/index.tsx @@ -16,13 +16,13 @@ export default function AlertDropdown({ }: AlertDropdownType): JSX.Element { const notificationList = useAlertStore((state) => state.notificationList); const clearNotificationList = useAlertStore( - (state) => state.clearNotificationList + (state) => state.clearNotificationList, ); const removeFromNotificationList = useAlertStore( - (state) => state.removeFromNotificationList + (state) => state.removeFromNotificationList, ); const setNotificationCenter = useAlertStore( - (state) => state.setNotificationCenter + (state) => state.setNotificationCenter, ); const [open, setOpen] = useState(false); diff --git a/src/frontend/src/components/ImageViewer/index.tsx b/src/frontend/src/components/ImageViewer/index.tsx index dc7f41ad7..8433962a7 100644 --- a/src/frontend/src/components/ImageViewer/index.tsx +++ b/src/frontend/src/components/ImageViewer/index.tsx @@ -31,14 +31,14 @@ export default function ImageViewer({ image }) { const fullPageButton = document.getElementById("full-page-button"); zoomInButton!.addEventListener("click", () => - viewer.viewport.zoomBy(1.2) + viewer.viewport.zoomBy(1.2), ); zoomOutButton!.addEventListener("click", () => - viewer.viewport.zoomBy(0.8) + viewer.viewport.zoomBy(0.8), ); homeButton!.addEventListener("click", () => viewer.viewport.goHome()); fullPageButton!.addEventListener("click", () => - viewer.setFullScreen(true) + viewer.setFullScreen(true), ); // Optionally, you can set additional viewer options here @@ -47,16 +47,16 @@ export default function ImageViewer({ image }) { return () => { viewer.destroy(); zoomInButton!.removeEventListener("click", () => - viewer.viewport.zoomBy(1.2) + viewer.viewport.zoomBy(1.2), ); zoomOutButton!.removeEventListener("click", () => - viewer.viewport.zoomBy(0.8) + viewer.viewport.zoomBy(0.8), ); homeButton!.removeEventListener("click", () => - viewer.viewport.goHome() + viewer.viewport.goHome(), ); fullPageButton!.removeEventListener("click", () => - viewer.setFullScreen(true) + viewer.setFullScreen(true), ); }; } diff --git a/src/frontend/src/components/accordionComponent/composite/folderAccordionComponent/index.tsx b/src/frontend/src/components/accordionComponent/composite/folderAccordionComponent/index.tsx index 212a03fa2..d4fb95b5c 100644 --- a/src/frontend/src/components/accordionComponent/composite/folderAccordionComponent/index.tsx +++ b/src/frontend/src/components/accordionComponent/composite/folderAccordionComponent/index.tsx @@ -15,7 +15,7 @@ export default function FolderAccordionComponent({ options, }: AccordionComponentType): JSX.Element { const [value, setValue] = useState( - open.length === 0 ? "" : getOpenAccordion() + open.length === 0 ? "" : getOpenAccordion(), ); function getOpenAccordion(): string { diff --git a/src/frontend/src/components/accordionComponent/index.tsx b/src/frontend/src/components/accordionComponent/index.tsx index 43a0aef79..c9c21b8b2 100644 --- a/src/frontend/src/components/accordionComponent/index.tsx +++ b/src/frontend/src/components/accordionComponent/index.tsx @@ -17,7 +17,7 @@ export default function AccordionComponent({ sideBar, }: AccordionComponentType): JSX.Element { const [value, setValue] = useState( - open.length === 0 ? "" : getOpenAccordion() + open.length === 0 ? "" : getOpenAccordion(), ); function getOpenAccordion(): string { @@ -52,7 +52,7 @@ export default function AccordionComponent({ disabled={disabled} className={cn( sideBar ? "w-full bg-muted px-[0.75rem] py-[0.5rem]" : "ml-3", - disabled ? "cursor-not-allowed" : "cursor-pointer" + disabled ? "cursor-not-allowed" : "cursor-pointer", )} > {trigger} diff --git a/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx b/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx index 61dada650..36b68a7e8 100644 --- a/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx +++ b/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx @@ -23,19 +23,19 @@ export default function AddNewVariableButton({ children }): JSX.Element { const setErrorData = useAlertStore((state) => state.setErrorData); const componentFields = useTypesStore((state) => state.ComponentFields); const unavaliableFields = new Set( - Object.keys(useGlobalVariablesStore((state) => state.unavaliableFields)) + Object.keys(useGlobalVariablesStore((state) => state.unavaliableFields)), ); const availableFields = () => { const fields = Array.from(componentFields).filter( - (field) => !unavaliableFields.has(field) + (field) => !unavaliableFields.has(field), ); return sortByName(fields); }; const addGlobalVariable = useGlobalVariablesStore( - (state) => state.addGlobalVariable + (state) => state.addGlobalVariable, ); function handleSaveVariable() { diff --git a/src/frontend/src/components/cardComponent/components/dragCardComponent/index.tsx b/src/frontend/src/components/cardComponent/components/dragCardComponent/index.tsx index 54dbf4846..28674f3bc 100644 --- a/src/frontend/src/components/cardComponent/components/dragCardComponent/index.tsx +++ b/src/frontend/src/components/cardComponent/components/dragCardComponent/index.tsx @@ -10,7 +10,7 @@ export default function DragCardComponent({ data }: { data: storeComponent }) { draggable //TODO check color schema className={cn( - "group relative flex flex-col justify-between overflow-hidden transition-all hover:bg-muted/50 hover:shadow-md hover:dark:bg-[#ffffff10]" + "group relative flex flex-col justify-between overflow-hidden transition-all hover:bg-muted/50 hover:shadow-md hover:dark:bg-[#ffffff10]", )} >
@@ -22,7 +22,7 @@ export default function DragCardComponent({ data }: { data: storeComponent }) { "visible flex-shrink-0", data.is_component ? "mx-0.5 h-6 w-6 text-component-icon" - : "h-7 w-7 flex-shrink-0 text-flow-icon" + : "h-7 w-7 flex-shrink-0 text-flow-icon", )} name={data.is_component ? "ToyBrick" : "Group"} /> diff --git a/src/frontend/src/components/cardComponent/index.tsx b/src/frontend/src/components/cardComponent/index.tsx index a5d671aa0..8b16d9040 100644 --- a/src/frontend/src/components/cardComponent/index.tsx +++ b/src/frontend/src/components/cardComponent/index.tsx @@ -60,11 +60,11 @@ export default function CollectionCardComponent({ const [loading, setLoading] = useState(false); const [loadingLike, setLoadingLike] = useState(false); const [liked_by_user, setLiked_by_user] = useState( - data?.liked_by_user ?? false + data?.liked_by_user ?? false, ); const [likes_count, setLikes_count] = useState(data?.liked_by_count ?? 0); const [downloads_count, setDownloads_count] = useState( - data?.downloads_count ?? 0 + data?.downloads_count ?? 0, ); const currentFlow = useFlowsManagerStore((state) => state.currentFlow); const setCurrentFlow = useFlowsManagerStore((state) => state.setCurrentFlow); @@ -75,12 +75,12 @@ export default function CollectionCardComponent({ const [openPlayground, setOpenPlayground] = useState(false); const [openDelete, setOpenDelete] = useState(false); const setCurrentFlowId = useFlowsManagerStore( - (state) => state.setCurrentFlowId + (state) => state.setCurrentFlowId, ); const [loadingPlayground, setLoadingPlayground] = useState(false); const selectedFlowsComponentsCards = useFlowsManagerStore( - (state) => state.selectedFlowsComponentsCards + (state) => state.selectedFlowsComponentsCards, ); const name = data.is_component ? "Component" : "Flow"; @@ -220,7 +220,7 @@ export default function CollectionCardComponent({ "group relative flex min-h-[11rem] flex-col justify-between overflow-hidden transition-all hover:bg-muted/50 hover:shadow-md hover:dark:bg-[#ffffff10]", disabled ? "pointer-events-none opacity-50" : "", onClick ? "cursor-pointer" : "", - isSelectedCard ? "border border-selected" : "" + isSelectedCard ? "border border-selected" : "", )} onClick={onClick} > @@ -233,7 +233,7 @@ export default function CollectionCardComponent({ "visible flex-shrink-0", data.is_component ? "mx-0.5 h-6 w-6 text-component-icon" - : "h-7 w-7 flex-shrink-0 text-flow-icon" + : "h-7 w-7 flex-shrink-0 text-flow-icon", )} name={data.is_component ? "ToyBrick" : "Group"} /> @@ -428,7 +428,7 @@ export default function CollectionCardComponent({ name="Trash2" className={cn( "h-5 w-5", - !authorized ? " text-ring" : "" + !authorized ? " text-ring" : "", )} /> @@ -463,7 +463,7 @@ export default function CollectionCardComponent({ liked_by_user ? "fill-destructive stroke-destructive" : "", - !authorized ? " text-ring" : "" + !authorized ? " text-ring" : "", )} /> @@ -501,7 +501,7 @@ export default function CollectionCardComponent({ } className={cn( loading ? "h-5 w-5 animate-spin" : "h-5 w-5", - !authorized ? " text-ring" : "" + !authorized ? " text-ring" : "", )} /> diff --git a/src/frontend/src/components/cardsWrapComponent/index.tsx b/src/frontend/src/components/cardsWrapComponent/index.tsx index 0de3f1a2f..c7ca01588 100644 --- a/src/frontend/src/components/cardsWrapComponent/index.tsx +++ b/src/frontend/src/components/cardsWrapComponent/index.tsx @@ -65,7 +65,7 @@ export default function CardsWrapComponent({ "h-full w-full", isDragging ? "mb-36 flex flex-col items-center justify-center gap-4 text-2xl font-light" - : "" + : "", )} > {isDragging ? ( diff --git a/src/frontend/src/components/chatComponent/index.tsx b/src/frontend/src/components/chatComponent/index.tsx index 1fa82e9dd..81dade485 100644 --- a/src/frontend/src/components/chatComponent/index.tsx +++ b/src/frontend/src/components/chatComponent/index.tsx @@ -50,7 +50,7 @@ export default function FlowToolbar(): JSX.Element { "relative inline-flex h-full w-full items-center justify-center gap-[4px] bg-muted px-5 py-3 text-sm font-semibold text-foreground transition-all duration-150 ease-in-out hover:bg-background hover:bg-hover ", !hasApiKey || !validApiKey || !hasStore ? " button-disable text-muted-foreground " - : "" + : "", )} > Share ), - [hasApiKey, validApiKey, currentFlow, hasStore] + [hasApiKey, validApiKey, currentFlow, hasStore], ); return ( @@ -118,7 +118,7 @@ export default function FlowToolbar(): JSX.Element {
{ if (disabled && myValue !== "") { diff --git a/src/frontend/src/components/codeTabsComponent/index.tsx b/src/frontend/src/components/codeTabsComponent/index.tsx index 9f1fc99b6..0a0b691c8 100644 --- a/src/frontend/src/components/codeTabsComponent/index.tsx +++ b/src/frontend/src/components/codeTabsComponent/index.tsx @@ -236,7 +236,7 @@ export default function CodeTabsComponent({
{data?.map((node: any, i) => ( @@ -275,8 +275,8 @@ export default function CodeTabsComponent({ .show && LANGFLOW_SUPPORTED_TYPES.has( node.data.node.template[templateField] - .type - ) + .type, + ), ) .map((templateField, indx) => { return ( @@ -334,7 +334,7 @@ export default function CodeTabsComponent({ target, node.data.node.template[ templateField - ] + ], ); }} /> @@ -380,7 +380,7 @@ export default function CodeTabsComponent({ target, node.data.node.template[ templateField - ] + ], ); }} /> @@ -433,7 +433,7 @@ export default function CodeTabsComponent({ target, node.data.node.template[ templateField - ] + ], ); }} /> @@ -470,7 +470,7 @@ export default function CodeTabsComponent({ e, node.data.node.template[ templateField - ] + ], ); }} size="small" @@ -501,7 +501,7 @@ export default function CodeTabsComponent({ ].fileTypes } onFileChange={( - value: any + value: any, ) => { node.data.node.template[ templateField @@ -554,7 +554,7 @@ export default function CodeTabsComponent({ target, node.data.node.template[ templateField - ] + ], ); }} /> @@ -594,7 +594,7 @@ export default function CodeTabsComponent({ target, node.data.node.template[ templateField - ] + ], ); }} value={ @@ -656,7 +656,7 @@ export default function CodeTabsComponent({ target, node.data.node.template[ templateField - ] + ], ); }} /> @@ -702,7 +702,7 @@ export default function CodeTabsComponent({ target, node.data.node.template[ templateField - ] + ], ); }} /> @@ -748,7 +748,7 @@ export default function CodeTabsComponent({ target, node.data.node.template[ templateField - ] + ], ); }} /> @@ -780,8 +780,8 @@ export default function CodeTabsComponent({ ].value, type( node, - templateField - ) + templateField, + ), ) } duplicateKey={ @@ -790,15 +790,15 @@ export default function CodeTabsComponent({ onChange={(target) => { const valueToNumbers = convertValuesToNumbers( - target + target, ); node.data.node!.template[ templateField ].value = valueToNumbers; setErrorDuplicateKey( hasDuplicateKeys( - valueToNumbers - ) + valueToNumbers, + ), ); setData((old) => { let newInputList = @@ -815,7 +815,7 @@ export default function CodeTabsComponent({ target, node.data.node.template[ templateField - ] + ], ); }} isList={ @@ -863,7 +863,7 @@ export default function CodeTabsComponent({ target, node.data.node.template[ templateField - ] + ], ); }} /> diff --git a/src/frontend/src/components/csvOutputComponent/index.tsx b/src/frontend/src/components/csvOutputComponent/index.tsx index a25cfb679..a98d9c028 100644 --- a/src/frontend/src/components/csvOutputComponent/index.tsx +++ b/src/frontend/src/components/csvOutputComponent/index.tsx @@ -67,7 +67,7 @@ function CsvOutputComponent({ if (file) { const { rowData: data, colDefs: columns } = convertCSVToData( file, - separator + separator, ); setRowData(data); setColDefs(columns); diff --git a/src/frontend/src/components/dictComponent/index.tsx b/src/frontend/src/components/dictComponent/index.tsx index 5161135ed..39850e6e3 100644 --- a/src/frontend/src/components/dictComponent/index.tsx +++ b/src/frontend/src/components/dictComponent/index.tsx @@ -29,7 +29,7 @@ export default function DictComponent({
1 && editNode ? "my-1" : "", - "flex flex-col gap-3" + "flex flex-col gap-3", )} > { diff --git a/src/frontend/src/components/dropdownComponent/index.tsx b/src/frontend/src/components/dropdownComponent/index.tsx index 0fd981603..4aa9dcf07 100644 --- a/src/frontend/src/components/dropdownComponent/index.tsx +++ b/src/frontend/src/components/dropdownComponent/index.tsx @@ -58,7 +58,7 @@ export default function Dropdown({ ? "dropdown-component-outline" : "dropdown-component-false-outline", "w-full justify-between font-normal", - editNode ? "input-edit-node" : "py-2" + editNode ? "input-edit-node" : "py-2", )} > @@ -106,7 +106,7 @@ export default function Dropdown({ name="Check" className={cn( "ml-auto h-4 w-4 text-primary", - value === option ? "opacity-100" : "opacity-0" + value === option ? "opacity-100" : "opacity-0", )} /> diff --git a/src/frontend/src/components/editFlowSettingsComponent/index.tsx b/src/frontend/src/components/editFlowSettingsComponent/index.tsx index 3dd813965..26bc138e3 100644 --- a/src/frontend/src/components/editFlowSettingsComponent/index.tsx +++ b/src/frontend/src/components/editFlowSettingsComponent/index.tsx @@ -99,7 +99,7 @@ export const EditFlowSettings: React.FC = ({ {description === "" ? "No description" : description} diff --git a/src/frontend/src/components/genericIconComponent/index.tsx b/src/frontend/src/components/genericIconComponent/index.tsx index 398ae6e7f..9f7c687a1 100644 --- a/src/frontend/src/components/genericIconComponent/index.tsx +++ b/src/frontend/src/components/genericIconComponent/index.tsx @@ -18,7 +18,7 @@ export const ForwardedIconComponent = memo( strokeWidth, id = "", }: IconComponentProps, - ref + ref, ) => { const [showFallback, setShowFallback] = useState(false); @@ -65,8 +65,8 @@ export const ForwardedIconComponent = memo( /> ); - } - ) + }, + ), ); export default ForwardedIconComponent; diff --git a/src/frontend/src/components/headerComponent/components/menuBar/index.tsx b/src/frontend/src/components/headerComponent/components/menuBar/index.tsx index 78a21113a..35542ca2a 100644 --- a/src/frontend/src/components/headerComponent/components/menuBar/index.tsx +++ b/src/frontend/src/components/headerComponent/components/menuBar/index.tsx @@ -113,7 +113,7 @@ export const MenuBar = ({}: {}): JSX.Element => { title: UPLOAD_ERROR_ALERT, list: [error], }); - } + }, ); }} > @@ -195,7 +195,7 @@ export const MenuBar = ({}: {}): JSX.Element => { name={isBuilding || saveLoading ? "Loader2" : "CheckCircle2"} className={cn( "h-4 w-4", - isBuilding || saveLoading ? "animate-spin" : "animate-wiggle" + isBuilding || saveLoading ? "animate-spin" : "animate-wiggle", )} /> {printByBuildStatus()} diff --git a/src/frontend/src/components/horizontalScrollFadeComponent/index.tsx b/src/frontend/src/components/horizontalScrollFadeComponent/index.tsx index 7e0c788a6..e0bf48917 100644 --- a/src/frontend/src/components/horizontalScrollFadeComponent/index.tsx +++ b/src/frontend/src/components/horizontalScrollFadeComponent/index.tsx @@ -32,11 +32,11 @@ export default function HorizontalScrollFadeComponent({ fadeContainerRef.current.classList.toggle( "fade-left", - isScrollable && !atStart + isScrollable && !atStart, ); fadeContainerRef.current.classList.toggle( "fade-right", - isScrollable && !atEnd + isScrollable && !atEnd, ); }; diff --git a/src/frontend/src/components/inputComponent/components/popover/index.tsx b/src/frontend/src/components/inputComponent/components/popover/index.tsx index 06be89d91..e93f69207 100644 --- a/src/frontend/src/components/inputComponent/components/popover/index.tsx +++ b/src/frontend/src/components/inputComponent/components/popover/index.tsx @@ -75,9 +75,9 @@ const CustomInputPopover = ({ (selectedOption !== "" || !onChange) && setSelectedOption ? selectedOption : (selectedOptions?.length !== 0 || !onChange) && - setSelectedOptions - ? selectedOptions?.join(", ") - : value + setSelectedOptions + ? selectedOptions?.join(", ") + : value } autoFocus={autoFocus} disabled={disabled} @@ -103,7 +103,7 @@ const CustomInputPopover = ({ (password && !(setSelectedOption || setSelectedOptions)) ? "pr-8" : "", - className! + className!, )} placeholder={password && editNode ? "Key" : placeholder} onChange={handleInputChange} @@ -141,15 +141,15 @@ const CustomInputPopover = ({ onSelect={(currentValue) => { setSelectedOption && setSelectedOption( - currentValue === selectedOption ? "" : currentValue + currentValue === selectedOption ? "" : currentValue, ); setSelectedOptions && setSelectedOptions( selectedOptions?.includes(currentValue) ? selectedOptions.filter( - (item) => item !== currentValue + (item) => item !== currentValue, ) - : [...selectedOptions, currentValue] + : [...selectedOptions, currentValue], ); !setSelectedOptions && setShowOptions(false); }} @@ -162,7 +162,7 @@ const CustomInputPopover = ({ selectedOption === option || selectedOptions?.includes(option) ? "opacity-100" - : "opacity-0" + : "opacity-0", )} >
diff --git a/src/frontend/src/components/inputComponent/components/popoverObject/index.tsx b/src/frontend/src/components/inputComponent/components/popoverObject/index.tsx index d43022845..e907ec239 100644 --- a/src/frontend/src/components/inputComponent/components/popoverObject/index.tsx +++ b/src/frontend/src/components/inputComponent/components/popoverObject/index.tsx @@ -60,14 +60,14 @@ const CustomInputPopoverObject = ({ ? options.find((option) => option.id === selectedOption)?.name || "" : (selectedOptions?.length !== 0 || !onChange) && - setSelectedOptions - ? selectedOptions - .map( - (optionId) => - options.find((option) => option.id === optionId)?.name - ) - .join(", ") - : value + setSelectedOptions + ? selectedOptions + .map( + (optionId) => + options.find((option) => option.id === optionId)?.name, + ) + .join(", ") + : value } autoFocus={autoFocus} disabled={disabled} @@ -115,15 +115,15 @@ const CustomInputPopoverObject = ({ onSelect={(currentValue) => { setSelectedOption && setSelectedOption( - currentValue === selectedOption ? "" : currentValue + currentValue === selectedOption ? "" : currentValue, ); setSelectedOptions && setSelectedOptions( selectedOptions?.includes(currentValue) ? selectedOptions.filter( - (item) => item !== currentValue + (item) => item !== currentValue, ) - : [...selectedOptions, currentValue] + : [...selectedOptions, currentValue], ); !setSelectedOptions && setShowOptions(false); }} @@ -136,7 +136,7 @@ const CustomInputPopoverObject = ({ selectedOption === option.id || selectedOptions?.includes(option.id) ? "opacity-100" - : "opacity-0" + : "opacity-0", )} >
diff --git a/src/frontend/src/components/inputComponent/index.tsx b/src/frontend/src/components/inputComponent/index.tsx index b361f48ab..5327c11e3 100644 --- a/src/frontend/src/components/inputComponent/index.tsx +++ b/src/frontend/src/components/inputComponent/index.tsx @@ -71,7 +71,7 @@ export default function InputComponent({ editNode ? " input-edit-node " : "", password && editNode ? "pr-8" : "", password && !editNode ? "pr-10" : "", - className! + className!, )} placeholder={password && editNode ? "Key" : placeholder} onChange={(e) => { @@ -154,7 +154,7 @@ export default function InputComponent({