mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-25 03:52:19 +08:00
214829ab45df454ca0fdae9f828b56d3e508af20
JSONCleaner._remove_control_characters by 1,491% (#5322)
* ⚡️ Speed up method `JSONCleaner._remove_control_characters` by 1,491%
To optimize the function `_remove_control_characters`, we can use the `translate` method with a translation table to remove control characters. This method is generally faster than using regular expressions for character replacement/removal tasks.
Here is the optimized version of the program.
By precompiling the translation table in the `__init__` method, we're reducing the repeated overhead of creating this table every time `_remove_control_characters` is called. Using `str.translate` with this precompiled table significantly improves the performance compared to using a regular expression substitution.
* add super()
---------
Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
🔧 (.pre-commit-config.yaml): Add eslint@9.1.1 as a dependency and enable autofix for pretty-format-json hook
🔧 (.pre-commit-config.yaml): Add eslint@9.1.1 as a dependency and enable autofix for pretty-format-json hook
Langflow is a low-code app builder for RAG and multi-agent AI applications. It’s Python-based and agnostic to any model, API, or database.
Docs - Free Cloud Service - Self Managed
✨ Core features
- Python-based and agnostic to models, APIs, data sources, or databases.
- Visual IDE for drag-and-drop building and testing of workflows.
- Playground to immediately test and iterate workflows with step-by-step control.
- Multi-agent orchestration and conversation management and retrieval.
- Free cloud service to get started in minutes with no setup.
- Publish as an API or export as a Python application.
- Observability with LangSmith, LangFuse, or LangWatch integration.
- Enterprise-grade security and scalability with free DataStax Langflow cloud service.
- Customize workflows or create flows entirely just using Python.
- Ecosystem integrations as reusable components for any model, API or database.
📦 Quickstart
- Install with uv (recommended) (Python 3.10 to 3.12):
uv pip install langflow
- Install with pip (Python 3.10 to 3.12):
pip install langflow
- Cloud: DataStax Langflow is a hosted environment with zero setup. Sign up for a free account.
- Self-managed: Run Langflow in your environment. Install Langflow to run a local Langflow server, and then use the Quickstart guide to create and execute a flow.
- Hugging Face: Clone the space using this link to create a Langflow workspace.
⭐ Stay up-to-date
Star Langflow on GitHub to be instantly notified of new releases.
👋 Contribute
We welcome contributions from developers of all levels. If you'd like to contribute, please check our contributing guidelines and help make Langflow more accessible.
❤️ Contributors
Languages
Python
64.5%
TypeScript
23.4%
JavaScript
11.4%
CSS
0.3%
Makefile
0.2%
Other
0.1%

