LLM for Unity  v2.2.5
Create characters in Unity with LLMs!
Loading...
Searching...
No Matches
LLMUnity.LLama2Template Class Reference

Class implementing the LLama2 template. More...

Inheritance diagram for LLMUnity.LLama2Template:
[legend]

Public Member Functions

override string GetName ()
 Returns the chat template name.
 
override string GetDescription ()
 Returns the chat template description.
 
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[] GetNameMatches ()
 Returns an array of names that can be used to match the chat template.
 
virtual string[] GetChatTemplateMatches ()
 Returns an array of jinja templates that can be used to match the chat template.
 
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, ChatTemplatetemplates
 a dictionary from chat template name to chat template type. It can be used to get the chat template names supported with:
 

Detailed Description

Class implementing the LLama2 template.

Definition at line 236 of file LLMChatTemplates.cs.

Member Function Documentation

◆ GetDescription()

override string LLMUnity.LLama2Template.GetDescription ( )
inlinevirtual

Returns the chat template description.

Reimplemented from LLMUnity.ChatTemplate.

Definition at line 239 of file LLMChatTemplates.cs.

◆ GetName()

override string LLMUnity.LLama2Template.GetName ( )
inlinevirtual

Returns the chat template name.

Reimplemented from LLMUnity.ChatTemplate.

Definition at line 238 of file LLMChatTemplates.cs.

◆ GetStop()

override string[] LLMUnity.LLama2Template.GetStop ( string playerName,
string AIName )
inlinevirtual

Returns an array of the stopwords used by the template.

Reimplemented from LLMUnity.ChatTemplate.

Definition at line 247 of file LLMChatTemplates.cs.


The documentation for this class was generated from the following file: