feat(langflow): add function base class to InitializeAgentNode
The `build_template_from_class` function in `ChainCreator` now supports adding a function to the chain. This is done by passing `add_function=True` to the function.
In `InitializeAgentNode`, the `base_classes` attribute has been updated to include the `function` base class. This allows the node to be used as a function in the chain.
fix(chat_manager.py): empty chat history for a client when an exception is raised
fix(GenericNode): fix useEffect dependencies to avoid unnecessary re-renders
refactor(langflow): set advanced flag to False for LLMFrontendNode class' api key field
feat(langflow): add show flag to LLMFrontendNode class' model_kwargs field
refactor(langflow): set advanced flag to False and show flag to True for LLMFrontendNode class' model_name and temperature fields
This commit adds validation for pydantic BaseModel subclasses in the
instantiate_class function. The function now checks if the class_object
is a subclass of BaseModel and if so, it validates the params passed to
it against the fields of the class_object.
Add verbose and fix_memory_inputs to langchain_object in load_flow_from_json function. The verbose attribute is set to True if it exists in the langchain_object. The fix_memory_inputs function is called on the langchain_object.
fix(api/chat_manager.py): remove async from ChatHistory.add_message and on_chat_history_update
fix(interface/run.py): remove async from async_get_result_and_steps
refactor(utils/util.py): remove unused code and simplify sync_to_async decorator
fix(api): fix ChatManager.get_history method to exclude start and stream messages
feat(api): add is_bot field to ChatMessage, ChatResponse, and FileResponse schemas
This commit modifies run.py to use type hinting and avoid circular imports by changing the import for NotEnoughElementsException to use type: ignore. Specifically, the code now imports from chromadb.errors instead of chromadb.exceptions.
fix(validate): set validation status to "success" or "error" based on response status
feat(validate): add state for validation status and outline color in GenericNode component
refactor(validate): use useDebouncedCallback hook for debouncing validation function
refactor(validate): simplify useEffect dependencies in GenericNode component
This change adds error handling to catch a specific exception that may occur when processing documents with the ChromaDB library. If there are not enough documents for indexing, the error message will suggest reducing the chunk size in TextSplitter.