.Net: When the importPluginFromPromptDirectory Function fails in finding or validating the file content, the exception is not clear enough or none at all.
When the importPluginFromPromptDiretory Function fails in finding or validating the file content, the exception is not clear enough or none at all. for example, when skprompt.txt or config.json files are not properly formatted, sometimes there is no exception being thrown and the function is simply not loaded. It would be great to have a warning or an exception being thrown stating the issue happening and on what file this is happening. It would be great to raise a warning that no functions/plugins have been loaded, along the path used.
on another side, the following syntax throws a not so clear exception: error "Microsoft.SemanticKernel.KernelException: 'Tokens must be separated by one space least'"
For example, in skprompt.txt with: User Input Format: {{ ""request"": ""{request}"" }} raises the "Tokens must be separated..."
Changing it to the following works User Input Format: {{ ""Request"": {{$input}} }}
Suggestion:
- raise clear exception/warning when parsing-validating prompt and configuration files, including yaml.
- improve the "tokens must be separated error" ideally pointing to the root cause.
Thank you for logging this. Here's a screenshot of this issue
Further, if the prompt uses double curly brackets, it appears that SK starts looking at it as a function name itself. So for example if I define the output format to be something like
Instructions
Provide the city name from the input using the following format:
{{ ""city"": {{CityName}} }}
the kernel.InvokeAsync raises an error "System.Collections.Generic.KeyNotFoundException: 'The plugin collection does not contain a plugin and/or function with the specified names. Plugin name - '', function name - 'CityName'.'"
Here's a screenshot of this error
Thank you
This issue is stale because it has been open for 90 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.