LLM for Unity  v2.3.0
Create characters in Unity with LLMs!
Loading...
Searching...
No Matches
LLMEmbedder.cs
Go to the documentation of this file.
1
3using UnityEngine;
4
5namespace LLMUnity
6{
7 [DefaultExecutionOrder(-2)]
12 public class LLMEmbedder : LLMCaller
13 {
14 protected override void SetLLM(LLM llmSet)
15 {
16 base.SetLLM(llmSet);
17 if (llmSet != null && !llmSet.embeddingsOnly)
18 {
19 LLMUnitySetup.LogWarning($"The LLM {llmSet.name} set for LLMEmbeddings {gameObject.name} is not an embeddings-only model, accuracy may be sub-optimal");
20 }
21 }
22
23 public override bool IsAutoAssignableLLM(LLM llmSet)
24 {
25 return llmSet.embeddingsOnly;
26 }
27 }
28}
Class implementing calling of LLM functions (local and remote).
Definition LLMCaller.cs:17
Class implementing the LLM embedder.
override bool IsAutoAssignableLLM(LLM llmSet)
Checks if a LLM can be auto-assigned if the LLM of the LLMCaller is null.
Class implementing helper functions for setup and process management.
Class implementing the LLM server.
Definition LLM.cs:19