Skip to content

Commit 0dd5faf

Browse files
committed
update Linux tests
1 parent b703a34 commit 0dd5faf

1 file changed

Lines changed: 14 additions & 15 deletions

File tree

Tests/Editor/TestLLM.cs

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ public virtual void SetParameters()
170170
}
171171
else
172172
{
173-
reply1 = "Sure! Here's a fun fact: Ants work together to build complex structures like nests, which is a fascinating example of teamwork.";
174-
reply2 = "Of course! Ants are the most intelligent insects on Earth—working in perfect harmony to build their homes and solve problems.";
173+
reply1 = "Sure! Here's a fun fact: Ants are among the most common insects, often found in human homes, and they play an important role in soil fertility by breaking down organic matter.";
174+
reply2 = "Of course! Here's a fun fact: Ants are among the most common insects, often found in human homes, and they play an important role in soil fertility by breaking down organic matter.";
175175
}
176176
tokens1 = 20;
177177
tokens2 = 9;
@@ -531,21 +531,18 @@ public void TestSave()
531531
{
532532
string savePath = llmAgent.GetSavePath();
533533
Assert.That(File.Exists(savePath));
534-
string json = File.ReadAllText(savePath);
534+
535+
llmAgent.chat = new List<LLMUnity.ChatMessage>();
536+
Assert.AreEqual(llmAgent.chat.Count, 0);
537+
538+
llmAgent.LoadHistory();
535539
File.Delete(savePath);
536540

537-
List<ChatMessage> chatHistory = JsonUtility.FromJson<ChatListWrapper>("{ \"chat\": " + json + " }").chat;
541+
List<LLMUnity.ChatMessage> chatHistory = llmAgent.chat;
538542
Assert.AreEqual(chatHistory.Count, 2);
539543
Assert.AreEqual(chatHistory[0].role, "user");
540544
Assert.AreEqual(chatHistory[0].content, "bye!");
541545
Assert.AreEqual(chatHistory[1].role, "assistant");
542-
543-
Assert.AreEqual(llmAgent.chat.Count, chatHistory.Count);
544-
for (int i = 0; i < chatHistory.Count; i++)
545-
{
546-
Assert.AreEqual(chatHistory[i].role, llmAgent.chat[i].role);
547-
Assert.AreEqual(chatHistory[i].content, llmAgent.chat[i].content);
548-
}
549546
}
550547
}
551548

@@ -567,7 +564,8 @@ public override void SetParameters()
567564
}
568565
else
569566
{
570-
reply2 = "Of course! \"Ants are the most intelligent insects on Earth—working in perfect harmony to build their homes and solve problems.\"";
567+
reply1 = "Ants are known for their ability to build complex structures, such as hexagons, which is a key feature of their social behavior.";
568+
reply2 = "Of course! Ants are so sneaky and clever that they can even build intricate nests with just a few minutes of effort—no matter where you start!";
571569
}
572570
}
573571

@@ -591,7 +589,8 @@ public override void SetParameters()
591589
}
592590
else
593591
{
594-
reply2 = "Of course! \"Ants are the most intelligent insects on Earth—working in perfect harmony to build their homes and solve problems.\"";
592+
reply1 = "Ants are known for their ability to build complex structures, such as hexagons, which is a key feature of their social behavior.";
593+
reply2 = "Sure! \"Ants are the most intelligent insects on Earth—using simple tools and communication to build complex structures like hexagons.\"";
595594
}
596595
}
597596

@@ -621,8 +620,8 @@ public override void SetParameters()
621620
}
622621
else
623622
{
624-
reply1 = "Sure! Here's a fun fact: Ants work together to build complex structures like nests, even though they don't have a brain.";
625-
reply2 = "Of course! \"Ants are so smart—well, they’re all just tiny ants!\" — a joke that highlights their incredible teamwork and adaptability.";
623+
reply1 = "Sure! Here's a fun fact: Ants are among the most common insects, often found in human homes or gardens.";
624+
reply2 = "Of course! \"Ants are so sneaky and efficient that they can even build a tiny house!\" — a smart-ass comment with a twist on their behavior.";
626625
}
627626
}
628627
}

0 commit comments

Comments
 (0)