Commit graph

2,911 commits

Author SHA1 Message Date
DiogenesBR
2f5dba1210 File loader 2023-09-22 17:36:40 +00:00
Gabriel Luiz Freitas Almeida
eeab7bda05 🐛 fix(process.py): handle unknown langchain_object types by returning the object as is instead of raising an exception 2023-09-18 14:22:45 -03:00
Gabriel Luiz Freitas Almeida
15a96b63d9
Bug fix on error detail of customComponent code - Release (#927) 2023-09-18 10:42:08 -03:00
Gabriel Luiz Freitas Almeida
6500d793d1 🐛 fix(types.py): fix indentation and remove duplicate docstring to improve code readability
🔥 chore(types.py): remove unused variable 'e' and improve exception handling by adding 'from exc' to preserve original traceback
2023-09-18 10:39:29 -03:00
Gabriel Luiz Freitas Almeida
b5cb175c58
Enabling prompt modal close without variables (#915) 2023-09-18 10:31:34 -03:00
Gabriel Luiz Freitas Almeida
8e166cebf3 🔧 fix(types): fix indentation in TooltipComponentType to improve code readability
🔧 fix(utils): fix indentation in validateNode function to improve code readability
2023-09-18 09:59:34 -03:00
Gabriel Luiz Freitas Almeida
cc6cf4df35 🐛 fix(validate.py): set prompt_request.name to the key of the only custom field if it is an empty string and there is only one custom field to handle the first prompt request after node creation 2023-09-18 09:34:30 -03:00
Cristhian Zanforlin Lousa
887d1d8f79 🐛 fix(types.py): handle exceptions and raise HTTPException with detailed error message and traceback
🐛 fix(index.tsx): fix error detail access in className condition
🐛 fix(classes.css): adjust scrollbar styles for Ace editor
2023-09-18 09:28:24 -03:00
Gabriel Luiz Freitas Almeida
4cefc59aba 🔀 merge(process.py): merge changes from langflow.utils.logger module to process.py module
🔀 merge(process.py): merge changes from langflow.utils.logger module to process.py module to improve code organization and import statements
2023-09-17 20:15:37 -03:00
Gabriel Luiz Freitas Almeida
d65a75c8d8 🔧 chore(process.py): replace logger import from langflow.utils.logger to loguru.logger for better logging functionality
🔧 chore(process.py): change ValueError exception to a warning log message when encountering an unknown langchain_object type
2023-09-17 20:14:25 -03:00
Cristhian Zanforlin Lousa
bd9c53bf14 🐛 fix(EditNodeModal): fix state mutation issue by using useRef instead of useState for myData variable
 feat(EditNodeModal): add onChangeOpenModal prop to BaseModal component to reset myData to original data when modal is closed

🔧 chore: fix indentation in setTabsState function call for better code readability

🔧 fix(baseModal): import useEffect from react to fix missing dependency warning
🔧 fix(baseModal): add missing onChangeOpenModal prop to BaseModal component
🔧 fix(baseModal): call onChangeOpenModal prop in useEffect to notify parent component of modal open state change
🔧 fix(genericModal): add empty onChangeOpenModal prop to BaseModal component to fix prop type error
2023-09-14 20:11:48 -03:00
Cristhian Zanforlin Lousa
144fdbd098 🐛 fix(parameterComponent): fix data mutation by cloning data object before updating it
🐛 fix(parameterComponent): fix data mutation by cloning data object before updating it
🐛 fix(genericModal): remove unnecessary cloning of nodeClass object
🐛 fix(genericModal): fix validation logic for PROMPT type modal
🐛 fix(reactflowUtils): remove console.log statement in handleKeyDown function
2023-09-14 14:18:30 -03:00
Gabriel Luiz Freitas Almeida
63d1e82c80 fix: 🐛 fixes Infinity icon crashing the frontend
There's an issue with the exported Infinity variable, InfinityIcon is an alias and fixes that
2023-09-14 09:36:34 -03:00
Cristhian Zanforlin Lousa
9c4c8f1cf7 🔨 refactor(promptComponent): rename TextAreaComponentType to PromptAreaComponentType for better naming consistency and clarity
🔨 refactor(genericModal): import cloneDeep from lodash to improve code readability and maintainability
🔨 refactor(genericModal): add type annotations to validatePrompt function parameters for better code documentation
🔨 refactor(genericModal): add null check for nodeClass before modifying it in validatePrompt function
🔨 refactor(genericModal): setNodeClass and setModalOpen only if frontend_node is not an empty object in validatePrompt function
🔨 refactor(genericModal): remove console.log statement in catch block of validatePrompt function
🔨 refactor(genericModal): add type annotations to catch block of validatePrompt function for better code documentation
🔨 refactor(types): add PromptAreaComponentType to define the type of PromptAreaComponent props
2023-09-14 09:12:18 -03:00
Gabriel Luiz Freitas Almeida
327cb0771f 🐛 fix(inputListComponent): handle conversion from string to array for value prop to ensure smooth operation and prevent potential errors 2023-09-11 14:23:35 -03:00
Gabriel Luiz Freitas Almeida
250b11b5d9 🐛 fix(__main__.py): make cache argument optional in update_settings function to allow not passing a value for it 2023-09-11 14:21:45 -03:00
Gabriel Luiz Freitas Almeida
15cd835a0c 🔧 chore(utils.py): add logging statement when no LLM cache is set to provide visibility and debugging information 2023-09-11 14:20:04 -03:00
Gabriel Luiz Freitas Almeida
6e7d7dfb51 🔧 chore(langfuse.py): update debug log message for better clarity and accuracy 2023-09-11 14:19:11 -03:00
Gabriel Luiz Freitas Almeida
899a8fbb33 🔧 chore(__main__.py): change default value of cache option to None for better flexibility
🐛 fix(utils.py): handle ImportError when importing cache class and log a warning message
🔧 chore(settings.py): change default value of CACHE option to None for better flexibility

Fixes #880
2023-09-11 14:05:35 -03:00
Gabriel Luiz Freitas Almeida
f379d54686 🐛 fix(process.py): add support for processing Document objects in process_graph_cached function 2023-09-09 08:28:29 -03:00
Gabriel Luiz Freitas Almeida
c7554a2477 🔧 chore(langfuse.py): fix import statement for Langfuse to ignore type checking 2023-08-30 10:10:39 -03:00
Gabriel Luiz Freitas Almeida
2fe8e29546 Merge branch 'release' into langfuse_integration 2023-08-30 09:53:21 -03:00
Gabriel Luiz Freitas Almeida
afca3fe3e7 🔧 chore(base.py): add teardown method to Engine class for proper cleanup of the database engine
🔧 chore(base.py): add logging statement to teardown method for debugging purposes
🔧 chore(base.py): call dispose method on database engine instance in teardown method to properly release resources
🔧 chore(base.py): set database engine instance to None in teardown method to ensure proper cleanup
2023-08-30 09:51:02 -03:00
Gabriel Luiz Freitas Almeida
3efecc8b9b 🐛 fix(manager.py): add unique session id to avoid multiple clients with the same id
🐛 fix(utils.py): pass session id to process_graph function to ensure unique session id for each client
🐛 fix(base.py): pass session id to setup_callbacks function to ensure unique session id for each client
2023-08-30 09:50:19 -03:00
Gabriel Luiz Freitas Almeida
55bd1dc6ec 🔧 chore(main.py): import and add startup and shutdown events for LangfuseInstance to improve plugin functionality
🔧 chore(__init__.py): add empty file to create plugins directory structure
2023-08-30 09:49:57 -03:00
Gabriel Luiz Freitas Almeida
9559f1d684 feat(langfuse.py): add temporary implementation of LangfuseInstance class
The LangfuseInstance class is a temporary implementation that will be replaced by a plugin system in the future. This class provides methods for creating, getting, updating, and tearing down an instance of Langfuse. It uses the Langfuse library and credentials from the settings module to create the instance. If no credentials are found, the instance is set to None. The update method resets the instance and creates a new one. The teardown method flushes the instance and sets it to None.
2023-08-30 09:49:38 -03:00
Gabriel Luiz Freitas Almeida
3d9533a98a
🔀 refactor(OpenAIConversationalAgent.py): remove unused openai_api_base parameter to improve code readability and maintainability (#838) 2023-08-29 20:33:31 +00:00
Gabriel Luiz Freitas Almeida
8f27c71553
Bugfix - InputListComponent expect an array as Input() (#830) 2023-08-29 20:25:28 +00:00
Alexandre Henrique
9530230c2c Fixed the connection to the forward component 2023-08-29 16:34:40 -03:00
Gabriel Luiz Freitas Almeida
4bb7181587 🔀 refactor(OpenAIConversationalAgent.py): remove unused openai_api_base parameter to improve code readability and maintainability
🔀 refactor(OpenAIConversationalAgent.py): make openai_api_base parameter optional with a default value of None for better flexibility and backward compatibility
2023-08-29 15:25:55 -03:00
Alexandre Henrique
e7f94f23e4 added huggingface endpoints 2023-08-29 00:31:55 -03:00
Cristhian Zanforlin Lousa
dc3db7ce78 🔧 chore(inputListComponent): add TODO comment for handling conversion from string to array format
🔧 chore(inputListComponent): add recursive character text splitter to handle conversion from string to array format
2023-08-28 13:59:01 -03:00
Cristhian Zanforlin Lousa
c6f6e2008e 🔀 refactor(inputListComponent): improve code readability and handle value conversion from string to array format
📝 WHY: The InputListComponent expects an array format for the value prop, but sometimes it receives a string instead. To prevent errors and ensure smooth operation, we need to handle the conversion from a string to an array with the string as its element. This refactor improves code readability and clarifies the purpose of the value conversion logic.
2023-08-28 13:52:49 -03:00
Cristhian Zanforlin Lousa
517816bd3b 🐛 fix(inputListComponent): convert value to an array when it's a string to avoid errors in InputListComponent 2023-08-28 13:51:42 -03:00
Cristhian Zanforlin Lousa
3b1872dd4c 🐛 fix(inputListComponent): fix type error when value is a string by converting it to an array 2023-08-28 13:31:50 -03:00
Gabriel Luiz Freitas Almeida
cc4db3911e 🔀 chore(MetalRetriever.py): fix import statement for Metal class from metal_sdk.metal module to resolve type checking issue 2023-08-28 08:06:37 -03:00
Gabriel Luiz Freitas Almeida
b3b0f63a1f 🔀 merge(MetalRetriever.py): merge changes from langchain/retrievers to langchain/schema to keep codebase up to date
🔀 merge(MetalRetriever.py): merge changes from metal_sdk/metal to langchain/schema to keep codebase up to date
🐛 fix(MetalRetriever.py): change BaseRetriever import from langchain.schema.retriever to langchain.schema to match updated codebase
 feat(MetalRetriever.py): add error handling to MetalRetriever build method to raise ValueError if connection to Metal API fails
2023-08-28 07:54:59 -03:00
Gabriel Luiz Freitas Almeida
0f9279c68d feat(MetalRetriever.py): add MetalRetriever component to retrieve data using the Metal API
 feat(__init__.py): add empty __init__.py file to the retrievers directory to make it a package
2023-08-28 07:32:18 -03:00
Gabriel Luiz Freitas Almeida
748f38e8c4
Fixed bug where name is not changed when description changes (#813) 2023-08-25 01:58:09 +00:00
Gabriel Luiz Freitas Almeida
a28df1f08f 📝 docs(LanguageRecursiveTextSplitter.py): update documentation link to point to the correct URL
🔨 refactor(LanguageRecursiveTextSplitter.py): change type hints for the 'documents' parameter from Document to list[Document] and change return type from Document to list[Document] to improve clarity and consistency
🔨 refactor(LanguageRecursiveTextSplitter.py): change type hints for the 'chunk_overlap' parameter from Optional[int] to Optional[str] and handle conversion to int to improve flexibility and error handling
🔨 refactor(LanguageRecursiveTextSplitter.py): change type hints for the 'chunk_size' parameter from Optional[int] to Optional[str] and handle conversion to int to improve flexibility and error handling
🔨 refactor(RecursiveCharacterTextSplitter.py): change type hints for the 'documents' parameter from Document to list[Document] and change return type from Document to list[Document] to improve clarity and consistency
🔨 refactor(RecursiveCharacterTextSplitter.py): change type hints for the 'separators' parameter from Optional[str] to Optional[list[str]] and handle conversion to list of escaped characters to improve flexibility and error handling
🔨 refactor(RecursiveCharacterTextSplitter.py): change type hints for the 'chunk_overlap' parameter from Optional[int] to Optional[str] and handle conversion to int to improve flexibility and error handling
🔨 refactor(RecursiveCharacterTextSplitter.py): change type hints for the 'chunk_size' parameter from Optional[int] to Optional[str] and handle conversion to int to improve flexibility and error handling
2023-08-24 22:52:16 -03:00
Gabriel Luiz Freitas Almeida
c9f4969080 🐛 fix(types.py): fix regex pattern in extract_type_from_optional function to correctly extract type from optional field_type
🐛 fix(types.py): fix logic in add_new_custom_field function to correctly set is_list flag when field_type contains "list" keyword
 feat(types.py): add field_contains_list variable to check if field_type contains "list" keyword to improve semantics in add_new_custom_field function
2023-08-24 22:49:52 -03:00
Gabriel Luiz Freitas Almeida
86927d10d3 🔧 fix(types.py): add support for extracting inner type from list field types in process_type function 2023-08-24 22:37:30 -03:00
Gabriel Luiz Freitas Almeida
0649b61fca 📦 chore(LanguageRecursiveTextSplitter.py): add LanguageRecursiveTextSplitter component to split text into chunks based on language
📝 docs(LanguageRecursiveTextSplitter.py): add documentation link for LanguageRecursiveTextSplitter component
🔧 refactor(LanguageRecursiveTextSplitter.py): refactor build_config method to use options from Language enum for separator_type
🔧 refactor(LanguageRecursiveTextSplitter.py): refactor build method to split text into chunks based on specified length and overlap
🔧 refactor(LanguageRecursiveTextSplitter.py): refactor build method to handle chunk_size and chunk_overlap as integers
🔧 refactor(LanguageRecursiveTextSplitter.py): refactor build method to use RecursiveCharacterTextSplitter from langchain.text_splitter
🔧 refactor(LanguageRecursiveTextSplitter.py): refactor build method to split documents using RecursiveCharacterTextSplitter and return the chunks
2023-08-24 22:24:07 -03:00
Gabriel Luiz Freitas Almeida
86730437a5 feat(RecursiveCharacterTextSplitter.py): add RecursiveCharacterTextSplitter component to split text into chunks of a specified length 2023-08-24 22:23:45 -03:00
Gabriel Luiz Freitas Almeida
40ab6b1e87 🔥 refactor(config.yaml): remove RecursiveCharacterTextSplitter from the config file as it is no longer used
📚 docs(config.yaml): update documentation link for CharacterTextSplitter in the config file
2023-08-24 22:22:31 -03:00
Gabriel Luiz Freitas Almeida
95ff2a7f6b 🔧 chore(util.py): add missing import for 'Document' from langchain.schema
🔧 chore(util.py): add missing type hint for 'documents' parameter in build_loader_repr_from_documents function
🔧 chore(util.py): add logic to calculate average document length and display summary information in build_loader_repr_from_documents function
2023-08-24 22:22:09 -03:00
Gabriel Luiz Freitas Almeida
9fb1a26277 🐛 fix(manager.py): catch all exceptions instead of just TypeError when loading JSON payload to improve error handling and prevent crashes 2023-08-24 21:10:34 -03:00
Lucas Oliveira
1e5fc97013 Bug fixed 2023-08-24 20:21:09 -03:00
Lucas Oliveira
eaf70303ee Fixed bug where name is not changed when description changes 2023-08-24 10:52:23 -03:00
anovazzi1
cd6985591f fix(App.tsx): replace hardcoded error message with FetchErrorComponent to improve error handling and display
feat(App.tsx): add support for displaying fetch error message and description in FetchErrorComponent
feat(fetchErrorComponent): create FetchErrorComponent to display fetch error message and description
fix(genericIconComponent): add stroke-width property to ensure consistent icon stroke width
feat(loadingComponent): import LoadingComponentProps from types/components to improve type safety
feat(constants): add FETCH_ERROR_MESSAGE and FETCH_ERROR_DESCRIPTION constants for fetch error handling
fix(typesContext): remove console.log statement and set fetchError to true when an error occurs during fetching types
feat(typesContext): add error handling for fetching types and set fetchError to true when an error occurs
feat(typesContext): import fetchErrorComponentType from types/components to improve type safety
feat(types/components): create fetchErrorComponentType and LoadingComponentProps interfaces for type safety
fix(styleUtils): import Unplug icon from lucide-react to fix missing icon issue
2023-08-23 21:09:53 -03:00