Commit graph

4,269 commits

Author SHA1 Message Date
ogabrielluiz
8daaf43551 refactor: Update ChatOutput and InterfaceVertex to improve message handling
Refactor the ChatOutput and InterfaceVertex classes to improve message handling. In ChatOutput, remove the unnecessary storage of the message response and update the text_response method to only store the message if a session ID is present. In InterfaceVertex, update the text_output assignment to handle different scenarios and ensure the correct text is used. Also, update the message assignment to handle instances of Message and str. These changes improve the code logic and maintain consistency in message handling across the components.
2024-06-11 21:05:57 -03:00
ogabrielluiz
c3e2ad670e refactor: Remove PromptComponent and update langflow components to use Prompt field type 2024-06-11 20:49:34 -03:00
ogabrielluiz
c40188f6b6 refactor: Update VertexAIEmbeddingsComponent to use Embeddings field type
Update the VertexAIEmbeddingsComponent to use the `Embeddings` field type instead of importing it from `langchain_google_vertexai`. This ensures compatibility with the latest version of the langflow library and improves code readability.
2024-06-11 20:40:52 -03:00
Lucas Oliveira
fde9a77035 Merge branch 'two_edges_merge' into two_edges 2024-06-11 18:19:59 -03:00
Lucas Oliveira
ce0f49aed5 Changed poetry.lock 2024-06-11 18:18:56 -03:00
Lucas Oliveira
850de6b952 Merge branch 'dev' into two_edges_merge 2024-06-11 18:11:13 -03:00
ogabrielluiz
8b622446a1 refactor: Update langflow components to use Prompt field type
Update the langflow components to use the `Prompt` field type instead of the deprecated `type` attribute. This ensures compatibility with the latest version of the langflow library and improves code readability.
2024-06-11 17:34:03 -03:00
ogabrielluiz
3976298881 feat: Refactor ChatInput and ChatOutput to store message response
Refactor the ChatInput and ChatOutput components to store the message response in the session. This ensures that the message is properly stored and can be accessed later.
2024-06-11 17:27:21 -03:00
Gabriel Luiz Freitas Almeida
6716a90c0f
Update .gitignore and refactor ChatInput and ChatOutput (#2140)
This pull request includes two changes. First, the `.gitignore` file is
updated to include `*.db-shm` and `*.db-wal` files. Second, the
`ChatInput` and `ChatOutput` classes are refactored to include a new
`return_message` parameter. This parameter allows the caller to specify
whether they want the message to be returned as a `Message` object or
just the message text. These changes improve the functionality and
maintainability of the code.
2024-06-11 12:04:32 -07:00
ogabrielluiz
f7b1040562 chore: Update package versions in pyproject.toml and poetry.lock 2024-06-11 15:55:14 -03:00
ogabrielluiz
e0cdd17811 Refactor ChatInput and ChatOutput to include return_message parameter 2024-06-11 15:50:07 -03:00
ogabrielluiz
c8ebcd1b03 update projects 2024-06-11 15:44:19 -03:00
ogabrielluiz
cda65c07de 🐛 (chat.py): Fix issue with logs assignment in build_vertex function
🐛 (schemas.py): Fix issue with logs field type in ResultDataResponse class
🐛 (Prompt.py): Fix issue with kwargs assignment in build_prompt method
🐛 (component.py): Fix issue with results and arguments assignment in Component class
🐛 (schema.py): Fix issue with logs field type in ResultData class

📝 (types.py): Add ResultData import and build_logs_from_artifacts function for better logging and message extraction
📝 (setup.py): Set DEFAULT_PROMPT_INTUT_TYPES for missing template keys to provide default input types
📝 (loading.py): Update build_component function to return artifacts along with build_results
📝 (schema.py): Add build_logs_from_artifacts function to generate logs from artifacts
📝 (utils.py): Update log_transaction function to use source instead of vertex and handle source result for outputs
📝 (prompt.py): Define DEFAULT_PROMPT_INTUT_TYPES constant and use it for missing template input types
2024-06-11 15:44:05 -03:00
Rodrigo
b7a63154c3 chore: Update ChatInput.py to include Text import and modify return type 2024-06-11 15:27:57 -03:00
ogabrielluiz
7fad3353e1 refactor: Update load_from_db flag to true for openai_api_key field 2024-06-11 13:49:47 -03:00
Gabriel Luiz Freitas Almeida
aa94e42e0d
Release -> Output Inspection, Session Management, General Bug Fixing and UI Improvements (#2104) 2024-06-11 09:08:24 -07:00
ogabrielluiz
901e22de66 chore: Update package versions in pyproject.toml and poetry.lock 2024-06-11 13:05:48 -03:00
ogabrielluiz
60f446cb76 Refactor memory components to use updated Record schema 2024-06-11 13:05:48 -03:00
ogabrielluiz
2b2812f4df Merge remote-tracking branch 'origin/dev' into cz/mergeAll 2024-06-11 12:49:47 -03:00
Lucas Oliveira
4cf5f3ae0f Merge remote-tracking branch 'origin/dev' into cz/mergeAll 2024-06-11 12:46:51 -03:00
ming
ad23cac117
Improve SQLite performance (#2111)
* tune sqlite upon connection

* catch operational error

* use wal for journal_mode for faster performance
2024-06-11 08:44:48 -07:00
ogabrielluiz
89faa251ef chore: Update package versions in pyproject.toml and poetry.lock 2024-06-11 12:43:44 -03:00
Lucas Oliveira
23e25cad7a Merge remote-tracking branch 'origin/cz/mergeAll' into fix/minor_ui_adjustments 2024-06-11 12:39:08 -03:00
ogabrielluiz
1a03c0d0c7 refactor: Migrate base classes to outputs in FrontendNode model 2024-06-11 12:36:36 -03:00
Lucas Oliveira
a7f7530354 Formatting 2024-06-11 12:32:03 -03:00
ogabrielluiz
2dddfe4aea refactor: Update import statements in CassandraMessageReader and CassandraMessageWriter 2024-06-11 10:15:02 -03:00
ogabrielluiz
0014d8e50a Merge remote-tracking branch 'origin/dev' into two_edges 2024-06-11 09:52:41 -03:00
YAMON.IO
11b5aad3bd
add PythonCodeStructuredTool (#1747)
* Create PythonStructuredTool

This draft involves receiving two 'Code' types as inputs and creating a structured tool.

* Delete src/backend/base/langflow/components/experimental/PythonStructuredTool

* Create PythonCodeStructuredTool.py
2024-06-11 05:42:49 -07:00
Gabriel Luiz Freitas Almeida
e28962cbc4
Update Couchbase component and package versions (#2138)
* feat: Update Couchbase component to handle import errors

* chore: Update package versions in pyproject.toml and poetry.lock

* refactor: Fix encoding issue in read_text_file function

* 🐛 (parse.py): fix issue where method was always set to "post" when data or data binary was provided in curl command

* refactor: Fix string formatting in MonitorService delete_messages method

* fix: Update Couchbase import instructions in CouchbaseComponent

* refactor: Fix encoding issue in read_text_file function
2024-06-11 05:33:23 -07:00
cristhianzl
34626f0531 merge dev 2024-06-11 09:12:52 -03:00
Rodrigo
49bdbef548 refactor: Improve advanced options in ChatComponent, URLComponent, and MessageHistoryComponent 2024-06-10 21:27:47 -03:00
Rodrigo
6cc31da766 feat: Add EmbedComponent and PromptComponent to langflow components 2024-06-10 21:26:21 -03:00
ogabrielluiz
f6fabac477 update projects 2024-06-10 21:24:43 -03:00
ogabrielluiz
6d51386b83 Merge remote-tracking branch 'origin/dev' into two_edges 2024-06-10 21:07:02 -03:00
cristhianzl
79615816a4 Merge branch 'cz/mergeAll' into fix/minor_ui_adjustments 2024-06-10 20:07:26 -03:00
cristhianzl
3cda01b9c6 Merge branch 'fix/minor_ui_adjustments' of https://github.com/langflow-ai/langflow into fix/minor_ui_adjustments 2024-06-10 20:06:41 -03:00
cristhianzl
972f44ce7b 🐛 (chat.py): add check for message.text being a string to prevent errors
♻️ (index.ts): refactor variable names for clarity and add debug logging
♻️ (IOModal/index.tsx): reformat code for better readability and consistency
 (IOModal/index.tsx): add excluded fields parameter to getMessagesTable calls
2024-06-10 20:06:31 -03:00
ogabrielluiz
9b99aeda36 refactor: Generate unique names for flows and folders with the same name 2024-06-10 19:51:18 -03:00
Jordan Frazier
11ef216c0a
feat: add cassandra components (#2056)
* Add cassandra store component

* Add cassandra search component

* revert poetry changes

* fix type

* Add cassandra icon

* Add Cassandra Message Writer

* Add cassandra message reader

* poetry

* Fix init of cass reader

* move cassio import to base project and inline imports in backend

* running make format

* remove file

* remove cassio import

* update lockfile

* Actually update lockfile:

* merge fixes
2024-06-10 15:04:24 -07:00
ogabrielluiz
b5ead60ac9 update projects 2024-06-10 19:00:44 -03:00
ogabrielluiz
108514b734 refactor: Update langflow/custom/custom_component/component.py to cache output values for improved performance 2024-06-10 19:00:31 -03:00
ogabrielluiz
4d11c76476 refactor: Update ChatInput and ChatOutput to use Message instead of Record for input and output 2024-06-10 19:00:09 -03:00
ogabrielluiz
cf99a5ffa7 refactor: Update setup.py to handle new output types in source node 2024-06-10 18:59:07 -03:00
Rodrigo
b5b02e8a95 feat: Add Message and StoreMessage components
The code changes introduce two new components, `MessageComponent` and `StoreMessageComponent`, to the `langflow` project.

The `MessageComponent` creates a `Message` object given a session ID, allowing for the creation of chat messages with customizable sender type, sender name, and text.

The `StoreMessageComponent` stores a chat message, utilizing the `store_message` function and the `get_messages` function to retrieve the stored messages.

These changes aim to enhance the chat functionality of the project.
2024-06-10 18:48:09 -03:00
cristhianzl
965b18a4de Merge branch 'cz/mergeAll' into fix/minor_ui_adjustments 2024-06-10 18:04:12 -03:00
ogabrielluiz
af38ec4580 refactor: Add log method to CustomComponent for logging messages 2024-06-10 16:16:50 -03:00
ogabrielluiz
bde49ba286 refactor: Remove unused imports and update artifact type handling 2024-06-10 16:16:27 -03:00
italojohnny
827aec5139 fix: PydanticSerializationError 2024-06-10 16:16:21 -03:00
italojohnny
118da0d482 refactor to use DefaultModel as base class 2024-06-10 16:16:15 -03:00
italojohnny
876b26e1ac Add class with custom JSON serialization 2024-06-10 16:16:11 -03:00