Commit graph

3,745 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
397c665536 Merge branch 'python_custom_node_component' into ChatWidgetAPI 2023-07-27 17:38:35 -03:00
Gabriel Luiz Freitas Almeida
0b28d5d8de format 2023-07-27 17:36:34 -03:00
Gabriel Luiz Freitas Almeida
aeca627222 📝 docs(custom-component.mdx): update guidelines for custom components
 feat(custom-component.mdx): add rules and explanations for creating custom components

📝 docs(custom-component.mdx): update rule 1 to specify that the script must contain a single class inheriting from CustomComponent

📝 docs(custom-component.mdx): update rule 2 to specify that the class must have a build method

📝 docs(custom-component.mdx): update rule 3 to specify that the type annotations of the build method will be used to create the fields of the component

📝 docs(custom-component.mdx): update rule 4 to specify that the class can have a build_config method

📝 docs(custom-component.mdx): update rule 4 to provide details on the format of the build_config method

📝 docs(custom-component.mdx): update rule 4 to correct a typo in the display_name key

📝 docs(custom-component.mdx): update rule 4 to provide additional details on the options and multiline keys in the build_config method

📝 docs(custom-component.mdx): add example for creating a FlowRunner component

📝 docs(custom-component.mdx): update example for creating a FlowRunner component to include display_name and description attributes

📝 docs(custom-component.mdx): update example for creating a FlowRunner component to import Document from the schema module

📝 docs(custom-component.mdx): update example for creating a FlowRunner component to add parameters and return type to the build method
2023-07-27 17:28:46 -03:00
Gabriel Luiz Freitas Almeida
4783b47815 🔧 chore(custom.css): adjust max-width and min-width of .ch-scrollycoding-content and .ch-scrollycoding-sticker to improve layout
🔧 chore(custom.css): add min-height to .ch-scrollycoding-step-content for better spacing
2023-07-27 17:20:29 -03:00
Gabriel Luiz Freitas Almeida
b2e784dcb7 🐛 fix(types.py): fix issue with incorrect assignment of field_advanced variable in add_new_custom_field function
 feat(types.py): add support for advanced field configuration in add_new_custom_field function
🐛 fix(types.py): fix issue with incorrect assignment of field_advanced variable in add_code_field function
 feat(types.py): add support for advanced field configuration in add_code_field function
🐛 fix(types.py): fix issue with incorrect sorting of function_args in add_extra_fields function
 feat(types.py): add sorting of function_args in add_extra_fields function
🐛 fix(types.py): fix issue with incorrect usage of field_config in add_code_field function
 feat(types.py): add support for field_config in add_code_field function
🐛 fix(types.py): fix issue with incorrect usage of field_config in build_langchain_template_custom_component function
 feat(types.py): add support for field_config in build_langchain_template_custom_component function
2023-07-27 17:19:24 -03:00
Gabriel Luiz Freitas Almeida
35724e1473 🐛 fix(code_parser.py): handle "None" values in default arguments correctly 2023-07-27 17:17:57 -03:00
Rodrigo Nader
d9663bee45 Rename widget.md to chat-widget.md
- The code changes renamed the file `widget.mdx` to `chat-widget.mdx`.
- The content has been modified to reflect the new name and provide a more detailed description of the Langflow Chat Widget.
- The usage instructions have been updated to reflect the changes.

This commit renames `widget.mdx` to `chat-widget.mdx` and provides more detailed information about the Langflow Chat Widget, including its features, usage in HTML, React, and Angular, and customization options.
2023-07-27 15:49:22 -03:00
Cristhian Zanforlin Lousa
07b5419586 🔧 chore(constants.ts): add URL_EXCLUDED_FROM_ERROR_RETRIES constant to store URLs excluded from error retries for better error handling
🔧 chore(api.tsx): add logic to exclude certain URLs from error retries in the ApiInterceptor component to improve error handling
🔧 chore(index.ts): update postCustomComponent function to use the api instance instead of axios for consistency and reusability
2023-07-27 14:59:11 -03:00
Gabriel Luiz Freitas Almeida
fb407cf9d1 🔥 refactor(test_custom_component.py): remove unused imports and test_list_flows_no_flows test case
🔥 refactor(test_custom_component.py): remove test_list_flows_no_flows test case as it is no longer needed
2023-07-27 14:35:49 -03:00
Gabriel Luiz Freitas Almeida
3b93c5814b 🐛 fix(utils.py): simplify format_content function to improve readability and maintainability 2023-07-27 14:33:31 -03:00
Gabriel Luiz Freitas Almeida
707e55c880 🐛 fix(loading.py): refactor instantiate_prompt function to improve readability and maintainability
 feat(utils.py): add utility functions to handle node type and format kwargs in instantiate_prompt function
