LLM for Unity  v3.0.1
Create characters in Unity with LLMs!
Loading...
Searching...
No Matches
LLMCharacter.cs
1using UnityEngine;
2
3namespace LLMUnity
4{
5 public class LLMCharacter : LLMAgent
6 {
7 public string prompt
8 {
9 get { return systemPrompt; }
10 set { systemPrompt = value; }
11 }
12
13 public LLMCharacter()
14 {
15 Debug.LogWarning("LLMCharacter is deprecated and will be removed from future versions. Please Use LLMAgent instead.");
16 }
17
18 public void SetPrompt(string newPrompt, bool clearChat = true)
19 {
21 if (clearChat) _ = ClearHistory();
22 }
23 }
24}
Unity MonoBehaviour that implements a conversational AI agent with persistent chat history....
Definition LLMAgent.cs:21
virtual async Task ClearHistory()
Clears the entire conversation history.
Definition LLMAgent.cs:189
string systemPrompt
System prompt defining the agent's behavior and personality.
Definition LLMAgent.cs:58
int slot
Server slot ID for this agent's requests.
Definition LLMAgent.cs:44