* updating components to access secret key with new method
* [autofix.ci] apply automated fixes
* 📝 (text_embedder.py): Add error messages as constants for better error handling and readability
📝 (text_embedder.py): Improve error handling and validation for embedding model and text content
📝 (text_embedder.py): Ensure proper protocol for the base URL in the embedding model client
📝 (text_embedder.py): Validate the output of embeddings and handle exceptions with logging
📝 (text_embedder.py): Refactor code to encapsulate results in a Data object and update status accordingly
📝 (similarity.spec.ts): Add a delay before clicking the button to run the text output test for better synchronization
* uv fix
* [autofix.ci] apply automated fixes
* 📝 (text_embedder.py): refactor error messages to use inline strings for better readability and maintainability
🐛 (text_embedder.py): fix issue with extracting the first element from embeddings list to ensure correct data handling
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
* Start on big langchain dep upgrade
* Update pyproject.toml
* add new lock
* Rebase on post1 changes
---------
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* create newmodal.tsx
* Add new icons to styleUtils.ts
* Refactor import path for IOModal in chatComponent/index.tsx
* Refactor import path for IOModal in chatComponent/index.tsx
* Refactor session selector UI in IOFieldView component
* Refactor NodeToolbarComponent to add a minimum width to SelectContent
* Refactor IOModal to use newChatView component for ChatView
* improve html structure to ensure aligment of texts
* Refactor IOModal to improve sidebar behavior and alignment
* add new input
* Add Image icon to nodeIconsLucide in styleUtils.ts
* Refactor uploadFileButton to use Image icon instead of PaperclipIcon
* Refactor chat input layout for improved alignment and behavior
* Refactor buttonSendWrapper component to show a "Stop" button with loading indicator
* add a new TextAreaWrapper component
* add icons and update colors
* Add CornerDownLeft icon to nodeIconsLucide in styleUtils.ts
* Refactor buttonSendWrapper component to use default button state
* create newFilePreview
* Refactor file preview component and update button styling
* Refactor file preview component and update button styling
* fix overflow bug
* Refactor ChatView component to include a lockChat feature and display a flow running message
* [autofix.ci] apply automated fixes
* Refactor ChatView component to fix padding issue
* [autofix.ci] apply automated fixes
* Refactor dependencies in uv.lock to use a more specific version specifier for astra-assistants package
* Refactor ChatView component to import newChatMessage instead of chatMessage
* Refactor IOModal newModal component to conditionally display the session name
* Refactor TextAreaWrapper component to update placeholder text and fix padding issue
* Refactor TextAreaWrapper component to update placeholder text and fix padding issue
* Refactor ChatView component to update lockChat UI and display flow running message
* Refactor ChatView component to update lockChat UI and display flow running message
* Refactor ChatMessage component to update sender name UI and fix message width issue
* Refactor EditMessageButton component to update button UI and add tooltips
* Refactor EditMessageButton component to update button UI and add tooltips
* Refactor EditMessageField component to update UI and add functionality
* update edit message field
* fix group reference
* Refactor CodeTabsComponent to update UI, add functionality, and improve code structure
* Refactor CodeTabsComponent to update UI and improve code structure
* Refactor CodeTabsComponent to simplify and improve UI
* [autofix.ci] apply automated fixes
* Refactor ChatView component to fix UI layout issue
* fix overflow code boundaries problems
* Refactor CSS to update background color variables
* Refactor ChatCodeTabComponent to update UI and improve code structure
* fix broken rebase changes
* [autofix.ci] apply automated fixes
* Refactor EditMessageButton component to remove delete functionality
* Refactor SessionSelector component to update UI and improve code structure
* Refactor SessionSelector component to update UI and improve code structure
* [autofix.ci] apply automated fixes
* refactor session selector to use old code and keep updates on newSessionSelector
* create new button send wrapper
* restore old button send wrapper and update imports
* restore upload file button and create new UploadFileButton
* [autofix.ci] apply automated fixes
* Add feature flag for new IO modal
* Refactor IOModal imports to support feature flag
* update package-lock.json
* [autofix.ci] apply automated fixes
* remove console.log
* Refactor session selector event handlers
* Refactor file deletion in ChatInput component
* [autofix.ci] apply automated fixes
* Refactor file handling in ChatInput component
* [autofix.ci] apply automated fixes
* add user icon to messages
* feat: Add "Run Flow" button to ChatInput component
This commit adds a new button labeled "Run Flow" to the ChatInput component. When clicked, it triggers the sendMessage function with a repeat value of 1. Additionally, if there is no input in the chat, a message is displayed prompting the user to add a Chat Input component to their flow.
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Update Azure OpenAI API versions and improve version selection
This PR updates the `AZURE_OPENAI_API_VERSIONS` list in the `AzureChatOpenAIComponent` class to include the latest GA and preview versions of the Azure OpenAI API. It also improves the default version selection logic.
Changes:
- Updated `AZURE_OPENAI_API_VERSIONS` list:
- Added the latest GA version: "2024-06-01"
- Added recent preview versions: "2024-07-01-preview", "2024-08-01-preview", "2024-09-01-preview", "2024-10-01-preview"
- Removed older versions that are no longer relevant
- Reordered the list to prioritize newer versions
- Improved the `api_version` DropdownInput:
- Now sorts options in reverse chronological order
- Default value now selects the latest non-preview version, falling back to the first version if all are preview
The updated list now reflects the most current API versions as of the latest documentation update, and the improved selection logic ensures users are presented with the most appropriate default version.
* Some fixes for ruff rules preview mode
* Fix mypy error
* More Annotated[] types for fastapi endpoints
* Use type aliases for Depends(get_session) and Depends(get_current_active_user)
- Added logic to change button variant to "primary" or "secondary"
based on the current pathname, including the "/flows" route.
Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
* 📝 (utils.py): Add Query import and custom_params function to handle custom pagination parameters
📝 (flows.py): Update read_flows function to handle get_all flag and add error handling for missing folders
📝 (folders.py): Add custom_params dependency to read_folder endpoint for custom pagination handling
📝 (model.py): Remove PaginatedFlowResponse class as it is no longer used, add FlowHeader class to represent flow headers without data
✨ (test_database.py): Add pagination support for reading flows with different parameters to improve testing coverage and flexibility.
✅ (test_database.py): add unit tests for reading folders with different scenarios such as pagination, flows, search, and component filter to ensure proper functionality and data retrieval.
* 📝 (utils.py): Add constants MAX_PAGE_SIZE and MIN_PAGE_SIZE for better readability and maintainability
📝 (flows.py): Update get_all parameter default value to True for backward compatibility with frontend
📝 (flows.py): Update error message formatting for clarity
📝 (model.py): Update comments for folder_id, is_component, endpoint_name, and description fields for clarity
* ✨ (test_database.py): Simplify test functions by removing unnecessary parameters and code duplication to improve readability and maintainability.
* formatter
* [autofix.ci] apply automated fixes
* ruff fix
* [autofix.ci] apply automated fixes
---------
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
🔄 (constants.py): refactor sidebar categories list to improve readability and maintainability by removing unnecessary properties and formatting the dictionary entries for consistency.
* ✨ (endpoints.py): Add new endpoint to retrieve sidebar categories for the frontend application.
* 📝 (schemas.py): add SidebarCategory and SidebarCategoriesResponse models to define sidebar categories and response structure for API endpoint.
* ✨ (constants.py): Add sidebar categories with display names, names, icons, and beta status for different components to enhance the user interface and navigation experience.
* 📝 (constants.py): Update icons names to use proper casing for consistency and clarity in the code.
* starting fix test
* ✨ (decisionFlow.spec.ts): refactor integration test to remove unnecessary commented out code and improve readability by simplifying and organizing the test steps for creating a flow with decision.
* 📝 (StoreMessage.py): Update input types in StoreMessageComponent to include StrInput for sender, sender_name, and session_id to improve data handling and consistency.
* 📝 (StoreMessage.py): Update imports to use the correct MessageTextInput class from langflow.inputs.inputs module for sender, sender_name, and session_id inputs in StoreMessageComponent class. This change ensures consistency and improves code readability.
* Add utility functions to build Pydantic models from schema definitions
* Add unit tests for build_model_from_schema function in test_base_model.py
- Implement various test cases to validate the functionality of build_model_from_schema.
- Test cases cover scenarios such as handling valid and empty schemas, managing unknown field types, and processing schemas with missing optional keys.
- Ensure proper handling of nested list and dict types, and verify the function's efficiency with large schemas.
- Confirm that the function raises exceptions for invalid input and handles duplicate field names correctly.
* Refactor tests in `test_base_model.py` to improve type handling and error checking
* Refactor output schema handling to use TableInput and build_model_from_schema
* Update OpenAI model components and hierarchical crew setup
- Refactor `OpenAIModelComponent` to use `TableInput` for `output_schema` and integrate `build_model_from_schema`.
- Modify `HierarchicalCrewComponent` to use unpacking for base inputs.
- Ensure consistent import statements across JSON files.
- Improve error handling and logging for vector store operations.
* Add chat result model with message building and execution logic
- Implement `build_messages_and_runnable` to construct message lists and configure runnable models.
- Add `get_chat_result` to execute language models with input messages, supporting streaming and custom configurations.
- Handle exceptions with optional custom error messages.
* Add "table" to DIRECT_TYPES in constants.py
* Add support for DataFrame input validation in TableInput class
* Add StructuredOutputComponent for generating structured outputs from language models
* Enhance structured output component with improved input descriptions and schema naming
* Convert DataFrame to list of dictionaries in TableInput validation
* Remove pandas dependency and refactor schema handling in structured_output.py
* Remove 'default' field from structured output schema and update field initialization
* Add 'number' and 'text' types to type mapping and remove default value from field creation
* Enhance error handling in structured output building process
* Improve error message for non-BaseModel output in structured_output.py
* Add unit tests for StructuredOutputComponent in helpers module
- Implement various test cases to ensure correct functionality of StructuredOutputComponent.
- Test successful structured output generation, handling of unsupported language models, and correct output model building.
- Validate handling of multiple outputs, empty and invalid output schemas, and nested schemas.
- Include tests for large input values and invalid language model configurations.
* Update description for StructuredOutputComponent to clarify functionality
* Add default values and error handling for structured output in helpers
* Remove unused 'method' parameter from 'with_structured_output' in MockLanguageModel
* refactor: rename test_base_model.py to test_base_model_from_schema.py
Rename the test_base_model.py file to test_base_model_from_schema.py to better reflect its purpose of testing the build_model_from_schema function. This change improves code clarity and maintainability.
* Add type ignore comments to suppress type checking errors
* Add Generic typing to StructuredOutputComponent and fix method call
* Revert "Refactor output schema handling to use TableInput and build_model_from_schema"
This reverts commit 2e84a8608689bcfb519dc589d3eeef852784f3e4.
* Deprecate JSON mode in OpenAIModel output schema documentation
* Remove unused Generic import and add type ignore comment in StructuredOutputComponent
* Refactor OpenAI model components and deprecate output schema
- Refactored `OpenAIModelComponent` to use `operator.ior` and `functools.reduce` for converting `output_schema` to a dictionary.
- Deprecated the `output_schema` field, updating its info to reflect the deprecation.
- Simplified the `_docs_to_data` method in `SplitTextComponent` for better readability.
- Updated import statements and removed unused imports across multiple JSON files.
* Add specific type ignore comments and update exception types in backend code