Commit graph

5,939 commits

Author SHA1 Message Date
Í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
VICTOR CORREA GOMES
ef6226d25d
feat: Enhance ConditionalRouterComponent with Regex Matching and UI Improvements (#5217)
* fix: revert response return type to Message for compatibility

* Change the max_iterations and case_sensitive advanced options

* feat: add regex matching and real-time refresh functionality

* Refactor evaluate_condition method to use elif statements for clarity

- Changed if statements to elif in the evaluate_condition method to improve readability and indicate mutually exclusive conditions.

- Removed redundant advanced=True line from BoolInput for case sensitivity.

* [autofix.ci] apply automated fixes

* Format code using make format

- Applied code formatting to ensure consistency and adherence to style guidelines.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
2024-12-16 10:13:25 -08:00
anovazzi1
dffc2d51cd
feature: Improve Table customization to enhance ux on tool mode (#5216)
* refactor: Add field validation options to TableOptions

* refactor: Add field validation options and trigger text/icon to TableMixin

* refactor: Add field validation options and trigger text/icon to TableMixin

* refactor: Add field validation options and trigger text/icon to TableMixin

* update table trigger for toolmode usage

* Refactor table trigger and field validation options

- Updated the table trigger for toolmode usage
- Added field validation options and trigger text/icon to TableMixin
- Modified TableOptions to block certain actions and hide options

* Refactor TableOptionsTypeAPI field names for blocking actions

* Refactor TableOptions default values for blocking actions

* Refactor TableOptions default values for blocking actions

* Refactor TableOptions component to include tableOptions prop

* Refactor table selection and pagination options

* Refactor TOOL_TABLE_SCHEMA to disable sorting and filtering for the "name" and "description" fields

* Refactor TableOptions to allow blocking hiding of fields

* Refactor TableModal and TableNodeComponent to include support for block hiding columns

* Refactor Column model to include support for different edit modes

* Refactor TableOptions to include support for field parsers

* Refactor TableOptions to include support for field parsers and blocking hiding of fields

* Refactor TableOptions to include support for inline editing of fields

* Refactor App.css to style large text inputs and text areas in AgGrid

* update types

* Update table modal to prevent closing the the modal while editing cell

* Refactor string manipulation utilities to support parsing and transforming strings based on specified field parsers

* add inline input support

* Refactor TextModal component to remove close button in the footer

* add field parser in context

* format code

* format code

* Add disable_edit field to Column class

* Refactor TableNodeComponent to exclude columns with disable_edit field from being editable

* [autofix.ci] apply automated fixes

* Fix casing in selector text for "Open table" in tableInputComponent tests

---------

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-16 17:50:00 +00:00
Edwin Jose
13a468027b
fix: fixes agents issue by removing depreciated feature output parser from the LLM Model Components (#5242)
* remove depreciated output parser

* Update model.py

* [autofix.ci] apply automated fixes

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

* Update model.py

* Update src/backend/base/langflow/base/models/model.py

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

* [autofix.ci] apply automated fixes

---------

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-16 16:04:24 +00:00
Christophe Bornet
8d66754380
ref: Remove unused build_lc_memory (#5228) 2024-12-16 15:34:48 +00:00
Jan Heimes
e8667009b7
feat: add needle as custom component (#4657)
* init: add needle as custom component

* [autofix.ci] apply automated fixes

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

* stage changes

* upgrate: langchain-community

* lint

* [autofix.ci] apply automated fixes

* techdebt: package-lock.json

* [autofix.ci] apply automated fixes

* techdebt: lint with working needle

* techdebt: use Component class and Integrate with other components

* techdebt: adjust needle component

* [autofix.ci] apply automated fixes

* lint

* fix: package json & lock not in sync

* chore: remove outdated dependencies from pyproject.toml

* Removed pyautogen and several langchain-related packages to streamline dependencies and reduce potential conflicts.

* [autofix.ci] apply automated fixes

* refactor: simplify needle component API key handling and clean up imports

* Streamlined API key retrieval by removing unnecessary SecretStr usage, defaulting to empty strings if keys are not provided.
* Consolidated import statements for better readability and organization.

---------

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-16 15:11:31 +00:00
Rodrigo Nader
c82aeb2536
feat: improve component configuration and input clarity (#5267)
* Add tool mode to structured output component

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
2024-12-16 14:39:33 +00:00
Christophe Bornet
ddb53ab83d
fix: Put back some sync methods for backward compatibility. (#5269)
* Put back some sync methods for backward compatibility.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-16 14:18:16 +00:00
Jordan Frazier
ba6f5183be
ci: update docker image configuration for secure deployments (#5259)
* changes required for openshift to work with read-only dirs
2024-12-13 22:38:55 +00:00
Eric Hare
77a82d7cc5
fix: set embedding dict to empty if vectorize (#5258)
* fix: set embedding dict to empty if vectorize

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-13 20:25:47 +00:00
Eric Hare
b28c6dcc55
fix: support additional autodetect astradb params (#5254)
* fix: support additional autodetect astradb params

* [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-13 16:23:43 -03:00
Sergey Ryabov
ee31f152ad
feat: Add AgentQL integration (#4998)
AgentQL is a query language and a set of supporting developer tools designed to identify web elements and their data using natural language and return them in the shape you define.
Added AgentQL data extraction component. See: https://docs.agentql.com/rest-api/api-reference

This pull request introduces a new component, AgentQL, to both the backend and frontend of the project. The changes include the implementation of the AgentQL component, its integration into the frontend, and the addition of a new icon for AgentQL.

* feat: Add AgentQL integration

* upd: Update the logo

* upd: Update field type

* upd: Address feedback + better error handling

* upd: Change DictInput type & mark 'advanced' fields

* upd: Update wording

* upd: Update wording

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2024-12-13 13:38:09 -05:00
Gabriel Luiz Freitas Almeida
c40be15e9b
refactor: reduce logging of SQLite pragmas and enhance model provider type safety (#5235)
* feat: add ModelProvidersDict TypedDict and update MODEL_PROVIDERS_DICT type annotation

- Introduced ModelProvidersDict as a TypedDict to define the structure for model provider configurations.
- Updated MODEL_PROVIDERS_DICT to use the new TypedDict for improved type safety and clarity.
- Enhanced code readability and maintainability by specifying input types for model providers.

* fix: prevent duplicate logging of SQLite pragmas in DatabaseService

- Added a flag to track whether SQLite pragmas have been logged to avoid redundant log entries.
- Improved logging efficiency by ensuring that the debug message for setting pragmas is only logged once per session.
2024-12-13 14:20:55 +00:00
Christophe Bornet
384ac5e80e
ref: Add and use update_component_build_config utility (#5226)
* Add and use update_component_build_config utility

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-12 23:58:19 +00:00
Raphael Valdetaro
67892d4292
feat: add gemini-2.0-flash-exp and gemini-exp-1206 models (#5213) 2024-12-12 21:21:46 +00:00
Gabriel Luiz Freitas Almeida
222f15d8a1
fix: Ensure safe assignment to tool_blocks_map in agent_message handling (#5239)
fix: ensure tool_blocks_map assignment is safe by checking content availability in agent_message
2024-12-12 20:45:34 +00:00
Gabriel Luiz Freitas Almeida
c6b1eaba60
feat: add support for Python 3.13 (#5238)
* chore: update Python version requirement and remove deprecated dependencies in pyproject.toml files

* Updated Python version requirement to allow up to 3.14 in both main and base pyproject.toml files.
* Removed deprecated dependencies: cohere and pyautogen from the main dependencies list.

* chore: update Python version requirements and add support for Python 3.13 in uv.lock

* Updated the required Python version to allow up to 3.14.
* Adjusted resolution markers for Python versions to include 3.13.
* Added markers for the 'typing-extensions' dependency to restrict it for Python versions below 3.13.
* Included additional wheel files for various packages to support Python 3.13 compatibility.

* Update Python version requirements in README files to support Python 3.13

* Update Python version in GitHub Actions workflow to 3.13

* Update Python version in GitHub Actions workflows to include 3.13

* Update installation documentation to support Python 3.13 and clarify troubleshooting steps

* revert changes to docs until we release

* chore: add ag2 dependency and update uv.lock for Python 3.13 compatibility

* Added ag2 version 0.3.2 and 0.5.2 to pyproject.toml and uv.lock with appropriate resolution markers for Python versions.
* Included flaml version 2.3.2 in uv.lock to ensure compatibility with the new ag2 dependency.
* Updated dependency specifications to support Python 3.13 and above.
2024-12-12 12:24:43 -08:00
Eric Hare
a17335e802
fix: Do a better job of mapping Langchain to LiteLLM (#5233) 2024-12-12 18:56:39 +00:00
anovazzi1
0531084e35
fix: Refactor JSON serialization in build_flow and log_vertex_build (#5189)
* refactor(langflow): Update JSON serialization in build_flow and log_vertex_build

* Refactor JSON serialization in build_flow and log_vertex_build functions

* Refactor JSON serialization in build_flow and log_vertex_build functions
2024-12-12 18:51:24 +00:00
Gabriel Luiz Freitas Almeida
2c0991f9cf
fix: make user_id variable valid and fix type signature in messages endpoints (#5236)
* fix: enhance user_id validation in CustomComponent to ensure correct UUID handling

* Added type checks for user_id to ensure it is either a string or a UUID before conversion.
* Improved error handling by raising TypeError for invalid user_id types.

* fix: update flow_id and session_id types to UUID in monitor endpoint

* fix: convert flow_id to UUID type before adding messages

* fix: convert flow_id string to UUID when storing message

* fix: update session_id type to string in get_messages endpoint for improved type consistency
2024-12-12 18:46:08 +00:00
Eric Hare
fc4d93a33d
fix: have defaults for the table schema (#5099) 2024-12-12 18:33:15 +00:00
Raphael Valdetaro
943bef1167
feat(component): implement directory component enhancements (#5012)
* feat: directory component enhancements

* [autofix.ci] apply automated fixes

* feat: update directory component implementation

* [autofix.ci] apply automated fixes

* feat(directory): add MultiselectInput for file types selection

* [autofix.ci] apply automated fixes

* Fix mypy issue

* Update directory.py

* fix: correct type annotation in DirectoryComponent to ensure list[Data] return type

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
2024-12-12 10:23:07 -08:00
Christophe Bornet
2e19403660
ref: Make list_flows async (#5222)
* Make list_flows async

* Keep sync list_flows method for backward compatibility
2024-12-12 16:02:43 +00:00
Cristhian Zanforlin Lousa
2e7a5cdd67
fix: improve UUID handling in custom component variables (#5230)
* 🐛 (custom_component.py): fix user_id assignment to convert it to UUID type for consistency and correctness

* [autofix.ci] apply automated fixes

* 🐛 (custom_component.py): fix potential bug by checking if self.user_id is a string before converting it to UUID

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-12 15:13:38 +00:00
Gabriel Luiz Freitas Almeida
3de42f4575
feat: Update SQLModel dependency and improve UUID handling (#4891)
* Update sqlmodel dependency to version 0.0.20 in pyproject.toml

* Handle UUID conversion for message IDs in memory update logic

* Refactor Alembic migrations to use `sa.inspect` and update GUID to Uuid type

* refactor: Change flow_id parameter type from str to uuid.UUID in graph building functions

* refactor: Ensure UUID handling for flow_id and user_id across various services and models

* refactor: improve UUID handling and graph caching for compatibility with sqlmodel 0.0.20

* fix: update message assertion in component events test

* chore: update sqlmodel dependency to version 0.0.22 in uv.lock and pyproject.toml

* fix: enhance flow_id validation to ensure valid UUID format in MessageBase model

* fix: add error handling for cache directory cleanup

* refactor: improve flow_id type handling in message storage

* refactor: enhance flow_id handling in message functions to support UUID type

* refactor: integrate Properties into message creation in component event tests

* update test durations

* fix: correct flow_id parameter in database query

* refactor: update session_id and flow_id parameters to support UUID type across message handling functions and models

* fix: handle message data update in SQLModel update method

* refactor: improve flow_id assignment in message update method to enhance UUID handling
2024-12-12 04:58:27 -08:00
Christophe Bornet
4cc336fa45
ref: Use async list_variables (#5224)
Use async list_variables
2024-12-12 12:28:32 +00:00
Cristhian Zanforlin Lousa
262e3bd3cc
fix: use SecretStr get_secret_value for LMStudio API key handling (#5200)
* 🐛 (lmstudiomodel.py): fix issue with accessing secret value in api_key variable to prevent potential errors

* ♻️ (lmstudiomodel.py): refactor api_key assignment to simplify code and improve readability

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-12 12:08:04 +00:00