Skip to content

Commit

Permalink
expand prompt change tests
Browse files Browse the repository at this point in the history
  • Loading branch information
amakropoulos committed Mar 13, 2024
1 parent 55cc2b3 commit 4b2ea20
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions Tests/Runtime/TestLLM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,13 @@ public async Task RunTests()
TestInitParameters((await llm.Tokenize(prompt)).Count, 1);
TestWarmup();
await llm.Chat("How can I increase my meme production/output? Currently, I only create them in ancient babylonian which is time consuming.", TestChat);
TestPostChat();
TestPostChat(3);
llm.SetPrompt(llm.prompt);
llm.AIName = "False response";
await llm.Chat("How can I increase my meme production/output? Currently, I only create them in ancient babylonian which is time consuming.", TestChat2);
TestPostChat(3);
await llm.Chat("bye!");
TestPostChat(5);
prompt = "How are you?";
llm.SetPrompt(prompt);
await llm.Chat("hi");
Expand Down Expand Up @@ -142,9 +148,15 @@ public void TestChat(string reply)
Assert.That(reply.Trim() == AIReply);
}

public void TestPostChat()
public void TestChat2(string reply)
{
Assert.That(llm.GetChat().Count == 3);
string AIReply = "One possible solution is to use a more advanced natural language processing library like NLTK or sp";
Assert.That(reply.Trim() == AIReply);
}

public void TestPostChat(int num)
{
Assert.That(llm.GetChat().Count == num);
}
}
}

0 comments on commit 4b2ea20

Please sign in to comment.