🐛 fix(endpoints.py): add missing import statement for 'settings' module
✨ feat(endpoints.py): add support for loading custom components from a specified path 🐛 fix(endpoints.py): fix typo in variable name 'custom_components_from_file' 🐛 fix(endpoints.py): fix typo in variable name 'filtered' 🐛 fix(base.py): fix indentation of raise statement to improve code readability 🐛 fix(component.py): fix indentation of if statements to improve code readability 🐛 fix(load_custom_component_from_path.py): fix indentation of base_path comment to improve code readability 🐛 fix(load_custom_component_from_path.py): fix indentation of base_path assignment to improve code readability 🐛 fix(load_custom_component_from_path.py): fix indentation of validate_code method to improve code readability 🐛 fix(load_custom_component_from_path.py): fix indentation of build_component_menu_list method to improve code readability 🐛 fix(types.py): fix indentation of extract_type_from_optional function to improve code readability ✨ feat(types.py): add support for building custom component templates ✨ feat(types.py): add support for building custom component templates with extra fields ✨ feat(types.py): add support for building custom component templates with function arguments ✨ feat(types.py): add support for building custom component templates with base classes ✨ feat(types.py): add support for building custom component templates with return type ✨ feat(types.py): add support for building custom component templates with exception handling ✨ feat(types.py): add support for building custom component templates from a specified path 🐛 fix(settings.py): fix indentation of set_env_variables method to improve code readability ✨ feat(settings.py): add support for specifying component path in settings 🐛 fix(test_custom_component.py): change variable names and attributes in YourComponent class for better readability and consistency 🐛 fix(test_custom_component.py): reformat code to adhere to PEP8 style guide 🐛 fix(test_custom_component.py): fix syntax error in test_component_get_code_tree_syntax_error() 🐛 fix(test_custom_component.py): fix syntax error in test_custom_component_class_template_validation_no_code() 🐛 fix(test_custom_component.py): fix syntax error in test_custom_component_get_main_class_name_no_main_class() ✨ feat(test_custom_component.py): add test_component_get_function_valid() to test the get_function method of the Component class with valid code and function_entrypoint_name ✨ feat(test_custom_component.py): add test_code_parser_parse_assign() to test the parse_assign method of the CodeParser class ✨ feat(test_custom_component.py): add test_custom_component_class_template_validation_no_code() to test the _class_template_validation method of the CustomComponent class when the code is None ✨ feat(test_custom_component.py): add test_custom_component_get_main_class_name_no_main_class() to test the get_main_class_name method of the CustomComponent class when there is no main class ✨ feat(test_custom_component.py): add test_custom_component_get_function_entrypoint_args_no_args() to test the get_function_entrypoint_args method of the CustomComponent class when there are no arguments ✨ feat(test_custom_component.py): add test_custom_component_get_function_entrypoint_return_type_none() to test the get_function_entrypoint_return_type method of the CustomComponent class when the return type is None
This commit is contained in:
parent
33f8b63431
commit
548383b09e
7 changed files with 73 additions and 18 deletions
|
|
@ -24,9 +24,9 @@ from langchain.schema import Document
|
|||
import requests
|
||||
|
||||
class YourComponent(CustomComponent):
|
||||
langflow_display_name: str = "Your Component"
|
||||
langflow_description: str = "Your description"
|
||||
langflow_field_config = { "url": { "multiline": True, "required": True } }
|
||||
display_name: str = "Your Component"
|
||||
description: str = "Your description"
|
||||
field_config = { "url": { "multiline": True, "required": True } }
|
||||
|
||||
def build(self, url: str, llm: BaseLLM, template: Prompt) -> Document:
|
||||
response = requests.get(url)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue