Commit graph

11,252 commits

Author SHA1 Message Date
italojohnny
876b26e1ac Add class with custom JSON serialization 2024-06-10 16:16:11 -03:00
ogabrielluiz
e6fefa680d Format tests and update prettier command 2024-06-10 15:23:52 -03:00
ogabrielluiz
1726561f39 format 2024-06-10 15:16:49 -03:00
ogabrielluiz
65773b424f refactor: Update .gitattributes to remove working-tree-encoding for .mdx and .json files 2024-06-10 14:30:27 -03:00
ogabrielluiz
f872a3e753 refactor: Update SelfQueryRetrieverComponent build method to handle different input types 2024-06-10 14:30:05 -03:00
ogabrielluiz
24e8da5086 refactor: Update ChromaComponent build method to allow duplicates in the Vector Store 2024-06-10 14:30:05 -03:00
ogabrielluiz
becdb49661 refactor: Rename 'document' variable to 'text' in chroma_collection_to_records function 2024-06-10 14:30:05 -03:00
cristhianzl
e719f1746f Merge branch 'cz/mergeAll' of https://github.com/langflow-ai/langflow into cz/mergeAll 2024-06-10 14:15:00 -03:00
cristhianzl
2f4ebb290a ♻️ (TableOptions): reorder imports for better readability
💄 (TableOptions): adjust gap between buttons for better UI spacing
💄 (TableOptions): update icon styles for better visual feedback
 (editNodeModal): add dark mode support for badge component
♻️ (editNodeModal): refactor function parameters for consistency
💄 (headerComponent): update icon hover color for better UX consistency
2024-06-10 14:14:39 -03:00
ogabrielluiz
6c27964edd 🐛 (custom_component.py): fix resolving path logic to handle empty path input and check if path parts exist before accessing the first part 2024-06-10 14:12:50 -03:00
ogabrielluiz
0de6c2a88f feat: Update Prompt class to assign formatted prompt to self.text 2024-06-10 14:12:32 -03:00
ogabrielluiz
f8aa1274fc (record.py): add __eq__ method to compare Record instances based on their data attribute 2024-06-10 14:12:24 -03:00
ogabrielluiz
6eac507eb9 feat: Update RecordsOutput build method to set status 2024-06-10 14:11:43 -03:00
ogabrielluiz
65037a43a5 refactor: Update session_id parameter in build_and_cache_graph_from_db function 2024-06-10 14:11:04 -03:00
cristhianzl
cab1f40b55 Merge branch 'cz/mergeAll' of https://github.com/langflow-ai/langflow into cz/mergeAll 2024-06-10 13:37:44 -03:00
cristhianzl
246ea90b23 (tailwind.config.js): add custom focus-visible styles to improve accessibility and user experience 2024-06-10 13:21:10 -03:00
ogabrielluiz
ed20dd606f chore: Update keyboard shortcut for API to "mod+shift+r" 2024-06-10 13:07:00 -03:00
ogabrielluiz
23b2bf2358 feat: Add SelfQueryRetrieverComponent to langflow retrievers 2024-06-10 12:59:06 -03:00
ogabrielluiz
d0a03b1563 feat: Add LangChainIcon component and export it in index.tsx 2024-06-10 12:51:30 -03:00
igorrCarvalho
fe3f365885 Fix: use stopImmediatePropagation to prevent macOS bugs 2024-06-10 12:39:39 -03:00
cristhianzl
f60abfdb8a Merge branch 'cz/mergeAll' of https://github.com/langflow-ai/langflow into cz/mergeAll 2024-06-10 12:06:04 -03:00
cristhianzl
119bd7397d (actionsMainPage.spec.ts): add steps to click 'more-options-modal' in end-to-end tests to ensure modal interactions are tested 2024-06-10 12:05:45 -03:00
ogabrielluiz
7557c7979c refactor: add utility function for converting chroma collection to records 2024-06-10 12:02:53 -03:00
igorrCarvalho
91e5aa1dc5 Merge branch 'cz/mergeAll' of github.com:langflow-ai/langflow into cz/mergeAll 2024-06-10 11:36:02 -03:00
igorrCarvalho
92b398d29b Refactor: block non supported file types 2024-06-10 11:35:40 -03:00
cristhianzl
5ef79e33fa ♻️ (csvOutputComponent): replace FlowPoolObjectType with VertexBuildTypeAPI for type consistency
💡 (IOFieldView): update console.log to provide more detailed flowPool node data
2024-06-10 11:35:20 -03:00
anovazzi1
9fe2d455f3 remove id update on db fetch flow 2024-06-10 10:51:01 -03:00
anovazzi1
28a463c49a Merge branch 'cz/mergeAll' of personal:langflow-ai/langflow into cz/mergeAll 2024-06-10 09:37:10 -03:00
anovazzi1
1a9bf3aec3 status on session 2024-06-10 09:37:02 -03:00
cristhianzl
5d34461ab5 ♻️ (buttonSendWrapper): refactor button to use Button component for consistency
 (buttonSendWrapper): add variant and size props to Button component for customization
