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

Class implementing the LLM embedder. More...

Inheritance diagram for LLMUnity.LLMEmbedder:
[legend]

Public Member Functions

override bool IsAutoAssignableLLM (LLM llmSet)
 Checks if a LLM can be auto-assigned if the LLM of the LLMCaller is null.
 
- Public Member Functions inherited from LLMUnity.LLMCaller
virtual void Awake ()
 The Unity Awake function that initializes the state before the application starts. The following actions are executed:
 
virtual bool IsValidLLM (LLM llmSet)
 Checks if a LLM is valid for the LLMCaller.
 
virtual void CancelRequests ()
 Cancel the ongoing requests e.g. Chat, Complete.
 
virtual async Task< List< int > > Tokenize (string query, Callback< List< int > > callback=null)
 Tokenises the provided query.
 
virtual async Task< string > Detokenize (List< int > tokens, Callback< string > callback=null)
 Detokenises the provided tokens to a string.
 
virtual async Task< List< float > > Embeddings (string query, Callback< List< float > > callback=null)
 Computes the embeddings of the provided input.
 

Additional Inherited Members

- Public Attributes inherited from LLMUnity.LLMCaller
bool advancedOptions = false
 toggle to show/hide advanced options in the GameObject
 
bool remote = false
 toggle to use remote LLM server or local LLM
 
string APIKey
 allows to use a server with API key
 
string host = "localhost"
 host to use for the LLM server
 
int port = 13333
 port to use for the LLM server
 
int numRetries = 10
 number of retries to use for the LLM server requests (-1 = infinite)
 
- Properties inherited from LLMUnity.LLMCaller
LLM llm [get, set]
 

Detailed Description

Class implementing the LLM embedder.

Definition at line 12 of file LLMEmbedder.cs.

Member Function Documentation

◆ IsAutoAssignableLLM()

override bool LLMUnity.LLMEmbedder.IsAutoAssignableLLM ( LLM llmSet)
inlinevirtual

Checks if a LLM can be auto-assigned if the LLM of the LLMCaller is null.

<param name="llmSet"LLM object>

Returns
bool specifying whether the LLM can be auto-assigned

Reimplemented from LLMUnity.LLMCaller.

Definition at line 23 of file LLMEmbedder.cs.


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