def from_params(kwargs) -> "YAuth":
        """
        Create a YAuth instance from parameters.

        :param kwargs: A dictionary containing either a 'config' file path or direct 'folder_id' and 'api_key'.
        :return: A YAuth instance.
        """
        if kwargs.get("config") is not None:
            return YAuth.from_config_file(kwargs["config"])
        return YAuth.from_dict(kwargs)

        Create a YAuth instance from parameters.

        :param kwargs: A dictionary containing either a 'config' file path or direct 'folder_id' and 'api_key'.
        :return: A YAuth instance.
        
llama-index-integrations/embeddings/llama-index-embeddings-yandexgpt/llama_index/embeddings/yandexgpt/util.py