diff --git a/Runtime/LLMCharacter.cs b/Runtime/LLMCharacter.cs index 997a9f84..9b1f5153 100644 --- a/Runtime/LLMCharacter.cs +++ b/Runtime/LLMCharacter.cs @@ -564,9 +564,18 @@ public async Task Complete(string prompt, Callback callback = nu /// callback function called when the full response has been received /// user prompt used during the initialisation (not added to history) /// the LLM response - public async Task Warmup(EmptyCallback completionCallback = null, string query = "hi") + public async Task Warmup(EmptyCallback completionCallback = null) { - return await Chat(query, null, completionCallback, false); + await LoadTemplate(); + if (!CheckTemplate()) return; + if (!await InitNKeep()) return; + + string prompt = template.ComputePrompt(chat, playerName, AIName); + ChatRequest request = GenerateRequest(prompt); + request.n_predict = 0; + string json = JsonUtility.ToJson(request); + await CompletionRequest(json); + completionCallback?.Invoke(); } ///