🐛 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
🔧 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
🐛 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
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.
🔀 refactor(OpenAIConversationalAgent.py): make openai_api_base parameter optional with a default value of None for better flexibility and backward compatibility
📝 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.
🔀 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
🔨 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
🐛 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
📝 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