Skip to content

Commit

Permalink
Merge pull request #942 from martindevans/fix_build_fail
Browse files Browse the repository at this point in the history
Fixed build failure after merging binary update
  • Loading branch information
martindevans authored Oct 7, 2024
2 parents 3483a59 + 06fab4b commit 4e32191
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions LLama.Examples/Examples/LLama2ChatSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@ public static async Task Run()
var modelPath = UserSettings.GetModelPath();
var parameters = new ModelParams(modelPath)
{
Seed = 1337,
GpuLayerCount = 10
};

using var model = LLamaWeights.LoadFromFile(parameters);
using var context = model.CreateContext(parameters);
var executor = new InteractiveExecutor(context);

var chatHistoryJson = File.ReadAllText("Assets/chat-with-bob.json");
var chatHistoryJson = await File.ReadAllTextAsync("Assets/chat-with-bob.json");
var chatHistory = ChatHistory.FromJson(chatHistoryJson) ?? new ChatHistory();

ChatSession session = new(executor, chatHistory);
Expand Down

0 comments on commit 4e32191

Please sign in to comment.