Commit graph

7,790 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
9bcd74cbce Refactor code formatting and style 2024-03-18 18:38:35 -03:00
Gabriel Luiz Freitas Almeida
c57aadbbc6 Fix merge conflicts in backend code 2024-03-18 18:30:55 -03:00
Lucas Oliveira
06f0e0e0f8 Added dropdown and global page 2024-03-18 13:12:31 +01:00
Gabriel Luiz Freitas Almeida
b57173dd76 Add docs to CustomComponent 2024-02-09 09:39:01 -03:00
Gabriel Luiz Freitas Almeida
56133bc57c Update update_params_with_load_from_db_fields signature to include type hint for custom_component 2024-02-09 09:38:38 -03:00
Gabriel Luiz Freitas Almeida
6b73ad2197 Fix loading.py to handle custom component keys properly 2024-02-09 09:16:45 -03:00
anovazzi1
3d2a76438c fix(parameterComponent): fix logic for setting load_from_db property in template object
fix(codeTabsComponent): fix logic for setting load_from_db property in template object
fix(EditNodeModal): fix logic for setting load_from_db property in template object
fix(globalVariablesPage): fix logic for deleting global variable by id
feat(globalVariables): add getVariableId function to retrieve variable id by key
feat(types): add getVariableId function to GlobalVariablesStore type
2024-02-08 16:58:13 -03:00
Gabriel Luiz Freitas Almeida
928ba602bb Refactor credential creation logic 2024-02-08 16:33:42 -03:00
anovazzi1
c724d1131a Refactor registerGlobalVariable function signature 2024-02-08 15:36:18 -03:00
anovazzi1
021612f5ae Add provider field to AddNewVariableButton component 2024-02-08 15:29:41 -03:00
anovazzi1
326a0f9866 Refactor getGlobalVariables function to store data in globalVariables object 2024-02-08 15:06:54 -03:00
anovazzi1
9c24affbd1 Refactor globalVariablesStore to use optional provider 2024-02-08 14:16:03 -03:00
anovazzi1
b76eb655b2 Refactor API functions and update global variables types 2024-02-08 14:01:52 -03:00
anovazzi1
a91668b5f2 fix(parameterComponent): add options prop to ParameterComponent to display global variables in dropdown
feat(codeTabsComponent): add support for global variables in InputComponent and DictComponent
feat(inputComponent): remove dependency on globalVariablesStore and use options prop instead
feat(editNodeModal): add support for global variables in InputComponent
2024-02-08 13:45:18 -03:00
anovazzi1
45e24058bd feat(parameterComponent): add support for global variables in parameter input field
This commit adds support for global variables in the parameter input field of the ParameterComponent. It imports the useGlobalVariablesStore hook from the globalVariables store and uses it to access the globalVariablesEntries state. It also imports the setNoticeData function from the alert store to display a notice when a global variable is used as a parameter value.

In the onChange event handler of the input field, the commit checks if the entered value is a global variable by comparing it with the globalVariablesEntries array. If it is a global variable, the commit sets the notice data to inform the user that the real value will be updated during runtime. Additionally, the commit marks the parameter as a global variable by setting the load_from_db property of the template object to true in the setNode function.
2024-02-07 14:01:31 -03:00
Gabriel Luiz Freitas Almeida
ec1fe03974 Update TemplateField class in base.py 2024-02-06 21:16:38 -03:00
Gabriel Luiz Freitas Almeida
108d0b2e12 Refactor class instantiation and update params with load_from_db_fields 2024-02-06 21:16:34 -03:00
Gabriel Luiz Freitas Almeida
937a50498a Add load_from_db_fields attribute to Vertex class 2024-02-06 21:16:27 -03:00
Gabriel Luiz Freitas Almeida
84f4c32076 Refactor Credential model to use Optional for provider field 2024-02-06 19:14:52 -03:00
Gabriel Luiz Freitas Almeida
1558934429 Add delete_credential endpoint to API 2024-02-06 19:04:32 -03:00
anovazzi1
476a670eb9 Add global variables support to InputComponent 2024-02-05 18:58:37 -03:00
anovazzi1
d0dcb32a7e Refactor global variables page and add delete functionality 2024-02-05 18:50:58 -03:00
anovazzi1
4a1c9f8dae Add global variable functionality and display on Global Variables page 2024-02-05 18:30:41 -03:00
anovazzi1
911d681320 feat(addNewVariableButton.tsx): implement form logic to handle saving new global variables
feat(globalVariables.ts): add functions to add and remove global variables in the store
feat(globalVariables/index.ts): add types for the new functions in the global variables store
2024-02-05 18:07:05 -03:00
anovazzi1
e4e5b06185 fix(App.tsx): import getGlobalVariables function from API controller to fix missing import error
feat(App.tsx): add support for fetching global variables and setting them in the global variables store
feat(App.tsx): add useGlobalVariablesStore hook to access and set global variables in the component
feat(addNewVariableButton.tsx): create a new component for adding a new variable
feat(GlobalVariablesPage.tsx): create GlobalVariablesPage component to display and manage global variables
feat(routes.tsx): add route for GlobalVariablesPage component
feat(globalVariables.ts): update globalVariables store to include globalVariablesEntries array and modify setGlobalVariables function to set both globalVariables and globalVariablesEntries
feat(index.ts): add types for globalVariables store
2024-02-05 15:47:31 -03:00
igorrCarvalho
f30c1df9bf Feat: make input dropdown filter with text 2024-02-05 14:53:47 -03:00
anovazzi1
c1d9e12956 Add global variables store using Zustand 2024-02-05 14:45:47 -03:00
anovazzi1
0a0f35cdac Add global variable API functions 2024-02-05 14:16:40 -03:00
igorrCarvalho
1be52e253a Fix: arrow icon dont appear in dropdown 2024-02-05 14:09:33 -03:00
igorrCarvalho
5eef2774a2 Remove blank space 2024-02-05 11:45:35 -03:00
igorrCarvalho
ccb7947b40 Merge branch 'dropdownInput' into globalVariables 2024-02-05 11:43:19 -03:00
igorrCarvalho
86ccae87fb Feat: make text input capable of support dropdown inputs also 2024-02-05 11:42:08 -03:00
anovazzi1
8023332260
add vectara icon (#1389)
* adding vectara icon

* Add field_typing imports and source parameter to VectaraComponent

* Refactor Vectara imports and update dependencies

* Refactor VectaraSelfQueryRetriverComponent class and update field_config

* Remove None values and update template strings

* Add get_output_types_from_code method to DirectoryReader

* Refactor directory_reader.py and handle exception when getting output types from code

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@logspace.ai>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
2024-02-02 18:01:29 -03:00
Gabriel Luiz Freitas Almeida
c0c64c99c9 Update imports to use langchain_core.documents 2024-02-01 09:37:37 -03:00
Gabriel Luiz Freitas Almeida
7efa79af69 Fix formatting issues and update code style 2024-02-01 09:35:46 -03:00
Gabriel Luiz Freitas Almeida
42ce5b7112 Refactor RedisComponent to handle existing index in Redis 2024-02-01 09:35:46 -03:00
Gabriel Luiz Freitas Almeida
f670ba50ac
Fix vectorstores/PGVector missing output issue. (#1296)
In previous version, the output disappeared. I've fixed it and made it
support the output component "Chains" as well.

Before:

![image](https://github.com/logspace-ai/langflow/assets/7540749/704b7e0a-62b5-4691-90df-c6bd1f266f10)
After:

![image](https://github.com/logspace-ai/langflow/assets/7540749/fac77b3f-c48c-4b5f-ad27-f4176637c2be)
2024-02-01 09:34:59 -03:00
Gabriel Luiz Freitas Almeida
54df76096f
Merge branch 'dev' into fix/vectorstores/pgvector 2024-02-01 09:34:50 -03:00
Gabriel Luiz Freitas Almeida
a6877033f8
Fix vectorstores/Redis to support output component "Chains" (#1292)
The previous version was missing  output component "Chains".
Before:

![image](https://github.com/logspace-ai/langflow/assets/7540749/079dca11-68da-4a0d-8d0e-80b97321d90e)
After:

![image](https://github.com/logspace-ai/langflow/assets/7540749/9331ceac-28be-4a4d-a37a-f3b20ae18ea8)
2024-02-01 09:20:19 -03:00
Gabriel Luiz Freitas Almeida
1d46ba5d74
Merge branch 'dev' into fix/vectorstores/redis 2024-02-01 09:20:13 -03:00
Gabriel Luiz Freitas Almeida
e2f0fd0a75
Update buffer-memory.mdx (#1365)
Update the ref link for langchain component - Conversation Buffer
2024-02-01 09:18:41 -03:00
Gabriel Luiz Freitas Almeida
8f9d3ce155
Fix AgentInitializer to has last statement of returning base class (#1301)
From the last update, AgentInitializer lost ability to chain another
AgentInitializer via tool.
Fix issue: https://github.com/logspace-ai/langflow/issues/1255
2024-02-01 09:18:04 -03:00
Gabriel Luiz Freitas Almeida
3a5e3f24af
chat websocket api support param token and x-api-key (#1339)
Currently, chat interfaces do not support x-api-key authentication. In
this modification, token or x-api-key authentication is supported
2024-02-01 09:16:16 -03:00
Gabriel Luiz Freitas Almeida
e61e4ac51b
Update Langchain to 0.1 and migrate most components to CustomComponent (#1382)
This PR updates Langchain to 0.1.* and move components previously
created automatically to start using the CustomComponent framework.

This will improve maintainability and move Langflow to be closer to the
framework.
2024-01-31 17:43:18 -03:00
Gabriel Luiz Freitas Almeida
339029cd5b Update import statement for retrievers module 2024-01-31 17:33:32 -03:00
Gabriel Luiz Freitas Almeida
11473961e0 Update dependencies to latest versions 2024-01-31 17:09:38 -03:00
Gabriel Luiz Freitas Almeida
57c09c3409 Add unique constraints and foreign key for user_id in flow table 2024-01-31 17:09:16 -03:00
Gabriel Luiz Freitas Almeida
da9b139801 Remove empty lines in pyproject.toml 2024-01-31 17:00:22 -03:00
Gabriel Luiz Freitas Almeida
d8e34c1c6b Update dependencies in pyproject.toml 2024-01-31 16:59:18 -03:00
Gabriel Luiz Freitas Almeida
e111e01efd Update version number in pyproject.toml 2024-01-31 15:57:31 -03:00