This commit adds the `TelemetryService` class and updates the code in `endpoints.py` to log the run time of package execution. The `TelemetryService` is responsible for handling telemetry-related functionality, including logging package run time. This addition enables the application to collect and analyze telemetry data, providing insights into the performance of package execution.
The code changes introduce the `TelemetryService` schema and service in the `langflow.services.telemetry` module. This addition enables the application to collect and analyze telemetry data.
The VersionPayload class in the TelemetryService module has been updated to include the arch field for architecture information and the autoLogin field to indicate whether auto login is enabled. This change enhances the telemetry data collected by the application.
The code changes in `main.py` add the `get_telemetry_service()` function call to start telemetry service. This change enables the application to collect and analyze telemetry data.
This commit adds the `TelemetryService` class and `TelemetryServiceFactory` class to the `langflow.services.telemetry` module. The `TelemetryService` is responsible for handling telemetry-related functionality, while the `TelemetryServiceFactory` is used to create instances of the `TelemetryService` class. This addition enables the application to collect and analyze telemetry data.
📝 (base.py): add new attributes backend_only and do_not_track with their respective descriptions
📝 (base.py): add telemetry_base_url attribute with default value
The get_version endpoint in the API router has been updated to use the get_version_info utility function from langflow.utils.version. This change improves code organization and maintainability by centralizing the version retrieval logic.
This commit adds exception handling and trace ending functionality to the Graph class in the `base.py` file. It imports the `traceback` module and adds a try-except block to catch any exceptions that occur during graph execution. If an exception is caught, it logs the exception and ends all traces with the error message. Finally, it ensures that all traces are ended regardless of whether an exception occurred or not. This change improves the robustness and error handling of the Graph class.
This commit updates the GenericNode component and its related hooks to handle the component type. The code changes in the index.tsx file of the GenericNode directory include modifying the updateNodeCode function to accept an additional "type" parameter. The handleNodeClass function in the use-handle-node-class.tsx file has also been updated to handle the "type" parameter. These changes ensure that the GenericNode component can correctly handle different types of components and update the node code accordingly.
This commit adds the CustomComponentResponse model to the schemas.py file, allowing the custom_component endpoint to return a structured response. The custom_component endpoint in the endpoints.py file has been updated to include the response_model parameter, specifying the CustomComponentResponse model. This ensures that the endpoint returns the built_frontend_node along with the type of the component_instance. These changes improve the consistency and clarity of the API response.
The build_config parameter in the update_build_config method of the AgentComponent class has been updated to accept a field_name parameter of type str instead of Text | None. This change improves the clarity and consistency of the code.
The code changes in `directory_reader.py` introduce a check to skip files that are located in the `deactivated` folder. This improves the efficiency of the directory reading process by excluding unnecessary files.
* 🐛 (folders.py): fix folder name update logic to ensure name changes are saved correctly
* ✨ (folders.py): add custom_sort function to prioritize "My Projects" folder
♻️ (folders.py): refactor read_folders to return sorted folders using custom_sort
🐛 (folders.py): fix update_folder to refresh session after updating folder name
🐛 (folders.py): correct update statement to exclude flows not in the provided list
* Apply Ruff formatting
* ♻️ (folders.py): remove custom_sort function and replace with inline lambda for sorting folders
🐛 (folders.py): fix update statement to correctly update flows with excluded folder IDs
♻️ (folders.py): refactor folder update logic to use session.add for better clarity and consistency
---------
Co-authored-by: Cristhianzl <Cristhianzl@users.noreply.github.com>
Simplify the getJsApiCode utility function in the get-js-api-code.tsx file. The unnecessary replacement of JavaScript boolean literals has been removed, improving code readability and maintainability.
This commit updates the CodeTabsComponent to handle an additional tab in the code tabs display. The previous implementation had a condition that checked if the active tab index was less than 4, but it has been updated to check if the active tab index is less than 5. This change ensures that the component can handle the new tab and display the corresponding content correctly. The code has been modified in the index.tsx file of the CodeTabsComponent directory.
This commit adds a new utility function called getJsApiCode to the apiModal/utils/get-js-api-code.tsx file. The function generates JavaScript code for interfacing with an API using the LangflowClient class. It takes several parameters including the flowId, isAuth, tweaksBuildedObject, and endpointName. The function constructs a LangflowClient instance and defines methods for making API requests, handling streams, and running flows. It also includes a main function that demonstrates how to use the LangflowClient to initiate a session and handle stream updates. This utility function improves code organization and reusability.
The create_or_update_starter_projects function in setup.py has been refactored to improve code organization. This change separates the function definition from the rest of the code, making it easier to read and maintain.
The Retriever class in constants.py has been refactored to improve code organization. This change separates the class definition from the rest of the code, making it easier to read and maintain.