Commit graph

6,115 commits

Author SHA1 Message Date
Christophe Bornet
4b0c42e520
feat: Bump blockbuster version to 1.5.5 (#5382)
Bump blockbuster version to 1.5.5
2024-12-20 13:45:06 +00:00
anovazzi1
243055e1cd
refactor: Simplify agent input text content construction (#5344)
* refactor: Simplify agent input text content construction

* Change HUMAN to Input

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-12-20 13:28:54 +00:00
Raphael Valdetaro
68c36c415e
feat(component): enhance merge data with standard operations (#5125)
* feat(component): enhance merge data with standard operations

- Add standard merge operations (concatenate, append, merge, join)
- Add operation selection via dropdown
- Return DataFrame output type
- Implement separate merge strategies

* style(component): improve merge data formatting

- Add MIN_INPUTS_REQUIRED constant
- Use descriptive DataFrame variable names
- Move return statement to else block
- Use list comprehension for better performance
- Fix unused loop variable
- Improve overall code formatting

* [autofix.ci] apply automated fixes

* Update src/backend/base/langflow/components/processing/merge_data.py

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* refactor: adjust merge_data operations to use langflow.schema.DataFrame

* Update Merge Data component name and description

* [autofix.ci] apply automated fixes

* refactor: enhance data merging logic in DataMergerComponent

- Improved type hinting for combined data structures to enhance code clarity.
- Streamlined the concatenation and merging operations to ensure consistent handling of string and object types.
- Updated the logic to correctly append values to lists when merging data inputs, improving data integrity in the merging process.

* revert merge data changes

* add data merger component

* refactor: remove DataMergerComponent and clean up imports

- Deleted the DataMergerComponent to streamline the processing components.
- Updated the __init__.py file to reflect the removal of the DataMergerComponent from the exports.

* refactor: enhance MergeDataComponent with new merge operations

- Introduced a new enum, MergeOperation, to define various data merging strategies: CONCATENATE, APPEND, MERGE, and JOIN.
- Updated the merge_data method to return a DataFrame instead of a list of Data objects, improving data handling.
- Enhanced input validation to ensure a minimum number of data inputs are provided.
- Streamlined the merging logic to support different operations, improving flexibility and usability of the component.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-12-20 12:17:17 +00:00
Abhishek Patil
fb9825ee65
fix: Resolve Auth field issue in Composio component and bump Composio (#5357)
* fix: replace single quotes with double quotes

* feat: update Composio component fields
2024-12-20 11:42:29 +00:00
Raphael Valdetaro
9a8f721515
feat: Add OpenRouter component for multi-provider model access (#5271)
* feat: add OpenRouter component for multi-provider model access

- Add OpenRouter integration with provider-based model selection
- Support dynamic model fetching from OpenRouter API
- Implement temperature and max tokens controls
- Add site URL and app name for rankings
- Include model tooltips with context length and descriptions

* fix: restore SambaNova component in models __init__.py

* refactor: simplify OpenRouter build_model method

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-19 19:29:45 +00:00
VICTOR CORREA GOMES
68deca4feb
refactor(components): Rename StoreMessage to MessageStore for Better Clarity (#5009)
* refactor: Rename store message component to message store

* [autofix.ci] apply automated fixes

* refactor: Rename store message component to message store

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* fix: restore StoreMessage name for backwards compatibility

* fix(core): rename store_message.py for compatibility

- Restore original filename to maintain system compatibility
- Ensure consistent file naming across codebase

* fix(ui): correct output message display name

- Update Output display_name from "Stored Messages" to "Stored Message"
- Maintain consistency in singular/plural naming conventions

* refactor: rename message_store to store_message in helpers module

- Updated import statement in __init__.py to reflect the new module name for MessageStoreComponent.
- This change improves clarity and consistency in the component naming convention.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-12-19 19:19:02 +00:00
Cristhian Zanforlin Lousa
b07bd173b4
feat: Add Pandas kwargs support for CSV Agent (#5372)
*  (csv.py): Add support for passing Pandas kwargs to the CSV agent for more customization and flexibility.

* 📝 (csv.py): mark 'is_list' attribute as True for the 'Pandas Kwargs' parameter to indicate it can accept a list of values
2024-12-19 19:17:26 +00:00
bhatsanket
e657e9de4a
fix: fix partition error in AstraDBCQLToolComponent (#4356)
* fix: AstraDBCQLToolComponent

Tool part is working fine but the direct Data output fails cause of partition key issue

* Ruff fix

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-19 19:00:00 +00:00
Gabriel Luiz Freitas Almeida
0619ed7248
refactor: add model validator to FlowHeader model and fix response handling (#5355)
* refactor: streamline imports and enhance flow header response handling in flows.py

- Consolidated import statements for better readability.
- Updated the response structure in the  function to utilize  for improved data validation and consistency.

* refactor: enhance FlowHeader model with detailed field descriptions and validation

- Updated FlowHeader model to include field descriptions for better clarity and documentation.
- Introduced a model validator to ensure data integrity before processing.
- Streamlined import statements for improved readability.

---------

Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
2024-12-19 18:58:09 +00:00
VICTOR CORREA GOMES
81da524375
feat(components): add LangWatch evaluator component - New Bundle (#4722)
* feat(components): add LangWatch evaluator component

* feat(langwatch): add tracing integration and custom endpoint support

* style(langwatch): update component name and svg icon

* [autofix.ci] apply automated fixes

* Clean code with code formatting styles

* Add contexts and expected_output also as dynamic fields

* refactor(langwatch): remove redundant logging and improve type hinting

- Removed unnecessary logger exception calls in error handling sections to streamline the code.
- Added type hinting for the trace_id assignment to enhance code clarity and maintainability.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Rogério Chaves <rogeriochaves@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-12-19 18:26:10 +00:00
Dario Saltarelli
c864929bde
fix: add endpoint_name to read_flows endpoint (#5354)
* fix: add endpoint_name whem mapping results for headers_flow parameter (#5353)

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Dario Saltarelli <dario.saltarelli@sscinc.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-19 18:10:40 +00:00
Gabriel Luiz Freitas Almeida
dd68a97567
feat: return variable value if it is a generic variable (#5366)
* fix: update pre-commit configuration for ruff formatting args

* fix: update variable type constant from GENERIC_TYPE to CREDENTIAL_TYPE

* feat: enhance variable service to handle decryption for generic type and update default variable type to CREDENTIAL_TYPE

* feat: add abstract method to retrieve all variables for a user in VariableService

* feat: implement get_all method in KubernetesSecretService to retrieve and decrypt user variables

* refactor: update variable tests to use fixtures for generic and credential types

- Renamed and refactored test fixtures for better clarity and reusability.
- Updated tests to utilize `generic_variable` and `credential_variable` fixtures instead of hardcoded values.
- Enhanced assertions to ensure correct handling of variable types, including encryption for credential variables and decryption for generic variables.
- Improved test structure for creating, reading, updating, and deleting variables, ensuring consistency across test cases.

* refactor: update get_all method signatures in variable services to return VariableRead

- Changed return type of the get_all method in VariableService, KubernetesSecretService, and DatabaseVariableService from list[Variable | None] to list[VariableRead].
- This update enhances type consistency across variable services and aligns with the new VariableRead model for improved data handling.

* fix: update variable type assertion in test_update_variable to CREDENTIAL_TYPE

- Changed the assertion in the `test_update_variable` test to verify that the result type is now `CREDENTIAL_TYPE` instead of `GENERIC_TYPE`.
- This update aligns the test with recent changes in variable type handling, ensuring accurate validation of variable updates.

* fix: update variable type assertion in test_create_variable to CREDENTIAL_TYPE

- Changed the assertion in the `test_create_variable` test to verify that the result type is now `CREDENTIAL_TYPE` instead of `GENERIC_TYPE`.
- This update ensures consistency with recent changes in variable type handling and improves the accuracy of the test validation.
2024-12-19 17:04:00 +00:00
Gabriel Luiz Freitas Almeida
b7f5a7fe9b
fix: avoid checking variables with empty value (#5367)
fix: enhance load_from_db field checks in custom component update and parameter loading

- Updated the condition in  to ensure that  only includes fields with a defined value.
- Modified the  function to skip parameters that are either not present or have a falsy value, improving robustness in parameter handling.
2024-12-19 17:01:15 +00:00
Eric Hare
22877ae920
feat: tool mode for all vector store components (#5348)
* feat: tool mode for all vector store components

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Update elasticsearch.py

* Update test_vector_store_rag.py

* Update vector_store_rag.py

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-19 16:49:09 +00:00
Saurabh Misra
a30ccc4302
feat: Install Codeflash optimizer github action (#5350)
* Install Codeflash optimizer github action

* try

* install the right dev

* try

* try

* try

* try

* try

* Python 3.12

* temp run

* test optimizing bubble sort

* try

* try

* finalize setup
2024-12-19 16:36:57 +00:00
Rodrigo Nader
62c13adcfd
feat: add dataframe operations component (#5341)
* add dataframe operations component

* populate entire new column with value

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* [autofix.ci] apply automated fixes

* Add unit tests for DataFrame operations in `test_dataframe_operations.py`

* **Import modules**
  - Import `pytest` and `pandas` for testing DataFrame operations

* **Define test cases**
  - Define test cases for edge cases like empty DataFrames and invalid column names
  - Include tests for operations like "Head", "Tail", and "Replace Value"
  - Use `pytest.mark.parametrize` to test multiple operations with different inputs
  - Add detailed assertions to verify the correctness of DataFrame operations

* [autofix.ci] apply automated fixes

* Remove test cases for DataFrame operations from `test_dataframe_operations.py`. This deletion includes all unit tests related to various DataFrame operations such as adding, dropping, filtering, and renaming columns, as well as handling edge cases like empty DataFrames and invalid operations. The removal streamlines the test suite by eliminating outdated or redundant tests.

* Add unit tests for DataFrame operations in

- Introduced a new test file  for organizing test components.
- Updated import paths for  to reflect the new module structure.
- Refactored test cases to use  for better readability and maintainability.
- Enhanced assertions in tests for various DataFrame operations, including handling of empty DataFrames and invalid operations.
- Improved code formatting for consistency and clarity.

* Refactor DataFrameOperationsComponent for improved readability and maintainability

- Consolidated import statements for clarity.
- Renamed variable `df` to `dataframe_copy` for better understanding.
- Streamlined the `perform_operation` method by replacing `elif` with `if` statements for clearer logic flow.
- Enhanced error message for unsupported operations to improve debugging.

These changes aim to enhance the code structure and make future modifications easier.

* Update unit tests for DataFrame operations in `test_dataframe_operations.py`

- Modified expected values in parameterized tests for various DataFrame operations, including "Add Column", "Filter", "Sort", "Head", "Tail", and "Replace Value" to reflect new test scenarios.
- Adjusted assertions to ensure they correctly validate the output of operations, particularly for lists of expected values.
- Enhanced error handling in the test for invalid operations to provide clearer feedback on unsupported operation types.

These changes improve the accuracy and robustness of the unit tests for DataFrame operations.

* Refactor DataFrameOperationsComponent methods to return DataFrame instances consistently

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-19 16:14:04 +00:00
Edwin Jose
41f83294a2
fix: code flash pr issues in Calculator and JSONCleaner Components (#5352)
* Update calculator.py

* Update json_cleaner.py

* [autofix.ci] apply automated fixes

* updated init

* updated format

format

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-19 15:38:59 +00:00
Edwin Jose
d5498cf3cb
fix: improve UUID handling in flow helpers (#5346)
* Update flow.py

solving error when user id is string and not uuid

* Update flow.py

* solve lint errors
2024-12-19 01:14:41 +00:00
Ítalo Johnny
2db5f93bd4
feat!: rename the type BaseChatMessageHistory to Memory (#5190)
* chore: rename the type BaseChatMessageHistory to Memory

* Added Memory type with same color as BaseChatMessageHistory

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Lucas Oliveira <lucas.edu.oli@hotmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-18 22:10:01 +00:00
VICTOR CORREA GOMES
e79b1649a5
feat: add tool_mode parameter to MessageTextInput in ID Generator Component (#5311)
* feat: add tool_mode parameter to MessageTextInput for enhanced functionality

* fix: update tool mode test to ensure correct functionality and response handling

- Adjusted test to wait for the "Toolset" element to appear before asserting its count.
- Modified code handling to replace "tool_mode=True" with "tool_mode=False" and verified the updated code is different.
- Added response check for the custom component to ensure a successful status (200) after submission.

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-12-18 21:54:13 +00:00
Saurabh Misra
214829ab45
refactor: (codeflash)️ Speed up method JSONCleaner._remove_control_characters by 1,491% (#5322)
* ️ Speed up method `JSONCleaner._remove_control_characters` by 1,491%
To optimize the function `_remove_control_characters`, we can use the `translate` method with a translation table to remove control characters. This method is generally faster than using regular expressions for character replacement/removal tasks.

Here is the optimized version of the program.



By precompiling the translation table in the `__init__` method, we're reducing the repeated overhead of creating this table every time `_remove_control_characters` is called. Using `str.translate` with this precompiled table significantly improves the performance compared to using a regular expression substitution.

* add super()

---------

Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
2024-12-18 21:53:59 +00:00
Saurabh Misra
90ba7f3ae7
refactor: (codeflash) ️ Speed up method CalculatorToolComponent._eval_expr by 103% (#5323)
* ️ Speed up method `CalculatorToolComponent._eval_expr` by 103%
Certainly! Here is an optimized version of the provided program.



### Changes Made.
1. **Caching Operators Dictionary**: 
    - Moved the operators dictionary to the `__init__` method of the class. This avoids redefining the dictionary every time `_eval_expr` is called.
    
2. **Avoid Repeated Type Checks**.
    - Used `elif` for subsequent checks to avoid unnecessary type checks if a condition is met early.

3. **Intermediate Variable Storage**.
    - Stored intermediate results (`left_val`, `right_val`, `operand_val`) to improve readability and potential slight performance gains by avoiding repeated function calls.

These changes improve speed and efficiency without significantly altering the logic or structure of the method. The returned value remains unaffected, meeting the requirement for an identical output to the original program.

* add super()

* ruff formatting

---------

Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
2024-12-18 21:53:37 +00:00
Cristhian Zanforlin Lousa
1e52711cf4
refactor: simplify input_types in LCToolsAgentComponent (remove BaseTool and StructuredTool) (#5084)
* 🔧 (agent.py): remove unnecessary input_types "BaseTool" and "StructuredTool" from the HandleInput class to simplify and clarify the code.

* 🔧 (sql.py): remove "BaseTool" from input_types in HandleInput to simplify the code and enhance clarity.

* 🔧 Refactor starter project JSON files to simplify inputTypes by removing "BaseTool" and "StructuredTool", retaining only "Tool" for clarity and consistency across multiple agent configurations.

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-12-18 20:57:37 +00:00
Christophe Bornet
3f0e383135
ref: Remove unused sync session_scope, with_session and engine (#5333)
Remove unused sync session_scope, with_session and engine
2024-12-18 20:52:06 +00:00
Edwin Jose
9bf372ee3e
feat: add ToolModeMixin to existting Input Types except SecretsInputs (#5339)
* adding  ToolModeMixin to paramters

* Update inputs.py

* Update inputs.py

updated inputs that doesnt require a tool as input. Removed tool mode mixin from unwnated input types

* Create test_toolmodemixin.py

updated tests

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-18 20:30:37 +00:00
Gabriel Luiz Freitas Almeida
0e1f1a48e2
feat: turn most class variables into instance variables in the Component classes (#5252)
* refactor: improve type checking and initialization in BaseComponent class

- Moved UUID import to TYPE_CHECKING for better type hinting without runtime overhead.
- Reorganized the initialization of class attributes within the __init__ method for clarity and consistency.
- Enhanced the __setattr__ method to handle potential KeyError and AttributeError when checking immutability of _user_id.

* refactor: streamline CustomComponent initialization and enhance attribute management

- Introduced ClassVar constants for better clarity and organization.
- Removed redundant class attributes and restructured instance attribute initialization for improved readability.
- Ensured that instance-specific attributes are initialized before calling the parent class's constructor.
- Enhanced the overall structure of the CustomComponent class to facilitate future maintenance and development.

* refactor: enhance Component initialization and attribute management

- Reorganized the __init__ method to initialize instance-specific attributes before calling the parent class constructor.
- Introduced new instance attributes for better management of inputs, outputs, and internal state.
- Improved clarity by processing input kwargs and ensuring unique ID assignment for components.
- Streamlined the setup process for inputs and outputs, enhancing overall structure and maintainability.

* test: Add unit tests for ChatInput component to verify attribute independence
2024-12-18 18:59:17 +00:00
Ítalo Johnny
fffc7fb73f
fix: file path handling for cross-os compatibility (#5342)
* test: add more unit tests

* fix: correct file path splitting to handle OS differences

* [autofix.ci] apply automated fixes

* fix: ruff error

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-18 18:51:48 +00:00
Gabriel Luiz Freitas Almeida
0c08bed713
fix: make serialization errors in component update show up in the UI (#5332)
* feat: Add SerializationError exception for improved error handling during data serialization

- Introduced a new SerializationError class to handle errors when serializing data to JSON.
- The class provides detailed error messages based on the type of serialization issue encountered, including async function handling and unsupported object types.
- Enhances the robustness of the application by providing clearer feedback for serialization-related errors.

* fix: Improve error handling in custom component update to include SerializationError
2024-12-18 18:36:55 +00:00
dhlidongming
6e162b5a73
perf: optimize vertex build query for recent records (#5301)
* Optimize query to fetch latest vertex builds.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-18 16:50:13 +00:00
Ali Saleh
82080ebade
feat: ArizePhoenixTracer v2 - Enhanced Session Tracking and Flow Organization (#5336)
Updated ArizePhoenixTracer
2024-12-18 16:32:58 +00:00
Christophe Bornet
51677667ab
fix: Fix missing await in initialize_alembic_log_file (#5334)
Fix missing await in initialize_alembic_log_file
2024-12-18 16:05:56 +00:00
Gabriel Luiz Freitas Almeida
d41d740768
fix: make errors in build_flow function use the standardized ErrorMessage schema (#5199)
* fix: enhance error handling in build_flow function by utilizing ErrorMessage schema

- Introduced ErrorMessage schema to standardize error reporting in the build_flow function.
- Updated error handling to include flow_id, session_id, and trace_name for better context in error messages.
- Improved clarity and maintainability of error handling logic across multiple exception cases.

* Remove session_id from ErrorMessage in chat endpoint

* fix: enhance error handling in build_flow function by checking for custom component existence

Updated the error handling logic in the build_flow function to safely access the trace_name of the custom component. This change ensures that if the custom component is not present, the trace_name will be set to None, improving the robustness of error reporting.

* fix: update ErrorMessage schema to allow optional session_id and source

- Modified the ErrorMessage class to accept optional parameters for session_id and source, enhancing flexibility in error reporting.
- Updated the initialization logic to handle None values for sender and component attributes, ensuring robustness in cases where source may not be provided.

* fix: improve error handling in build_flow function by using getattr for trace_name

Updated the error handling logic in the build_flow function to utilize getattr for safely accessing the trace_name attribute of the custom component. This change ensures that if the custom component is not present, trace_name will default to None, enhancing the robustness of error reporting.
2024-12-18 15:04:25 +00:00
Saurabh Misra
40d179ddc4
refactor: ️ Speed up method Graph.sort_chat_inputs_first by 152% (#5263)
* ️ Speed up method `Graph.sort_chat_inputs_first` by 152%
Certainly! Optimization in this large context requires streamlining I/O operations, leveraging efficient data structures, and minimizing repeated operations. Below is the optimized version that focuses on these aspects.



### Explanation of Improvements.
1. **Remove Unnecessary Attributes**: Removed unused attributes to reduce memory footprint and complexity.
2. **Streamlined `__deepcopy__` Method**: Combined conditional logic to avoid redundant checks.
3. **Efficient Loop Handling**: Used list comprehensions and in-place modifications for the layers in the `sort_chat_inputs_first` method to reduce additional loops and copies.
4. **Exception Handling**: Simplified exception raise statements for clarity.

These changes focus on minimizing redundant operations, optimizing data structure usages, and ensuring that the operations performed are as direct and efficient as possible. Further optimization could be performed by profiling this code with real data to identify specific bottlenecks.

* Remove extra imports

* fix lint issues

---------

Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
2024-12-18 14:55:48 +00:00
Pedro Pacheco
b98b225037
feat: add vector retrieval and update policy/template (#5218)
* Updated collection_indexing_policy to store the correct json. Added support for graph retrival and other minor imporvements

* Added RagGraph template

* [autofix.ci] apply automated fixes

* Corrected the class name to avoid ut failures

* [autofix.ci] apply automated fixes

* Updated _map_search_type to be less idiotic

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Renamed AstraDBGraphVectorStoreComponent back to its original form for convention sake

* Unrelated to the graph work

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Linting

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* [autofix.ci] apply automated fixes

* Delete src/backend/base/langflow/initial_setup/starter_projects/RagGraph.json

Remove template as per langflow team

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-12-18 14:50:36 +00:00
Christophe Bornet
8f6241be91
feat: Bump blockbuster version to 1.5.2 (#5331)
Bump blockbuster version to 1.5.2
2024-12-18 14:43:31 +00:00
Gabriel Luiz Freitas Almeida
5a8d73c5b2
fix: make messages appear in the correct order again (#5309) 2024-12-18 01:45:22 +00:00
Edwin Jose
d31cb351f3
fix: Error handling in loading components/features in Agent Component (#5320) 2024-12-18 01:30:34 +00:00
Christophe Bornet
c3f36b69a2
feat: Bump blockbuster version to 1.5.0 (#5292)
* Bump blockbuster version to 1.5.0

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-17 23:26:18 +01:00
anovazzi1
02fbb450db
feature: Add message feedback and update frontend interface (#5022)
* add style for message feedback

* add backend suprot to new feature

* update frontend interface and add handle function

* [autofix.ci] apply automated fixes

* Update tooltip content for bot messages

* Update evaluation icons styling

* Add custom thumb icons for thumbs up and thumbs down

* Add custom thumb icons for thumbs up and thumbs down

* Update thumb icons based on evaluation value

* [autofix.ci] apply automated fixes

* Update property name for positive feedback

* Update property name for positive feedback

* feat: Add data-testid attributes to helpful and not helpful buttons and update test of playground to include new functionality

* update test to include new message features
2024-12-17 19:09:06 +00:00
Ítalo Johnny
4be6b04d8c
fix: validate and test database connection URLs (#5178)
* test: add unit test for database url validation

* feat: add function to validate database urls

* refactor: use new database url validation function

* fix: ruff errors

* refactor: validate database urls using sqlalchemy

* test: add more cases for database url validation
2024-12-17 17:29:53 +00:00
Feng
3755e642b9
fix: Properly handle invalid endpoint parameters in Baidu Qianfan component (#5272)
* fix baidu qianfan model calling error

* update tests

* remove invalid tests

* [autofix.ci] apply automated fixes

* fix test issue

* ak sk secret string fix

* fix format

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
2024-12-17 08:36:24 -08:00
Gabriel Luiz Freitas Almeida
c97450dcf2
feat: add pydantic-ai and update dependencies to support it (#5297)
* chore: update weaviate-client version and add pydantic-ai dependency in pyproject.toml

- Updated weaviate-client from version 4.9.6 to 4.10.2.
- Added pydantic-ai dependency with a minimum version of 0.0.12.

* chore: update pydantic version in pyproject.toml from 2.7.0 to 2.10.0

* chore: update package versions and add new dependencies

- Added eval-type-backport version 0.2.0.
- Added griffe version 1.5.1 with colorama as a dependency.
- Updated grpcio-health-checking and grpcio-tools from version 1.62.3 to 1.68.1.
- Updated pydantic_core from version 2.18.4 to 2.27.1.
- Updated weaviate-client from version 4.9.6 to 4.10.2.

* chore: update pydantic version in dependency files

- Updated pydantic version from 2.10.0 to 2.10.1 in both uv.lock and pyproject.toml to ensure compatibility with the latest features and fixes.
2024-12-17 05:41:06 -08:00
Jordan Frazier
39b0d6dd1e
fix: move blocking io ops to async method on dbservice init (#5291)
* move blocking io ops to async method on init

* [autofix.ci] apply automated fixes

* use correct lib

* imports

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Christophe Bornet <cbornet@hotmail.com>
2024-12-17 13:21:33 +00:00
Saurabh Misra
a97c29fb39
refactor: ️ Speed up function find_cycle_vertices by 324% (#5262) 2024-12-16 23:33:37 -03:00
Eric Hare
a3d238c280
FIX: Clean up the advanced parameters in Astra DB Vector Store Component (#5298)
* fix: Clean up the list of params in AstraDB

* Clean up some more parameters

* Update Vector Store RAG.json

* [autofix.ci] apply automated fixes

* Update Vector Store RAG.json

* [autofix.ci] apply automated fixes

* Update Vector Store RAG.json

* Update astradb.py

* [autofix.ci] apply automated fixes

* Update Vector Store RAG.json

* [autofix.ci] apply automated fixes

* Update Vector Store RAG.json

* [autofix.ci] apply automated fixes

* Error if no file provided

* Fix base file value to be empty

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-17 02:33:07 +00:00
Saurabh Misra
e8d3714dc6
refactor: ️ Speed up function find_last_node by 29,891% (#5261)
️ Speed up function `find_last_node` by 29,891%
Certainly! We can optimize the existing code by minimizing the checks inside the loop and improving the lookup operations. Here's an optimized version of the program.



### Explanation.
1. **Set for Fast Lookup**: We first create a set of all source IDs from the edges. This is efficient because checking for membership in a set is on average O(1) time complexity.
2. **Iterate Through Nodes**: We loop through each node and check if its ID is not in the set of source IDs. If a node's ID is not found in the set, it means this node has no outgoing edges and is the "last node".

This approach ensures we only iterate over the edges once to create the set and then do a fast lookup for each node, improving the overall efficiency.

Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
2024-12-16 21:58:32 +00:00
dhlidongming
1ec63800b2
feat: implement pagination for transaction log queries (#5281)
* Add pagination support for transaction logs.

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Replace 'TransactionData' with 'data' variable.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-16 21:04:30 +00:00
anovazzi1
4736aaed8c
fix: update message update logic and add comment (#5295)
* refactor: Simplify message update logic in aupdate_messages function

* add comment
2024-12-16 12:05:54 -08:00
Edwin Jose
5b6bfcafe2
fix: Update stored message to give out only the latest message (#4954)
* Update store_message.py

update stored message to give out only the latest message

* Update store_message.py

* Update store_message.py

* Update store_message.py

update with error handling
2024-12-16 18:56:37 +00:00
Edwin Jose
4fc7b187c4
fix: fixes tool metadata order and update issue, resolves agent tool metadata update failure (#5248)
This pull request includes several changes to the langflow project, focusing on deprecating the agent_description feature and enhancing the tools' metadata handling. The most important changes include marking the agent_description as deprecated, updating the tools' metadata management, and adding tags to tools.
2024-12-16 18:33:35 +00:00