MicrosoftDocs / semantic-kernel-docs

Semantic Kernel (SK) is a lightweight SDK enabling integration of AI Large Language Models (LLMs) with conventional programming languages.
MIT License
181 stars 104 forks source link

Can I pass more than one variable to a plugin call when using the prompt template syntax? #65

Closed Cotspheer closed 9 months ago

Cotspheer commented 10 months ago

It is unclear from the docs if I can pass only a default parameter "input" or if I can pass additionally variables if I know the plugin accepts those. prompt-template-syntax#function-parameters. For example I have a plugin that accepts a mandatory input and can accept additional metadata treated differently. Am I able to call the plugin like this:

The weather today in {{$city}} is {{weather.getForecast $city $temperatureUnit}}.

where temperatureUnit can be Fahrenheit or Celsius.

It would be good to clarify that behavior and if it is possible to add another example.

EDIT: According to multiple-parameters it seems to be supported in code but it isn't clear for the template syntax.

trt commented 10 months ago

Hi @Cotspheer, I agree it's not straightforward from docs how to handle multiple parameters. I think this docs section might help you a bit.

Cotspheer commented 9 months ago

Syntax changed with handlebars templates, closing therefore my issue.