File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 7
7
using System . Collections ;
8
8
using UnityEngine . TestTools ;
9
9
using System . IO ;
10
+ using NUnit . Framework . Internal ;
10
11
11
12
namespace LLMUnityTests
12
13
{
@@ -86,6 +87,8 @@ public virtual async Task RunTests()
86
87
llmCharacter . SetPrompt ( prompt ) ;
87
88
await llmCharacter . Chat ( "hi" ) ;
88
89
TestInitParameters ( ( await llmCharacter . Tokenize ( prompt ) ) . Count + 2 , 3 ) ;
90
+ List < float > embeddings = await llmCharacter . Embeddings ( "hi how are you?" ) ;
91
+ TestEmbeddings ( embeddings ) ;
89
92
llm . OnDestroy ( ) ;
90
93
}
91
94
catch ( Exception e )
@@ -126,7 +129,7 @@ public void TestWarmup()
126
129
127
130
public void TestChat ( string reply )
128
131
{
129
- string AIReply = "To increase your meme production/output, you can consider the following: \n 1. Use " ;
132
+ string AIReply = "One way to increase your meme production/output is by creating a more complex and customized " ;
130
133
Assert . That ( reply . Trim ( ) == AIReply ) ;
131
134
}
132
135
@@ -141,6 +144,11 @@ public void TestPostChat(int num)
141
144
Assert . That ( llmCharacter . chat . Count == num ) ;
142
145
}
143
146
147
+ public void TestEmbeddings ( List < float > embeddings )
148
+ {
149
+ Assert . That ( embeddings . Count == 1024 ) ;
150
+ }
151
+
144
152
public virtual void OnDestroy ( )
145
153
{
146
154
LLMManager . Remove ( filename ) ;
You can’t perform that action at this time.
0 commit comments