The setNodeClass function is now passed down to PromptAreaComponent from ParameterComponent. This allows the nodeClass to be set when a prompt is used.
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.
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.
🎨 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.
✨ 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.
🔥 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.
🚀 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
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.
✨ 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.
🔨 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.
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.
🚀 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.
The config.yaml file has been updated to include new prompt templates. In types.py, the input_variables list was not being cleared when prompt or messages were present, which has been fixed. The instantiate_prompt function in loading.py has been updated to support the new prompt templates.
🔀 chore(config): add new prompt templates to config.yaml
🐛 fix(types.py): fix input_variables not being cleared when prompt or messages are present
The `AgentType` enum is added to the `langchain.agents.custom` module to improve readability and type safety. The `InitializeAgent` class now uses the `AgentType` enum to ensure that the `agent` parameter is a valid value from the enum.
🚀 feat(chat.py): use build_input_keys_response function to build input keys response
The build_input_keys_response function was extracted from the remove_api_keys function to improve code reusability. It builds the input keys response object, which contains the input keys and memory keys of a langchain object. The chat.py file now uses this function to build the input keys response object instead of building it manually. This improves code readability and reduces code duplication.
The prepare-commit-msg file is added to the .gitignore file to avoid pushing the Opencommit hook to the remote repository. This is done to prevent the hook from being executed on other machines and to avoid any issues that may arise from the hook being executed on different machines.
The commented out code was removed to improve code readability. Input validation was added to ensure that the template and input variables are valid before creating a PromptTemplate object. This helps to prevent errors that may occur when the object is created with invalid input.
🔒 chore(base.py): remove commented out code and add input validation for PromptTemplate
The stream_build function has been refactored to send input_keys to the client if the langchain_object has the attribute "input_keys". This change improves the user experience by providing the client with the necessary input keys to continue the conversation.
🔼 chore(pyproject.toml): bump package version to 0.2.1
The langchain dependency has been updated to version 0.0.215, which includes bug fixes and performance improvements. The package version has been bumped to 0.2.1 to reflect the changes made.
The import statement for the MidjourneyIcon was misspelled as MidjorneyIcon, which caused a runtime error. This commit fixes the typo by changing the import statement to MidjourneyIcon.
The import of Boxes and LayoutDashboard were removed as they were not being used in the file. New icons were added to nodeIconsLucide to improve the variety of icons available for use. The new icons added are MongoDBAtlasVectorSearch, Pinecone, and SupabaseVectorStore.
🔥 chore(utils.ts): remove unused import of Boxes and LayoutDashboard