Commit graph

5,500 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
ae5f04a1b0
Merge branch 'release' into bugfix-duplicate 2023-06-27 13:15:49 -03:00
Lucas Oliveira
54891277c6 Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io 2023-06-27 12:40:51 -03:00
Lucas Oliveira
a0ea6647eb Initial changes on form modal 2023-06-27 12:40:45 -03:00
Gabriel Luiz Freitas Almeida
3a5cd957c3
Added info parameter to fields (#552) 2023-06-27 12:10:53 -03:00
Gabriel Luiz Freitas Almeida
8107f9e332 feat(loading.py): add support for new prompt templates in instantiate_prompt function
The config.yaml file has been updated to include new prompt templates. In types.py, the input_variables list was not being cleared when prompt or messages were present, which has been fixed. The instantiate_prompt function in loading.py has been updated to support the new prompt templates.
🔀 chore(config): add new prompt templates to config.yaml
🐛 fix(types.py): fix input_variables not being cleared when prompt or messages are present
2023-06-27 12:06:23 -03:00
Gabriel Luiz Freitas Almeida
93c3f7a2a6 feat(__main__.py): add optional static_files_dir parameter to setup_app function
The variable name static_files_dir was changed to improve semantics. It is now more clear that it is a directory path. An optional static_files_dir parameter was added to the setup_app function to allow for a directory path to be passed in. This allows for more flexibility in serving static files.
🐛 fix(__main__.py): fix static_files_dir variable name to improve semantics
2023-06-27 11:09:26 -03:00
Gabriel Luiz Freitas Almeida
b741853454 🔧 chore(utils.py): use ChatConfig to set streaming option
The first change removes an extra blank line in the ChatManager class. The second change updates the try_setting_streaming_options function to use the ChatConfig class to set the streaming option instead of hardcoding it. This makes the code more modular and easier to maintain.
2023-06-27 10:16:41 -03:00
Gabriel Luiz Freitas Almeida
7c6845b15e 🔧 chore(loading.py): add instantiate_llm function to handle LLM instantiation and set ChatConfig.streaming based on openai_api_base parameter
This commit adds a new function `instantiate_llm` to handle LLM (Language Model) instantiation. It also sets the `ChatConfig.streaming` attribute based on the `openai_api_base` parameter. This is a workaround to ensure that JinaChat works until streaming is implemented.
2023-06-27 10:16:19 -03:00
Gabriel Luiz Freitas Almeida
c86f72e7a6 🎉 feat(config.py): add ChatConfig class with streaming attribute set to True
The ChatConfig class is added to the project with a single attribute, streaming, set to True. This attribute is used to determine whether the chatbot should use streaming or request-response communication with the client.
2023-06-27 10:11:39 -03:00
Gabriel Luiz Freitas Almeida
b005f8d87c
Merge pull request #553 from logspace-ai:setup_app
Added a setup_app function to reuse the app object
2023-06-27 09:47:18 -03:00
Gabriel Luiz Freitas Almeida
f78088bdb2 🔧 refactor(__main__.py, main.py): move setup_static_files function to main.py and rename create_app to setup_app
 feat(__main__.py, main.py): add support for a custom static files directory to be passed as an argument to the app
The `setup_static_files` function has been moved from `__main__.py` to `main.py` to improve code organization. The function has also been renamed to `setup_app` to better reflect its purpose. The `create_app` function has been renamed to `setup_app` to follow the naming convention of the new function. The `setup_app` function now accepts an optional argument `static_files_dir` which allows the user to specify a custom directory for static files. This improves the flexibility of the app as it can now be run with a custom frontend.
2023-06-27 09:44:20 -03:00
Gabriel Luiz Freitas Almeida
0d84d19657 📝 docs(constants.py): update OpenAI API base info to include additional API options
This commit updates the documentation in the constants.py file to include additional API options that can be used instead of the default OpenAI API. The new options are JinaChat, LocalAI, and Prem. This change provides more information to the user and allows them to make an informed decision when choosing an API to use.
2023-06-27 07:44:20 -03:00
Gabriel Luiz Freitas Almeida
415bee7384 🔧 chore(base.py, constants.py, llms.py): add info field to TemplateField and OPENAI_API_BASE_INFO constant
The `info` field is added to the `TemplateField` class to provide additional information about the field. The `OPENAI_API_BASE_INFO` constant is added to the `constants.py` file to provide information about the base URL of the OpenAI API and how it can be changed to use other APIs like Prem and LocalAI. The `info` field is set to `OPENAI_API_BASE_INFO` for the `openai_api_base` field in the `LLMFrontendNode` class in `llms.py`.
2023-06-27 07:33:35 -03:00
Gabriel Luiz Freitas Almeida
87af22d059 🔨 refactor(components): add info property to ParameterComponentType
The ParameterComponent now has an info icon and tooltip to show additional information about the parameter. The GenericNode component now passes the info prop to the ParameterComponent to show the additional information. The ParameterComponentType has been refactored to include the info property.
🎨 style(parameterComponent): add info icon and tooltip to show additional information
🚀 feat(GenericNode): pass info prop to ParameterComponent to show additional information
2023-06-27 07:33:01 -03:00
Gabriel Luiz Freitas Almeida
e362cfcf16
Adds an Info button that links to docs (#539) 2023-06-26 23:16:58 +00:00
Gabriel Luiz Freitas Almeida
92aec903ea 📝 docs(config.yaml): add documentation links for various document loaders, embeddings, and llms
Added documentation links for various document loaders, embeddings, and llms to improve the readability and usability of the config.yaml file. These links provide a quick reference to the documentation for each of the modules, making it easier for developers to understand and use them.
2023-06-26 19:53:51 -03:00
carlosrcoelho
d76d5cd10c organized folders, added components tab, adjusted mendable style. 2023-06-26 19:23:00 -03:00
Carlos Coelho
a42d8542ac
Delete test-deploy.yml 2023-06-26 19:20:22 -03:00
Carlos Coelho
a4f1cabe32
Delete deploy.yml 2023-06-26 19:19:50 -03:00
Carlos Coelho
1849739fa6
Create test-deploy.yml 2023-06-26 19:11:13 -03:00
Carlos Coelho
6d1f0e6f37
Create deploy.yml 2023-06-26 19:09:52 -03:00
Cristhian Zanforlin Lousa
47fcdaef41 🎨 style(GenericNode/index.tsx): refactor GenericNode component to use a more readable and maintainable code structure
 feat(GenericNode/index.tsx): add documentation link to GenericNode component and display it as a tooltip when hovering over the info icon.
2023-06-26 18:29:27 -03:00
Cristhian Zanforlin Lousa
fcedf08073 🔧 refactor(frontend): remove unnecessary blank lines in multiple components
🔧 refactor(tabsContext.tsx): add missing type annotations and improve code readability
🔧 refactor(ApiModal): improve code readability by adding a new line to a JSX element
🔧 refactor(EditNodeModal): remove unnecessary blank line in a JSX element
2023-06-26 17:11:47 -03:00
carlosrcoelho
e330c33493 fixed mendable key 2023-06-26 16:53:45 -03:00
carlosrcoelho
4a80d87269 adjusted baseUrl 2023-06-26 16:52:17 -03:00
carlosrcoelho
ad55d8f4c7 changed baseUrl 2023-06-26 16:19:24 -03:00
Gabriel Luiz Freitas Almeida
52329b36dc Merge remote-tracking branch 'origin/main' into dev 2023-06-26 14:54:53 -03:00
Gabriel Luiz Freitas Almeida
d4e01f28ef
Hotfix to AgentInitializer (#546) 2023-06-26 16:44:05 +00:00
Gabriel Luiz Freitas Almeida
644fc98271 🚀 chore(pyproject.toml): update package version to 0.2.2
The package version has been updated to 0.2.2 to reflect the changes made to the package. This is a chore commit as it does not include any functional changes to the package.
2023-06-26 13:38:00 -03:00
Gabriel Luiz Freitas Almeida
2b73f8fd5f
Merge branch 'main' into release 2023-06-26 16:36:59 +00:00
Gabriel Luiz Freitas Almeida
d3a2367932 🚀 feat(custom.py): add AgentType enum to improve readability and type safety
The `AgentType` enum is added to the `langchain.agents.custom` module to improve readability and type safety. The `InitializeAgent` class now uses the `AgentType` enum to ensure that the `agent` parameter is a valid value from the enum.
2023-06-26 13:27:34 -03:00
Gabriel Luiz Freitas Almeida
c51a90c537 🚀 feat(custom.py): add AgentType enum to improve readability and type safety
The `AgentType` enum is added to the `langchain.agents.custom` module to improve readability and type safety. The `InitializeAgent` class now uses the `AgentType` enum to ensure that the `agent` parameter is a valid value from the enum.
2023-06-26 13:27:05 -03:00
Lucas Oliveira
2b08969c0d 🎨 style(chatTrigger, formTrigger, formModal): change absolute positioning to fixed positioning to improve UI layout and consistency, added ShadCN modal 2023-06-26 12:00:53 -03:00
Lucas Oliveira
ea65c58682 🐛 fix(chatComponent): fix ChatTrigger and FormTrigger open state to open when either of them is clicked 2023-06-26 11:48:25 -03:00
Lucas Oliveira
4303e9efb0 Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io 2023-06-26 11:45:31 -03:00
Lucas Oliveira
90cc4023e5 Added form button to bottom right and copied chat modal 2023-06-26 11:45:27 -03:00
carlosrcoelho
947c921a48 adjusted footer 2023-06-26 11:38:35 -03:00
Gabriel Luiz Freitas Almeida
89286c6456 🔨 refactor(utils.py): extract build_input_keys_response function to improve code reusability
🚀 feat(chat.py): use build_input_keys_response function to build input keys response
The build_input_keys_response function was extracted from the remove_api_keys function to improve code reusability. It builds the input keys response object, which contains the input keys and memory keys of a langchain object. The chat.py file now uses this function to build the input keys response object instead of building it manually. This improves code readability and reduces code duplication.
2023-06-26 10:52:53 -03:00
Lucas Oliveira
466d583103 Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io 2023-06-26 10:34:43 -03:00
Lucas Oliveira
5a6d75a38c 🔥 chore(.gitignore): remove .githooks/prepare-commit-msg from git tracking to avoid committing hooks accidentally 2023-06-26 10:23:00 -03:00
Gabriel Luiz Freitas Almeida
423caa5ddc 🔍 chore(.gitignore): add prepare-commit-msg to avoid pushing Opencommit hook
The prepare-commit-msg file is added to the .gitignore file to avoid pushing the Opencommit hook to the remote repository. This is done to prevent the hook from being executed on other machines and to avoid any issues that may arise from the hook being executed on different machines.
2023-06-26 10:22:27 -03:00
Gabriel Luiz Freitas Almeida
ebcaedb840 feat(base.py): add input validation for PromptTemplate to ensure that the template and input variables are valid
The commented out code was removed to improve code readability. Input validation was added to ensure that the template and input variables are valid before creating a PromptTemplate object. This helps to prevent errors that may occur when the object is created with invalid input.
🔒 chore(base.py): remove commented out code and add input validation for PromptTemplate
2023-06-26 10:20:48 -03:00
Gabriel Luiz Freitas Almeida
ff0abf5183 🔧 refactor(chat.py): refactor stream_build function to send input_keys to the client
The stream_build function has been refactored to send input_keys to the client if the langchain_object has the attribute "input_keys". This change improves the user experience by providing the client with the necessary input keys to continue the conversation.
2023-06-26 10:20:28 -03:00
Gabriel Luiz Freitas Almeida
2d77aaaa15 🐛 fix(loading.py): fix instantiation of TextSplitter by removing unnecessary check for RecursiveCharacterTextSplitter
The import of RecursiveCharacterTextSplitter was removed as it was not being used in the code. The instantiation of TextSplitter was fixed by removing the unnecessary check for RecursiveCharacterTextSplitter and simplifying the code.
🔥 refactor(loading.py): remove unused import of RecursiveCharacterTextSplitter
2023-06-26 07:58:49 -03:00
Rodrigo Nader
361e981d0d Refactor component styles for better visual consistency
This commit refactors the styling of some components to improve their visual consistency with the rest of the application. Specifically, it removes unnecessary background and text color properties and adjusts classes for spacing and layout. These changes will enhance the user experience and create a more polished look and feel.
2023-06-26 01:42:25 -03:00
Gabriel Luiz Freitas Almeida
6459a27777 🐛 fix(loading.py): use 'is' instead of '==' to compare object types
The commit changes the comparison operator from '==' to 'is' to compare object types. This is because 'is' compares the object identity while '==' compares the object value. In this case, we want to compare the object identity, so 'is' is the correct operator to use.
2023-06-25 21:37:24 -03:00
Gabriel Luiz Freitas Almeida
7d415e62df 🎨 style(GenericNode): refactor tooltip to improve accessibility and user experience
The tooltip now includes a link to the documentation of the node, which makes it more accessible and user-friendly. The link is now wrapped in the tooltip title, which improves the semantics of the code.
2023-06-25 21:32:48 -03:00
Rodrigo Nader
ae71a54a06
Main (#543) 2023-06-25 20:08:33 -03:00
Rodrigo Nader
f373d18502
Fix Icons, Add LLM Caching (#542)
- Fixed Icons that were not set properly on refactor.
- Added LLM Caching
2023-06-25 20:03:53 -03:00
Gabriel Luiz Freitas Almeida
a3efa8fe5d 🐛 fix(utils.py): fix import order to avoid import errors
The import order was changed to avoid import errors. The import of langchain was moved to the top of the file to avoid circular import errors.
2023-06-25 19:52:49 -03:00