LLM for Unity
v2.3.0
Create characters in Unity with LLMs!
|
Class implementing the LLama3 template for chat. More...
Public Member Functions | |
override string | GetName () |
Returns the chat template name. | |
override string | GetDescription () |
Returns the chat template description. | |
override string[] | GetNameMatches () |
Returns an array of names that can be used to match the chat template. | |
override string[] | GetChatTemplateMatches () |
Returns an array of jinja templates that can be used to match the chat template. | |
override string[] | GetStop (string playerName, string AIName) |
Returns an array of the stopwords used by the template. | |
Public Member Functions inherited from LLMUnity.ChatTemplate | |
virtual string | ComputePrompt (List< ChatMessage > messages, string playerName, string AIName, bool endWithPrefix=true) |
Constructs the prompt using the template based on a list of ChatMessages. | |
Additional Inherited Members | |
Static Public Member Functions inherited from LLMUnity.ChatTemplate | |
static string | FromName (string name) |
Determines the chat template name from a search name. It searches if any of the chat template names is a substring of the provided name. | |
static string | FromTemplate (string template) |
Determines the chat template name from a Jinja template. | |
static string | FromGGUF (string path) |
Determines the chat template name from a GGUF file. It reads the GGUF file and then determines the chat template name based on: | |
static string | FromGGUF (GGUFReader reader, string path) |
static ChatTemplate | GetTemplate (string template) |
Creates the chat template based on the provided chat template name. | |
Static Public Attributes inherited from LLMUnity.ChatTemplate | |
static string | DefaultTemplate |
the default template used when it can't be determined ("chatml") | |
static Dictionary< string, ChatTemplate > | templates |
a dictionary from chat template name to chat template type. It can be used to get the chat template names supported with: | |
Class implementing the LLama3 template for chat.
Definition at line 275 of file LLMChatTemplates.cs.
|
inlinevirtual |
Returns an array of jinja templates that can be used to match the chat template.
Reimplemented from LLMUnity.ChatTemplate.
Definition at line 280 of file LLMChatTemplates.cs.
|
inlinevirtual |
Returns the chat template description.
Reimplemented from LLMUnity.ChatTemplate.
Definition at line 278 of file LLMChatTemplates.cs.
|
inlinevirtual |
Returns the chat template name.
Reimplemented from LLMUnity.ChatTemplate.
Definition at line 277 of file LLMChatTemplates.cs.
|
inlinevirtual |
Returns an array of names that can be used to match the chat template.
Reimplemented from LLMUnity.ChatTemplate.
Definition at line 279 of file LLMChatTemplates.cs.
|
inlinevirtual |
Returns an array of the stopwords used by the template.
Reimplemented from LLMUnity.ChatTemplate.
Definition at line 291 of file LLMChatTemplates.cs.