Commit graph

12,533 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
23f0da7cbb fix docs build 2024-06-19 10:43:40 -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
Gabriel Luiz Freitas Almeida
ddc7719a6d chore: Apply Ruff formatting 2024-06-19 10:16:01 -03:00
Gabriel Luiz Freitas Almeida
3b8d90a06b refactor: Remove unused imports and update components in documentation
Remove unused imports and update components in the documentation files to improve code clarity and ensure consistency. This refactor optimizes the codebase and enhances the overall quality of the documentation.
2024-06-19 10:11:56 -03: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
c22d7a4a7a chore: Update lint-js workflow to run Prettier and commit changes
Apply Prettier formatting to the codebase by running the Prettier command in the src/frontend directory. Also, add a step to commit the changes automatically using the git-auto-commit-action. This update improves code formatting and ensures consistency in the repository.
2024-06-19 09:47:31 -03:00
Nicolò Boschi
6e49a2ec3b
fix test: test_data_components.test_directory_without_mocks (#2223) 2024-06-19 08:41:51 -04: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
b475e51c51 refactor: Update AstraDBMessageWriterComponent to use AstraVectorStoreComponent
This commit updates the AstraDBMessageWriterComponent class in the AstraDBMessageWriter.py file to use the AstraVectorStoreComponent for vector storage. By making this change, we ensure consistency and improve code organization. This update aligns with recent changes in the AstraDBVectorStoreComponent and promotes code reuse.
2024-06-19 01:07:05 -03:00
ogabrielluiz
b3de990beb refactor: Update langchain-astradb dependency to version 0.3.3
This commit updates the langchain-astradb dependency in the pyproject.toml file to version 0.3.3. This update ensures compatibility with the latest features and improvements in langchain-astradb.
2024-06-19 01:06:52 -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
74af14b373 refactor: Update docs_path in test_data_components.py to fix directory path
The code changes in test_data_components.py update the `docs_path` variable to fix the directory path for loading components. The previous path was incorrect, and this update ensures that the correct path is used. This refactor improves the accuracy and reliability of the code.
2024-06-18 22:42:14 -03:00
ogabrielluiz
412a793a4c refactor: Update DocumentsToDataComponent class name in test_helper_components.py
The code changes in test_helper_components.py update the class name from DocumentToDataComponent to DocumentsToDataComponent. This refactor improves the clarity and consistency of the code.
2024-06-18 22:42:06 -03:00
ogabrielluiz
ca95e66b88 (test_custom_component.py): update test_custom_component_get_function_entrypoint_args to reflect correct number of arguments in build method
📝 (test_custom_component.py): reorganize import statements for better readability and consistency
♻️ (test_custom_component.py): refactor build method in YourComponent class to simplify and improve code readability
2024-06-18 22:41:57 -03:00
ogabrielluiz
98e3f4bdaa refactor: Update langflow custom components to use specific input classes
The code changes update the langflow custom components to use specific input classes, such as IntInput and TextInput, instead of the generic field types. This refactor improves the clarity and type safety of the code.
2024-06-18 22:41:10 -03:00
ogabrielluiz
df04a329cc Update webhook test case 2024-06-18 22:17:35 -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