You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by MaxiPigna May 2, 2024
I implemented a simple (Auto) Function Calling kernel.
var yamlPrompt = EmbeddedResource.Read("SomePrompt.yml");
var function = kernel.CreateFunctionFromPromptYaml(yamlPrompt, new HandlebarsPromptTemplateFactory());
var args = new KernelArguments(new OpenAIPromptExecutionSettings()
{
ToolCallBehavior = ToolCallBehavior.AutoInvokeKernelFunctions,
})
{
{ "history", chatHistory }
};
var chatResponse = await kernel.InvokeAsync(function, args, cancellationToken);
with this Yaml prompt
name: SomePrompt
template: |
Reply to user question.
Search on {{knowledgeType}} knowledge
Conversation:
{{#each history}}
<message role="{{role}}">{{content}}</message>
{{/each}}
template_format: handlebars
description: A function that replies to user questions.
input_variables:
- name: history
description: conversation history
is_required: true
- name: knowledgeType
description: type of knowledge that could be internal or external
is_required: true
output_variable:
description: Answer to question of the user
execution_settings:
default:
temperature: 0.1
Considering that knowledgeType is just an example, since is_required is true and I didn't provide the value in the kernel arguments, what is the expected behavior? Because, now it simply ignores it, so I don't understand what is the difference between is_required true and false. Thanks.
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
is_required property doesn't throw error if set to true and isn't passed in
Python: is_required property doesn't throw error if set to true and isn't passed in
May 13, 2024
@matthewbolanos when I am running this, I actually fail to render the handlebars prompt due to the missing knowledgeType argument. You're not seeing that error?
Discussed in #6103
Originally posted by MaxiPigna May 2, 2024
I implemented a simple (Auto) Function Calling kernel.
with this Yaml prompt
Considering that
knowledgeType
is just an example, sinceis_required
is true and I didn't provide the value in the kernel arguments, what is the expected behavior? Because, now it simply ignores it, so I don't understand what is the difference betweenis_required
true and false. Thanks.The text was updated successfully, but these errors were encountered: