Closed sheng-jie closed 1 year ago
To fix the issue with the incorrect server URL, you need to update the planner.CreatePlanAsync method call with the correct URL for the Klarna skill. Here's the updated code:
var originalPlan = await planner.CreatePlanAsync("I want to buy a laptop and my budget is 200 dollars", skill["productsUsingGET"]); Make sure to include the skill["productsUsingGET"] parameter in the planner.CreatePlanAsync method call to specify the skill to be used for the plan.
Additionally, you need to update the server_url named parameter in the named_parameters list of the first step in the plan to use the correct Klarna server URL. Here's the updated code snippet:
var originalPlan = await planner.CreatePlanAsync("I want to buy a laptop and my budget is 200 dollars"); originalPlan.Steps[0].NamedParameters.First(p => p.Key == "server_url").Value = "https://www.klarna.com/us/shopping"; After these updates, the code should execute correctly, and the plan and response should reflect the desired behavior.
I modified Example21_ChatGPTPlugins.cs in local to run with planner, got unexpected results.
The results as follows:
We can see that the generated plan is wrong, the
server_url
is not correct, it should behttps://www.klarna.com/us/shopping
.