Commit graph

2,461 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
4d72c92e4c 🔧 chore(llms.py): add extra fields for VertexAI template and modify field type for "credentials"
📝 chore(llms.py): improve field configuration for VertexAI template and modify field type for "credentials"
The `add_extra_fields` method is modified to add an additional field called "credentials" for the VertexAI template. The field is of type "file" and is required. It allows the user to upload a JSON file as credentials. The `format_openai_field` method is also updated to handle the new "credentials" field.
2023-06-30 09:00:18 -03:00
Gabriel Luiz Freitas Almeida
879390488e 🔖 chore(pyproject.toml): update package version to 0.2.7
The package version has been updated from 0.2.6 to 0.2.7. This change is made to reflect the latest changes and improvements in the package.
2023-06-29 19:06:50 -03:00
Gabriel Luiz Freitas Almeida
5a69b479ff
Merge branch 'main' into vertex_ai 2023-06-28 22:10:43 -03:00
Gabriel Luiz Freitas Almeida
98fb7c84c7
Hotfix: 0.2.6 -> Docs and TextSplitter bug (#564) 2023-06-28 18:32:51 -03:00
Gabriel Luiz Freitas Almeida
c2e22a6c08
Merge branch 'main' into release 2023-06-28 18:22:44 -03:00
Gabriel Luiz Freitas Almeida
d92db6b638
Hotfix_02 (#563) 2023-06-28 18:21:09 -03:00
Gabriel Luiz Freitas Almeida
14da6494bf 🔖 chore(pyproject.toml): update package version to 0.2.6
The package version has been updated from 0.2.5 to 0.2.6. This change is made to reflect the latest changes and improvements in the package.
2023-06-28 18:17:58 -03:00
Gabriel Luiz Freitas Almeida
36212884e4 🐛 fix(loading.py): refactor instantiate_textsplitter function to improve readability and remove unnecessary code
The `instantiate_textsplitter` function has been refactored to improve readability and remove unnecessary code. The condition for creating the `text_splitter` object has been simplified and the `separator_type` parameter is now removed from the `params` dictionary if it exists. Additionally, the `language` parameter is now passed as an instance of the `Language` class from the `langchain.text_splitter` module. This change ensures that the `text_splitter` object is created correctly and the `split_documents` method is called with the appropriate parameters.
2023-06-28 18:16:13 -03:00
Gabriel Luiz Freitas Almeida
3485893be0 🔀 refactor(textsplitters.py): extract options list into a variable for reusability and sorting
The options list for the separator_type field in the TextSplittersFrontendNode class has been extracted into a variable called options. This improves code readability and allows for easier modification and sorting of the options list.
2023-06-28 18:16:04 -03:00
Gabriel Luiz Freitas Almeida
8c12e17ad0 📝 docs(config.yaml): update documentation link for ConversationBufferMemory in memories section
The documentation link for ConversationBufferMemory in the memories section has been updated to point to the correct URL "https://python.langchain.com/docs/modules/memory/how_to/buffer". This change ensures that users can access the correct documentation for using ConversationBufferMemory.
2023-06-28 18:06:46 -03:00
Gabriel Luiz Freitas Almeida
614bcecec2
Fix: Metadata now updates existing metadata in documents (#560) 2023-06-28 09:32:34 -03:00
Gabriel Luiz Freitas Almeida
e5b12ae05a 🔖 chore(pyproject.toml): update langchain dependency version to ^0.0.218
The langchain dependency version has been updated to ^0.0.218 to ensure compatibility with the latest features and bug fixes.
2023-06-28 09:19:07 -03:00
Gabriel Luiz Freitas Almeida
d79e61f7ed
Merge branch 'main' into release 2023-06-28 09:06:51 -03:00
Gabriel Luiz Freitas Almeida
fe11604976 Merge branch 'release' of https://github.com/logspace-ai/langflow into release 2023-06-28 09:03:30 -03:00
Gabriel Luiz Freitas Almeida
7364ba41f8 🐛 fix(loading.py): handle case where metadata is an empty dict and document already has metadata
🐛 fix(loading.py): handle case where separator_type is not provided in params
The first fix ensures that if the metadata is an empty dict, it will not be added to the documents if they already have metadata. This prevents overwriting existing metadata.

The second fix handles the case where the separator_type is not provided in the params. In this case, the text_splitter will be instantiated using the class_object and the params as is.
2023-06-28 08:59:31 -03:00
Gabriel Luiz Freitas Almeida
f33ad207e7
Fix: docs now open correctly (#556) 2023-06-27 18:33:22 -03:00
Gabriel Luiz Freitas Almeida
c29c813551
Merge branch 'main' into release 2023-06-27 18:32:56 -03:00
Gabriel Luiz Freitas Almeida
8aeb7c5fb1 🔖 chore(pyproject.toml): bump version to 0.2.4
The version number has been updated from 0.2.3 to 0.2.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-27 18:28:01 -03:00
Gabriel Luiz Freitas Almeida
0200b22189 🎨 style(nodeToolbarComponent): add noopener and noreferrer attributes to documentation link
The noopener and noreferrer attributes were added to the documentation link to improve security by preventing the linked page from having access to the window.opener object and to prevent the referrer header from being sent to the linked page, respectively.
2023-06-27 18:26:01 -03:00
Gabriel Luiz Freitas Almeida
f3e22b0080 fix: docs open in a new tab now 2023-06-27 18:25:05 -03:00
Gabriel Luiz Freitas Almeida
6a3f89c2b9 feat: adding VertexAI
Issue #290
2023-06-27 16:53:48 -03:00
Gabriel Luiz Freitas Almeida
a795632ed6
Adds Info tooltips and links to docs, fixes component duplication (#554) 2023-06-27 16:32:44 -03:00
Gabriel Luiz Freitas Almeida
2ec01afd8b 🎨 style(nodeToolbarComponent): update button colors and icons for better visibility and consistency
🐛 fix(nodeToolbarComponent): fix documentation link not working when no documentation is provided
The button colors and icons have been updated to improve visibility and consistency. The delete and copy buttons now have a darker background color when hovered over. The edit button now has a rounded right corner and a lighter background color when there are no nodes present. The documentation button now shows a "Coming Soon" tooltip when no documentation is provided and has a muted color. The documentation link now works correctly even when no documentation is provided.
2023-06-27 15:39:31 -03:00
Gabriel Luiz Freitas Almeida
37239e27c9 🎨 style(extraSidebarComponent): remove delayDuration from ShadTooltip component
The delayDuration prop was removed from all ShadTooltip components in the ExtraSidebar component. This improves the user experience by removing the delay before the tooltip is displayed.
2023-06-27 15:29:40 -03:00
Gabriel Luiz Freitas Almeida
0a3648c23e 🔨 refactor(GenericNode): remove unused imports and simplify documentation tooltip
The required indicator is now next to the title, which improves readability and makes it easier to see which parameters are required. The documentation tooltip has been simplified to only show the documentation link, which improves the user experience by reducing clutter. Unused imports have been removed to improve code quality.
🔨 refactor(parameterComponent): move required indicator next to title
2023-06-27 15:29:20 -03:00
Gabriel Luiz Freitas Almeida
e10d271e22 🔧 refactor(ShadTooltipComponent): destructure props and add types
The ShadTooltipComponent has been refactored to destructure the props and add types to improve readability and maintainability. The ShadTooltipProps type has been added to the types/components/index.ts file to define the expected props for the ShadTooltipComponent. The delayDuration, side, content, and children props are now destructured from the props object and have their respective types defined.
2023-06-27 15:26:53 -03:00
Gabriel Luiz Freitas Almeida
1880484a6c fix: add info field to tests 2023-06-27 13:25:59 -03:00
Gabriel Luiz Freitas Almeida
23cf37eee5 🔖 chore(pyproject.toml): update package version to 0.2.3
🔥 refactor(manager.py): remove unnecessary blank line at the end of the file
The package version has been updated to 0.2.3 in the pyproject.toml file. This is a chore as it does not affect the functionality of the package. The blank line at the end of the manager.py file has been removed as it is unnecessary and does not add any value to the code. This is a refactor as it improves the code readability.
2023-06-27 13:21:40 -03:00
Gabriel Luiz Freitas Almeida
09a72fa856
Bugfix - Deep-cloning the nodes when duplicate (#547) 2023-06-27 13:16:21 -03:00
Gabriel Luiz Freitas Almeida
ae5f04a1b0
Merge branch 'release' into bugfix-duplicate 2023-06-27 13:15:49 -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
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
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
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
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
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