Commit graph

1,848 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
76cc488d79 🚀 feat(constants.py): add new OpenAI chat models and update existing ones
Added new OpenAI chat models to the CHAT_OPENAI_MODELS list to improve the quality of the chatbot responses. The new models are "gpt-3.5-turbo-0613", "gpt-3.5-turbo-16k-0613", "gpt-4-0613", and "gpt-4-32k-0613". The existing models "gpt-3.5-turbo" and "gpt-4-32k" were also updated to their latest versions.
2023-06-14 11:43:36 -03:00
Gabriel Luiz Freitas Almeida
1b0b41f408 🔼 chore(pyproject.toml): update langchain and openai dependencies
The langchain and openai dependencies have been updated to versions 0.0.200 and 0.27.8 respectively. This update is necessary to ensure that the application is using the latest versions of these libraries and to take advantage of any bug fixes or new features that have been added.
2023-06-14 11:37:58 -03:00
Gabriel Luiz Freitas Almeida
53f01c618b feat(flowSettingsModal): add handleSaveFlow function to save flow changes to the database and display success message
The changes in this commit include removing unused imports and formatting the code to improve readability. The handleSaveFlow function was added to save flow changes to the database and display a success message. This function is called when the user clicks the save button.
🎨 style(flowSettingsModal): remove unused imports and format code
2023-06-14 11:37:35 -03:00
Gabriel Luiz Freitas Almeida
a6f15476c9 🔨 refactor(chatModal): remove unused imports and variables, extract getWebSocketUrl function
The imports for XMarkIcon and FaEraser were removed as they were not being used. The lodash set function was also removed as it was not being used. The getWebSocketUrl function was extracted from the connectWS function to improve readability and maintainability.
2023-06-14 10:51:54 -03:00
Gabriel Luiz Freitas Almeida
e4af874534 🔨 refactor(menuBar): remove unused imports and code, add missing semicolon
🔨 refactor(vite.config): remove unused routes and commented code, remove rewrite function
The menuBar component had some unused imports and code that was removed. A missing semicolon was added to the code. The vite.config file had some unused routes and commented code that was removed. The rewrite function was also removed as it was not needed.
2023-06-14 09:28:50 -03:00
Gabriel Luiz Freitas Almeida
7fc7cd0957 🔨 refactor(App.tsx): remove unused imports and components
 feat(App.tsx): simplify getVersion() function call
The imports and components that are no longer used have been removed to improve the code's readability and maintainability. The getVersion() function call has been simplified to make the code more concise and easier to read.
2023-06-14 09:28:30 -03:00
Gabriel Luiz Freitas Almeida
83bd59dedb 🚀 feat(API): add /api/v1 prefix to all API endpoints
All API endpoints now have the /api/v1 prefix to improve the semantics of the API and to make it easier to distinguish between the frontend and backend routes.
2023-06-14 09:28:01 -03:00
Gabriel Luiz Freitas Almeida
d78f2a81c5 🎨 style(cardComponent): format code with Prettier
This commit only formats the code with Prettier to improve code readability and consistency. No functional changes were made.
2023-06-14 09:27:51 -03:00
Gabriel Luiz Freitas Almeida
23d56efda7 🔥 chore(MainPage): remove unused imports and variables
The import statements for unused components and contexts have been removed to improve code readability and maintainability. The unused variables have also been removed to reduce clutter and improve code quality.
2023-06-14 09:27:33 -03:00
Gabriel Luiz Freitas Almeida
676c92dd92 🎨 style(flows.py): add status codes to API endpoints
The status codes have been added to the API endpoints to improve the readability of the code and to make it more explicit what the expected response codes are. The status codes have been added to the following endpoints: create_flow, read_flows, read_flow, update_flow, delete_flow, create_flows, upload_file, and download_file.
2023-06-14 09:27:02 -03:00
Gabriel Luiz Freitas Almeida
07c5a41f60 Merge remote-tracking branch 'origin/mainPage' into db 2023-06-14 08:57:35 -03:00
Lucas Oliveira
466cb17302 Removed user stub 2023-06-14 08:40:04 -03:00
Gabriel Luiz Freitas Almeida
bcf0b88a7c 🧪 test(process.py): add tests for process_tweaks function
This commit adds tests for the process_tweaks function in the langflow.processing.process module. The tests cover the following scenarios:
- No tweaks are applied to the graph data
- A single tweak is applied to the graph data
- Multiple tweaks are applied to the graph data
- A tweak is applied to a non-existent parameter in the graph data
The tests ensure that the function processes the tweaks correctly and returns the expected result.
2023-06-14 07:21:49 -03:00
Gabriel Luiz Freitas Almeida
7817c64591 🐛 fix(endpoints.py): change predict_flow function signature to include flow_id and session dependencies
 feat(endpoints.py): add flow_id parameter to predict_flow function to allow for running a flow by ID
The predict_flow function now includes a flow_id parameter and a session dependency to allow for running a flow by ID. The flow object is retrieved from the session using the flow_id parameter. If the flow is not found, a ValueError is raised.

🔨 refactor(constants.tsx): change API_URL constant to BASE_API_URL and add flow_id parameter to run_flow function
The API_URL constant has been renamed to BASE_API_URL to better reflect its purpose. The run_flow function now includes a flow_id parameter to allow for running a flow by ID. The flow_id parameter is used to construct the API URL.
2023-06-14 07:21:25 -03:00
Lucas Oliveira
b2598165a6 Fixed saving issue and implemented saved message 2023-06-14 06:52:10 -03:00
Lucas Oliveira
4a89470cee Overflow fixed at sidebar 2023-06-14 06:48:06 -03:00
Lucas Oliveira
2def9b2e5e Merge branch 'db' into mainPage 2023-06-13 20:07:44 -03:00
Lucas Oliveira
bc254a8aee Added importing flow to the same flow 2023-06-13 20:07:08 -03:00
Lucas Oliveira
97645884ab Added project settings modal 2023-06-13 20:00:46 -03:00
Gabriel Luiz Freitas Almeida
0259bf4acc 🎨 style(endpoints.py): rename get_load function to predict_flow for better semantics
The function name was changed to predict_flow to better reflect the functionality of the endpoint.
2023-06-13 19:53:00 -03:00
Lucas Oliveira
f1f36024e9 Added description to pages 2023-06-13 19:45:50 -03:00
Gabriel Luiz Freitas Almeida
8689c39c06 Merge remote-tracking branch 'origin/mainPage' into db 2023-06-13 19:43:56 -03:00
Lucas Oliveira
ddd0b05947 Added default description and redirected to new flow as soon as its created 2023-06-13 19:16:27 -03:00
Lucas Oliveira
b6757d3ac1 Removed unused functions 2023-06-13 19:10:26 -03:00
Lucas Oliveira
1a92ceca7e Added community page, fixed styling of buttons, added promise at AddFlow 2023-06-13 19:09:24 -03:00
Gabriel Luiz Freitas Almeida
2d3428307e 🔨 refactor(constants.tsx): remove flowId from API_URL and add it to the headers as an Authorization token
The flowId is now passed as an Authorization token in the headers of the API request. This improves security as the flowId is not exposed in the URL. The API_URL now only contains the base URL without the flowId.
2023-06-13 12:49:41 -03:00
Gabriel Luiz Freitas Almeida
90a1dd9795 🔧 chore(process.py): refactor process_tweaks function to improve readability and maintainability
The process_tweaks function has been refactored to improve readability and maintainability. The function now takes in two parameters, graph_data and tweaks, and returns the modified graph_data. The tweaks parameter is a dictionary of dictionaries, where the key is the node id and the value is a dictionary of the tweaks. The function processes the graph data to add the tweaks by iterating over the nodes and checking if the node id is in the tweaks dictionary. If it is, the function applies the tweaks to the node by updating the template data with the new values. The function also prints a message to the console to indicate that a tweak has been applied.
2023-06-13 12:49:22 -03:00
Gabriel Luiz Freitas Almeida
faf44eca0e 🔧 refactor(schemas.py): add optional tweaks field to PredictRequest schema
The PredictRequest schema now includes an optional tweaks field, which is a dictionary of dictionaries. This field allows for additional customization of the prediction request, such as specifying tool names or descriptions. The tweaks field is optional, and if not provided, the default value is an empty dictionary. The schema_extra attribute has also been updated to include an example of the new tweaks field.
2023-06-13 12:49:11 -03:00
Gabriel Luiz Freitas Almeida
7cc14e83b8 🚀 feat(endpoints.py): add authentication to predict endpoint using HTTPBearer
🐛 fix(endpoints.py): change predict endpoint to use Flow object instead of flow_id
🐛 fix(endpoints.py): add support for processing tweaks in predict endpoint
The predict endpoint now requires authentication using HTTPBearer. The flow_id is now extracted from the bearer token instead of being passed as a parameter. This improves security as the flow_id is not exposed in the URL. The predict endpoint now uses the Flow object instead of the flow_id to retrieve the graph data. This improves code readability and reduces the number of database queries. The predict endpoint now supports processing tweaks, which allows for more flexibility in the processing of messages.
2023-06-13 12:48:52 -03:00
Lucas Oliveira
8b6af6b768 Undo and Redo icons changed 2023-06-13 11:41:41 -03:00
Lucas Oliveira
1452e9c7a2 added useUndoRedo to context and added Undo and Redo buttons to header 2023-06-13 11:41:03 -03:00
Lucas Oliveira
1af07ec453 Fixed flow id after uploading to DB 2023-06-13 11:00:09 -03:00
Lucas Oliveira
809e4c5306 Merge branch 'mainPage' of github.com:logspace-ai/langflow into mainPage 2023-06-13 10:51:47 -03:00
Lucas Oliveira
d76d0b2d51 Upload and Download Flows done, fixed deleting flow bug 2023-06-13 10:51:10 -03:00
Gabriel Luiz Freitas Almeida
eb26216d51 🗑️ chore(langflow.db): remove langflow.db file
The langflow.db file was deleted. This commit removes the file from the repository.
2023-06-13 08:05:31 -03:00
Lucas Oliveira
74192c205c git ignore updated to ignore db 2023-06-12 22:10:57 -03:00
anovazzi1
513174fb3a scroll and general position bug fixed 2023-06-12 22:08:16 -03:00
Lucas Oliveira
35fea98301 Fixed bug with home page overflow 2023-06-12 21:47:56 -03:00
Lucas Oliveira
74954dd4b1 Fixed bug where flow disappears 2023-06-12 21:47:02 -03:00
Lucas Oliveira
91b243779c Added buttons on sidebar and fixed header visual bug 2023-06-12 21:46:21 -03:00
Lucas Oliveira
2d640c8e5a Back button added, chevron with dropdown added to flow name 2023-06-12 21:17:44 -03:00
Lucas Oliveira
e491064662 Removed menubar edit and file, added all into the project name 2023-06-12 20:44:35 -03:00
Lucas Oliveira
83e592d4d7 fixed routing, working perfectly 2023-06-12 20:15:07 -03:00
Lucas Oliveira
b45966051a fixed header to new logic 2023-06-12 19:23:34 -03:00
Lucas Oliveira
9408442191 Fixed logic to simplify transition to routes 2023-06-12 19:21:48 -03:00
Lucas Oliveira
ceb9b1d155 Added flow id and routes logic 2023-06-12 18:19:05 -03:00
Gabriel Luiz Freitas Almeida
09bd1093dd 🎨 style(constants.tsx): refactor getPythonApiCode, getCurlCode, and getPythonCode to separate functions
 feat(ApiModal): use getPythonApiCode and getCurlCode functions to generate python and curl code
 feat(cardComponent): add RenameLabel component to allow renaming of flow name and description
🐛 fix(cardComponent): fix CardDescription height to prevent overflow
The getPythonApiCode, getCurlCode, and getPythonCode functions were refactored into separate functions to improve code readability and maintainability. The ApiModal component now uses the getPythonApiCode and getCurlCode functions to generate the python and curl code. The CardComponent now has a RenameLabel component that allows renaming of the flow name and description. The CardDescription height was also fixed to prevent overflow.
2023-06-11 10:58:10 -03:00
Gabriel Luiz Freitas Almeida
445f4013c1 🎨 style(MainPage): add whitespace to button className
The whitespace was added to the button className to improve readability and consistency with the rest of the code.
2023-06-10 16:52:55 -03:00
Gabriel Luiz Freitas Almeida
a95d7d7f6a 🎨 style(cardComponent): update color of card background and icons
💄 style(cardComponent): update layout of card footer and remove unused code
The background color of the card component has been updated to a lighter shade of blue. The icons used for editing and deleting a flow have been updated to use the Lucide icon library. The layout of the card footer has been updated to align the content to the right and remove unused code.
2023-06-10 16:52:30 -03:00
Gabriel Luiz Freitas Almeida
181df91500 🎨 style(menuBar): replace heroicons with lucide-react icons and refactor code to improve readability
 feat(menuBar): add support for custom emoji and color for each flow
This commit replaces the heroicons with lucide-react icons to improve the consistency of the icon set used in the application. The code has also been refactored to improve readability. Additionally, support for custom emoji and color for each flow has been added to improve the user experience.
2023-06-10 16:52:09 -03:00