Define parameters used for required components
To integrate a YouTube document loader from LangChain into GenAI Stack, define a class and inherit the custom component. Each component necessitates a display name, description, and documentation URL that should be appropriately reflected on the user interface (UI).
Inside the class, create a build_config()
method to specify the parameters utilized by the component. In the context of integrating the YouTube loader, user input for the URL and the desired transcription language is essential. For these parameters, construct a Python dictionary and assign the display_name, is_list, required, and value as keys that will be updated on the UI. For instance, consider the URL as an example component.
display_name (str): The component's name, e.g., Video URL
is_list (bool): Indicates whether the required parameter is a list input
required (bool): Specifies whether the input is mandatory
value (str): The default value, which can be left empty or assigned a default value
These parameters will help define and communicate the necessary information for the YouTube loader within the UI. Once all the essential parameters are defined, utilize the build(**kwargs)
method to instantiate the custom component with the specified configurations.
Last updated