Commit graph

2,231 commits

Author SHA1 Message Date
anovazzi1
19be2e8178 refactor(parameterComponent): change setTemplate to setNodeClass to improve semantics and fix bug
refactor(codeAreaComponent): change template to nodeClass and setTemplate to setNodeClass to improve semantics
refactor(API): change UpdateTemplate function parameter from template to nodeClass to improve semantics
refactor(codeAreaModal): change template to nodeClass and setTemplate to setNodeClass to improve semantics and fix bug
refactor(types): add APIClassType to import and change APITemplateType to import in relevant files to improve semantics
2023-06-22 18:21:41 -03:00
gustavoschaedler
37e1ea05b4 Base classes data moved 2023-06-22 22:15:59 +01:00
gustavoschaedler
531b3b3f7a Base classes data added 2023-06-22 21:49:22 +01:00
gustavoschaedler
6736288e6f Add code section 2023-06-22 21:37:01 +01:00
anovazzi1
a47dc9ae92 feat(frontend): add support for updating node template on code change in CodeAreaModal
fix(API): fix UpdateTemplate function return type to match the actual response
fix(vite.config.ts): add dynamic_node route to apiRoutes array to proxy requests to backend
2023-06-22 17:30:04 -03:00
gustavoschaedler
a458b2d91c Change type str to bool 2023-06-22 21:26:25 +01:00
gustavoschaedler
2c256421f4 Remove description 2023-06-22 21:16:10 +01:00
gustavoschaedler
ec517fd9b6 Endpoint dynamic_node template to test 2023-06-22 21:00:02 +01:00
anovazzi1
e67e55d94e feat(API): add UpdateTemplate function to update templates via API call 2023-06-22 15:12:38 -03:00
Gabriel Luiz Freitas Almeida
05bd7b415a
Adding Building Progress Bar with DaisyUI and Radial Progress (#522) 2023-06-22 00:20:01 +00:00
Cristhian Zanforlin Lousa
1aa91587cc refactor: Use specific event parameter type in BuildTrigger
This change updates an event parameter type in BuildTrigger to improve type safety. Specifically, an event parameter type was modified from 'any' to a more specific type to avoid invalid use of the event parameter.
2023-06-21 15:11:49 -03:00
Gabriel Luiz Freitas Almeida
d3d33162e8 🐛 fix(chat.py): change event name from "node" to "message" in stream_build function
The event name was changed from "node" to "message" to better reflect the nature of the data being sent. The data being sent is a message response from the server, not a node in the graph.
2023-06-21 15:04:36 -03:00
Gabriel Luiz Freitas Almeida
0a1ceba765 🔥 chore(buildTrigger): remove unused TODO comment
The TODO comment regarding the implementation of progress has been removed as it is no longer relevant.
2023-06-21 14:55:22 -03:00
Gabriel Luiz Freitas Almeida
b9231aad8f 🔥 refactor(buildTrigger): remove unused imports and ProgressBarComponent
🐛 fix(buildTrigger): handle error response from server when starting a build
The ProgressBarComponent import was removed as it was not being used. The error handling was improved to handle the case where the server returns an error response when starting a build. The error message is now displayed to the user and the build state is reset.
2023-06-21 14:53:55 -03:00
Gabriel Luiz Freitas Almeida
38c2eaa897 🔥 refactor(chat.py): remove unused import statement
🐛 fix(chat.py): fix StreamData class import statement
 feat(chat.py): add progress tracking and node building events to stream_build function
The unused import statement has been removed to improve code readability. The StreamData class import statement has been fixed to avoid errors. Progress tracking and node building events have been added to the stream_build function to provide more information to the user about the build process.
2023-06-21 14:53:54 -03:00
Gabriel Luiz Freitas Almeida
fae1ca349f 🔧 chore(schemas.py): add StreamData model and __str__ method to improve readability of stream data
The StreamData model is added to represent the data that is streamed from the server. The __str__ method is added to improve the readability of the stream data by returning a formatted string that includes the event and data attributes.
2023-06-21 14:53:53 -03:00
Cristhian Zanforlin Lousa
22e24226a3 Refactor buildTrigger component to use progress state instead of myValue
The buildTrigger component was updated to use progress state instead of myValue to better represent the progress of the building process. This change allowed us to make improvements in the way progress is tracked, which will improve the user experience.
2023-06-21 14:50:38 -03:00
Cristhian Zanforlin Lousa
3a9315ed77 Merge branch 'feat/progressbar' of https://github.com/logspace-ai/langflow into feat/progressbar 2023-06-21 14:05:26 -03:00
Cristhian Zanforlin Lousa
0caab2e9ea Refactor buildTrigger event handling to handle end-of-stream event properly
This commit refactors buildTrigger event handling to ensure that end-of-stream events are handled by closing the connection without logging them.
2023-06-21 14:05:22 -03:00
Gabriel Luiz Freitas Almeida
0fb33825d9 🐛 fix(chat.py): change data to error in yield statement when flow_id is invalid
🐛 fix(chat.py): catch exception when building graph and yield error message
When the flow_id is invalid, the yield statement should return an error message instead of data. Additionally, when building the graph, an exception could occur, so we added a try-except block to catch any exceptions and yield an error message instead of data.
2023-06-21 14:04:45 -03:00
Cristhian Zanforlin Lousa
7a46794f1d Update radial progress & fix build trigger log handling
- The radial progress now displays the percentage value correctly.
- In the build trigger, we now properly handle the end of a stream event and fixed an issue with the RadialProgressComponent when isBuilding is true.
2023-06-21 14:04:35 -03:00
Cristhian Zanforlin Lousa
f2abb531d4 Add RadialProgress value state, remove progressContext
This commit adds a value state to the RadialProgress component, replacing the progressContext previously used. It also removes the progressContext, as it is no longer needed.
2023-06-21 13:50:27 -03:00
Gabriel Luiz Freitas Almeida
4b1ab3c640 update lock 2023-06-21 11:36:42 -03:00
anovazzi1
37ff0cac4f update version 2023-06-21 11:36:42 -03:00
anovazzi1
770f61294d feat(chatInput): add useEffect hook to focus on chat input when lockChat is false and inputRef is available
fix(chatInput): remove unnecessary comment in useEffect hook
2023-06-21 11:36:41 -03:00
Gabriel Luiz Freitas Almeida
fef8324886
Fix: Restore Notion and Slack directory loaders. (#476) 2023-06-21 13:57:00 +00:00
Cristhian Zanforlin Lousa
da28c2e670 Merge branch 'dev' into feat/progressbar 2023-06-20 21:04:28 -03:00
Cristhian Zanforlin Lousa
c06fdb1f13 Adding daisyUI radialProgress to project 2023-06-20 20:47:05 -03:00
Gabriel Luiz Freitas Almeida
2029b08d2e Merge remote-tracking branch 'origin/main' into dev 2023-06-20 16:18:37 -03:00
Rodrigo Nader
ba7157f155
Fix remove api key condition (#518)
Condition was reversed.
2023-06-20 16:17:43 -03:00
anovazzi1
8f86acecb0
zoom out 10x bigger (#517)
increase the zoom out limit of the flow
2023-06-20 16:14:18 -03:00
Gabriel Luiz Freitas Almeida
1c7485bb64 🔖 chore(pyproject.toml): bump version to 0.1.5
The version number has been updated from 0.1.4 to 0.1.5 to reflect the changes made in the package. This is a chore commit as it does not add any new features or fix any bugs, but rather updates the version number.
2023-06-20 16:12:47 -03:00
Gabriel Luiz Freitas Almeida
5f5bf06ab2 🐛 fix(flows.py): fix conditional statement in update_flow function
The conditional statement in the update_flow function was incorrect. The if statement was checking for the opposite of what was intended. The fix changes the if statement to check for the correct condition.
2023-06-20 16:11:33 -03:00
anovazzi1
46a30cf92e zoom out 10x bigger 2023-06-20 15:45:48 -03:00
Cristhian Zanforlin Lousa
625f22c024 Adding progress bar on build 2023-06-19 22:45:55 -03:00
Carlos Coelho
272be9f566
Update README.md
added discord link
2023-06-19 22:21:43 -03:00
Rodrigo Nader
53ff28ecde
Update README.md 2023-06-19 22:08:30 -03:00
Rodrigo Nader
06dbfb5faf
Update README.md (#515) 2023-06-19 21:43:39 -03:00
Rodrigo Nader
bf869232f7
Update README.md 2023-06-19 21:43:30 -03:00
Lucas Oliveira
c969bcca78 Fixed spearator 2023-06-19 19:33:07 -03:00
Gabriel Luiz Freitas Almeida
f511ddc20f Merge remote-tracking branch 'origin/main' into dev 2023-06-19 17:17:07 -03:00
Gustavo Schaedler
fa2d2fbc97
Small bugfixes and improvements (#514)
# Pull Request Description

## Summary

This Pull Request includes several code improvements, refactoring,
feature additions, and documentation updates mainly focused on enhancing
the functionality and maintainability of the codebase.

## Details

### Refactoring and Improvements:

- **Commit (5ea20aa) by @ogabrielluiz**: Unnecessary indentation in the
`getPythonCode` function within `constants.tsx` has been removed to
improve code readability.

- **Commit (6886828) by @ogabrielluiz**: 
- Changed the `load_flow_from_json` function signature in `process.py`
to accept either a JSON file path or a JSON object.
- Updated the import statement for `Chain` in `base.py` to be more
explicit by importing it from `langchain.chains.base` instead of
`langflow.graph.vertex.types`.
- Removed a print statement from the `process_tweaks` function in
`process.py`.
- Added an optional `tweaks` parameter to the `load_flow_from_json`
function.
- Changed the return type of the `build` method in the `Graph` class
from `List[Vertex]` to `Chain`.

- **Commit (83c28dc) by @ogabrielluiz**: The `process_tweaks` function
in `process.py` has been refactored to improve readability and
maintainability. An `apply_tweaks` function was added to apply tweaks to
the node, and a `validate_input` function was added for input
validation. The function now raises a `ValueError` if the input is not
in the expected format.

- **Commit (11185af) by @ogabrielluiz**: Refactored the
`fix_memory_inputs` function in `process.py` to improve readability by
reducing nesting. The function now checks if the `langchain_object` has
a `memory` attribute and if it is not `None` before proceeding. The
try-except block was also refactored to reduce nesting.

- **Commit (f180fa6) by @ogabrielluiz**: The input parameter in
`process.py` has been changed to accept a `Path` object in addition to a
string or dictionary, improving the flexibility of the function and
allowing for easier file handling.

### Features:

- **Commit (8a5525f) by @ogabrielluiz**: The `getPythonCode` function in
`constants.tsx` now accepts a `tweaks` parameter which is used to
customize the behavior of the flow. A `buildTweaks` function generates
the `tweaks` object which is passed to the `load_flow_from_json`
function.

- **Commit (c5d6f48) by @ogabrielluiz**: Added a `build_and_install`
target to the `Makefile` to build the package and install it without
running it. This is useful for building and installing on a remote
server. Additionally, fixed the path to the `langflow.main` module in
the backend target of the `Makefile`.

### Documentation:

- **Commit (76a1265) by @ogabrielluiz**: Updated the Langflow API usage
example in `README.md` to reflect the new API endpoint URL. Added a new
optional `tweaks` parameter to the `run_flow` function for flow
customization and updated the example code accordingly.

### Other:

- **Commit (0dcd93e) by @lucaseduoli**: Added Discord and Twitter icons,
and GitHub stars.

- **Commit (0dcd93e) by @lucaseduoli**: Fixed the Twitter link.
2023-06-19 21:10:41 +01:00
Gabriel Luiz Freitas Almeida
7b2849260c 🔖 chore(pyproject.toml): bump version to 0.1.4
The version number has been updated from 0.1.3 to 0.1.4. This is a chore commit as it does not introduce any new features or bug fixes, but rather updates the version number to reflect changes made in the package.
2023-06-19 16:27:08 -03:00
Lucas Oliveira
b616e0dd42 fixed twitter link 2023-06-19 16:16:58 -03:00
Lucas Oliveira
9be559397b removed api key 2023-06-19 16:14:25 -03:00
Gabriel Luiz Freitas Almeida
825f2798c3 🐛 fix(chat.py): fix node to vertex variable name in stream_build function
 feat(chat.py): add progress logging to stream_build function
The variable node was renamed to vertex to improve semantics and consistency with the naming conventions. Progress logging was added to the stream_build function to provide feedback to the user on the progress of the build process.

🐛 fix(index.tsx): fix typo in setSuccessData function call
 feat(index.tsx): add success logging to handleBuild function
A typo in the setSuccessData function call was fixed. Success logging was added to the handleBuild function to provide feedback to the user on the success of the build process.
2023-06-19 16:03:25 -03:00
Lucas Oliveira
0dcd93ef92 added discord and twitter icons, added github stars 2023-06-19 15:45:26 -03:00
Gabriel Luiz Freitas Almeida
c5d6f487fa feat(Makefile): add build_and_install target to build and install package without running it
The path to the langflow.main module was incorrect, causing the backend target to fail. The path has been updated to the correct location.

The build_and_install target has been added to build the package and install it without running it. This is useful when the package needs to be built and installed on a remote server.
🐛 fix(Makefile): fix path to langflow.main module in backend target
2023-06-19 14:28:29 -03:00
Gabriel Luiz Freitas Almeida
f180fa6f26 🐛 fix(process.py): change input parameter type hint to include Path type
The input parameter now accepts a Path object in addition to a string or dictionary. This improves the flexibility of the function and allows for easier file handling.
2023-06-19 14:25:10 -03:00
Gabriel Luiz Freitas Almeida
8a5525f465 🚀 feat(constants.tsx): add tweaks parameter to getPythonCode function to allow for customization of flow behavior
The `getPythonCode` function now accepts a `tweaks` parameter which is used to customize the behavior of the flow. The `buildTweaks` function is called to generate the `tweaks` object which is then passed to the `load_flow_from_json` function. This allows for more flexibility in the usage of the flow.
2023-06-19 14:24:48 -03:00