2023-07-27 14:32:10 -03:00
gustavoschaedler
2144e0d92d 🐛 fix(code_parser.py): strip single quotes from default values in CodeParser class to improve consistency and readability 2023-07-27 15:12:18 +01:00
Gabriel Luiz Freitas Almeida
d9816902e4 🐛 fix(GenericNode/index.tsx): fix rendering of validationStatus.params when it is a string 2023-07-27 09:56:15 -03:00
Gabriel Luiz Freitas Almeida
28bf88cf79 🐛 fix(custom_component.py): fix custom_repr method to return a string representation of repr_value 2023-07-27 09:55:48 -03:00
anovazzi1
3baa3a1ca5 Merge branch 'python_custom_node_component' of personal:logspace-ai/langflow into python_custom_node_component 2023-07-27 09:47:20 -03:00
anovazzi1
3d103398e3 fix(codeAreaModal): clear error state when setting value to code and closing modal to prevent displaying previous errors 2023-07-27 09:46:29 -03:00
Gabriel Luiz Freitas Almeida
4a0fe95093 🔧 chore(types.py): add support for custom field value in add_new_custom_field function
🔧 chore(types.py): add support for custom field value in add_new_custom_field function to allow specifying a default value for the field
2023-07-27 09:44:01 -03:00
Gabriel Luiz Freitas Almeida
2b55b0c3b3 🔀 refactor(custom_component.py): rename load_flow method parameter flow_id to graph_id for clarity
🔀 refactor(custom_component.py): add optional `tweaks` parameter to `load_flow` method to allow for processing tweaks on the graph data
🔀 refactor(custom_component.py): rename `data_graph` variable to `graph_data` for consistency and clarity
🔀 refactor(custom_component.py): add logic to process tweaks on the `graph_data` if `tweaks` parameter is provided
2023-07-27 09:39:27 -03:00
Cristhian Zanforlin Lousa
f49bca8e9d 📝 docs(widget.mdx): add Admonition component to provide additional information about using the Chat Widget in Angular projects
📝 docs(widget.mdx): update caution admonition to provide instructions on passing JSON props as Stringified JSONs
2023-07-27 09:06:58 -03:00
Gabriel Luiz Freitas Almeida
e43f52dd7a 📝 docs(custom-component.mdx): update guidelines for creating custom components
 feat(custom-component.mdx): add example code for creating a custom component
🔧 chore(custom-component.mdx): update code comments and fix typo in build_config method
2023-07-27 08:04:18 -03:00
Gabriel Luiz Freitas Almeida
529322e56a 🎨 style(custom.css): adjust max-width and min-width of .ch-scrollycoding-content and .ch-scrollycoding-sticker to improve layout proportions 2023-07-27 08:00:22 -03:00
Gabriel Luiz Freitas Almeida
d8980d34f2 🔧 chore(docusaurus.config.js): enable sidebar to be hideable in the docs section for better user experience 2023-07-27 07:59:58 -03:00
Lucas Oliveira
1c5eb4a2f8 Changed text to be more specific 2023-07-27 07:54:27 -03:00
Lucas Oliveira
5b34d8e725 Added note to JSONs on docs 2023-07-27 07:52:24 -03:00
Gabriel Luiz Freitas Almeida
fa8b3eca92 📝 docs(widget.mdx): update code snippet language from html to jsx for accuracy and clarity 2023-07-27 07:34:21 -03:00
Gabriel Luiz Freitas Almeida
5110644082 🔧 chore(widget.mdx): remove unnecessary comment in langflow-chat component example 2023-07-27 07:33:32 -03:00
Gabriel Luiz Freitas Almeida
3e0fc3cc1b 📝 docs(widget.mdx): improve formatting and readability of the Chat Widget documentation 2023-07-27 07:32:30 -03:00
Gabriel Luiz Freitas Almeida
34008bf3d0 🔄 refactor(index.tsx): reorder import statements for better readability and consistency 2023-07-27 07:02:48 -03:00
Gabriel Luiz Freitas Almeida
8d8fae78c8 🔧 fix(__init__.py): update import statement for CustomComponent to reflect new location
🔧 fix(constants.py): update import statement for CustomComponent to reflect new location
🔧 fix(constants.py): update field_config to build_config to match changes in CustomComponent class
🔧 fix(constants.py): update build method signature to match changes in CustomComponent class
2023-07-27 07:02:14 -03:00
Gabriel Luiz Freitas Almeida
6b7ab2aded 📝 docs(custom-component.mdx): add documentation for custom components
🎨 style(custom.css): update styling for code blocks and sidebar in documentation
2023-07-27 06:58:39 -03:00
Gabriel Luiz Freitas Almeida
9a1c20d750 📝 docs(custom.mdx): add documentation for custom component 2023-07-27 06:58:38 -03:00
Gabriel Luiz Freitas Almeida
ea8865dc18 🔧 chore(docs): update docusaurus.config.js to use monokai theme for code highlighting, show copy button, and display line numbers
📝 docs(sidebars.js): add "guidelines/custom-component" and "components/custom" to the sidebar for better navigation and discoverability
2023-07-27 06:58:38 -03:00
Gabriel Luiz Freitas Almeida
bb247af614 🔧 chore(package.json): update dependencies
📦 Add new dependency:
- "@code-hike/mdx": "^0.9.0"

