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

Class representing the LORA manager allowing to convert and retrieve LORA assets to string (for serialisation) More...

Public Member Functions

void Clear ()
 Clears the LORA assets.
 
int IndexOf (string path)
 Searches for a LORA based on the path.
 
bool Contains (string path)
 Checks if the provided LORA based on a path exists already in the LORA manager.
 
void Add (string path, float weight=1)
 Adds a LORA with the defined weight.
 
void Remove (string path)
 Removes a LORA based on its path.
 
void SetWeight (string path, float weight)
 Modifies the weight of a LORA.
 
void FromStrings (string loraString, string loraWeightsString)
 Converts strings with the lora paths and weights to entries in the LORA manager.
 
string ToStrings ()
 
float[] GetWeights ()
 Gets the weights of the LORAs in the manager.
 
string[] GetLoras ()
 Gets the paths of the LORAs in the manager.
 

Public Attributes

string delimiter = ","
 
 string
 Converts the entries of the LORA manager to strings with the lora paths and weights.
 

Detailed Description

Class representing the LORA manager allowing to convert and retrieve LORA assets to string (for serialisation)

Definition at line 55 of file LLMUtils.cs.

Member Function Documentation

◆ Add()

void LLMUnity.LoraManager.Add ( string path,
float weight = 1 )
inline

Adds a LORA with the defined weight.

Parameters
pathLORA path
weightLORA weight

Definition at line 99 of file LLMUtils.cs.

◆ Clear()

void LLMUnity.LoraManager.Clear ( )
inline

Clears the LORA assets.

Definition at line 63 of file LLMUtils.cs.

◆ Contains()

bool LLMUnity.LoraManager.Contains ( string path)
inline

Checks if the provided LORA based on a path exists already in the LORA manager.

Parameters
pathLORA path
Returns
whether the LORA manager contains the LORA

Definition at line 89 of file LLMUtils.cs.

◆ FromStrings()

void LLMUnity.LoraManager.FromStrings ( string loraString,
string loraWeightsString )
inline

Converts strings with the lora paths and weights to entries in the LORA manager.

Parameters
loraStringlora paths
loraWeightsStringlora weights

Definition at line 136 of file LLMUtils.cs.

◆ GetLoras()

string[] LLMUnity.LoraManager.GetLoras ( )
inline

Gets the paths of the LORAs in the manager.

Returns
LORA paths

Definition at line 196 of file LLMUtils.cs.

◆ GetWeights()

float[] LLMUnity.LoraManager.GetWeights ( )
inline

Gets the weights of the LORAs in the manager.

Returns
LORA weights

Definition at line 185 of file LLMUtils.cs.

◆ IndexOf()

int LLMUnity.LoraManager.IndexOf ( string path)
inline

Searches for a LORA based on the path.

Parameters
pathLORA path
Returns
LORA index

Definition at line 73 of file LLMUtils.cs.

◆ Remove()

void LLMUnity.LoraManager.Remove ( string path)
inline

Removes a LORA based on its path.

Parameters
pathLORA path

Definition at line 109 of file LLMUtils.cs.

◆ SetWeight()

void LLMUnity.LoraManager.SetWeight ( string path,
float weight )
inline

Modifies the weight of a LORA.

Parameters
pathLORA path
weightLORA weight

Definition at line 120 of file LLMUtils.cs.

◆ ToStrings()

string LLMUnity.LoraManager.ToStrings ( )
inline

Definition at line 164 of file LLMUtils.cs.

Member Data Documentation

◆ delimiter

string LLMUnity.LoraManager.delimiter = ","

Definition at line 58 of file LLMUtils.cs.

◆ string

LLMUnity.LoraManager.string

Converts the entries of the LORA manager to strings with the lora paths and weights.

Returns
strings with the lora paths and weights

Definition at line 164 of file LLMUtils.cs.


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