@@ -45,27 +45,6 @@ public class LLM : MonoBehaviour
45
45
[ LLM ] public bool debug = false ;
46
46
/// <summary> number of prompts that can happen in parallel (-1 = number of LLMCharacter objects) </summary>
47
47
[ LLMAdvanced ] public int parallelPrompts = - 1 ;
48
- /// <summary> allows to start the server asynchronously.
49
- /// This is useful to not block Unity while the server is initialised.
50
- /// For example it can be used as follows:
51
- /// \code
52
- /// void Start(){
53
- /// StartCoroutine(Loading());
54
- /// ...
55
- /// }
56
- ///
57
- /// IEnumerator<string> Loading()
58
- /// {
59
- /// // show loading screen
60
- /// while (!llm.started)
61
- /// {
62
- /// yield return null;
63
- /// }
64
- /// Debug.Log("Server is ready");
65
- /// }
66
- /// \endcode
67
- /// </summary>
68
- [ LLMAdvanced ] public bool asynchronousStartup = true ;
69
48
/// <summary> select to not destroy the LLM GameObject when loading a new Scene. </summary>
70
49
[ LLMAdvanced ] public bool dontDestroyOnLoad = true ;
71
50
/// <summary> Size of the prompt context (0 = context size of the model).
@@ -119,8 +98,7 @@ public async void Awake()
119
98
await AndroidSetup ( ) ;
120
99
string arguments = GetLlamaccpArguments ( ) ;
121
100
if ( arguments == null ) return ;
122
- if ( asynchronousStartup ) await Task . Run ( ( ) => StartLLMServer ( arguments ) ) ;
123
- else StartLLMServer ( arguments ) ;
101
+ await Task . Run ( ( ) => StartLLMServer ( arguments ) ) ;
124
102
if ( dontDestroyOnLoad ) DontDestroyOnLoad ( transform . root . gameObject ) ;
125
103
if ( basePrompt != "" ) await SetBasePrompt ( basePrompt ) ;
126
104
}
0 commit comments