Allow arguments to be passed to the prompt when calling AskAsync #617
Replies: 3 comments
-
Haven't tried this, but have you considered to use SemanticKernel and KernelMemory as Plugin? that way, you can configure your Prompt as you say, and the facts section would be replaced by a call to the KM plugin. |
Beta Was this translation helpful? Give feedback.
-
This is an interesting suggestion. I will give a try, thank you |
Beta Was this translation helpful? Give feedback.
-
The prompt content can now be fully customized both with config and at runtime during a request, see #673 for details and examples. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Context / Scenario
I would like to be able to pass parameters to a custom prompt when calling the
AskAsync
method.For example:
I want to conditionally instruct the LLM to automatically translate the response to a specific language that is selected by the user at runtime.
The problem
Cannot pass arguments to a customized prompt when asking.
Proposed solution
Lets say I add a custom prompt provider as shown here that has the following prompt:
I would like to be able to pass a
Dictionary<string,string>
with arguments to theAskAsync
method that contains thetranslateLanguage
argument, for exampleImportance
would be great to have
Beta Was this translation helpful? Give feedback.
All reactions