Commit graph

9,296 commits

Author SHA1 Message Date
Lucas Oliveira
11281c509c removed console.log 2024-06-19 14:34:21 -03:00
Gabriel Luiz Freitas Almeida
1367212412 refactor: Update LogType to include ErrorLogType
The LogType in the schema module has been updated to include the ErrorLogType. This allows for more detailed logging of error messages, including the error message itself and the stack trace. This change improves the accuracy and usefulness of error logging in the application.
2024-06-19 12:24:02 -03:00
cristhianzl
4249170fa9 add tests to basic examples 2024-06-19 11:42:23 -03:00
Gabriel Luiz Freitas Almeida
27594e03dc refactor: Ensure data_input is always a list in RecursiveCharacterTextSplitterComponent 2024-06-19 11:32:09 -03:00
Gabriel Luiz Freitas Almeida
29052746a1 refactor: Update Component class to support dynamic attributes
The Component class in the custom_component module has been updated to support dynamic attributes. This allows users to access attributes that are not explicitly defined in the class. The __getattr__ method has been implemented to handle attribute retrieval. This change improves flexibility and extensibility of the Component class.
2024-06-19 11:32:02 -03:00
anovazzi1
ab9dc0dcd5 add scroll to error tooltip 2024-06-19 11:13:56 -03:00
Gabriel Luiz Freitas Almeida
4f7d453abc refactor: Ensure data_input is always a list in RecursiveCharacterTextSplitterComponent
To prevent potential errors, this refactor ensures that the `data_input` attribute in the `RecursiveCharacterTextSplitterComponent` class is always a list. If it is not already a list, it is converted to a list before processing. This change improves the reliability and consistency of the code.
2024-06-19 10:54:32 -03:00
anovazzi1
f4ef1d9007 Apply Prettier formatting 2024-06-19 13:51:44 +00:00
anovazzi1
481870f7bd add fitGridWidth autoSize Strategy 2024-06-19 10:50:19 -03:00
Gabriel Luiz Freitas Almeida
929bac56ed refactor: Remove lock parameter from build_vertex function 2024-06-19 10:37:26 -03:00
ogabrielluiz
49a7860aa5 Apply Ruff formatting 2024-06-19 13:17:38 +00:00
ogabrielluiz
c62acbb80d Apply Prettier formatting 2024-06-19 13:02:41 +00:00
Gabriel Luiz Freitas Almeida
cedab5c9d0 Merge remote-tracking branch 'origin/dev' into two_edges 2024-06-19 09:50:15 -03:00
Nicolò Boschi
47e63d1d02
fix: graph could re-run input vertices twice and override the input value (#2219) 2024-06-19 14:47:39 +02:00
Gabriel Luiz Freitas Almeida
58d596b8e3 Merge remote-tracking branch 'origin/dev' into two_edges 2024-06-19 09:37:58 -03:00
mmdsnb
f18ca3d8a1 BUG FIX 2152
When the cache expires, deleting the key from the cache will attempt to acquire a lock, which is not reentrant at this point, leading to suspension.
2024-06-19 05:08:32 -07:00
ogabrielluiz
6a6d0e7389 fix: rearrange imports 2024-06-19 01:25:48 -03:00
ogabrielluiz
be88c25dac Add io module for easier access to Inputs and Outputs 2024-06-19 01:22:59 -03:00
Rodrigo
40fd956c9c refactor: Update URLComponent and ParseDataComponent
This commit updates the URLComponent and ParseDataComponent classes in the URL.py and ParseData.py files respectively.

In URLComponent, the 'value' attribute in the 'urls' input has been removed, improving code clarity.

In ParseDataComponent, the 'value' attribute in the 'sep' input has been changed from '---' to '\n', enhancing the functionality of the component.

These changes optimize the code logic and ensure consistency in the codebase.
2024-06-19 01:13:26 -03:00
ogabrielluiz
bac6a8cdff Merge remote-tracking branch 'origin/dev' into two_edges 2024-06-19 01:11:38 -03:00
ogabrielluiz
2db30b42fc refactor: Update TextOutputComponent to set status with input value
This commit updates the TextOutputComponent class in the TextOutput.py file to set the status attribute with the input value. This change improves the code logic and ensures that the status is properly assigned.
2024-06-19 01:08:31 -03:00
ogabrielluiz
e1686e34df refactor: Update multiline property to true in Langflow Prompt Chaining.json
This commit updates the multiline property to true in the Langflow Prompt Chaining.json file. The multiline property was previously set to false, but it has been changed to true to allow for multiline input in certain fields. This change improves the functionality and flexibility of the prompt chaining feature.
2024-06-19 01:06:40 -03:00
ogabrielluiz
dfcba47e75 Update RAG project 2024-06-19 01:06:32 -03:00
ogabrielluiz
7a089e7d71 refactor: Update RecursiveCharacterTextSplitterComponent to use new input classes
This commit updates the RecursiveCharacterTextSplitterComponent class in the RecursiveCharacterTextSplitter.py file to use the new input classes from langflow.inputs.inputs module. The StrInput class has been replaced with TextInput, and the Document class has been replaced with DataInput. This change improves code organization and ensures compatibility with the latest input classes.
2024-06-19 01:04:05 -03:00
ogabrielluiz
2c2cc968e8 refactor: Remove MultilineMixin from StrInput class
This commit removes the MultilineMixin from the StrInput class in the inputs.py file. The MultilineMixin was unnecessary for the StrInput class and removing it simplifies the code and improves code clarity.
2024-06-19 01:03:55 -03:00
ogabrielluiz
95f1c563ef refactor: Update AstraVectorStoreComponent to inherit from LCVectorStoreComponent
This commit updates the AstraVectorStoreComponent class in the AstraDB.py file to inherit from the LCVectorStoreComponent class. By doing so, it ensures that the AstraVectorStoreComponent has access to the base functionality provided by the LCVectorStoreComponent. This change improves code organization and promotes code reuse.
2024-06-19 01:03:39 -03:00
ogabrielluiz
8440f3c0bb refactor: Remove unused code in ChromaVectorStoreComponent 2024-06-19 01:03:25 -03:00
ogabrielluiz
2b3ca8ecc6 refactor: Validate name overlap and attributes in FrontendNode class
This refactor adds a new method `validate` to the `FrontendNode` class in the `frontend_node/base.py` file. The `validate` method now calls two separate validation methods: `validate_name_overlap` and `validate_attributes`. The `validate_name_overlap` method checks for any overlap between input and output names, while the `validate_attributes` method checks for reserved attributes in the input and output names. These changes improve the reliability and maintainability of the code.
2024-06-19 01:03:19 -03:00
ogabrielluiz
395cf1f053 refactor: Remove console.log statement in FlowLogsModal component 2024-06-19 01:03:03 -03:00
ogabrielluiz
f4b369b837 refactor: Improve handling of inputValue in GenericModal component
This commit improves the handling of the inputValue in the GenericModal component. It checks if the inputValue is a string before assigning it to coloredContent. Additionally, it updates the classNames in the JSX elements to ensure consistent ordering. These changes enhance the reliability and maintainability of the code.
2024-06-19 01:02:55 -03:00
ogabrielluiz
68f5b38bd2 refactor: Improve TextOutputView component
This commit refactors the TextOutputView component to handle a specific case where the `value` prop is an object with a `text` property. It updates the component to check if the `value` is an object and if it contains the `text` property. If so, it assigns the value of `value.text` to `value`. This change improves the flexibility and usability of the component.
2024-06-19 01:02:46 -03:00
ogabrielluiz
d4a3e83e80 Update Blog Writer project 2024-06-18 23:33:54 -03:00
ogabrielluiz
ba90a4229c Format memory project 2024-06-18 23:08:04 -03:00
ogabrielluiz
4a546dbab7 refactor: Update loading.py to ignore Pydantic deprecation warnings
The code changes in loading.py add a filter to ignore Pydantic deprecation warnings when building custom components or components. This refactor improves the code's maintainability and ensures compatibility with the latest Pydantic version.
2024-06-18 23:07:43 -03:00
ogabrielluiz
ddd4ebf4fa refactor: Add get_message_from_openai_exception function to handle OpenAI exceptions
The code changes in exceptions.py add a new function `get_message_from_openai_exception` to handle exceptions raised by the OpenAI library. This function retrieves the error message from the exception and returns it. This refactor improves the error handling and enhances the code's robustness.
2024-06-18 23:07:12 -03:00
ogabrielluiz
86bdb23865 refactor: Add load_from_db attribute to SecretStrInput class
The code changes in inputs.py add a new attribute `load_from_db` to the `SecretStrInput` class. This attribute controls whether the input should be loaded from the database or not. By default, it is set to `True`. This refactor improves the flexibility and configurability of the code.
2024-06-18 23:07:00 -03:00
ogabrielluiz
3ea9d9c40a Update Basic Prompting project 2024-06-18 23:06:49 -03:00
ogabrielluiz
56f15e87b6 update Memory Conversation project 2024-06-18 23:06:39 -03:00
ogabrielluiz
2134abcaa9 refactor: Fix logger warning in Message class 2024-06-18 22:11:46 -03:00
ogabrielluiz
9ba00de4d5 refactor: Validate name overlap between inputs and outputs in FrontendNode
The code changes in `frontend_node/base.py` add a new method `validate_name_overlap` to the `FrontendNode` class. This method checks if any of the output names overlap with any of the input names and raises a `ValueError` if there is a duplication. This refactor improves the consistency and correctness of the code. The commit message follows the established convention of using a prefix to indicate the type of change.
2024-06-18 22:11:33 -03:00
ogabrielluiz
92bc06be00 refactor: Update WebhookComponent to use langflow.custom.Component and langflow.inputs.TextInput
The code changes in `Webhook.py` update the `WebhookComponent` class to inherit from `langflow.custom.Component` instead of `langflow.custom.CustomComponent`. It also replaces the `langflow.schema.dotdict` import with `langflow.template.Output` and updates the `build_data` method to use the `self.data` attribute instead of the `data` parameter. Additionally, it adds a new input `TextInput` for providing a JSON payload. This refactor improves the consistency and readability of the code. The commit message follows the established convention of using a prefix to indicate the type of change.
2024-06-18 22:11:21 -03:00
ogabrielluiz
599ef9cc73 refactor: Add MultilineMixin to StrInput for multiline input support and adapt validation 2024-06-18 22:11:06 -03:00
ogabrielluiz
01027cb7a3 🐛 (loading.py): Fix bug where custom component outputs and results were not properly assigned
🐛 (base.py): Fix issue where outputs were not initialized causing potential errors
2024-06-18 21:25:04 -03:00
ogabrielluiz
ba835dc16f refactor: Improve endpoint name uniqueness handling in create_flow function 2024-06-18 21:24:22 -03:00
ogabrielluiz
669237cbd9 refactor: Set user agent for API calls in base settings
The code changes in `base.py` add a `user_agent` attribute to the `Settings` class and a corresponding class method `set_user_agent` to set the user agent for API calls. If the `user_agent` is not provided, it defaults to "langflow". The method also updates the `USER_AGENT` environment variable and logs the new value. This refactor improves the flexibility and maintainability of the code. The commit message follows the established convention of using a prefix to indicate the type of change.
2024-06-18 21:03:43 -03:00
ogabrielluiz
22e3c86df7 chore: Update chat.py to set cache before closing stream
The code changes in `chat.py` update the `build_vertex_stream` function to set the cache using `chat_service.set_cache` before closing the stream. This ensures that the cache is updated with the latest data before the stream is closed. The commit message follows the established convention of using a prefix to indicate the type of change.
2024-06-18 20:48:08 -03:00
ogabrielluiz
decb741e13 🐛 (types.py): Fix get_edge_with_target method to return a Generator instead of a single ContractEdge instance
🐛 (types.py): Fix _get_result method to handle multiple edges with the same target_id
📝 (types.py): Add comments to clarify the purpose of setting the result in the vertex of origin
2024-06-18 20:47:58 -03:00
anovazzi1
63c38437d1 update background on prompt 2024-06-18 20:30:34 -03:00
anovazzi1
6488d27421 fix frozen ui 2024-06-18 20:02:26 -03:00
anovazzi1
0f8b1c729c Adjust initial width 2024-06-18 19:50:55 -03:00