2024-06-10 09:25:52 -03:00
italojohnny
05fd2ff67b fix: freeze 2024-06-10 09:13:30 -03:00
ogabrielluiz
05453e8eec chore: Add lcov coverage report for pytest 2024-06-10 09:11:52 -03:00
Lucas Oliveira
666815f996 Fixed formatting of jsons 2024-06-10 08:09:31 -03:00
Lucas Oliveira
ed117efb75
Minor UI Adjustments (#2122)
- Added shadow on nodes
- Removed unused buttons from API Node
2024-06-10 07:33:47 -03:00
Lucas Oliveira
5b3a6551ae Merge remote-tracking branch 'origin/cz/mergeAll' into fix/ui_adjustments 2024-06-10 07:32:18 -03:00
Igor Carvalho
20e7b82ba4
Feat: Implement Customizable Shortcuts
This pull request improve user experience by enabling customization of
keyboard shortcuts.
2024-06-10 01:08:26 -03:00
igorrCarvalho
75fa7c147b Fix: state not reseting properly 2024-06-10 00:29:48 -03:00
igorrCarvalho
983e03d714 Fix: modal leaving screen 2024-06-09 23:40:08 -03:00
Rodrigo
30ad86cb75 chore: Update cardComponent and button styles 2024-06-09 23:28:24 -03:00
Rodrigo
ec3c2b3ab7 refactor: Update display names for input fields in ChatComponent and TextInput
This commit updates the display names for the input fields in the ChatComponent and TextInput classes. The display name for the "Message" input field in ChatComponent is changed to "Text", and the display name for the "Value" input field in TextInput is changed to "Text". These updates improve the clarity and consistency of the input field labels.

Fixes #<issue_number>
2024-06-09 23:09:01 -03:00
Rodrigo
4de1a3afd9 add temporary fix for message["type"] 2024-06-09 23:08:15 -03:00
Gabriel Luiz Freitas Almeida
df57570852
refactor: migrate from Record to Message (#2113)
* chore: Update launch.json to use debugpy instead of python for debugging

* refactor: Update import statements for Record in langflow components

* feat: Add image handling functionality to langflow schema

* update projects

* 📝 (constants.py): Add 'output_types' to NODE_FORMAT_ATTRIBUTES for consistency and completeness

♻️ (setup.py): Refactor imports to improve readability and maintainability
♻️ (setup.py): Update code to remove fields that are not in the latest template for consistency

* refactor: Update schema from Record to Message

* refactor: Remove print statement in MonitorService

* refactor: Remove fields not in the latest template for consistency

* refactor: Update code to handle Record objects in utils.py

* update projects

* 📝 (monitor.py): Add type hint for message_id parameter in update_message function
📝 (parse.py): Rename ParsedContext to ParsedArgs for clarity
📝 (chat.py): Remove unused imports and methods in ChatComponent class
📝 (StoreMessage.py): Change return type of store_message method from list[Record] to list[Message]
📝 (base.py): Change type hint from Dict[str, str | list[str]] to Mapping[str, str | list[str]] in update_raw_params method
📝 (loading.py): Add condition to check if raw is not None before accessing its attributes in instantiate_custom_component function
📝 (memory.py): Change return type of get_messages function from list[Record] to list[Message]
📝 (memory.py): Change parameter type of add_messages function from Message to Message | list[Message]
📝 (image.py): Add type hint for image_prompt_value variable in Message class

🐛 (record.py): fix type hint for image_prompt_value variable to ImagePromptValue to improve code clarity and maintainability

* chore: Add orjson options for serialization

* chore: Update orjson options for serialization in setup.py

* chore: Update input_value options for models

This commit updates the input_value options for the models in the `OpenAIModel.py`, `MistralModel.py`, `CohereModel.py`, `VertexAiModel.py`, `ChatLiteLLMModel.py`, `OllamaModel.py`, `HuggingFaceModel.py`, `AnthropicModel.py`, and `AmazonBedrockModel.py` files. The `input_value` now supports the additional input type "Prompt". This change allows for more flexibility in the input data that can be provided to the models.

Fixes #<issue_number>

* chore: Update edges with latest component versions

This commit updates the edges in the project data with the latest component versions. It ensures that the source and target nodes are correctly updated based on their corresponding nodes in the project. The commit also includes escaping of JSON dumps for the source and target handles in the edges.

* 📝 (utils.py): Remove unnecessary async keyword from dict_values_to_string function to improve code readability and consistency
🔧 (utils.py): Simplify handling of Message objects by directly accessing the text property instead of calling to_lc_message() method

* chore: Refactor PromptComponent to use updated Prompt class and remove unused imports

* feat: Add support for image files in Message model

This commit modifies the Message model to support image files as attachments. It introduces the `is_image_file` function to check if a file is an image, and the `to_content_dict` method in the Image class to convert the image object to a content dictionary. Additionally, the `get_file_content_dicts` method is added to generate content dictionaries for all files in the message, including images. This enhancement improves the handling of image attachments in the messaging system.

Fixes #<issue_number>

* update projects and lock

* chore: Update LCModelComponent to use Prompt instead of Record

* refactor: Update artifact type to include message in utils.py

* fix: Add check for input_value to only pass if string

*  (switchOutputView/index.tsx): introduce constant RECORD_TYPES to store valid record types for better readability and maintainability
🔧 (switchOutputView/index.tsx): refactor switch cases to use RECORD_TYPES constant for checking valid record types and simplify the logic for handling different types of result messages

* feat: Enable loading from database for openai_api_key field in Langflow starter projects

This commit updates the Langflow starter projects by enabling the loading of the `openai_api_key` field from the database. Previously, the field was not being loaded from the database, but now it will be loaded and used in the projects. This change improves the functionality and flexibility of the projects.

Fixes #<issue_number>

* ♻️ (constants.py): remove unnecessary import statement and clean up code formatting in ORJSON_OPTIONS constant definition

* refactor: Update MemoryComponent to use messages instead of records

This commit updates the MemoryComponent class in the langflow/components/helpers/MemoryComponent.py file to use the term "messages" instead of "records" for better clarity and consistency. It also updates the get_messages method to return a list of Message objects instead of Record objects. This change improves the naming and readability of the code.

* refactor: Update Message model to include timestamp conversion function

This commit updates the Message model in the langflow/schema/message.py file to include a new function `_timestamp_to_str` that converts the timestamp to a string format. This function is used as a BeforeValidator for the `timestamp` field, ensuring that it is always formatted correctly. This change improves the consistency and reliability of the timestamp handling in the messaging system.

* refactor: Update test_data_components.py to improve directory component loading

This commit updates the test_data_components.py file to improve the loading of the directory component. It ensures that the directory component can load mdx files from the ../docs/docs/components directory. This change enhances the functionality and reliability of the directory component.

Fixes #<issue_number>

* refactor: Update .gitattributes to specify working-tree-encoding for .mdx and .json files

This commit updates the .gitattributes file to specify the working-tree-encoding for .mdx and .json files. It sets the encoding to UTF-8 for both file types, ensuring consistent handling of character encoding. This change improves the reliability and compatibility of the repository.

Fixes #<issue_number>

* fix: 🐛 corrects encoding error

* refactor: Update toolkits.mdx to improve documentation and fix formatting

* refactor: Add dictdiffer library as a dependency

This commit adds the dictdiffer library as a dependency in the poetry.lock file. The dictdiffer library is a useful tool for diffing and patching dictionaries. It will enhance the functionality and flexibility of the project.
2024-06-09 18:00:48 -07:00
igorrCarvalho
5028f80a63 Refactor: Simplify isThereModal function 2024-06-09 20:32:40 -03:00
igorrCarvalho
63dec536e6 Refactor: Create modal_classes constant 2024-06-09 20:31:46 -03:00
igorrCarvalho
4f80346602 Feat: create isThereModal validate function to prevent modals from opening on top of each other 2024-06-09 20:29:35 -03:00
igorrCarvalho
d07dec9195 Add preventDefault to every shortcut call 2024-06-09 19:06:05 -03:00
igorrCarvalho
c59542db19 Feat: add colorful padding to visual shortcut on toolbar 2024-06-09 19:00:09 -03:00
igorrCarvalho
d14e13d4e4 Feat: Add shortcut to open flow share modal 2024-06-09 18:51:31 -03:00
igorrCarvalho
2bbf01deaa Feat: add visual shortcuts to nodeToolbar tooltips 2024-06-09 18:11:34 -03:00
Rodrigo
3ddd42b127 chore: Update display name for input field in ChatComponent 2024-06-09 17:17:16 -03:00