🔄 Update existing dependencies:
- "@mdx-js/react": "^2.3.0"
- "docusaurus-theme-mdx-v2": "^0.1.2"
2023-07-27 06:58:37 -03:00
Gabriel Luiz Freitas Almeida
e78ce40cbf 🔧 fix(docusaurus.config.js): fix import statement for remarkCodeHike to resolve linting error
 feat(docusaurus.config.js): add support for code highlighting with remarkCodeHike plugin
2023-07-27 06:58:36 -03:00
Gabriel Luiz Freitas Almeida
8ac890c553 🔧 chore(chains.mdx): add import statement for Admonition component to improve code organization and readability
🔧 chore(chains.mdx): fix formatting and indentation for better code readability
🔧 chore(chains.mdx): update verbose parameter description to improve clarity
🔧 chore(chains.mdx): fix formatting and indentation for better code readability
🔧 chore(chains.mdx): update verbose parameter description to improve clarity
🔧 chore(chains.mdx): fix formatting and indentation for better code readability
🔧 chore(chains.mdx): update verbose parameter description to improve clarity
🔧 chore(chains.mdx): fix formatting and indentation for better code readability
🔧 chore(chains.mdx): update verbose parameter description to improve clarity
🔧 chore(chains.mdx): fix formatting and indentation for better code readability
🔧 chore(chains.mdx): update verbose parameter description to improve clarity
🔧 chore(chains.mdx): fix formatting and indentation for better code readability
🔧 chore(chains.mdx): update verbose parameter description to improve clarity
🔧 chore(chains.mdx): fix formatting and indentation for better code readability
🔧 chore(chains.mdx): update verbose parameter description to improve clarity
🔧 chore(chains.mdx): fix formatting and indentation for better code readability
🔧 chore(chains.mdx): update verbose parameter description to improve clarity
🔧 chore(chains.mdx): fix formatting and indentation for better code readability
🔧 chore(chains.mdx): update verbose parameter description to improve clarity
🔧 chore(chains.mdx): fix formatting and indentation for better code readability
🔧 chore(chains.mdx): update verbose parameter description to improve clarity
🔧 chore(chains.mdx): fix formatting and indentation for better code readability
🔧 chore(chains.mdx): update verbose parameter description to improve clarity
🔧 chore(chains.mdx): fix formatting and indentation for better code readability
🔧 chore(chains.mdx): update verbose parameter description to improve clarity
🔧 chore(chains.mdx): fix formatting and indentation for better code readability
🔧 chore(chains.mdx): update verbose parameter description to improve clarity
🔧 chore(chains.mdx): fix formatting and indentation for better code readability
🔧

📝 chore(docs): update import statements for Admonition component in examples

📝 chore(docs): update link in Prompts component to use Admonition component

📝 chore(docs): update import statements for Admonition component in examples

