File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,6 @@ public class LLM : MonoBehaviour
90
90
public string lora = "" ;
91
91
92
92
/// \cond HIDE
93
- public LLMManager llmManager = new LLMManager ( ) ;
94
93
95
94
IntPtr LLMObject = IntPtr . Zero ;
96
95
List < LLMCharacter > clients = new List < LLMCharacter > ( ) ;
@@ -102,6 +101,9 @@ public class LLM : MonoBehaviour
102
101
/// \endcond
103
102
104
103
#if UNITY_EDITOR
104
+
105
+ public LLMManager llmManager = new LLMManager ( ) ;
106
+
105
107
public LLM ( )
106
108
{
107
109
LLMManager . Register ( this ) ;
@@ -171,7 +173,11 @@ protected virtual string GetLlamaccpArguments()
171
173
LLMUnitySetup . LogError ( "No model file provided!" ) ;
172
174
return null ;
173
175
}
176
+ #if UNITY_EDITOR
177
+ string modelPath = LLMManager . Get ( model ) . path ;
178
+ #else
174
179
string modelPath = LLMUnitySetup . GetAssetPath ( model ) ;
180
+ #endif
175
181
if ( ! File . Exists ( modelPath ) )
176
182
{
177
183
LLMUnitySetup . LogError ( $ "File { modelPath } not found!") ;
@@ -180,7 +186,11 @@ protected virtual string GetLlamaccpArguments()
180
186
string loraPath = "" ;
181
187
if ( lora != "" )
182
188
{
189
+ #if UNITY_EDITOR
190
+ loraPath = LLMManager . Get ( lora ) . path ;
191
+ #else
183
192
loraPath = LLMUnitySetup . GetAssetPath ( lora ) ;
193
+ #endif
184
194
if ( ! File . Exists ( loraPath ) )
185
195
{
186
196
LLMUnitySetup . LogError ( $ "File { loraPath } not found!") ;
You can’t perform that action at this time.
0 commit comments