Commit graph

2,631 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
df09f6119d 📝 docs(README.md): fix typo in Langflow to LangFlow for consistency
The typo in the word "LangFlow" has been fixed to ensure consistency in the naming convention used throughout the project.
2023-07-05 16:42:47 -03:00
Gabriel Luiz Freitas Almeida
b71913a0aa 🐛 fix(__main__.py): change word variable from "LangFlow" to "Langflow" for consistency
🐛 fix(schemas.py): change class name from "ExportedFlow" to "Exported flow from Langflow" for consistency
The word variable in __main__.py is changed from "LangFlow" to "Langflow" to maintain consistency in naming conventions. Similarly, the class name in schemas.py is changed from "ExportedFlow" to "Exported flow from Langflow" for consistency in naming conventions.
2023-07-05 16:42:13 -03:00
Gabriel Luiz Freitas Almeida
a73737435b 📝 docs(CONTRIBUTING.md): update project name to "Langflow" for consistency
📝 docs(README.md): update project name to "Langflow" for consistency
📝 chore(frontend): update project name in HTML title tag to "Langflow" for consistency
The project name "LangFlow" has been updated to "Langflow" for consistency throughout the documentation and codebase. This change improves readability and maintains a consistent naming convention.
2023-07-05 16:41:57 -03:00
Gabriel Luiz Freitas Almeida
90acee2273 🐛 fix(constants.tsx): fix typo in flow name from LangFlow to Langflow
🐛 fix(tabsContext.tsx): fix typo in variable name from LangFlowState to LangflowState
🐛 fix(flow_constants.tsx): fix typo in description from LangFlow to Langflow
🐛 fix(chatModal/index.tsx): fix typo in chat modal title from LangFlow Chat to Langflow Chat
🐛 fix(importModal/index.tsx): fix typo in import modal title from LangFlow Examples to Langflow Examples
🐛 fix(CommunityPage/index.tsx): fix typo in community page text from LangFlow to Langflow
🐛 fix(FlowPage/index.tsx): fix typo in flow page text from LangFlow to Langflow

The changes were made to fix typos in various parts of the codebase where the name "LangFlow" was misspelled as "Langflow". This improves consistency and ensures that the correct name is used throughout the application.
2023-07-05 16:41:35 -03:00
Gabriel Luiz Freitas Almeida
14d50c878c 🔖 chore(pyproject.toml): update package version to 0.2.13
The package version has been updated from 0.2.12 to 0.2.13. This change is made to reflect the latest changes and improvements in the package.
2023-07-05 16:35:24 -03:00
Gabriel Luiz Freitas Almeida
68906407e7
Merge branch 'main' into release 2023-07-05 16:25:24 -03:00
Gabriel Luiz Freitas Almeida
9c97490fd4
Merge pull request #613 from logspace-ai:fix_dotenv
🔧 chore(__main__.py): add load_params() function to load parameters from environment variables
2023-07-05 15:54:24 -03:00
Gabriel Luiz Freitas Almeida
5138129003 🔧 chore(__main__.py): add load_params() function to load parameters from environment variables
The load_params() function is added to load the parameters from the environment variables. This allows for more flexibility and configurability of the application by allowing the parameters to be set via environment variables.
2023-07-05 15:41:49 -03:00
Gabriel Luiz Freitas Almeida
31c361ce23
Release 0.2.12 (#612) 2023-07-05 15:13:02 -03:00
Gabriel Luiz Freitas Almeida
0743e306c9
Merge branch 'main' into release 2023-07-05 15:11:51 -03:00
Gabriel Luiz Freitas Almeida
0b61a682cd
Added better CLI docs in README and bumps langchain-serve (#611) 2023-07-05 15:10:39 -03:00
Gabriel Luiz Freitas Almeida
08bc992d63 🔖 chore(pyproject.toml): update package version to 0.2.12
The package version has been updated from 0.2.11 to 0.2.12. This change is made to reflect the latest changes and improvements in the package.
2023-07-05 14:57:48 -03:00
Gabriel Luiz Freitas Almeida
3c13f87495
Merge branch 'release' into jcloud_fix 2023-07-05 14:48:29 -03:00
Gabriel Luiz Freitas Almeida
f7515eb7bd 📚 docs(README.md): update table of contents and headings for better organization and readability
🔧 chore(README.md): reformat and update CLI section for clarity and consistency
The README.md file has been updated to improve the organization and readability of the document. The table of contents has been updated to include all relevant sections. Headings have been adjusted to provide a clear hierarchy and improve navigation. The CLI section has been reformatted and updated to provide clearer instructions and explanations.
2023-07-05 14:45:28 -03:00
Gabriel Luiz Freitas Almeida
611cb7f57c 📝 docs(README.md): Add CLI usage and environment variables sections to the README
The README file now includes a new section that provides information on how to use the command-line interface (CLI) of Langflow. It explains the available options and their usage. Additionally, a section on environment variables is added, which explains how to configure CLI options using environment variables. This provides users with more flexibility in customizing the behavior of the Langflow server.
2023-07-05 13:07:16 -03:00
Gabriel Luiz Freitas Almeida
70b634cbcf 🔧 chore(__main__.py): refactor serve function to use environment variables for configuration options
🌟 feat(__main__.py): add support for environment variables to configure serve function
The serve function in __main__.py has been refactored to use environment variables for configuration options. The following configuration options now support environment variables: host, workers, port, log_level, log_file, path, open_browser, and remove_api_keys. This change allows for greater flexibility and easier configuration of the serve function by using environment variables instead of command line options.
2023-07-05 13:07:02 -03:00
Gabriel Luiz Freitas Almeida
29f840aed9 🔧 chore(.env.example): update example values and add new configuration options
The .env.example file has been updated to include example values and new configuration options. The LANGFLOW_DATABASE_URL example has been updated to include both Postgres and SQLite examples. New configuration options have been added for cache type, server host, worker processes, server port, logging level, log file path, frontend directory path, whether to open the browser after starting the server, and whether to remove API keys from the projects saved in the database. These changes provide more flexibility and customization options for the application.
2023-07-05 13:06:50 -03:00
Gabriel Luiz Freitas Almeida
95b8555503 🐛 fix(settings.py): change environment variable name from LANGFLOW_DATABASE_URL to langflow_database_url for consistency
The environment variable name is changed from LANGFLOW_DATABASE_URL to langflow_database_url to maintain consistency with the naming conventions used in the codebase. This ensures that the code is more readable and easier to understand.
2023-07-05 12:10:32 -03:00
Gabriel Luiz Freitas Almeida
8214b22c09 🔧 chore(__main__.py): update cache and database environment variable names for clarity and consistency
The `cache` option has been changed to use the `LANGFLOW_LANGCHAIN_CACHE` environment variable instead of `LANGCHAIN_CACHE` for clarity and consistency. Similarly, the `database_url` option now uses the `LANGFLOW_DATABASE_URL` environment variable instead of the previous behavior of using a local SQLite database by default. This change allows for more flexibility in configuring the cache and database connections.
2023-07-05 12:10:09 -03:00
Gabriel Luiz Freitas Almeida
4b1fb4a49e 🐛 fix(utils.py): rename cache_class variable to cache_type for clarity and consistency
🔧 chore(utils.py): refactor `setup_llm_caching` to extract cache setup logic into a separate function for better modularity and readability
The variable `cache_class` has been renamed to `cache_type` to improve clarity and consistency with the naming conventions. The `setup_llm_caching` function has been refactored to extract the cache setup logic into a separate function called `set_langchain_cache`. This improves modularity and readability of the code.
2023-07-05 12:09:53 -03:00
Gabriel Luiz Freitas Almeida
cb1ab1a79e 📝 docs(.env.example): add example .env file with langflow_database_url set to sqlite database URL
The .env.example file is added to provide an example of how to configure the .env file. It includes a commented out example of a PostgreSQL database URL and a new line is added with the langflow_database_url set to a SQLite database URL. This allows users to easily copy the file to .env and modify the values according to their needs.
2023-07-05 12:00:42 -03:00
Gabriel Luiz Freitas Almeida
8cee7e701f 🔺 chore(pyproject.toml): update langchain-serve version to >0.0.51
The langchain-serve package has been updated to version >0.0.51. This update may include bug fixes, new features, or other improvements.
2023-07-05 11:54:41 -03:00
Gabriel Luiz Freitas Almeida
552edf072b 🔧 chore(settings.py): make database_url optional to handle cases where it is not provided
The `database_url` setting is now declared as an optional string (`Optional[str]`) instead of a required string. This change allows the application to handle cases where the `database_url` is not provided, providing more flexibility in the configuration.
2023-07-05 11:50:32 -03:00
Gabriel Luiz Freitas Almeida
d713d38ca7 🔧 chore(__main__.py): refactor loading of environment variables to allow overriding with .env file
The os module is imported to make use of the os.getenv() function. The loading of the environment variables is refactored to check for the presence of the "langflow_database_url" environment variable and use it as the value for the database_url variable if it is not provided. This allows for more flexibility in configuring the database URL. Additionally, the loading of environment variables is refactored to allow overriding with a .env file if the env_file parameter is provided. This allows for easier configuration management.
🔧 chore(__main__.py): import os module and refactor loading of environment variables
2023-07-05 11:50:07 -03:00
Gabriel Luiz Freitas Almeida
c0efe4dbcf 🔧 chore(__init__.py): add noqa comments to import statements to ignore linting errors
The noqa comments have been added to the import statements to ignore the linting errors raised by the linter. This ensures that the linting errors related to the imports are ignored and the code can be properly executed without any issues.
2023-07-05 11:49:22 -03:00
Gabriel Luiz Freitas Almeida
20da596d9a 🐛 fix(base.py): handle case when no database_url is provided and raise an error
 feat(base.py): add error handling when creating database and tables to provide more informative error messages
The code now checks if the `settings.database_url` is provided and raises a `RuntimeError` if it is not. This ensures that the application does not attempt to create a database connection without a valid URL. Additionally, error handling has been added when creating the database and tables. If an exception occurs during the creation process, an error message is logged and a `RuntimeError` is raised with a more informative error message. This helps in identifying and resolving any issues related to the database creation process.
2023-07-05 11:47:55 -03:00
Gabriel Luiz Freitas Almeida
9ba16d694a
🔧 fix(chat.py): add missing build step for root node in graph (#593) 2023-07-03 09:24:55 -03:00
Gabriel Luiz Freitas Almeida
5e28d01615
Merge branch 'main' into release 2023-07-03 09:19:17 -03:00
Gabriel Luiz Freitas Almeida
7d7db02fb6 🔖 chore(pyproject.toml): update package version to 0.2.11
⬆️ chore(pyproject.toml): update fastapi dependency to version 0.99.0
The package version has been updated from 0.2.10 to 0.2.11. This change reflects the new version of the package. Additionally, the fastapi dependency has been updated from version 0.98.0 to 0.99.0 to ensure compatibility with the latest version of fastapi.
2023-07-03 09:17:32 -03:00
Gabriel Luiz Freitas Almeida
08b2a9b753
🔧 chore(chat.py): add build step for root node in graph
📝 docs(chat.py): explain the need for building the root node before the rest of the graph
The root node in the graph was not being built before the rest of the graph, which caused issues when certain nodes required parameters that were not connected to them. By adding the missing build step for the root node, we ensure that all necessary connections and parameters are properly set up before building the rest of the graph. This improves the overall functionality and reliability of the chat module.
2023-07-03 09:14:36 -03:00
Gabriel Luiz Freitas Almeida
1d22e8c97a 🔧 chore(chat.py): add missing build step for root node in graph
📝 docs(chat.py): explain the need for building the root node before the rest of the graph
The root node in the graph was not being built before the rest of the graph, which caused issues when certain nodes required parameters that were not connected to them. By adding the missing build step for the root node, we ensure that all necessary connections and parameters are properly set up before building the rest of the graph. This improves the overall functionality and reliability of the chat module.
2023-07-03 09:12:59 -03:00
Gabriel Luiz Freitas Almeida
c1175e4961 🔧 chore(base.py): remove unnecessary debug log and add success log for database and tables creation
The debug log statement "Database and tables created" has been removed as it is unnecessary. Instead, a success log statement "Database and tables created successfully" has been added to indicate that the database and tables were created without any errors. This improves the clarity of the log messages and provides better feedback during the database setup process.
2023-07-03 08:46:01 -03:00
Gabriel Luiz Freitas Almeida
35e0ea9d80 🔧 chore(settings.py): update environment variable prefix from "LANGFLOW_" to "langflow_" for consistency
The environment variable prefix used in the settings.py file has been updated from "LANGFLOW_" to "langflow_" to maintain consistency with the naming conventions used in the project. This change ensures that all environment variables related to the Langflow backend have a consistent prefix.
2023-07-02 16:20:17 -03:00
Gabriel Luiz Freitas Almeida
9f2b6443cf debugging improvements 2023-07-02 16:11:51 -03:00
Gabriel Luiz Freitas Almeida
898ced7b02
Add PyPDFDirectoryLoader and fields to DirectoryLoader (#587) 2023-07-01 17:17:08 -03:00
Gabriel Luiz Freitas Almeida
6255932c8c Merge branch 'release' of https://github.com/logspace-ai/langflow into release 2023-07-01 17:15:09 -03:00
Gabriel Luiz Freitas Almeida
14dab7c0b9 🔖 chore(pyproject.toml): bump version to 0.2.10
The version of the package has been updated from 0.2.9 to 0.2.10. This change is made to reflect the latest changes and improvements in the package.
2023-07-01 17:14:24 -03:00
Gabriel Luiz Freitas Almeida
78f44b8e63
Merge branch 'main' into release 2023-07-01 17:12:46 -03:00
Gabriel Luiz Freitas Almeida
d6326979e6
Add PyPDFDirectoryLoader and improving DirectoryLoader (#586) 2023-07-01 17:11:32 -03:00
Gabriel Luiz Freitas Almeida
5333dbf021 📝 docs(config.yaml): add PyPDFDirectoryLoader documentation link
Added the documentation link for the PyPDFDirectoryLoader in the config.yaml file. This allows users to access the documentation on how to use the PyPDFDirectoryLoader for loading PDF documents.
2023-07-01 17:09:35 -03:00
Gabriel Luiz Freitas Almeida
30c9b4f5a9 🔧 chore(base.py): add debug logs when creating and creating database and tables
The logger.debug() statements are added to provide more visibility into the process of creating the database and tables. This can be helpful for debugging and troubleshooting purposes.
2023-07-01 17:09:26 -03:00
Gabriel Luiz Freitas Almeida
4c8c3528de 🔥 refactor(settings.py): remove commented out code for setting default database URL
The commented out code was unnecessary and cluttered the codebase. Removing it improves readability and maintainability of the code.
2023-07-01 17:09:15 -03:00
Gabriel Luiz Freitas Almeida
94cd8703b3 🐛 fix(App.tsx): improve code readability by formatting long conditional statements
The conditional statements in the useEffect hook were formatted to improve code readability. By breaking the statements into multiple lines and adding proper indentation, it is easier to understand the logic. This change does not affect the functionality of the code.
2023-07-01 17:09:04 -03:00
Gabriel Luiz Freitas Almeida
3506cb1311 🐛 fix(chatModal): refactor error handling in WebSocket connection to improve readability and error handling
The error handling in the WebSocket connection has been refactored to improve readability and error handling. Instead of nesting the `getHealth()` promise inside the `onerror` callback, it has been extracted to a separate `.then()` block. This allows for better separation of concerns and makes the code more readable. Additionally, the error handling logic has been updated to properly set the `setErrorData` state when the backend fails to respond.
2023-07-01 17:08:47 -03:00
Gabriel Luiz Freitas Almeida
e5eea2d9fb 🐛 fix(__main__.py): change logger.error to logger.exception to log full exception traceback
The change is made to improve the logging of exceptions. Using logger.exception instead of logger.error allows the logger to log the full traceback of the exception, providing more detailed information for debugging purposes.
2023-07-01 17:08:28 -03:00
Gabriel Luiz Freitas Almeida
d2609141ba 🔧 refactor(documentloaders.py): extract build_directory_loader_fields() function to improve code readability and maintainability
🔧 refactor(documentloaders.py): remove redundant code for adding fields in DocumentLoaderFrontNode class
The code in the DocumentLoaderFrontNode class has been refactored to extract the logic for building directory loader fields into a separate function called build_directory_loader_fields(). This improves code readability and maintainability by separating concerns and reducing duplication. The redundant code for adding fields in the DocumentLoaderFrontNode class has also been removed.
2023-07-01 17:08:23 -03:00
Gabriel Luiz Freitas Almeida
2112500a1c
VectorStoreRetrieverMemory fix, more names and descriptions (#583) 2023-07-01 10:10:38 -03:00
Gabriel Luiz Freitas Almeida
cff2a9d957
Merge branch 'main' into release 2023-07-01 10:09:25 -03:00
Gabriel Luiz Freitas Almeida
f046b303a9 Merge branch 'release' of https://github.com/logspace-ai/langflow into release 2023-07-01 10:02:10 -03:00
Gabriel Luiz Freitas Almeida
698b34429f 🔖 chore(pyproject.toml): update package version to 0.2.9
The package version has been updated from 0.2.8 to 0.2.9. This change is made to reflect the latest changes and improvements in the package.
2023-07-01 10:00:58 -03:00