Commit graph

11,537 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
3e23800199
feat: Implement streaming support and EventManager integration in flow execution (#5460)
* refactor: add create_stream_tokens_event_manager for handling streaming events

* feat: integrate EventManager into run_graph_internal for enhanced event handling

- Added EventManager import and parameter to run_graph_internal function.
- Updated function call to include event_manager for improved event management during graph execution.

* feat: enhance Graph class with event_manager parameter

- Added event_manager parameter to multiple methods in the Graph class to facilitate better event management during graph execution.
- Updated process and run methods to include event_manager, ensuring it is passed through to relevant function calls.
- Improved documentation for methods to reflect the new event_manager parameter.

* feat: implement streaming support in flow execution with EventManager integration

- Added support for streaming responses in the simplified_run_flow endpoint, allowing real-time event handling during flow execution.
- Introduced consume_and_yield and run_flow_generator functions to manage event consumption and client communication.
- Integrated EventManager for enhanced event tracking, including success and error notifications.
- Updated endpoint documentation to reflect new streaming capabilities and parameters.
- Improved error handling and logging for better debugging and client disconnection management.

* refactor: remove request logging from simplified_run_flow endpoint

- Removed the logging of the request object in the simplified_run_flow function to streamline logging and reduce verbosity.
- This change enhances the clarity of logs by focusing on essential information during flow execution.
2025-01-03 14:21:14 +00:00
Sebastián Estévez
63d649b0f4
feat: add anthropic mcp endpoint (#5148)
* mcp WIP

* [autofix.ci] apply automated fixes

* logging and flow user check

* mcp stdio client component

* handle disconnect better

* initialization

* session fix and type fix

* [autofix.ci] apply automated fixes

* defensive against mcp server bugs

* [autofix.ci] apply automated fixes

* notifications and sse component

* enabled flags and resource support

* remove unneeded print

* extract json schema util

* [autofix.ci] apply automated fixes

* ruff

* fix tools [] bug and db asysnc session api change

* Tool instead of StructuredTool

* ruff fixes

* ruff

* validation optimization

* fix frontend test

* another playwright fix

* Update src/frontend/tests/extended/features/notifications.spec.ts

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

* mcp component descriptions

* mypy fixes

* fix setup_database_url test

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-03 04:45:54 +00:00
Mendon Kissling
ee19feaf39
docs: add components-processing link to sidebar and update documentation link in component (#5526)
feat: add components-processing link to sidebar and update documentation URL for RecursiveCharacterTextSplitter
2025-01-02 22:04:37 +00:00
Rodrigo Nader
70eaacfd36
feat: improve gitloader component (#5351)
* feat: improve gitloader component

* [autofix.ci] apply automated fixes

* feat(git.py): refactor GitLoaderComponent to support asynchronous operations and improve temporary directory management

- Convert methods to async to enhance performance with file operations.
- Implement async context manager for handling temporary clone directories.
- Update binary file check and content filtering to be asynchronous.

* fix(git.py): enhance GitLoaderComponent with improved file filtering and binary check

- Refactor file filtering logic to utilize fnmatch for pattern matching.
- Introduce a new method to check for binary files based on null byte detection.
- Update content filtering to handle exceptions more gracefully.
- Modify temporary directory cleanup to use rmdir instead of remove for better directory management.
- Adjust load_documents method to utilize asyncio.to_thread for lazy loading of documents.

* refactor(git.py): enhance GitLoaderComponent with improved file filtering and binary check

- Refactor binary file check to be synchronous and handle exceptions more gracefully.
- Introduce new methods for checking file patterns and content patterns, allowing for more flexible filtering.
- Consolidate filtering logic into a single method for better maintainability.
- Update load_documents method to run lazy loading in a separate thread for improved performance.

* feat(tests): add unit tests for GitLoaderComponent file filtering and binary detection

- Introduced new test suite for GitLoaderComponent, including tests for binary file detection and file pattern matching.
- Implemented temporary file creation for testing various file types and permissions.
- Added tests for combined filtering functionality, ensuring robust handling of file and content patterns.

* refactor(git.py): improve pattern handling and content filtering in GitLoaderComponent

- Refactored pattern handling to use a more descriptive variable name `pattern_list` for clarity.
- Enhanced content filtering by ensuring proper encoding when reading file content.
- Updated regex validation to include a test string check for better error handling.
- Removed unnecessary comments to streamline the code and improve readability.

* fix: exception TypeError

TypeError: object async_generator can't be used in 'await' expression

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
2025-01-02 16:39:16 +00:00
anovazzi1
bf7d089847
Refactor: Remove unused API functions (#5488)
* refactor: Remove unused api functions

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-01 03:37:13 +00:00
Ítalo Johnny
c55edcd97f
fix: resolve data keyword conflict in template formatting (#5483)
* fix: resolve data keyword conflict in template formatting

* refactor: simplify code

* test: add unit tests

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-31 13:13:31 +00:00
anovazzi1
52b2913abe
fix: Update dimensions of SvgLangwatch component (#5424)
refactor: update dimensions of SvgLangwatch component
2024-12-30 20:48:08 +00:00
Cristhian Zanforlin Lousa
eb120c116e
feat: enhance UX with clickable items and simplified structure (#5387)
🔧 (dropdownComponent/index.tsx): refactor dropdownComponent to improve code readability and remove unnecessary ShadTooltip component
2024-12-30 19:39:14 +00:00
Christophe Bornet
870aedf74e
fix: Fix parallel execution of alembic with SQlite (#5404)
Fix parallel execution of alembic with SQlite
2024-12-30 18:10:33 +00:00
Rogério Chaves
2ce33d41a8
fix(LangWatch): make current trace available for custom code to hook on to, allow to override input/output, fix icon (#5484)
* Call __enter__ to make current langwatch trace available globally so users can more easily add more context to it, like final input and output. This means also skipping setting the root_span input and output if already set

* Update LangWatch logo
2024-12-30 17:59:01 +00:00
Cristhian Zanforlin Lousa
86b3aefe89
fix: Prevent template value from overriding user input on tab switch (#5369)
* 🐛 (newChatView.tsx): fix issue where chat value was not being cleared when tab is hidden

* 🔧 (newChatView.tsx): refactor setting chat value to handle additional condition for better logic clarity
2024-12-30 13:40:01 +00:00
VICTOR CORREA GOMES
9d64d08cb5
feat(conditional-router): rename 'matches regex' to 'regex' (#5410)
* feat(conditional-router): rename 'matches regex' to 'regex'

- Simplify the operator name in the ConditionalRouter component
- Update dropdown options for better UX
- Maintain existing functionality while using more concise naming

* [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>
2024-12-30 12:28:33 +00:00
dhlidongming
9ee63109d4
fix: unify delete logic and fix cascade deletion for flows (#5466)
* Fix incomplete cascade deletion for flows.

* [autofix.ci] apply automated fixes

* Remove modification.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-29 13:52:53 +00:00
Andrey Tatarinov
5640f84f54
fix: StructuredOutputComponent tool name generation for multiple=True mode (#5476)
StructuredOutputComponent: fix tool name generation for multiple=True mode
2024-12-29 13:52:48 +00:00
Christophe Bornet
e91bcc2520
ref: Some ruff fixes from preview (#5420)
* Some ruff fixes from preview

* [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-28 21:25:35 +00:00
Christophe Bornet
3454ede5a5
ref: Use better task cancellation logic (#5397)
Use better task cancellation logic

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-12-28 04:54:55 +00:00
tushar-composio
c4de1da4d4
fix: fetch composio apps list dynamically (#5427)
* fix: fetch composio apps list dynamically

* Ensure apps only get loaded once API key is entered

* Add comment

* typo fix

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-12-28 00:08:18 +00:00
Feng
a626209da6
fix: error message issue when "exception.body" is None (#5464)
fix errormessage issue when "exception.body" is None

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-12-27 23:48:20 +00:00
Gabriel Luiz Freitas Almeida
8cbc6a9085
refactor: update simple API test JSON (#5469) 2024-12-27 09:21:37 -08:00
Gabriel Luiz Freitas Almeida
0118e98b5c
fix: adjust mouse actions in regression test for proper drag-and-drop (#5462) 2024-12-26 14:28:05 -08:00
Gabriel Luiz Freitas Almeida
5fd601bb77
tests: fix tests that use Chat Input (#5461) 2024-12-26 13:46:20 -08:00
Gabriel Luiz Freitas Almeida
d31be29245
fix: Update import path for IOModal to new naming convention (#5423) 2024-12-24 04:34:43 -08:00
Cristhian Zanforlin Lousa
4fec41fcce
perf: add useMemo to chatHistory to avoid unecessary renders on Playground (#5376)
* fix uncessary renders on chat

* 📝 (chat-view.tsx): optimize rendering performance by memoizing ChatMessage component and using memoized version for chat history items

* ♻️ (chat-view.tsx): refactor memoized ChatMessage component to include additional props for improved performance and accuracy
2024-12-24 01:16:36 +00:00
Lucas Oliveira
ca8f3cad62
feat: add generic handle that inherits colors for multiple types (#5414)
* Fixed HandleTooltipComponent to use the type instead of passed color

* Fixed handle colors to use the connected edge color

* Changed color of generic handle

* Fixed edge color when clicking for generic handles

* Updated sidebar filter to contain more than one type

* fixed gradient generalBugs
2024-12-23 22:18:11 +00:00
Lucas Oliveira
bd7f913d28
fix: add minimized attribute to components and make chatinput and chatoutput start minimized by default (#5374)
* Added Minimized field to backend to make component start as minimized

* Added minimized as true to chat components

* Added showNode default value as the opposite of minimized

* Changed starter projects to new components

* [autofix.ci] apply automated fixes

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

* Fixed Freeze and DecisionFlow tests

* Fixed other tests that involved chatoutput and chatinput

* Restored tests that didnt fail

* Fixed stop playground test

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-23 22:09:22 +00:00
Cristhian Zanforlin Lousa
b4673d3656
refactor(sidebar): Optimize FlowSidebarComponent with improved search and performance (#5411)
*  (flowSidebarComponent/index.tsx): reorganize imports and remove unnecessary comments for better code readability and maintainability
♻️ (flowSidebarComponent/index.tsx): refactor filtering logic to improve performance and readability
🔧 (flowSidebarComponent/index.tsx): update variable names and state management for better clarity and consistency
💡 (flowSidebarComponent/index.tsx): add comments and organize code structure for easier understanding and future development

📝 (flowSidebarComponent/index.tsx): refactor useEffect hooks to improve code readability and maintainability
📝 (flowSidebarComponent/index.tsx): refactor drag handling function to use useCallback for better performance
📝 (flowSidebarComponent/index.tsx): refactor bundle and category checks to use useMemo for better performance

* ♻️ (flowSidebarComponent/index.tsx): Remove unnecessary comments and optimize code readability by removing redundant comments and improving code structure.

* package-lock
2024-12-23 20:16:33 +00:00
Cristhian Zanforlin Lousa
c227a9b58d
refactor: update GlobalVariableModal description text (#5405)
📝 (GlobalVariableModal.tsx): update description text to remove incorrect information about encryption for better clarity
2024-12-23 18:55:43 +00:00
Lucas Oliveira
1daf915169
fix: add data field to returned object on flowheader if flow is a component (#5373)
* Fixed FlowHeader model validator, adding data and removing it if flow is not a component

* [autofix.ci] apply automated fixes

* Fixed flowheader to use fieldvalidator instead of modelvalidator

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-23 18:54:40 +00:00
Christophe Bornet
9fc3601df8
fix: Fix parallel execution of alembic with PostgreSQL (#5408)
Fix parallel execution of alembic with PostgreSQL
2024-12-23 18:53:07 +00:00
Jordan Frazier
b2e7476d3b
fix: add initial setup validations (#5385)
* convert flow ids to uuids when loading from dir

* Edit a migration file to check for foreign key existence

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-21 00:23:21 +00:00
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
Cristhian Zanforlin Lousa
01c1d47ff5
refactor: Enhance error handling, message editing and prompt display (#5310)
* 📝 (newChatMessage.tsx): add event listener to handle tab visibility change and update state accordingly
📝 (newChatMessage.tsx): remove event listener when component unmounts to prevent memory leaks

*  (use-tab-visibility.tsx): introduce custom hook useTabVisibility to track tab visibility changes in the browser
📝 (newChatMessage.tsx, newChatView.tsx): import and use useTabVisibility hook to handle tab visibility changes and update chat behavior accordingly

* 📝 (newChatMessage.tsx): remove duplicate import of useTabVisibility and update import path
📝 (newChatView.tsx): remove duplicate import of useTabVisibility and update import path
 (use-tab-visibility.tsx): create a new custom hook to track tab visibility changes in the browser

* reducing to smaller components

* 📝 (frontend): remove unused imports and clean up code in various files to improve code readability and maintainability

* 📝 (editMessage/index.tsx): Rename EditMessage component to MarkdownField for better clarity and consistency
📝 (newChatMessage.tsx): Replace EditMessage component with MarkdownField component for rendering chat messages with markdown support
📝 (newChatView.tsx): Add conditional rendering to display a message when no chat messages are fetched

 (chatViewWrapper/index.tsx): Add messageFetched prop to ChatView component to handle messages fetching status and improve component functionality.

* prompt viedw

* Refactor chat view component and remove unused prop

* [autofix.ci] apply automated fixes

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-19 19:50:05 +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
Cristhian Zanforlin Lousa
435d86067c
refactor: improve conditional rendering on panel buttons (#5365)
add render condition on modal buttons
2024-12-19 18:35:11 +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
Cristhian Zanforlin Lousa
fa46786f47
fix: remove redundant memoization from parameter render components to fix input cursor position (#5347)
 (parameterRenderComponent/index.tsx): Refactor ParameterRenderComponent to improve code readability and maintainability. Remove unnecessary memoization and useCallback hooks, simplify component rendering logic, and optimize component structure.
2024-12-19 18:19:18 +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
Lucas Oliveira
c0ffb86c13
fix: make search on sidebar shortcut not be triggered inside inputs (#5345)
* added search components on sidebar shortcut

* Implemented search components sidebar shortcut on flow sidebar component

---------

Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
2024-12-19 17:27:03 +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
Gabriel Luiz Freitas Almeida
be612eb6d3
test: Update test descriptions to indicate requirement for store API key (#5359)
* test: update test descriptions to indicate requirement for store API key

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-19 16:37:28 +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