Commit graph

818 commits

Author SHA1 Message Date
Rodrigo
babe7ff1ac refactor: Rename SplitContentComponent to SplitTextComponent and update related variables and descriptions 2024-06-17 14:30:44 -03:00
ogabrielluiz
f3cb8c81b0 📝 (Chroma.py): Update imports and class inheritance
🐛 (Chroma.py): Fix method calls and variable names to align with changes in imports and class structure
🔧 (Chroma.py): Refactor code to handle exceptions and imports more gracefully
2024-06-17 14:25:42 -03:00
ogabrielluiz
7818e55146 📝 (model.py): Refactor LCVectorStoreComponent to use Component class instead of CustomComponent
📝 (model.py): Add outputs attribute to LCVectorStoreComponent to define available outputs and their methods
📝 (model.py): Implement _validate_outputs method in LCVectorStoreComponent to ensure required outputs are defined
📝 (model.py): Add build_vector_store and build_base_retriever methods to LCVectorStoreComponent for building Vector Store and Base Retriever objects
📝 (model.py): Update search_with_vector_store method in LCVectorStoreComponent to return data
📝 (model.py): Add NotImplementedError and ValueError handling in build_vector_store and build_base_retriever methods
📝 (component.py): Implement validate method in Component class to validate inputs and outputs
📝 (component.py): Implement _validate_outputs method in Component class to be extended by subclasses for output validation
2024-06-17 14:25:42 -03:00
Rodrigo
6b5d4798ac refactor: Rename SplitContentComponent to SplitTextComponent and update related variables and descriptions 2024-06-17 14:25:32 -03:00
cristhianzl
ef7e36ee14 remove context with to filter warnings 2024-06-17 14:13:16 -03:00
Rodrigo
472563a2e7 remove unused vector store imports 2024-06-17 13:59:52 -03:00
Rodrigo
7f11cae2b7 Refactor vector store component class names for consistency 2024-06-17 13:35:41 -03:00
ogabrielluiz
71524d8219 refactor: Add MessageInput to langflow inputs 2024-06-17 13:01:35 -03:00
ogabrielluiz
c71c442b82 refactor: Replace StrInput with MessageInput for input_value in model components 2024-06-17 13:01:02 -03:00
ogabrielluiz
8aa97ccd98 refactor: replace StrInput with TextInput 2024-06-17 12:59:58 -03:00
ogabrielluiz
8d3a175375 refactor: Ignore Pydantic deprecation warnings in build_component 2024-06-17 12:36:32 -03:00
ogabrielluiz
17065e4e4a refactor: Update TikToken Enable parameter in OpenAIEmbeddingsComponent 2024-06-17 12:36:25 -03:00
ogabrielluiz
360b62e661 refactor: Import build_logs in base.py 2024-06-17 12:31:14 -03:00
ogabrielluiz
91474ab6ca refactor: Raise ImportError with module name in PythonREPLTool 2024-06-17 12:10:52 -03:00
ogabrielluiz
b907825b33 refactor: Remove pprint statement in set_result method of Vertex class 2024-06-17 12:10:52 -03:00
ogabrielluiz
305bdda01f refactor: Update Component class to use correct variable for artifact_type 2024-06-17 12:10:52 -03:00
Rodrigo
fa7707c148 refactor vector stores 2024-06-17 11:36:32 -03:00
ogabrielluiz
c7a3624f21 Refactor inputs.py to add MessageInput and TextInput classes 2024-06-17 11:33:28 -03:00
ogabrielluiz
3ff0ac3a74 Refactor schema.py to use timezone-aware datetime for timestamp field 2024-06-17 11:33:28 -03:00
ogabrielluiz
89493a4700 Refactor message.py to set flow_id for Message instances 2024-06-17 11:33:28 -03:00
ogabrielluiz
080af42802 Refactor memory.py to ensure messages have a timestamp before adding them to the database 2024-06-17 11:33:28 -03:00
cristhianzl
9ad10b33f2 merging branch local two edges 2024-06-17 11:23:21 -03:00
anovazzi1
f9de8672aa add text modal view for table render 2024-06-17 11:02:11 -03:00
ogabrielluiz
88754b9cf3 Refactor build_template_from_class function to remove unused code and improve readability 2024-06-17 10:55:50 -03:00
cristhianzl
567712d69a removing unecessary prop 2024-06-17 10:50:13 -03:00
cristhianzl
63eee10f2e Merge branch 'two_edges' of https://github.com/langflow-ai/langflow into two_edges 2024-06-17 10:48:44 -03:00
cristhianzl
7e8928f88b removing pdb and function name 2024-06-17 10:48:34 -03:00
ogabrielluiz
4717ff0767 Refactor Component class to improve input mapping and validation 2024-06-17 10:35:31 -03:00
ogabrielluiz
d62c3452ab chore: Refactor TextInput class to improve value validation 2024-06-17 10:35:24 -03:00
ogabrielluiz
d1ab180040 Refactor utils.py and message.py modules
This commit refactors the `utils.py` module in the `base/prompts` directory and the `message.py` module in the `schema` directory. The changes include:
- Importing the `Message` class from `langflow.schema.message` in `utils.py`
- Importing various modules and classes from `langchain_core` in `message.py`
- Adding a new method `load_lc_prompt` to the `Message` class in `message.py`
- Adding a new class method `from_lc_prompt` to the `Message` class in `message.py`
- Adding a new method `format_text` to the `Message` class in `message.py`
- Adding a new class method `from_template_and_variables` to the `Message` class in `message.py`

