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

Class implementing a LLM model entry. More...

Public Member Functions

 ModelEntry (string path, bool lora=false, string label=null, string url=null)
 Constructs a LLM model entry.
 
ModelEntry OnlyRequiredFields ()
 Returns only the required fields for bundling the model in the build.
 

Static Public Member Functions

static string GetFilenameOrRelativeAssetPath (string path)
 Returns the relative asset path if it is in the AssetPath folder (StreamingAssets or persistentPath), otherwise the filename.
 

Public Attributes

string label
 
string filename
 
string path
 
bool lora
 
string chatTemplate
 
string url
 
bool embeddingOnly
 
int embeddingLength
 
bool includeInBuild
 
int contextLength
 

Detailed Description

Class implementing a LLM model entry.

Definition at line 17 of file LLMManager.cs.

Constructor & Destructor Documentation

◆ ModelEntry()

LLMUnity.ModelEntry.ModelEntry ( string path,
bool lora = false,
string label = null,
string url = null )
inline

Constructs a LLM model entry.

Parameters
pathmodel path
loraif it is a LORA or LLM
labellabel to show in the model manager in the Editor
urlmodel url

Definition at line 55 of file LLMManager.cs.

Member Function Documentation

◆ GetFilenameOrRelativeAssetPath()

static string LLMUnity.ModelEntry.GetFilenameOrRelativeAssetPath ( string path)
inlinestatic

Returns the relative asset path if it is in the AssetPath folder (StreamingAssets or persistentPath), otherwise the filename.

Parameters
pathasset path
Returns
relative asset path or filename

Definition at line 37 of file LLMManager.cs.

◆ OnlyRequiredFields()

ModelEntry LLMUnity.ModelEntry.OnlyRequiredFields ( )
inline

Returns only the required fields for bundling the model in the build.

Returns
Adapted model entry

Definition at line 85 of file LLMManager.cs.

Member Data Documentation

◆ chatTemplate

string LLMUnity.ModelEntry.chatTemplate

Definition at line 23 of file LLMManager.cs.

◆ contextLength

int LLMUnity.ModelEntry.contextLength

Definition at line 28 of file LLMManager.cs.

◆ embeddingLength

int LLMUnity.ModelEntry.embeddingLength

Definition at line 26 of file LLMManager.cs.

◆ embeddingOnly

bool LLMUnity.ModelEntry.embeddingOnly

Definition at line 25 of file LLMManager.cs.

◆ filename

string LLMUnity.ModelEntry.filename

Definition at line 20 of file LLMManager.cs.

◆ includeInBuild

bool LLMUnity.ModelEntry.includeInBuild

Definition at line 27 of file LLMManager.cs.

◆ label

string LLMUnity.ModelEntry.label

Definition at line 19 of file LLMManager.cs.

◆ lora

bool LLMUnity.ModelEntry.lora

Definition at line 22 of file LLMManager.cs.

◆ path

string LLMUnity.ModelEntry.path

Definition at line 21 of file LLMManager.cs.

◆ url

string LLMUnity.ModelEntry.url

Definition at line 24 of file LLMManager.cs.


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