Commit graph

1,504 commits

Author SHA1 Message Date
Gustavo Schaedler
10cbed6eef
Add Cohere LLM (#397) 2023-05-29 20:57:43 +01:00
GMS
44d6832163 Poetry.lock dependencies version fixed 2023-05-29 20:46:47 +01:00
GMS
2a07f6368f Add Cohere LLM 2023-05-29 20:40:17 +01:00
Alexandre Henrique Pereira Tavares
8039a58af0
🚀 feat(langflow): add support for extra fields in VectorStoreFrontendNode (#396)
 feat(template): add method to add fields to a template
The VectorStoreFrontendNode now supports adding extra fields to its
template. The add_extra_fields method is called after the node is loaded
and adds the weaviate_url field to the template if the node is of type
Weaviate. The Template class now has a method to add fields to a
template. This method is used by the VectorStoreFrontendNode to add the
weaviate_url field to its template.
2023-05-29 16:15:25 -03:00
Gabriel Almeida
3614296fd8 🚀 feat(langflow): add support for extra fields in VectorStoreFrontendNode
 feat(template): add method to add fields to a template
The VectorStoreFrontendNode now supports adding extra fields to its template. The add_extra_fields method is called after the node is loaded and adds the weaviate_url field to the template if the node is of type Weaviate. The Template class now has a method to add fields to a template. This method is used by the VectorStoreFrontendNode to add the weaviate_url field to its template.
2023-05-29 15:49:01 -03:00
Gabriel Almeida
20a438428f 🔧 chore(frontend): format code with prettier
The changes in this commit are purely cosmetic, as the code has been formatted with prettier to improve its readability and consistency. No functional changes have been made.
2023-05-29 14:35:41 -03:00
Gabriel Almeida
38cc3af18d 🔺 chore(pyproject.toml): update langchain and langchain-serve dependencies
The langchain and langchain-serve dependencies have been updated to versions 0.0.184 and 0.0.38 respectively. This update may include bug fixes, performance improvements, or new features.
2023-05-29 14:35:18 -03:00
Gustavo Schaedler
44ebfa450c
Adding support for Ctransformers (#387)
Ctransformers allows support for many models in the GGML format and
HuggingFace models.
2023-05-29 17:27:40 +01:00
Gustavo Schaedler
b9773668b4
Merge branch 'dev' into ctransformers 2023-05-29 17:16:24 +01:00
Gustavo Schaedler
4e474eaaae
Revert "Add Cohere LLM" (#394) 2023-05-29 15:12:45 +01:00
Gustavo Schaedler
b33a9d2b62
Revert "Add Cohere LLM" 2023-05-29 15:11:09 +01:00
anovazzi1
8e81a21722
Pull Request: UI Feature Enhancements (#393)
Description:
This pull request implements several UI feature enhancements to improve
the user experience. The changes include title casing on names and
titles, fixing and changing icons, and adding a cursor pointer on the
chat interface.

Changes Made:

Title case on names and titles: Modified the code to convert names and
titles to title case. This ensures consistent capitalization and
enhances readability throughout the application.

Fixing/Changing icons: Replaced outdated or inconsistent icons with
updated versions to provide a more visually appealing and cohesive user
interface.

Cursor on chat: Added a cursor pointer to the chat interface to indicate
interactivity and enhance user engagement. The cursor appears when
hovering over the chat area, making it clear that the chat is responsive
to user input.
2023-05-29 11:10:01 -03:00
Gustavo Schaedler
a859481513
Add Cohere LLM (#388) 2023-05-29 15:09:30 +01:00
Cristhian Zanforlin Lousa
acec690457 Title case on names/title, fixing/changing icons, cursor on chat 2023-05-29 08:45:42 -03:00
Gabriel Almeida
921fac3c95 Merge branch 'dev' of https://github.com/logspace-ai/langflow into dev 2023-05-29 07:31:51 -03:00
Gabriel Almeida
9bac61b563 🚀 feat(config.yaml): add new text splitters and toolkits
Added new text splitters to the configuration file: RecursiveCharacterTextSplitter, LatexTextSplitter, and PythonCodeTextSplitter. These text splitters will be used to split text into smaller chunks for processing. Also, added new toolkits to the configuration file: OpenAPIToolkit and JsonToolkit. These toolkits will be used to process the text chunks generated by the text splitters.
2023-05-29 07:30:58 -03:00
Rodrigo Nader
1e0e5545ae
Error Handling for Modal Calls in Different Flows Prompt/Text (#390)
This pull request resolves a bug related to error handling when
components attempt to call the same modals within different flows. The
issue occurs due to a lack of proper validation and error handling in
the existing codebase. This bugfix aims to provide a comprehensive
solution to mitigate the problem and ensure a smoother user experience.
2023-05-29 00:26:39 -03:00
Cristhian Zanforlin Lousa
46813e5c3f Fixing modal trattative error when is Prompt/Text 2023-05-28 20:37:07 -03:00
Gabriel Almeida
4c71b1d17f 🔇 chore(tabsContext.tsx): comment out code that was causing issues with file upload
The code that was causing issues with file upload has been commented out for now. The code was resetting the content of a file, which was causing issues with the file upload.
2023-05-28 20:34:01 -03:00
Gabriel Luiz Freitas Almeida
bb8d0d90d4
feat: notion directory loader (#382) 2023-05-28 20:04:04 -03:00
Gabriel Almeida
ece9530973 🎨 style(inputComponent): change input placeholder text to be more descriptive
🎨 style(inputListComponent): change input placeholder text to be more descriptive
The placeholder text for both input components has been changed to "Type something..." to be more descriptive and provide better guidance to the user.
2023-05-28 17:57:33 -03:00
Gabriel Almeida
edfc103999 🚀 feat(config.yaml): add CohereEmbeddings to the list of supported embeddings
The CohereEmbeddings is added to the list of supported embeddings in the config.yaml file. This allows the application to use the CohereEmbeddings for language processing tasks.
2023-05-28 17:53:49 -03:00
Gabriel Almeida
f9bc83c7aa Merge remote-tracking branch 'origin/dev' into cohere 2023-05-28 17:49:05 -03:00
Gabriel Almeida
fa8cd1e31c 🔒 chore(pyproject.toml): update dependencies to latest versions
FastAPI and Langchain dependencies have been updated to their latest versions to ensure that the application is using the latest features and security patches. The Llama-cpp-python dependency has also been updated to a more recent version.
2023-05-28 17:36:37 -03:00
Gabriel Almeida
4409066e81 🔼 chore(pyproject.toml): update langchain dependency from 0.0.176 to 0.0.183
 feat(pyproject.toml): add cohere dependency to enable new features
🔧 chore(config.yaml): add Cohere to the list of supported LLMS
The langchain dependency was updated to version 0.0.183 to take advantage of the latest features and bug fixes. The cohere dependency was added to enable new features. Cohere is now added to the list of supported LLMS in the config.yaml file.
2023-05-28 17:28:42 -03:00
Gabriel Almeida
5f25bb0d58 🐛 fix(utils.py): fix try_setting_streaming_options function to correctly set streaming attribute
The try_setting_streaming_options function now correctly sets the streaming attribute of the llm object to True if it is an instance of BaseLanguageModel and has the streaming attribute. This fixes a bug where the streaming attribute was not being set correctly.
2023-05-28 17:25:27 -03:00
Gabriel Almeida
f315d78f14 🔺 chore(pyproject.toml): update langchain dependency from 0.0.176 to 0.0.183
 feat(pyproject.toml): add ctransformers dependency to support text classification tasks
The langchain dependency has been updated to version 0.0.183 to ensure that the latest features and bug fixes are available. The ctransformers dependency has been added to support text classification tasks.
2023-05-28 17:15:10 -03:00
Gabriel Almeida
c2027898de 🐛 fix(config.yaml): add CTransformers to the list of supported llms
🐛 fix(utils.py): fix setting of streaming option for llm
🎨 style(llms.py): add model_file and model_type fields to the list of non-advanced fields
The first change adds CTransformers to the list of supported llms in the config.yaml file. The second change fixes a bug in the try_setting_streaming_options function in utils.py where the streaming option was not being set correctly. The third change is a style change that adds the model_file and model_type fields to the list of non-advanced fields in the LLMFrontendNode class in llms.py.
2023-05-28 17:14:49 -03:00
Gabriel Almeida
4848759aeb 🚀 chore(Makefile): add make targets to install backend and frontend dependencies
The Makefile now has two new targets, `install_backend` and `install_frontend`, which install the dependencies for the backend and frontend respectively. This makes it easier for developers to set up the project as they can now run `make init` to install the pre-commit hooks and all dependencies.
2023-05-28 16:36:57 -03:00
Gabriel Almeida
023df99ecc 🔨 refactor(embeddings.py): move openai fields formatting to a separate method
 test(embeddings_template.py): add tests for openai fields formatting
The openai fields formatting is now done in a separate method, which improves the readability and maintainability of the code. Tests were added to ensure that the formatting is done correctly.
2023-05-28 16:18:33 -03:00
Gabriel Ferreira Rosalino
36910ff187 chore: removed not needed inputDirectoryComponent 2023-05-28 02:13:24 -03:00
Gabriel Ferreira Rosalino
209e31da26 feat: adds NotionDirectoryLoader 2023-05-28 02:05:32 -03:00
Gabriel Almeida
fa9a3a210b 🐛 fix(base.py): change condition to check if content is empty instead of None
The previous condition was checking if the content was None, but it should check if it is empty. This change fixes the error message to be more accurate.
2023-05-27 23:39:05 -03:00
Gabriel Almeida
a758f48b88 🐛 fix(chains.py): set prompt field as required when value is None
The prompt field was previously set as not required when no value was provided, but this is not the intended behavior. The prompt field should always be required, even if the default prompt is used. This commit fixes the issue by setting the required attribute to True when the value is None.
2023-05-27 18:16:36 -03:00
Rodrigo Nader
f0503d2eb0
Activating HuggingFaceEmbeddings, adding Jina deps (#378)
🚀 feat(config.yaml): add HuggingFaceEmbeddings to embeddings
The Jina and sentence-transformers dependencies were added to the
project to improve the functionality of the application. The
HuggingFaceEmbeddings was added to the embeddings in the config.yaml
file to improve the quality of the embeddings used in the application.

Closes #375
2023-05-27 18:09:48 -03:00
Gabriel Almeida
6f8b434f68 🔧 chore(llms.py): add format_openai_field method to format OpenAI field display names
The `format_openai_field` method formats the display name of fields that contain the string "openai" in their name. It capitalizes the first letter of "OpenAI", replaces underscores with spaces, and replaces "Api" with "API". This improves the readability and consistency of the display names of OpenAI fields.
2023-05-27 17:58:00 -03:00
Gabriel Almeida
3436a713c2 🚀 feat(pyproject.toml): add jina and sentence-transformers dependencies
🚀 feat(config.yaml): add HuggingFaceEmbeddings to embeddings
The Jina and sentence-transformers dependencies were added to the project to improve the functionality of the application. The HuggingFaceEmbeddings was added to the embeddings in the config.yaml file to improve the quality of the embeddings used in the application.

Issue #375, #372
2023-05-27 17:19:09 -03:00
Gabriel Almeida
bf0ab14f67 🎨 style(promptComponent, textAreaComponent): fix indentation and whitespace
The changes in these files are purely cosmetic, fixing indentation and whitespace to improve code readability.

🔨 refactor(genericModal/index.tsx): improve code readability and add destructuring to props
The code has been refactored to improve readability and make it easier to understand. Destructuring has been added to the props to make it easier to access the values.
2023-05-27 17:04:12 -03:00
Gabriel Almeida
f774cc6361 🐛 fix(Makefile): update ruff command to fix all files in the directory
The ruff command was updated to fix all files in the directory instead of just the ones that have the I issue. This ensures that all files are properly formatted.
2023-05-27 17:00:44 -03:00
Gabriel Almeida
2a0b530d36 Merge branch 'dev' of https://github.com/logspace-ai/langflow into dev 2023-05-27 16:58:28 -03:00
Gabriel Almeida
41670bc43f 🐛 fix(chat_manager.py): change filter parameter name to filter_messages for clarity
The filter parameter name was ambiguous and could be interpreted in different ways. Renaming it to filter_messages makes it clear that it is used to filter chat messages.
2023-05-27 16:58:11 -03:00
Gabriel Luiz Freitas Almeida
c0493959af
Add First Version of Generic Modal Input Model (#369) 2023-05-27 16:54:26 -03:00
Gabriel Almeida
e0364833a9 🔥 refactor(chat_manager.py): rename filter parameter to filter_messages for clarity
🔥 refactor(custom.py): remove unused import of SQL_FORMAT_INSTRUCTIONS
🔥 refactor(custom_lists.py): remove unused import of SQLDatabase and utility_type_to_cls_dict
🔥 refactor(utilities/base.py): remove unused import of utility_type_to_cls_dict
🔥 refactor(utils/util.py): remove unused function build_template_from_parameters
The changes made are mostly removing unused imports and renaming a parameter for clarity. The import of SQL_FORMAT_INSTRUCTIONS was removed as it was not being used. The function build_template_from_parameters was removed as it was not being used.
2023-05-27 16:53:57 -03:00
Gabriel Almeida
a5b966f42e Formatting 2023-05-27 16:33:49 -03:00
Gabriel Almeida
cc785af652 🐛 fix(base.py): import UtilitiesFrontendNode from the correct module
 feat(base.py): add support for SQLDatabase utility and filter utilities according to settings.utilities
🎨 style(frontend_node/base.py): add display_name to fields
🎨 style(frontend_node/utilities.py): format field values and types
The import statement for UtilitiesFrontendNode was incorrect, causing an import error. The import statement was corrected to import from the correct module.

Support for SQLDatabase utility was added to the type_to_loader_dict dictionary. The dictionary is now filtered according to the settings.utilities list.

The display_name attribute was added to fields in the FrontendNode class to improve the readability of the frontend.

The format_field method in the UtilitiesFrontendNode class was updated to format field values and types. The method now converts field.field_type to a list if it is a Literal type and formats field.value if it is a dictionary.
2023-05-27 16:32:56 -03:00
Gabriel Almeida
7da8c0ef92 chore: refactor of template, frontend_node and field
This will improve the readability of the code and maintainability.
2023-05-27 15:56:46 -03:00
Gabriel Almeida
35dce224d7 📝 docs(nodes.py): update SQLAgentNode description to reflect its new implementation
The description of the SQLAgentNode has been updated to reflect its new implementation, which now constructs a SQL agent from an LLM and tools instead of a Vector Store Router. This change was made to improve the accuracy of the description and to better reflect the functionality of the node.
2023-05-27 14:24:19 -03:00
Gabriel Luiz Freitas Almeida
8c14b01d0c
fix: SQLAgent (#370) 2023-05-27 14:22:07 -03:00
Gabriel Ferreira Rosalino
aac6e3f2e9
Merge branch 'logspace-ai:dev' into gabfr-patch-1 2023-05-27 14:15:16 -03:00
Gabriel Ferreira Rosalino
f44e2f97f7
fix: SQLAgent
The queryCheckerTool now needs an extra arg with the LLM instance: https://github.com/hwchase17/langchain/blob/master/langchain/tools/sql_database/tool.py#L108

I added it so the SQLAgent can work normally now
2023-05-27 14:12:18 -03:00