📝 chore(docs): update link in Conversation Chain component to use Admonition component

📝 chore(docs): update import statements for Admonition component in examples

📝 chore(docs): update link in CSV Loader component to use Admonition component

📝 chore(docs): update import statements for Admonition component in examples

📝 chore(docs): update link in MidJourney Prompt Chain component to use Admonition component

📝 chore(docs): update import statements for Admonition component in examples

📝 chore(docs): update link in Multiple Vector Stores component to use Admonition component

📝 docs(examples/python-function.mdx): add import statement for Admonition component
📝 docs(examples/python-function.mdx): improve readability of tip admonition by breaking lines
📝 docs(examples/python-function.mdx): improve readability of info admonition by breaking lines
📝 docs(examples/serp-api-tool.mdx): add import statement for Admonition component
📝 docs(examples/serp-api-tool.mdx): improve readability of info admonition by breaking lines
📝 docs(guidelines/features.mdx): add import statement for Admonition component
📝 docs(guidelines/features.mdx): improve readability of caution admonition by breaking lines
2023-07-27 06:58:35 -03:00
Cristhian Zanforlin Lousa
0ed7b7cb2a 📝 docs(widget.mdx): add instructions for including Chat Widget in Angular component's view
📝 docs(widget.mdx): provide example code for adding the 'langflow-chat' tag with necessary attributes to include the Chat Widget in the component's view
2023-07-27 00:11:40 -03:00
Cristhian Zanforlin Lousa
33ad61ae71 📝 docs(widget.mdx): add instructions for using Chat Widget in Angular application
The commit adds instructions for using the Chat Widget in an Angular application. It includes steps to insert a script tag in the index.html file, suppress warnings related to custom elements in Angular templates, and additional notes about using the Chat Widget in Angular components.
2023-07-27 00:05:17 -03:00
Lucas Oliveira
ae83c987a5 Added documentation link to the description of the Api Tab 2023-07-26 23:00:51 -03:00
Lucas Oliveira
fd701ba272 Added documentation of Chat Widget. 2023-07-26 22:57:04 -03:00
anovazzi1
011dd98050 fixed bug on check and save 2023-07-26 16:44:15 -03:00
Lucas Oliveira
1124b10308 Changed comment to exemplify better 2023-07-26 16:20:39 -03:00
Lucas Oliveira
8df8875e7e Added description to Chat Widget HTML and changed comment from code 2023-07-26 16:04:11 -03:00
Lucas Oliveira
f4396fd6ea Fixed tooltip not appearing 2023-07-26 15:43:59 -03:00
Lucas Oliveira
aeb7b91446 Changed code to show how it is used. 2023-07-26 15:37:18 -03:00
Lucas Oliveira
eb0883231b Changed way of disabling sidebar button; Disabled API button before building. 2023-07-26 15:36:35 -03:00
Lucas Oliveira
40daa06d75 Added class 2023-07-26 14:16:34 -03:00
Lucas Oliveira
e90d05b711 Fixed button spacing at Sidebar 2023-07-26 14:15:42 -03:00
Lucas Oliveira
30779cb827 Ignore formatting 2023-07-26 14:12:23 -03:00
gustavoschaedler
ba02e99ec5 🔄 refactor(index.tsx): reorder import statements for better organization and readability 2023-07-26 18:02:12 +01:00
gustavoschaedler
d5ee293590 🔧 fix(test_custom_component.py): fix import statements and formatting issues in test_custom_component.py
 feat(test_custom_component.py): add tests for list_flows, build_config methods in CustomComponent class
🔧 fix(test_custom_component.py): fix formatting issues in test_list_flows_multiple_queries test
 feat(test_custom_component.py): add tests for list_flows, build_config methods in CustomComponent class
 feat(test_custom_component.py): add test for return type of list_flows method in CustomComponent class
 feat(test_custom_component.py): add test for return type of build_config method in CustomComponent class
 feat(test_custom_component.py): add test for presence of 'fields' key in build_config method in CustomComponent class
 feat(test_custom_component.py): add test for type of 'fields' value in build_config method in CustomComponent class
 feat(test_custom_component.py): add test for type of keys in 'fields' value in build_config method in CustomComponent class
 feat(test_custom_component.py): add test for type of values in 'fields' value in build_config method in CustomComponent class
2023-07-26 17:40:53 +01:00