-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor prompt validation and code processing in Component and PromptComponent classes #2264
Commits on Jun 23, 2024
-
refactor: Update prompt validation process in validate.py
Refactor the prompt validation process in validate.py to improve code readability and maintainability. The changes include: - Update the import statement for process_prompt_template in api_utils.py. - Remove unused imports from api_utils.py. - Simplify the post_validate_prompt function by removing unnecessary conditional statements. - Replace the validate_prompt function call with process_prompt_template in post_validate_prompt. These changes enhance the efficiency and organization of the prompt validation process.
Configuration menu - View commit details
-
Copy full SHA for af80b84 - Browse repository at this point
Copy the full SHA af80b84View commit details -
Configuration menu - View commit details
-
Copy full SHA for 64487f3 - Browse repository at this point
Copy the full SHA 64487f3View commit details -
refactor: Handle error updating Component code in GenericNode
When updating the Component code in GenericNode, handle any errors that occur. If an error occurs, display an error message with instructions to report the issue on Discord or GitHub. This improves the error handling and user experience when updating the Component code.
Configuration menu - View commit details
-
Copy full SHA for e7cd879 - Browse repository at this point
Copy the full SHA e7cd879View commit details -
Configuration menu - View commit details
-
Copy full SHA for ec4b9c5 - Browse repository at this point
Copy the full SHA ec4b9c5View commit details -
refactor: Update post_code_validation method in Component class
Refactor the post_code_validation method in the Component class to improve code readability and maintainability. The changes include: - Rename the parameters to better reflect their purpose. - Update the function documentation to provide a clear explanation of the method's purpose. - Remove unnecessary comments and whitespace. - Improve variable naming for better clarity. These changes enhance the overall quality of the code and make it easier to understand and maintain.
Configuration menu - View commit details
-
Copy full SHA for f11e567 - Browse repository at this point
Copy the full SHA f11e567View commit details -
refactor: Update build_custom_component_template return type
Update the return type of the build_custom_component_template function in utils.py to include the possibility of returning a Component object. This change ensures that the function can handle both CustomComponent and Component objects, improving flexibility and compatibility.
Configuration menu - View commit details
-
Copy full SHA for 4a69704 - Browse repository at this point
Copy the full SHA 4a69704View commit details -
refactor: Rename post_code_validation method to post_code_processing
The post_code_validation method in the Component class has been renamed to post_code_processing to better reflect its purpose. This change improves code clarity and maintainability.
Configuration menu - View commit details
-
Copy full SHA for 856797b - Browse repository at this point
Copy the full SHA 856797bView commit details -
refactor: Update PromptComponent post_code_processing method
Refactor the post_code_processing method in the PromptComponent class to improve code readability and maintainability. The changes include: - Import the process_prompt_template function from langflow.base.prompts.api_utils. - Import the update_template_values function from langflow.template.utils. - Call the process_prompt_template function to update the template value. - Update the frontend_node with any values set in the current_build_config. - Remove unnecessary comments and whitespace. These changes enhance the overall quality of the code and make it easier to understand and maintain.
Configuration menu - View commit details
-
Copy full SHA for a7259f7 - Browse repository at this point
Copy the full SHA a7259f7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 35b070c - Browse repository at this point
Copy the full SHA 35b070cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 35088ea - Browse repository at this point
Copy the full SHA 35088eaView commit details