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

Class implementing the Phi-3.5 template. More...

Inheritance diagram for LLMUnity.Phi3_5Template:
[legend]

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, 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 Phi-3.5 template.

Definition at line 496 of file LLMChatTemplates.cs.

Member Function Documentation

◆ GetChatTemplateMatches()

override string[] LLMUnity.Phi3_5Template.GetChatTemplateMatches ( )
inlinevirtual

Returns an array of jinja templates that can be used to match the chat template.

Reimplemented from LLMUnity.ChatTemplate.

Definition at line 501 of file LLMChatTemplates.cs.

◆ GetDescription()

override string LLMUnity.Phi3_5Template.GetDescription ( )
inlinevirtual

Returns the chat template description.

Reimplemented from LLMUnity.ChatTemplate.

Definition at line 499 of file LLMChatTemplates.cs.

◆ GetName()

override string LLMUnity.Phi3_5Template.GetName ( )
inlinevirtual

Returns the chat template name.

Reimplemented from LLMUnity.ChatTemplate.

Definition at line 498 of file LLMChatTemplates.cs.

◆ GetNameMatches()

override string[] LLMUnity.Phi3_5Template.GetNameMatches ( )
inlinevirtual

Returns an array of names that can be used to match the chat template.

Reimplemented from LLMUnity.ChatTemplate.

Definition at line 500 of file LLMChatTemplates.cs.

◆ GetStop()

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

Returns an array of the stopwords used by the template.

Reimplemented from LLMUnity.ChatTemplate.

Definition at line 510 of file LLMChatTemplates.cs.


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