Commit graph

1,777 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
fdf24f269b
Merge branch 'dev' into agent_and_qa_chain 2023-06-09 16:25:29 -03:00
Gustavo Schaedler
547e10b374 Remove condition for the execution of make publish, the execution is done by GitHub actions 2023-06-09 20:15:00 +01:00
Gustavo Schaedler
8a08ebdbe7 Remove some commented out code + add condition for the execution of make publish 2023-06-09 20:09:25 +01:00
Alexandre Henrique Pereira Tavares
b02ed92b84
Implemented add_extra_fields method for the documentloaders (#408) 2023-06-09 15:24:56 -03:00
Alexandre Henrique
f7bdb711f1 Merged frontend_node/llm from origin/dev into add_extra_fields_documentloaders 2023-06-09 15:05:56 -03:00
Gabriel Luiz Freitas Almeida
51ecc05563 🐛 fix(vite.config.ts): remove /api/v1 prefix from proxy target URL
 feat(vite.config.ts): add rewrite function to proxy configuration to add /api/v1 prefix to requests
The /api/v1 prefix was removed from the proxy target URL as it was already being added by the rewrite function. The rewrite function was added to the proxy configuration to add the /api/v1 prefix to requests, which is required by the backend API.

Fixes #458
2023-06-09 14:31:09 -03:00
Gabriel Luiz Freitas Almeida
eac5057d4f 🚀 feat(launch.json): add configuration for debugging frontend in Chrome
The new configuration allows for debugging the frontend in Chrome by launching the application on http://localhost:3000/* and setting the webRoot to the frontend directory. This will enable developers to debug the frontend code more efficiently. The existing configuration for debugging the backend has been renamed to "Debug Backend" for better clarity. The "justMyCode" property has been set to true to exclude external libraries from debugging.
2023-06-09 14:19:04 -03:00
Cristhian Zanforlin Lousa
111252fbb2
NodeToolbar Feature Implementation and Dialog UI Migration (#462)
Description
This pull request implements the NodeToolbar feature and migrates the
dialog UI to shadCN. The NodeToolbar introduces three actions:
duplicate, delete, and edit. The edit action allows users to modify the
advanced configuration of the tools. Additionally, this pull request
migrates the dialog UI to shadCN, specifically updating the prompt
dialog, code dialog, export dialog, python functions dialog and
tooltips. These enhancements improve the user experience and provide a
more efficient and modern interface.

Changes Made
Added NodeToolbar component to the application.
Implemented duplicate functionality, allowing users to create copies of
the selected nodes.
Implemented delete functionality, enabling users to remove selected
nodes.
Implemented edit functionality, providing users with the ability to
modify the advanced configuration of the tools.
Migrated the prompt dialog UI to shadCN, improving its appearance and
functionality.
Migrated the code dialog UI to shadCN, enhancing its usability and
aesthetics.
Migrated the export dialog UI to shadCN, resulting in a more streamlined
and intuitive interface.
Migrated the python functions dialog UI to shadCN, ensuring consistency
with the rest of the application's design.
Migrated the headlessUI tooltip to shadCN.

FYI: Need to improve the dialog subtitles texts.
2023-06-09 10:22:36 -03:00
Cristhian Zanforlin Lousa
f18f2f9851 adjust space codacy 2023-06-09 10:10:08 -03:00
Gabriel Luiz Freitas Almeida
f9528591d9
Better serrver start (#461) 2023-06-09 06:47:15 -03:00
Gabriel Luiz Freitas Almeida
eb3421711f
Add advanced parameters to llamacpp node (#465) 2023-06-08 18:40:41 -03:00
Gabriel Luiz Freitas Almeida
2b8333ee95
Merge branch 'dev' into fix_llama 2023-06-08 18:31:39 -03:00
Gabriel Luiz Freitas Almeida
5484a08230 🔖 chore(pyproject.toml): bump up version to 0.0.88
The version number in the pyproject.toml file has been updated from 0.0.87 to 0.0.88. This is a chore commit as it does not introduce any new features or fix any bugs, but it is necessary to keep track of the package version.
2023-06-08 18:15:26 -03:00
Gabriel Luiz Freitas Almeida
a443d0aa83 🔨 refactor(llms.py): extract formatting methods for Azure and Llama fields
This commit extracts the formatting methods for Azure and Llama fields from the `format_field` method to improve readability and maintainability of the code. The `format_azure_field` method formats the fields for Azure, while the `format_llama_field` method formats the fields for Llama. These methods are called conditionally based on the name of the field.
2023-06-08 18:14:03 -03:00
Gabriel Luiz Freitas Almeida
7ed19c739b 🐛 fix(tabsContext.tsx): add try-catch block to handle JSON parsing errors
🐛 fix(API/index.ts): remove duplicate forward slash in API routes
The try-catch block was added to handle JSON parsing errors that may occur when parsing the cookieObject. This ensures that the application does not crash when such errors occur.

The duplicate forward slash in the API routes was removed to ensure that the routes are correctly formed and the API requests are sent to the correct endpoints.
2023-06-08 17:51:06 -03:00
Gabriel Luiz Freitas Almeida
868158b11b Merge branch 'dev' into better_server 2023-06-08 17:31:45 -03:00
Gabriel Luiz Freitas Almeida
de6bfbab69 Merge remote-tracking branch 'origin/main' into dev 2023-06-08 17:29:25 -03:00
Gabriel Luiz Freitas Almeida
58fa3b8dc0 🐛 fix(__main__.py): ignore type error for multiprocess import
🐛 fix(__main__.py): rename path variable to frontend_path for clarity
The first change fixes a type error for the multiprocess import. The second change renames the path variable to frontend_path to improve clarity and readability of the code.
2023-06-08 17:17:27 -03:00
anovazzi1
5e99ba0e99
fix: loads the page even if flows.data is null (#464) 2023-06-08 17:12:28 -03:00
Cristhian Zanforlin Lousa
12fa7f4e14 removing the type any from filter 2023-06-08 17:01:54 -03:00
Cristhian Zanforlin Lousa
db5eb1da10 Merge branch 'feat/shadUI' of https://github.com/logspace-ai/langflow into feat/shadUI 2023-06-08 16:58:08 -03:00
Cristhian Zanforlin Lousa
10b3ad711e Adding constants pattern, textfile edit node fix 2023-06-08 16:58:05 -03:00
Gabriel Luiz Freitas Almeida
901a7c0696 🔖 chore(pyproject.toml): bump up version to 0.0.87
The version number in the pyproject.toml file has been updated from 0.0.86 to 0.0.87. This is a chore commit as it does not introduce any new features or bug fixes, but only updates the version number.
2023-06-08 16:56:35 -03:00
Gabriel Luiz Freitas Almeida
3785c7e610 🐛 fix(tabsContext.tsx): add null check for flow.data to prevent TypeError
The fix adds a null check for flow.data to prevent a TypeError when accessing the edges property.
2023-06-08 16:54:46 -03:00
Gabriel Luiz Freitas Almeida
fae17163c8 🚀 chore(frontend): add esbuild package to improve build performance
The esbuild package has been added to the frontend dependencies to improve the build performance of the application.
2023-06-08 16:38:41 -03:00
Gabriel Luiz Freitas Almeida
8d03db2834 removing package.json from root folder 2023-06-08 16:24:44 -03:00
anovazzi1
1318a813b2 fix bug with development server and some dark mode issues 2023-06-08 16:15:51 -03:00
Cristhian Zanforlin Lousa
736cbb83db Adding key-value to modal subtitles 2023-06-08 13:27:50 -03:00
Cristhian Zanforlin Lousa
73b3220334 Adjust height of dialogs 2023-06-08 13:00:35 -03:00
Cristhian Zanforlin Lousa
741c5a8cd4 Merge branch 'dev' into feat/shadUI 2023-06-08 12:40:09 -03:00
Gabriel Luiz Freitas Almeida
2482a230bb update lock 2023-06-08 12:29:29 -03:00
Gabriel Luiz Freitas Almeida
0cfc0b016e 🚀 feat(__main__.py): add optional path argument to serve function to specify path to frontend directory
🚀 feat(__main__.py): add optional open_browser argument to serve function to specify whether to open browser after starting server
The serve function now accepts an optional path argument to specify the path to the frontend directory containing build files. This is useful for development purposes only. The function also accepts an optional open_browser argument to specify whether to open the browser after starting the server. This is useful when running the server locally.
2023-06-08 12:25:00 -03:00
Cristhian Zanforlin Lousa
3b147c879d Formatting 2023-06-08 12:09:45 -03:00
Cristhian Zanforlin Lousa
c9b68f6f7a Changing to ShadUI, Edge Tooltips and Advanced Dialog 2023-06-08 12:05:32 -03:00
Gabriel Luiz Freitas Almeida
84a46d5869 Merge remote-tracking branch 'origin/dev' into better_server 2023-06-08 11:49:56 -03:00
Gabriel Luiz Freitas Almeida
23e760b052 🔺 chore(pyproject.toml): update langchain dependency from 0.0.186 to 0.0.194
This commit updates the langchain dependency from version 0.0.186 to version 0.0.194. This is a chore as it updates a dependency to a newer version.
2023-06-08 08:45:20 -03:00
Gabriel Luiz Freitas Almeida
0304becc28 Merge remote-tracking branch 'origin/main' into dev 2023-06-08 08:13:32 -03:00
Gabriel Luiz Freitas Almeida
c4423e0fc0
🐛 fix(utils.py): add type check for streaming and stream attributes before setting them to True (#457)
Fixes #452
2023-06-08 00:47:55 -03:00
Gabriel Luiz Freitas Almeida
1e728c96b6 🔖 chore(pyproject.toml): bump version to 0.0.86
The version number in the pyproject.toml file has been updated from 0.0.85 to 0.0.86. This is a chore commit as it does not introduce any new features or fix any bugs, but rather updates the version number to reflect changes made to the codebase.
2023-06-08 00:42:42 -03:00
Gabriel Luiz Freitas Almeida
8e2bacad9a 🐛 fix(utils.py): add type check for streaming and stream attributes before setting them to True
The code now checks if the streaming and stream attributes are boolean before setting them to True. This ensures that the attributes are not set to True if they are not boolean, which could cause errors in the code.
2023-06-08 00:40:51 -03:00
Gabriel Luiz Freitas Almeida
8ee4b2b79e 🐛 fix(complex_example.json): change _type value from 'zero_shot' to 'ZeroShotPrompt' to match class name
The _type value was changed to match the class name, which improves consistency and readability of the code.
2023-06-08 00:39:12 -03:00
Gabriel Luiz Freitas Almeida
d730ca027c 🔥 refactor(base.py): remove redundant abstractmethod decorators
The abstractmethod decorator is redundant in the CustomChain and CustomAgentExecutor classes as the methods they decorate are already defined as abstract in the parent classes. Removing these decorators improves code readability and reduces clutter.
2023-06-08 00:20:16 -03:00
Gabriel Luiz Freitas Almeida
85d2f9cce8 🔨 refactor(base.py): make function_name and initialize methods abstract
This commit makes the `function_name` and `initialize` methods abstract in the `CustomChain` and `CustomAgentExecutor` classes. This is done to enforce the implementation of these methods in the subclasses of these classes. This change improves the code quality and readability by making the code more explicit and easier to understand.
2023-06-08 00:14:33 -03:00
Gabriel Luiz Freitas Almeida
81d231c632 🐛 fix(vertex/base.py): fix vertex_type assignment to handle uppercase template types
🐛 fix(interface/loading.py): fix custom_node instantiation to handle classes without initialize method
 feat(template/frontend_node/prompts.py): change type_name to match class name
 feat(template/frontend_node/tools.py): change type_name to match class name
🔥 chore(test_agents_template.py): remove test_agents_settings and update initialize_agent test
The vertex_type assignment in the Vertex class was not handling uppercase template types correctly. This has been fixed to handle both uppercase and lowercase types. The custom_node instantiation in the instantiate_class function was not handling classes without an initialize method correctly. This has been fixed to instantiate the class directly if the initialize method is not present. The type_name in the ZeroShotPromptNode and PythonFunctionToolNode classes have been changed to match the class name. The test_agents_settings test has been removed as it is no longer necessary and the initialize_agent test has been updated to match the new AgentInitializer class name.
2023-06-07 21:36:40 -03:00
Gabriel Luiz Freitas Almeida
04bd0f43fb 🔨 refactor(custom.py): rename CustomChain to CustomAgentExecutor
🔨 refactor(base.py): add CustomAgentExecutor class and move CustomChain to base.py
🔨 refactor(custom_lists.py): update reference to CustomChain to CustomAgentExecutor
The CustomChain class has been renamed to CustomAgentExecutor to better reflect its purpose. The class has been moved to base.py and a new CustomAgentExecutor class has been added to custom.py. The reference to CustomChain in custom_lists.py has been updated to CustomAgentExecutor. These changes improve the semantics of the code and make it easier to understand the purpose of the classes.
2023-06-07 21:14:40 -03:00
Gabriel Luiz Freitas Almeida
f0975ddf63 🚀 feat(langflow): add new chains to config.yaml and custom chains to interface/chains/custom.py
 feat(langflow): add new chains to config.yaml and custom chains to interface/chains/custom.py
The following chains were added to the config.yaml file: RetrievalQA, RetrievalQAWithSourcesChain, QAWithSourcesChain, ConversationalRetrievalChain, and CombineDocsChain. These chains were added to improve the functionality of the application and provide more options for users.

In addition, custom chains were added to the interface/chains/custom.py file. The CombineDocsChain was added to allow users to combine multiple documents into a single document for use in the question answering chains. The QA_CHAIN_TYPES constant was also added to the frontend_node/constants.py file to provide a list of available question answering chain types.
2023-06-07 19:48:51 -03:00
Gabriel Luiz Freitas Almeida
c8125b3386 🔀 refactor(customs.py): add load_qa_chain to CUSTOM_NODES
🔀 refactor(custom_lists.py): merge CUSTOM_AGENTS and CUSTOM_CHAINS into CUSTOM_NODES
🔀 refactor(loading.py): add instantiate_chains function to instantiate chains
🔀 refactor(base.py): add CustomChain class
The changes add support for a new chain called load_qa_chain to CUSTOM_NODES. CUSTOM_AGENTS and CUSTOM_CHAINS are merged into CUSTOM_NODES. A new function called instantiate_chains is added to instantiate chains. A new class called CustomChain is added to the base.py file. This class is used to define a custom chain.
2023-06-07 19:48:16 -03:00
Gabriel Luiz Freitas Almeida
b5ab95c4cc 🔨 refactor(custom.py): remove unused code
 feat(frontend_node): add extra fields to MemoryFrontendNode and ChainFrontendNode
The unused code in custom.py has been removed. The MemoryFrontendNode and ChainFrontendNode classes have been updated to include additional fields that are required for their respective templates. The MemoryFrontendNode now has a return_messages field, and the ChainFrontendNode now has a memory field. These fields are optional and can be toggled on or off as required.
2023-06-07 19:46:51 -03:00
Gabriel Luiz Freitas Almeida
2ca750f654 feat: add BaseRetriever as base class for VectorStores 2023-06-07 19:45:15 -03:00
anovazzi1
5ab186bd88 Merge branch 'feat/node-toolbar' of personal:logspace-ai/langflow into feat/node-toolbar 2023-06-07 19:41:42 -03:00