1 /* 2 * Copyright (c) Meta Platforms, Inc. and affiliates. 3 * All rights reserved. 4 * 5 * This source code is licensed under the BSD-style license found in the 6 * LICENSE file in the root directory of this source tree. 7 */ 8 9 package com.example.executorchllamademo; 10 11 /** 12 * A helper interface within the app for MainActivity and Benchmarking to handle callback from 13 * ModelRunner. 14 */ 15 public interface ModelRunnerCallback { 16 onModelLoaded(int status)17 void onModelLoaded(int status); 18 onTokenGenerated(String token)19 void onTokenGenerated(String token); 20 onStats(String token)21 void onStats(String token); 22 onGenerationStopped()23 void onGenerationStopped(); 24 } 25