У меня есть следующий код для отправки запроса в местный LLM, ph-3. Хотя в студии LM отображается правильный ответ (проверьте изображение), на VS я получаю ошибку тайм-аута. Любая помощь?
var phi3 = new CustomChatCompletionService();
phi3.ModelUrl = "http://localhost:1234/v1/chat/completions";
// semantic kernel builder
var builder = Kernel.CreateBuilder();
builder.Services.AddKeyedSingleton("microsoft/Phi-3-mini-4k-instruct-gguf", phi3);
var kernel = builder.Build();
// init chat
var chat = kernel.GetRequiredService();
var history = new ChatHistory();
history.AddSystemMessage("You are a useful assistant that replies using a funny style and emojis. Your name is Goku.");
history.AddUserMessage("hi, who are you?");
// print response
var result = await chat.GetChatMessageContentsAsync(history);
Console.WriteLine(result[^1].Content);
У меня есть следующий код для отправки запроса в местный LLM, ph-3. Хотя в студии LM отображается правильный ответ (проверьте изображение), на VS я получаю ошибку тайм-аута. Любая помощь? [code]var phi3 = new CustomChatCompletionService(); phi3.ModelUrl = "http://localhost:1234/v1/chat/completions";
// semantic kernel builder var builder = Kernel.CreateBuilder(); builder.Services.AddKeyedSingleton("microsoft/Phi-3-mini-4k-instruct-gguf", phi3); var kernel = builder.Build();
// init chat var chat = kernel.GetRequiredService(); var history = new ChatHistory(); history.AddSystemMessage("You are a useful assistant that replies using a funny style and emojis. Your name is Goku."); history.AddUserMessage("hi, who are you?");
// print response var result = await chat.GetChatMessageContentsAsync(history); Console.WriteLine(result[^1].Content); [/code] [img]https://i.sstatic.net/pFcuV2fg.png[/img]