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

Class implementing the Vicuna template. More...

Inheritance diagram for LLMUnity.VicunaTemplate:
[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 Vicuna template.

Definition at line 409 of file LLMChatTemplates.cs.

Member Function Documentation

◆ GetChatTemplateMatches()

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

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

Reimplemented from LLMUnity.ChatTemplate.

Definition at line 414 of file LLMChatTemplates.cs.

◆ GetDescription()

override string LLMUnity.VicunaTemplate.GetDescription ( )
inlinevirtual

Returns the chat template description.

Reimplemented from LLMUnity.ChatTemplate.

Definition at line 412 of file LLMChatTemplates.cs.

◆ GetName()

override string LLMUnity.VicunaTemplate.GetName ( )
inlinevirtual

Returns the chat template name.

Reimplemented from LLMUnity.ChatTemplate.

Definition at line 411 of file LLMChatTemplates.cs.

◆ GetNameMatches()

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

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

Reimplemented from LLMUnity.ChatTemplate.

Definition at line 413 of file LLMChatTemplates.cs.

◆ GetStop()

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

Returns an array of the stopwords used by the template.

Reimplemented from LLMUnity.ChatTemplate.

Definition at line 421 of file LLMChatTemplates.cs.


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