Commit graph

423 commits

Author SHA1 Message Date
Mendon Kissling
e2e18318d5
[Docs] - Multiple outputs (#2256)
multiple-outputs
2024-06-22 12:05:59 -04:00
Mendon Kissling
682a1c65fe
Docs 1.0a changes (#2241)
* folders

* screenshots

* output-preview

* custom-api-endpoint

* screenshots

* memory-management

* update-component-version

* img

* errors

* space

* fix-issue

* remove-weird-footers

* mdx

* fix-import
2024-06-21 17:24:50 -04:00
Gabriel Luiz Freitas Almeida
23f0da7cbb fix docs build 2024-06-19 10:43:40 -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
cristhianzl
fcf4512210 merge dev into two_edges 2024-06-17 10:01:28 -03:00
Madhavan
9bdd353666
Minor documentation update and exception message fix to avoid confusion with Google Vertex (#2088)
* Update to use non-deprecated output parser imports

* Update documentation

* Revert "Update to use non-deprecated output parser imports"

This reverts commit 11a969d82b6b2b3659eb7c3c26b5b29a98815834.

* Update rag-with-astradb.mdx

* Update chat.py to clarify error message

vertex in the exception message appears to be confusing with google vertex and causes confusion when used with other providers.

* Minor formatting to highlight the vscode launch file
update the error message

* Fix a couple more error texts
2024-06-15 07:06:07 -07:00
Mendon Kissling
c7a15de0a9
[Docs] - Link to new features from migration page (#2163)
* migration-page

* check-links

* try
2024-06-15 06:56:17 -07:00
Gabriel Luiz Freitas Almeida
dfc008b383
Update dependencies and fix docs (#2186)
* chore: Update chardet package to version 5.2.0

* chore: Update Docker build workflow to support multiple platforms and add container testing

* chore: Update pre-release workflow to include CLI testing

* chore: Update npm install command in lint-js.yml workflow

* chore: Update eslint and prettier versions in package.json

* fix: remove .mdx from link in docs

* Merge remote-tracking branch 'origin/dev' into update
2024-06-15 06:37:34 -07:00
ogabrielluiz
16089ea5b2 Another batch of renaming Record to Data 2024-06-12 18:18:03 -03:00
ogabrielluiz
1d0056f4fc rename Record to Data 2024-06-12 17:59:32 -03:00
Lucas Oliveira
850de6b952 Merge branch 'dev' into two_edges_merge 2024-06-11 18:11:13 -03:00
cristhianzl
34626f0531 merge dev 2024-06-11 09:12:52 -03:00
ogabrielluiz
6d51386b83 Merge remote-tracking branch 'origin/dev' into two_edges 2024-06-10 21:07:02 -03:00
ogabrielluiz
735a7e3780 Merge cz/mergeAll to two_edges 2024-06-10 11:31:02 -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
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
Lucas Oliveira
98dcadc797 Merge remote-tracking branch 'origin/cz/mergeAll' into fix/edited_component 2024-06-07 20:06:50 -03:00
Mendon Kissling
71a22b9a0f style-edits 2024-06-07 18:07:45 -04:00
Mendon Kissling
ef1f647b66 text-between-headers 2024-06-07 16:24:32 -04:00
igorrCarvalho
e531e36ad1 Merge cz/mergeAll into shortcuts_settings 2024-06-07 17:18:40 -03:00
Mendon Kissling
36e298a7df remove-gerunds-in-titles 2024-06-07 15:43:53 -04:00
Mendon Kissling
2a21e2de30 remove-unused-pages 2024-06-07 15:23:45 -04:00
Mendon Kissling
774de98c70 remove-unused-file 2024-06-07 15:21:56 -04:00
Mendon Kissling
c468a7c918 tldr-not-heading 2024-06-07 15:21:02 -04:00
Mendon Kissling
9d3d4e00d6 Merge branch 'dev' into docs-resize-images 2024-06-07 14:58:19 -04:00
anovazzi1
8742c87bfe Merge remote-tracking branch 'origin/two_edges' into new_Group 2024-06-07 15:18:57 -03:00
Mendon Kissling
2e5a006f4b for-more 2024-06-07 13:51:38 -04:00
Mendon Kissling
25307e7509 Merge branch 'dev' into docs-explain-io-playground 2024-06-07 13:48:43 -04:00
Mendon Kissling
db0eeca9d6 title-case 2024-06-07 13:46:19 -04:00
Mendon Kissling
37867ee5f2 cleanup-images-and-some-text 2024-06-07 13:44:50 -04:00
Mendon Kissling
dcf68b0e8a remove-unused-pages 2024-06-07 13:44:39 -04:00
Mendon Kissling
c312359e79 move-custom-components 2024-06-07 13:44:31 -04:00
cristhianzl
9ce7ee31a9 merge branch chatImg 2024-06-07 12:11:40 -03:00
cristhianzl
d89078271c merge dev 2024-06-07 11:28:03 -03:00
anovazzi1
9ae07ec1e8 Merge remote-tracking branch 'origin/cz/mergeAll' into extended_Session 2024-06-07 10:50:43 -03:00
ogabrielluiz
4c87f7662c Merge remote-tracking branch 'origin/dev' into two_edges 2024-06-07 10:42:22 -03:00
Mendon Kissling
45bc84a314 clearer-python-reqs 2024-06-06 17:21:21 -04:00
Mendon Kissling
73ccb5e5b4 cap 2024-06-06 17:15:43 -04:00
Mendon Kissling
f4b443b28e langflow-ui-clarity 2024-06-06 17:02:50 -04:00
Mendon Kissling
d2cecd7de1 io-components 2024-06-06 16:56:44 -04:00
Mendon Kissling
40d02ccceb content 2024-06-06 12:55:39 -04:00
Mendon Kissling
60023657d8 command-order 2024-06-06 12:39:16 -04:00
Mendon Kissling
964afd3de4 Merge branch 'dev' into docs-cli-commands 2024-06-06 12:37:35 -04:00
Mendon Kissling
4e7867fd66 numbers 2024-06-06 12:33:21 -04:00
Mendon Kissling
7ad91a9b94 copy-db-info 2024-06-06 11:44:11 -04:00
Mendon Kissling
c8240d73bd Merge branch 'dev' into docs-cli-commands 2024-06-06 09:56:22 -04:00
Lucas Oliveira
cfb1df93ee Merge remote-tracking branch 'origin/dev' into fix/api_settings 2024-06-06 08:29:28 -03:00
anovazzi1
4236d22098
Refactor SettingsPage component and add Messages page (#2084)
* Feat: Create the first version of the eraser tool

* feat: Add Messages page to SettingsPage

Refactor the SettingsPage component to include a new "Messages" page. This page will be accessible through the "/settings/messages" route and will display messages related to user settings. The necessary changes have been made to the index.tsx file of the SettingsPage component and the routes.tsx file.

* refactor(tableComponent): update column definitions to include checkbox selection logic for first column

feat(API): add support for excluding specific columns in getMessagesTable function

fix(flowLogsModal): pass excludedFields parameter to getMessagesTable function

refactor(GlobalVariablesPage): remove unnecessary checkbox selection properties from column definitions

fix(messagesPage): pass excludedFields parameter to getMessagesTable function

refactor(utils): add support for excluding specific columns in extractColumnsFromRows function

* feat: Add API endpoints for managing messages

This commit adds new API endpoints for managing messages. It includes the ability to delete messages by their IDs, update a specific message, and delete all messages associated with a session. These changes are implemented in the `monitor.py`, `schema.py`, and `service.py` files.

*  (monitor.py): add MessageIds schema for structured message deletion
♻️ (monitor.py): change delete_messages endpoint to POST for better semantics
♻️ (monitor.py): update delete_messages to use MessageIds schema
 (schemas.py): add MessageIds schema for structured message deletion
🐛 (service.py): fix SQL query in delete_messages to use correct column name
 (index.tsx): add toTitleCase utility to format column headers
 (API/index.ts): add deleteMessagesFn to handle message deletion via API
 (headerMessages): add HeaderMessagesComponent for message management UI
 (use-messages-table): add useMessagesTable hook to fetch and manage messages
 (use-remove-messages): add useRemoveMessages hook to handle message deletion

♻️ (messagesPage): refactor messages page to use new messages store
 (messagesStore): create zustand store for managing messages state
 (types): add types for messages and zustand messages store

* 💡 (schemas.py): add newline at end of file to follow PEP 8 guidelines

* refactor(headerMessages): update text content in HeaderMessagesComponent

* move editable attribute to table Component

* refactor: Move editable attribute to TableComponent
add update function, need to fix backend

* ♻️ (monitor.py): change POST to DELETE for delete_messages endpoint
♻️ (schemas.py): remove unused MessageIds schema
♻️ (api.tsx): add missing commas in ApiInterceptor function
🐛 (api.tsx): fix duplicate request check to include method "get"
♻️ (index.ts): change deleteMessagesFn to use DELETE method instead of POST
♻️ (use-remove-messages.tsx): clean up comments and improve error handling

* start history in playgroundModal

* ♻️ (monitor.py): refactor update_message to return MessageModelResponse
♻️ (service.py): update SQL query to use index instead of id
♻️ (api.tsx): refactor duplicate request check logic
 (check-duplicate-requests.ts): add helper to check and store duplicate requests
🐛 (messagesStore.ts): fix message update logic to use index instead of id

* ♻️ (monitor.py, service.py): remove trailing whitespace to improve code cleanliness

* refactor: Add getSessions function to fetch available sessions in IOModal

* 🐛 (service.py): add missing 'id' column in SQL query to fix data retrieval issue
💡 (service.py): add print statement for debugging SQL query
♻️ (index.tsx): reorder imports for better readability and maintainability

♻️ (flowStore.ts): remove trailing commas to improve code consistency and readability

💡 (index.ts, storeUtils.ts): format type definitions for better readability

* update editable fields

* Feat: Make the table last column non-resizable and add a restore columns button

* Remove unnused imports

* Refactor: Remove “Page size” from table pagination

* Refactor: remove page size directly in css file

* chore: Update description text in SettingsPage

* Refactor: Add ResetColumns component to improve table functionality

* Refactor: Make Reset Column button reset columns order

* Refactor: Remove select from delete session button

* Refactor: Remove commented code for chat history tab in IOModal

* update route

* fix selection bug on Messages Table

* fix libs

---------

Co-authored-by: igorrCarvalho <igorsilvabhz6@gmail.com>
Co-authored-by: ogabrielluiz <gabriel@langflow.org>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
2024-06-05 20:37:38 -03:00
Mendon Kissling
1ba928a0c3 strip-broken-admonitions 2024-06-05 17:39:02 -04:00
Mendon Kissling
34e57b6a44 link 2024-06-05 17:18:00 -04:00