Commit graph

2,464 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
5a76d36cd4 🔧 chore(utils.py): refactor build_input_keys_response function to return an empty string for each input key
The build_input_keys_response function has been refactored to return an empty string for each input key in the langchain_object. This change ensures consistency in the response structure and provides a default value for each input key.
2023-06-28 11:44:07 -03:00
Lucas Oliveira
0c18aab513 Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io 2023-06-28 11:35:34 -03:00
Lucas Oliveira
789a4cb2f8 Fixed bug with template code area 2023-06-28 11:35:30 -03:00
Gabriel Luiz Freitas Almeida
40179ee011 🔧 chore(validate.py): add input_types to template_field in post_validate_prompt function
The input_types attribute is added to the template_field in the post_validate_prompt function. This change allows for specifying the input types that are accepted for the template field, providing more flexibility and control over the input data.
2023-06-28 11:33:56 -03:00
Gabriel Luiz Freitas Almeida
0ecb531749 🔧 fix(base.py): add input_types property to TemplateFieldCreator class
🔧 fix(index.ts): add input_types property to TemplateVariableType interface
The `input_types` property is added to the `TemplateFieldCreator` class in `base.py` and the `TemplateVariableType` interface in `index.ts`. This change allows for specifying the input types for template fields and template variables, respectively.
2023-06-28 11:33:42 -03:00
Lucas Oliveira
5d2901c7a6 🔧 fix(GenericNode/index.tsx): remove console.log statement for data object
🔥 chore(ProgressBarComponent/index.tsx): delete unused ProgressBarComponent component
🔧 fix(intComponent/index.tsx): remove commented out console.log statement for event object
2023-06-28 11:07:58 -03:00
Lucas Oliveira
9cb85a0c21 🔧 fix(tabsContext.tsx): remove console.log statements for cleaner code
🔧 fix(nodeToolbarComponent/index.tsx): remove console.log statement for cleaner code
🔧 fix(utils.ts): remove console.log statement for cleaner code
2023-06-28 11:07:49 -03:00
Lucas Oliveira
da5aa1e05b Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io 2023-06-28 11:01:40 -03:00
Lucas Oliveira
3b1b42fe3e Changed styling on From Chat toggle 2023-06-28 11:01:37 -03:00
Gabriel Luiz Freitas Almeida
6cf9639128 feat: add template to input_keys_response 2023-06-28 10:58:55 -03:00
Gabriel Luiz Freitas Almeida
b8f150d1ac format 2023-06-28 08:47:42 -03:00
Lucas Oliveira
264cb8aa30 📝 chore(constants.tsx): update CHAT_FORM_DIALOG_SUBTITLE to provide a more accurate description of its purpose and usage 2023-06-28 00:54:03 -03:00
Lucas Oliveira
a6e5dcaadc Deleted chat modal and changed disposition of clearChat button 2023-06-28 00:44:48 -03:00
Lucas Oliveira
d59b648b75 🔥 refactor(formTrigger): remove unused FormTrigger component
🔥 refactor(chatComponent): remove import and usage of FormTrigger component

🔥 refactor(ui/badge): remove unused size variant in Badge component

🔥 refactor(formModal/chatInput): remove unused Eraser icon import and clearChat function

🔥 refactor(formModal/chatMessage): remove unused classNames import and remove dark mode classes

🔥 refactor(formModal): remove unused Eraser icon import and clearChat function
2023-06-28 00:38:21 -03:00
Gabriel Luiz Freitas Almeida
2e09d7026b 🔀 chore(api): rename message property to inputs in sendAllProps type
The message property in the sendAllProps type has been renamed to inputs to better reflect its purpose. This change improves the semantics of the code and makes it easier to understand the purpose of the property.
2023-06-27 21:33:06 -03:00
Gabriel Luiz Freitas Almeida
c39e94d584 🔨 refactor(base.py): change message parameter to inputs parameter to improve semantics
The message parameter was not being used in the function, so it was changed to inputs to better reflect the purpose of the parameter.
2023-06-27 21:32:46 -03:00
Gabriel Luiz Freitas Almeida
5a9c1ae1b7 🔀 chore(schemas.py): add support for dict type in message field of ChatMessage schema
The message field of the ChatMessage schema now supports a dictionary type in addition to the previous string and None types. This change was made to allow for more complex messages to be sent and received in the chat.
2023-06-27 21:32:09 -03:00
Gabriel Luiz Freitas Almeida
a4101dac53 🔥 refactor(formModal): remove unused imports and variables
 feat(formModal): add function to format message inputs into a string
This commit removes unused imports and variables from the file. A new function was added to format the message inputs into a string, which is used to display the message in the chat. This improves the readability of the code and makes it easier to understand how the message is being constructed.
2023-06-27 21:31:47 -03:00
Lucas Oliveira
e1efeb6b33 Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io 2023-06-27 20:58:11 -03:00
Lucas Oliveira
8c721b0b8e 🐛 fix(formModal): fix keysValue state initialization to prevent undefined error
 feat(formModal): add support for memory_keys in input variables accordion to display memory keys in chat form modal
2023-06-27 20:58:01 -03:00
Lucas Oliveira
355b846be4 🎨 style(constants.tsx): add CHAT_FORM_DIALOG_SUBTITLE constant to improve code readability
 feat(formModal): add Input Variables section to Chat Form modal to allow users to input variables
🎨 style(formModal): adjust width of Chat Form modal and Input Variables section to improve UI
🎨 style(formModal): adjust layout of Input Variables section to improve UI
🎨 style(formModal): adjust layout of From Chat switch to improve UI
🐛 fix(formModal): replace Switch component with custom ToggleShadComponent to fix styling issue
2023-06-27 20:54:24 -03:00
Gabriel Luiz Freitas Almeida
526f5847c6 🐛 fix(validate.py): remove unused variables from prompt.frontend_node.template
 feat(validate.py): add support for dynamic template fields in prompt validation
The changes in this commit remove unused variables from the prompt.frontend_node.template. The commit also adds support for dynamic template fields in prompt validation. The new variables are added to the template and the custom_fields list. The old custom_fields list is copied and then updated with the new variables. The variables that are not in the template anymore are removed from the prompt.frontend_node.template.
2023-06-27 20:54:00 -03:00
Gabriel Luiz Freitas Almeida
2cf16de113 🐛 fix(validate.py): remove unused template fields from frontend_node
The code now removes any unused template fields from the frontend_node to avoid any potential errors.
2023-06-27 19:51:18 -03:00
Gabriel Luiz Freitas Almeida
aee34c87f2 🐛 fix(parameterComponent): setNodeClass function is now passed down to PromptAreaComponent
The setNodeClass function is now passed down to PromptAreaComponent from ParameterComponent. This allows the nodeClass to be set when a prompt is used.
2023-06-27 19:49:41 -03:00
Gabriel Luiz Freitas Almeida
753eae28c7 🐛 fix(validate.py): change dict() to to_dict() method to fix TypeError
The `dict()` method was causing a TypeError when trying to serialize the `template_field` object. The `to_dict()` method is the correct method to use to serialize the object.
2023-06-27 19:49:30 -03:00
Gabriel Luiz Freitas Almeida
e5676337b5 🐛 fix(utils.ts): add try-catch blocks to handle errors in groupByFamily function
The try-catch blocks were added to handle errors that may occur when the function is called. This improves the robustness of the function and prevents it from crashing when an error occurs.
2023-06-27 19:49:18 -03:00
Lucas Oliveira
5a62bdc592 🐛 fix(formModal): replace double quotes with single quotes to improve consistency and avoid escaping 2023-06-27 19:35:16 -03:00
Lucas Oliveira
64fa0c0dcb 🎨 style(chatInput.tsx): add padding to the chat input to improve readability and aesthetics
🎨 style(chatMessage.tsx): change icon from MessageCircle to MessageSquare to improve semantics
🎨 style(index.tsx): add new icons to the import statement and change MessageSquareDashed to MessageSquare to improve semantics. Add padding to the chat modal to improve aesthetics.
2023-06-27 19:31:37 -03:00
Gabriel Luiz Freitas Almeida
5a57de5425 🔨 refactor(promptComponent, genericModal, promptModal, API): rename checkPrompt to postValidatePrompt
 feat(promptComponent, genericModal): add setNodeClass prop to PromptAreaComponent and GenericModal to update nodeClass
The checkPrompt function has been renamed to postValidatePrompt to better reflect its functionality. The PromptTypeAPI now includes a frontend_node property, which is used to update the nodeClass in the PromptAreaComponent and GenericModal components. The setNodeClass prop has been added to both components to allow for updating the nodeClass.
2023-06-27 19:18:35 -03:00
Gabriel Luiz Freitas Almeida
e760f22847 🐛 fix(base.py): change frontend_node field in ValidatePromptRequest to use FrontendNodeRequest instead of FrontendNode
🔥 chore(base.py): remove unused FrontendNodeRequest class
🔨 refactor(validate.py): modify post_validate_prompt function to update the template field in the frontend_node object
The ValidatePromptRequest class was using the FrontendNode class instead of the FrontendNodeRequest class, which caused an error. The unused FrontendNodeRequest class was removed. The post_validate_prompt function was modified to update the template field in the frontend_node object instead of appending to the fields list.
2023-06-27 19:18:34 -03:00
Gabriel Luiz Freitas Almeida
47494dd9a8 🔥 chore(endpoints.py): remove unused custom_component endpoint
The custom_component endpoint was commented out and unused. It has been removed to improve code readability and maintainability.
2023-06-27 19:18:32 -03:00
Lucas Oliveira
2f5d721ba8 Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io 2023-06-27 19:15:56 -03:00
Lucas Oliveira
0e81dafc0e 🎨 style(chatMessage.tsx): remove unused classNames and add primary color to chat message text
🚀 feat(formModal.tsx): add support for multiple input keys and values to be sent in the chat message
🐛 fix(formModal.tsx): fix keysValue state initialization and message object creation
🚀 feat(formModal.tsx): add switch component to select which input key to send in the chat message
🎨 style(formModal.tsx): add muted background color to input keys container
🐛 fix(api/index.ts): change message type to any to support multiple input keys and values
2023-06-27 19:15:44 -03:00
Lucas Oliveira
bbdcb7c6b6 🎨 style(chatMessage): refactor chat message component styles to improve readability and remove unnecessary code
 feat(formModal): add accordion component to display form keys and memory keys in the chat form modal
2023-06-27 18:46:13 -03:00
Gabriel Luiz Freitas Almeida
38404e1243 🚀 feat(frontend_node): add custom_fields attribute to FrontendNode class
The FrontendNode class now has a new attribute called custom_fields, which is a list of strings. This attribute can be used to store any custom fields that are specific to a particular frontend node. This change allows for more flexibility in the data that can be stored in a FrontendNode object.
2023-06-27 18:23:38 -03:00
Gabriel Luiz Freitas Almeida
880fa5034f 🚀 feat(api): add support for frontend_node in validate_prompt endpoint
 feat(base.py): add frontend_node parameter to ValidatePromptRequest and PromptValidationResponse models
The validate_prompt endpoint now accepts a frontend_node parameter in the ValidatePromptRequest model. This parameter is used to add input variables to the frontend_node's template fields and custom fields. The PromptValidationResponse model now includes the frontend_node parameter to return the updated frontend_node object.
2023-06-27 18:23:12 -03:00
Gabriel Luiz Freitas Almeida
ab77792d65 🔨 refactor(parameterComponent): improve code readability by adding line breaks and indentation
🔨 refactor(promptComponent): add nodeClass prop to improve code consistency
🔨 refactor(genericModal): add nodeClass prop to improve code consistency
🔨 refactor(types/components): remove unused imports and add nodeClass prop to TextAreaComponentType
The changes made in the code aim to improve code readability and consistency. The ParameterComponent, PromptAreaComponent, and GenericModal components now have a nodeClass prop to improve consistency with the naming conventions. The TextAreaComponentType now has a nodeClass prop to improve consistency with the other components.
2023-06-27 18:22:48 -03:00
Gabriel Luiz Freitas Almeida
bc4edde8d7 Merge remote-tracking branch 'origin/python_custom_node_component' into form_io 2023-06-27 18:05:14 -03:00
Gabriel Luiz Freitas Almeida
43c06e0c4f Merge remote-tracking branch 'origin/dynamicNode' into form_io 2023-06-27 18:01:11 -03:00
Gabriel Luiz Freitas Almeida
c0b1a12766 🐛 fix(API/index.ts): add frontend_node parameter to checkPrompt function to fix validation errors
The checkPrompt function was not properly validating prompts due to missing frontend_node parameter. The fix adds the frontend_node parameter to the function and passes it to the axios.post request.
2023-06-27 17:59:57 -03:00
Lucas Oliveira
d52829dad7 🎉 feat(frontend): add Accordion component to improve UI/UX
🔧 chore(frontend): add keyframes and animations for Accordion component to tailwind.config.js
2023-06-27 17:55:32 -03:00
Lucas Oliveira
f1556f2446 feat(chat): improve chat UI and add support for chat history display and sending messages 2023-06-27 17:53:46 -03:00
Lucas Oliveira
d1a58397da Passed data through context to get form keys 2023-06-27 16:57:21 -03:00
anovazzi1
f5211d4ef0 bugfix: sendind string code 2023-06-27 16:40:00 -03:00
Gabriel Luiz Freitas Almeida
3c1b86ebe6 🐛 fix(chat.py): change event name from "input_keys" to "message" in stream_build function
The event name was changed from "input_keys" to "message" to improve semantics and consistency with the rest of the codebase.
2023-06-27 16:38:42 -03:00
anovazzi1
08b20e18cb feat(API): add postCustomComponent function to create custom components
fix(modals): replace UpdateTemplate function with postCustomComponent function to create custom components
2023-06-27 16:26:27 -03:00
anovazzi1
cfa7dd6800 Merge branch 'dynamicNode' into python_custom_node_component 2023-06-27 16:25:26 -03:00
Gabriel Luiz Freitas Almeida
2497561cd3 🚀 feat(API): add postCustomComponent function to send custom component code to the server
🚀 feat(CodeAreaModal): replace UpdateTemplate function with postCustomComponent function to send custom component code to the server
The UpdateTemplate function was not being used and was removed. The postCustomComponent function was added to send custom component code to the server. The CodeAreaModal component was updated to use the new postCustomComponent function instead of the UpdateTemplate function to send custom component code to the server.
2023-06-27 15:44:55 -03:00
gustavoschaedler
5d430f9364 Refactor ClassCodeExtractor to extract the entrypoint function arguments and return type\nAdd validation of correct format for custom_component code\nAdd function to build a template for custom_component with its code as a field value. 2023-06-27 19:25:44 +01:00
Lucas Oliveira
54891277c6 Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io 2023-06-27 12:40:51 -03:00