You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
I am using Visual Studio 2022 along with .NET 6, and I've integrated LLamaSharp and Backend.Cpu version 0.5.1 into my console project via NuGet. I've also copied the provided example code.
However, I've encountered a compiler error, and I'm not sure about what's causing this issue. Here is the error message. I don't see any other errors.
Error CS0246 The type or namespace name 'LLamaModel' could not be found (are you missing a using directive or an assembly reference?) LLamaConsole
using LLama.Common;
using LLama;
string modelPath = @"C:\Projects\LLamaSharp\ConsoleApp1\model\wizardLM-7B.ggmlv3.q4_1.bin";
var prompt = "Transcript of a dialog"; // use the "chat-with-bob" prompt here.
// Initialize a chat session
var ex = new InteractiveExecutor(new LLamaModel(new ModelParams(modelPath, contextSize: 1024, seed: 1337, gpuLayerCount: 5)));
ChatSession session = new ChatSession(ex);
// show the prompt
Console.WriteLine();
Console.Write(prompt);
// run the inference in a loop to chat with LLM
while (prompt != "stop")
{
foreach (var text in session.Chat(prompt, new InferenceParams() { Temperature = 0.6f, AntiPrompts = new List { "User:" } }))
{
Console.Write(text);
}
prompt = Console.ReadLine();
}
// save the session
session.SaveSession("SavedSessionPath");
The text was updated successfully, but these errors were encountered:
Thank you for your help! The example is functioning as expected. I found the old example on the LLamaSharp project page. https://github.com/SciSharp/LLamaSharp (Usages)
Hello!
I am using Visual Studio 2022 along with .NET 6, and I've integrated LLamaSharp and Backend.Cpu version 0.5.1 into my console project via NuGet. I've also copied the provided example code.
However, I've encountered a compiler error, and I'm not sure about what's causing this issue. Here is the error message. I don't see any other errors.
Error CS0246 The type or namespace name 'LLamaModel' could not be found (are you missing a using directive or an assembly reference?) LLamaConsole
using LLama.Common;
using LLama;
string modelPath = @"C:\Projects\LLamaSharp\ConsoleApp1\model\wizardLM-7B.ggmlv3.q4_1.bin";
var prompt = "Transcript of a dialog"; // use the "chat-with-bob" prompt here.
// Initialize a chat session
var ex = new InteractiveExecutor(new LLamaModel(new ModelParams(modelPath, contextSize: 1024, seed: 1337, gpuLayerCount: 5)));
ChatSession session = new ChatSession(ex);
// show the prompt
Console.WriteLine();
Console.Write(prompt);
// run the inference in a loop to chat with LLM
while (prompt != "stop")
{
foreach (var text in session.Chat(prompt, new InferenceParams() { Temperature = 0.6f, AntiPrompts = new List { "User:" } }))
{
Console.Write(text);
}
prompt = Console.ReadLine();
}
// save the session
session.SaveSession("SavedSessionPath");
The text was updated successfully, but these errors were encountered: