- Refactor code parsing in `code_parser.py` to handle imports, function definitions, and class attributes more robustly and cleanly.
- Add new methods in `component.py` to parse Assign and AnnAssign statements, and FunctionDef statements.
- Refactor `custom_component.py` to improve the handling of custom components, including better extraction of main class name and template configuration.
- Update `types.py` to better handle the building of custom component templates, including handling of field configurations and error handling.
- Minor formatting fix in `conftest.py` test fixture.
These changes improve the robustness and readability of the code, and provide better handling and validation of custom components.
🔨 refactor(constants.py): make YourComponent inherit from CustomComponent for better code reuse and structure
🔨 refactor(conftest.py): restructure custom_chain fixture for better readability and maintainability
✨ feat(conftest.py): add MyCustomChain class as an example of a custom chain
✨ feat(conftest.py): add CustomChain class as a custom component for building a document
✨ feat(conftest.py): add CSVLoaderComponent class as a custom component for loading CSV files and converting rows to documents
🔥 remove(langflow): delete custom.py as it's replaced by custom_component.py
📦 feat(langflow): add code_parser.py to parse Python source code
🐛 fix(langflow): update import paths due to file renaming
🎨 style(langflow): improve code formatting for readability
🐛 fix(langflow): correct handling of function arguments and return types in custom components
🔧 chore(langflow): update function calls due to changes in custom components
- Added new files for chat interface and prompt customization in the guidelines section
- Added descriptions and images for the chat interface and prompt customization features
- Updated the sidebars to include the new documentation pages
📝 docs(loading_document.mdx): update interactive guide URL and add step-by-step instructions for integrating a document into a PromptTemplate variable
📝 docs(sidebars.js): add "chatprompttemplate_guide" to the Guides section
This commit adds a new file `chatprompttemplate_guide.mdx` which contains a step-by-step guide on how to customize and build a chatbot with a custom system message. The guide includes instructions on how to modify the "Basic Chat with Prompt and History" example by integrating the `ChatPromptTemplate`, `SystemMessagePromptTemplate`, and `HumanMessagePromptTemplate` components. It also provides tips on setting the model, defining variables, and testing the chatbot. The guide aims to help users create a personalized chatbot that can interpret and respond based on user-defined system messages.
Co-authored-by: [Author Name] <author@example.com>
🔧 chore(index.css): add CSS class .code-nohighlight with different max-height value for tooltips with fewer words to display
🔧 chore(genericModal/index.tsx): add logic to dynamically apply CSS class .code-nohighlight to tooltips with fewer words to display
🎨 style(index.css): update class names for code block modal span and button for better readability
🎨 style(index.css): update class name for code highlight block to limit max height
🐛 fix(chatMessage/index.tsx): update max width classes for markdown content to improve responsiveness
🐛 fix(genericModal/index.tsx): add missing useRef declarations for divRef and divRefPrompt
🐛 fix(genericModal/index.tsx): update class name for code highlight textarea to fix styling issue
🐛 fix(genericModal/index.tsx): add missing ref prop to Textarea component
🐛 fix(genericModal/index.tsx): add missing ref prop to div element for prompt variables
🐛 fix(genericModal/index.tsx): add missing ref prop to div element for prompt variables
✨ feat(loading_document.mdx): add step-by-step instructions on how to define a Prompt variable and connect a WebBaseLoader to it for loading a document into the variable
🔀 chore(loading_document.mdx): reorganize and rephrase the content to improve readability and clarity
This commit adds a new guide file `loading_document.mdx` that provides an overview and example on how to load a document into a Prompt variable. The guide explains the process of defining a Prompt variable in the `PromptTemplate` component, connecting a `WebBaseLoader` to the variable, and building the flow. It also demonstrates how to chat with the document content in the context of a conversation.
The commit also includes an embedded iframe that showcases the functionality described in the guide.
🔧 chore(docusaurus.config.js): update logo alt text to match the updated title
🔧 chore(docusaurus.config.js): update announcementBar content to use consistent naming convention for Langflow
This commit adds a new GitHub Actions workflow file, `deploy_gh-pages.yml`, which is responsible for deploying the project to GitHub Pages. The workflow is triggered on pushes to the `lf-docs-fix` branch.
The workflow consists of the following steps:
1. Checkout the repository
2. Set up Node.js environment with version 18 and npm caching
3. Install dependencies for the documentation
4. Build the website
5. Deploy the built website to GitHub Pages using the `peaceiris/actions-gh-pages` action
- The deployment is done to the `gh-pages` branch
- The build output is published from the `./docs/build` directory
- The commit authorship is assigned to the official GH-Actions bot
This workflow enables automatic deployment of the documentation to GitHub Pages whenever changes are pushed to the `lf-docs-fix` branch.