Add icon support to CustomComponent

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-02-08 10:01:29 -03:00
commit 585ae464a1
4 changed files with 32 additions and 7 deletions

View file

@ -5,7 +5,6 @@ from typing import Any, ClassVar, Optional
from cachetools import TTLCache, cachedmethod
from fastapi import HTTPException
from langflow.interface.custom.code_parser import CodeParser
from langflow.utils import validate
@ -82,6 +81,9 @@ class Component:
elif "documentation" in item_name:
template_config["documentation"] = ast.literal_eval(item_value)
elif "icon" in item_name:
template_config["icon"] = ast.literal_eval(item_value)
return template_config
def build(self, *args: Any, **kwargs: Any) -> Any: