Browse Source

Fixed example code in readme

tags/v0.10.0
Martin Evans 2 years ago
parent
commit
b68bc3548d
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      README.md

+ 2
- 2
README.md View File

@@ -116,11 +116,11 @@ Console.Write(prompt);
// run the inference in a loop to chat with LLM
while (prompt != "stop")
{
await foreach (var text in session.ChatAsync(prompt, new InferenceParams() { Temperature = 0.6f, AntiPrompts = new List<string> { "User:" } }))
await foreach (var text in session.ChatAsync(new ChatHistory.Message(AuthorRole.User, prompt), new InferenceParams { Temperature = 0.6f, AntiPrompts = [ "User:" ] }))
{
Console.Write(text);
}
prompt = Console.ReadLine();
prompt = Console.ReadLine() ?? "";
}

// save the session


Loading…
Cancel
Save