These changes improve the organization and functionality of the code in the mentioned modules.
2024-06-17 10:09:30 -03:00
italojohnny
bfee5a508f unified vertex log creation 2024-06-17 10:03:31 -03:00
cristhianzl
1912f91139 Merge branch 'two_edges' of https://github.com/langflow-ai/langflow into two_edges 2024-06-17 10:01:36 -03:00
cristhianzl
fcf4512210 merge dev into two_edges 2024-06-17 10:01:28 -03:00
ogabrielluiz
50a37e92dc fix: set tiktoken_enable to True 2024-06-17 09:34:43 -03:00
ogabrielluiz
abf1582fe6 Refactor ChatInput and ChatOutput components to prevent duplicate message storage 2024-06-17 09:17:58 -03:00
ogabrielluiz
e4f85edb62 Refactor SettingsServiceFactory to use SettingsService.initialize() 2024-06-17 08:13:29 -03:00
Rodrigo
cbff3f8366 feat: Add SelectivePassThroughComponent 2024-06-16 20:57:09 -03:00
Rodrigo
cb1cc99c91 ```plaintext
Prevent duplicate message storage in Chat components

Introduce `_message_stored` flag to `ChatInput` and `ChatOutput` components to prevent storing the same message multiple times during a single session. This change ensures that each message is stored only once, enhancing data integrity and reducing redundant operations.
```
2024-06-16 20:30:12 -03:00
Rodrigo
06df9381ef Revert "```"
This reverts commit 29a31083e5.
2024-06-16 17:36:43 -03:00
Rodrigo
2cc23b8399 refactor: Update timestamp handling in Message schema
Refactor the `timestamp` field in the `Message` schema to use the `datetime.now(timezone.utc)` function instead of the `utc_now` utility. This change ensures consistency with other modules and reduces redundancy.

No behavioral changes are intended; only the implementation detail is modified to leverage the built-in function for getting the current UTC datetime.
2024-06-16 17:29:36 -03:00
Rodrigo
002430100c Refactor components and update JSON output for clarity 2024-06-16 16:46:14 -03:00
Rodrigo
29a31083e5 ```
Refactor datetime handling to use utc_now utility

Replaced multiple occurrences of `datetime.now(timezone.utc)` with
a single `utc_now` utility function across various modules. This
enhances code consistency and reusability, and reduces redundancy.

No behavioral changes are intended; only the implementation detail
is modified to leverage the utility function for getting the current
UTC datetime.

Fixes #1234
```
2024-06-16 16:44:59 -03:00
Jordan Frazier
ca660cf8df
test: add astra integration test (#2189)
* add first astra integ test framework

* use fixtures

* remove old tests from merge

* Add correct sender type

* chore: Update unit test command in GitHub workflow

---------

Co-authored-by: ogabrielluiz <gabriel@langflow.org>
2024-06-15 19:50:38 -07:00
Rodrigo
d0039fae1e feat: Add minimum chunk size to SplitContentComponent's split_text method 2024-06-15 23:09:04 -03:00
Rodrigo
4f0f8f3e0e refactor: Refactor SplitText component to SplitContentComponent 2024-06-15 22:47:35 -03:00
Rodrigo
0d609b9376 feat: Add Prompt component to prompts/__init__.py 2024-06-15 22:18:03 -03:00
Rodrigo
2996cb726d fix: Fix typo in import statement for DocumentsToDataComponent 2024-06-15 20:15:50 -03:00
ogabrielluiz
40cebd1bcf chore: Update package versions to latest in pyproject.toml files 2024-06-15 11:09:16 -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
Gabriel Luiz Freitas Almeida
81bb749ea8
feat: Add cache parameter to RunnableVerticesManager (#2181)
This commit adds a new optional `cache` parameter to the `RunnableVerticesManager` class in the `runnable_vertices_manager.py` file. The `cache` parameter allows controlling whether the graph data should be cached or not when retrieving the next runnable vertices for a given vertex. If `cache` is set to `True`, the graph data will be cached using the `set_cache_coro` function. If `cache` is set to `False`, the graph data will not be cached.

This change was made to provide more flexibility in managing the caching behavior of the graph data.

Ref: #2180
2024-06-15 07:04:00 -07:00