Closed Barshan-Mandal closed 2 weeks ago
Hi @Barshan-Mandal, can you provide a basic sample showing how we can reproduce this issue? Thanks.
Hi @Barshan-Mandal, can you provide a basic sample showing how we can reproduce this issue? Thanks.
` var modelPath = @"F:\HuggingFace Models\Phi-3-Vision\cpu-int4-rtn-block-32-acc-level-4"; string modelId = "microsoft/Phi-3-vision-128k-instruct"; string bge = @"F:\OnnxModels\bge-micro-v2\model.onnx"; string vocab = @"F:\OnnxModels\bge-micro-v2\vocab.txt";
// Load the model and services var builder = Kernel.CreateBuilder(); builder.AddOnnxRuntimeGenAIChatCompletion(modelId, modelPath); // builder.AddLocalTextEmbeddingGeneration(); builder.AddBertOnnxTextEmbeddingGeneration(bge, vocab);
// Build Kernel var kernel = builder.Build();
// Create services such as chatCompletionService and embeddingGeneration
var chatCompletionService = kernel.GetRequiredService
// Setup a memory store and create a memory out of it var memoryStore = new VolatileMemoryStore(); var memory = new SemanticTextMemory(memoryStore, embeddingGenerator); var planner = new HandlebarsPlanner(plannerOptions); var plan = await planner.CreatePlanAsync(kernel, "get the current date and time");`
Hi @Barshan-Mandal we haven't tested the Handlebars Planner with the ONNX AI connector. We have focussed on OpenAI and Azure OpenAI.
But we have decided to stop work on the Handlebars and Stepwise planners in favour of using code interpreter and function calling. The following Blog post explains our strategy: https://devblogs.microsoft.com/semantic-kernel/the-future-of-planners-in-semantic-kernel/
So our advise is to investigate the alternatives proposed in the Blog post. We're also happy to get any feedback you have on ONNX as we plan to graduate the connector later this year.
var plan = await planner.CreatePlanAsync(kernel, "get the current date and time");
throws the error below: